[
https://issues.apache.org/jira/browse/SCM-603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17962214#comment-17962214
]
ASF GitHub Bot commented on SCM-603:
------------------------------------
jira-importer opened a new issue, #817:
URL: https://github.com/apache/maven-scm/issues/817
**[Fabien
Bousquet](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=fafanoulele)**
opened
**[SCM-603](https://issues.apache.org/jira/browse/SCM-603?redirect=false)** and
commented
I use blame command for Mercurial provider (HG) and there is this exception :
```
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)
```
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.
---
**Affects:** 1.3, 1.4
**Attachments:**
-
[HG_blame_command.patch](https://issues.apache.org/jira/secure/attachment/12718565/HG_blame_command.patch)
(_1.19 kB_)
> Blame command for Mercurial (HG) is partial
> -------------------------------------------
>
> Key: SCM-603
> URL: https://issues.apache.org/jira/browse/SCM-603
> Project: Maven SCM (Moved to GitHub Issues)
> Issue Type: Bug
> Components: maven-scm-provider-mercurial (hg)
> Affects Versions: 1.3, 1.4
> Reporter: Fabien Bousquet
> Assignee: Olivier Lamy
> Priority: Major
> Fix For: 1.5
>
> 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 was sent by Atlassian Jira
(v8.20.10#820010)