maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mper...@apache.org
Subject svn commit: r391377 - in /maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src: main/java/org/apache/maven/scm/provider/perforce/command/checkin/ test/java/org/apache/maven/scm/provider/perforce/command/checkin/ test/resources/perforce/
Date Tue, 04 Apr 2006 17:56:38 GMT
Author: mperham
Date: Tue Apr  4 10:56:36 2006
New Revision: 391377

URL: http://svn.apache.org/viewcvs?rev=391377&view=rev
Log:
PR: SCM-181
Handle Perforce changelist renumbering

Added:
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/test/resources/perforce/checkin_gooder.txt
  (with props)
Modified:
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/checkin/PerforceCheckInConsumer.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/test/java/org/apache/maven/scm/provider/perforce/command/checkin/PerforceCheckInConsumerTest.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/test/resources/perforce/checkin_good.txt

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/checkin/PerforceCheckInConsumer.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/checkin/PerforceCheckInConsumer.java?rev=391377&r1=391376&r2=391377&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/checkin/PerforceCheckInConsumer.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/checkin/PerforceCheckInConsumer.java
Tue Apr  4 10:56:36 2006
@@ -39,7 +39,10 @@
 
     private static final String OP_PATTERN = "^[a-z]+ //[^#]+#\\d+$";
 
-    private static final String COMPLETE_PATTERN = "^Change \\d+ submitted.$";
+    // SCM-181 Two possible messages:
+    // "Change 94821 renamed change 94823 and submitted."
+    // "Change 94821 submitted."
+    private static final String COMPLETE_PATTERN = "^Change \\d+ .*submitted.$";
 
     public static final int STATE_CREATED = 1;
 

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/test/java/org/apache/maven/scm/provider/perforce/command/checkin/PerforceCheckInConsumerTest.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/test/java/org/apache/maven/scm/provider/perforce/command/checkin/PerforceCheckInConsumerTest.java?rev=391377&r1=391376&r2=391377&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/test/java/org/apache/maven/scm/provider/perforce/command/checkin/PerforceCheckInConsumerTest.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/test/java/org/apache/maven/scm/provider/perforce/command/checkin/PerforceCheckInConsumerTest.java
Tue Apr  4 10:56:36 2006
@@ -50,6 +50,26 @@
         assertEquals( "", consumer.getOutput() );
     }
 
+    public void testGooderParse()
+        throws Exception
+    {
+        File testFile = getTestFile( "src/test/resources/perforce/checkin_gooder.txt" );
+    
+        PerforceCheckInConsumer consumer = new PerforceCheckInConsumer();
+    
+        FileInputStream fis = new FileInputStream( testFile );
+        BufferedReader in = new BufferedReader( new InputStreamReader( fis ) );
+        String s = in.readLine();
+        while ( s != null )
+        {
+            consumer.consumeLine( s );
+            s = in.readLine();
+        }
+    
+        assertTrue( consumer.getOutput(), consumer.isSuccess() );
+        assertEquals( "", consumer.getOutput() );
+    }
+
     public void testBadParse()
         throws Exception
     {

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/test/resources/perforce/checkin_good.txt
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/test/resources/perforce/checkin_good.txt?rev=391377&r1=391376&r2=391377&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/test/resources/perforce/checkin_good.txt
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/test/resources/perforce/checkin_good.txt
Tue Apr  4 10:56:36 2006
@@ -2,4 +2,4 @@
 Submitting change 80835.
 Locking 1 files ...
 add //depot/modules/cordoba/runtime-ear/foo.xml#1
-Change 80835 submitted.
+Change 94821 renamed change 94823 and submitted.

Added: maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/test/resources/perforce/checkin_gooder.txt
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/test/resources/perforce/checkin_gooder.txt?rev=391377&view=auto
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/test/resources/perforce/checkin_gooder.txt
(added)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/test/resources/perforce/checkin_gooder.txt
Tue Apr  4 10:56:36 2006
@@ -0,0 +1,5 @@
+Change 80835 created with 1 open file(s).
+Submitting change 80835.
+Locking 1 files ...
+add //depot/modules/cordoba/runtime-ear/foo.xml#1
+Change 80835 submitted.

Propchange: maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/test/resources/perforce/checkin_gooder.txt
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message