maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1352832 - in /maven/scm/trunk/maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/command: HgCommandConstants.java changelog/HgChangeLogCommand.java changelog/HgChangeLogConsumer.java
Date Fri, 22 Jun 2012 10:22:26 GMT
Author: olamy
Date: Fri Jun 22 10:22:25 2012
New Revision: 1352832

URL: http://svn.apache.org/viewvc?rev=1352832&view=rev
Log:
[SCM-680] Changelog parse date fails
Submitted by Leonardo Bueno Postacchini

Modified:
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/command/HgCommandConstants.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/command/changelog/HgChangeLogCommand.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/command/changelog/HgChangeLogConsumer.java

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/command/HgCommandConstants.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/HgCommandConstants.java?rev=1352832&r1=1352831&r2=1352832&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/command/HgCommandConstants.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/command/HgCommandConstants.java
Fri Jun 22 10:22:25 2012
@@ -157,4 +157,12 @@ public final class HgCommandConstants
      */
     public static final String LIMIT_OPTION = "--limit";
 
+	/**
+	 * A template for the log output in order to decouple the date parsing from
+	 * system and java locale, also helps avoiding bug due changes on the
+	 * verbose format for log command.
+	 */
+	public static final String TEMPLATE_OPTION = "--template \"changeset:   {rev}:{node|short}\nbranch:
     {branch}\nuser:        {author}\ndate:        {date|isodatesec}\ntag:         {tags}\nfiles:
      {files}\ndescription:\n{desc}\n\n\"";
+
+
 }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/command/changelog/HgChangeLogCommand.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/changelog/HgChangeLogCommand.java?rev=1352832&r1=1352831&r2=1352832&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/command/changelog/HgChangeLogCommand.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/command/changelog/HgChangeLogCommand.java
Fri Jun 22 10:22:25 2012
@@ -125,7 +125,7 @@ public class HgChangeLogCommand
             revisionInterval.append( endVersion.getName() );
         }
 
-        String[] cmd = new String[]{ HgCommandConstants.LOG_CMD, HgCommandConstants.VERBOSE_OPTION,
+        String[] cmd = new String[]{ HgCommandConstants.LOG_CMD, HgCommandConstants.TEMPLATE_OPTION,
             HgCommandConstants.NO_MERGES_OPTION, HgCommandConstants.REVISION_OPTION, revisionInterval.toString()
};
         HgChangeLogConsumer consumer = new HgChangeLogConsumer( getLogger(), datePattern
);
         ScmResult result = HgUtils.execute( consumer, getLogger(), fileSet.getBasedir(),
cmd );

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/command/changelog/HgChangeLogConsumer.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/changelog/HgChangeLogConsumer.java?rev=1352832&r1=1352831&r2=1352832&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/command/changelog/HgChangeLogConsumer.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/command/changelog/HgChangeLogConsumer.java
Fri Jun 22 10:22:25 2012
@@ -38,7 +38,7 @@ public class HgChangeLogConsumer
     extends HgConsumer
 {
 
-    private static final String TIME_PATTERN = "EEE MMM dd HH:mm:ss yyyy Z";
+    private static final String TIME_PATTERN = "yyyy-MM-dd HH:mm:ss Z";
 
     private static final String REVNO_TAG = "changeset: ";
 



Mime
View raw message