Blame command for Mercurial (HG) is partial
-------------------------------------------
Key: SCM-603
URL: http://jira.codehaus.org/browse/SCM-603
Project: Maven SCM
Issue Type: Bug
Components: maven-scm-provider-mercurial (hg)
Affects Versions: 1.4, 1.3
Reporter: Fabien
Attachments: HG_blame_command.patch
I use blame command for Mercurial provider (HG) and there is this exception :
{code}
Caused by: org.codehaus.plexus.util.cli.CommandLineException: Error inside
systemOut parser
at
org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLine(CommandLineUtils.java:222)
at
org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLine(CommandLineUtils.java:107)
at org.apache.maven.scm.provider.hg.HgUtils.executeCmd(HgUtils.java:159)
... 13 more
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of
range: -1
at java.lang.String.substring(String.java:1768)
at
org.apache.maven.scm.provider.hg.command.blame.HgBlameConsumer.doConsume(HgBlameConsumer.java:49)
at
org.apache.maven.scm.provider.hg.command.HgConsumer.consumeLine(HgConsumer.java:131)
at
org.codehaus.plexus.util.cli.StreamPumper.consumeLine(StreamPumper.java:197)
at org.codehaus.plexus.util.cli.StreamPumper.run(StreamPumper.java:137)
{code}
This exception seems to launch when a line is empty in source file.
On version 1.3, blame is partial and no exception is launched.
I propose a patch to fix this problem.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira