maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1067536 - /maven/scm/trunk/maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/command/blame/HgBlameConsumer.java
Date Sat, 05 Feb 2011 22:08:57 GMT
Author: olamy
Date: Sat Feb  5 22:08:56 2011
New Revision: 1067536

URL: http://svn.apache.org/viewvc?rev=1067536&view=rev
Log:
[SCM-603] Blame command for Mercurial (HG) is partial

Modified:
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/command/blame/HgBlameConsumer.java

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/command/blame/HgBlameConsumer.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/command/blame/HgBlameConsumer.java?rev=1067536&r1=1067535&r2=1067536&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/command/blame/HgBlameConsumer.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/command/blame/HgBlameConsumer.java
Sat Feb  5 22:08:56 2011
@@ -49,7 +49,15 @@ public class HgBlameConsumer
     public void doConsume( ScmFileStatus status, String trimmedLine )
     {
         /* godin 0 Sun Jan 31 03:04:54 2010 +0300 */
-        String annotation = trimmedLine.substring( 0, trimmedLine.indexOf( ": " ) ).trim();
+        String annotation;
+        if(trimmedLine.indexOf(": ") > -1)
+        {
+         annotation = trimmedLine.substring(0, trimmedLine.indexOf(": ")).trim();
+        }
+        else
+        {
+          annotation = trimmedLine.substring(0, trimmedLine.lastIndexOf(":")).trim();
+        }
 
         String author = annotation.substring( 0, annotation.indexOf( ' ' ) );
         annotation = annotation.substring( annotation.indexOf( ' ' ) + 1 ).trim();



Mime
View raw message