maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1204846 - in /maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src: main/java/org/apache/maven/scm/provider/git/gitexe/command/changelog/ test/java/org/apache/maven/scm/provider/git/gitexe/command/chang...
Date Tue, 22 Nov 2011 07:55:52 GMT
Author: olamy
Date: Tue Nov 22 07:55:51 2011
New Revision: 1204846

URL: http://svn.apache.org/viewvc?rev=1204846&view=rev
Log:
[SCM-646] git parser should fill changeset revision
Submitted by Petr Kozelka.

Modified:
    maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/command/changelog/GitChangeLogConsumer.java
    maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/test/java/org/apache/maven/scm/provider/git/gitexe/command/changelog/GitChangeLogConsumerTest.java

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/command/changelog/GitChangeLogConsumer.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/command/changelog/GitChangeLogConsumer.java?rev=1204846&r1=1204845&r2=1204846&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/command/changelog/GitChangeLogConsumer.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/command/changelog/GitChangeLogConsumer.java
Tue Nov 22 07:55:51 2011
@@ -205,8 +205,8 @@ public class GitChangeLogConsumer
     /**
      * Process the current input line in the GET_HEADER state.  The
      * author, date, and the revision of the entry are gathered.  Note,
-     * Subversion does not have per-file revisions, instead, the entire
-     * repository is given a single revision number, which is used for
+     * Git does not have per-file revisions, instead, the entire
+     * branch is given a single revision number, which is also used for
      * the revision number of each file.
      *
      * @param line A line of text from the git log output
@@ -222,6 +222,8 @@ public class GitChangeLogConsumer
 
         currentChange = new ChangeSet();
 
+        currentChange.setRevision( currentRevision );
+
         status = STATUS_GET_AUTHOR;
     }
 

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/test/java/org/apache/maven/scm/provider/git/gitexe/command/changelog/GitChangeLogConsumerTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/test/java/org/apache/maven/scm/provider/git/gitexe/command/changelog/GitChangeLogConsumerTest.java?rev=1204846&r1=1204845&r2=1204846&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/test/java/org/apache/maven/scm/provider/git/gitexe/command/changelog/GitChangeLogConsumerTest.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/test/java/org/apache/maven/scm/provider/git/gitexe/command/changelog/GitChangeLogConsumerTest.java
Tue Nov 22 07:55:51 2011
@@ -79,6 +79,8 @@ public class GitChangeLogConsumerTest
 
             assertTrue( entry.getComment() != null && entry.getComment().length()
> 0 );
 
+            assertNotNull( entry.getRevision() );
+
             assertNotNull( entry.getFiles() );
             assertFalse( entry.getFiles().isEmpty() );
         }
@@ -93,6 +95,8 @@ public class GitChangeLogConsumerTest
 
         assertEquals( "2007-11-24 00:10:42 +0000", sdf.format( entry.getDate() ) );
 
+        assertEquals( "895d423689da3b36d8e9106c0ecbf3d62433978c", entry.getRevision() );
+
         assertEquals( "/ added", entry.getComment() );
 
         assertNotNull( entry.getFiles() );
@@ -129,6 +133,8 @@ public class GitChangeLogConsumerTest
 
             assertTrue( entry.getComment() != null && entry.getComment().length()
> 0 );
 
+            assertNotNull( entry.getRevision() );
+
             assertNotNull( entry.getFiles() );
             assertFalse( entry.getFiles().isEmpty() );
         }
@@ -145,6 +151,8 @@ public class GitChangeLogConsumerTest
 
         assertEquals( "2007-11-27 13:05:36 +0000", sdf.format( entry.getDate() ) );
 
+        assertEquals( "52733aa427041cafd760833cb068ffe897fd35db", entry.getRevision() );
+
         assertEquals( "fixed a GitCommandLineUtil and provice first version of the checkin
command.", entry
             .getComment() );
 



Mime
View raw message