Uploaded image for project: 'Maven SCM'
  1. Maven SCM
  2. SCM-603

Blame command for Mercurial (HG) is partial

    XMLWordPrintableJSON

Details

    • Patch

    Description

      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.

      Attachments

        1. HG_blame_command.patch
          1 kB
          Fabien Bousquet

        Activity

          People

            olamy Olivier Lamy
            fafanoulele Fabien Bousquet
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: