cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r810513 - /cxf/trunk/bin/DoMerges.java
Date Wed, 02 Sep 2009 14:12:20 GMT
Author: dkulp
Date: Wed Sep  2 14:12:20 2009
New Revision: 810513

URL: http://svn.apache.org/viewvc?rev=810513&view=rev
Log:
Update my merge scripty thing to do all the blocks in a batch at the end
to make it quicker

Modified:
    cxf/trunk/bin/DoMerges.java

Modified: cxf/trunk/bin/DoMerges.java
URL: http://svn.apache.org/viewvc/cxf/trunk/bin/DoMerges.java?rev=810513&r1=810512&r2=810513&view=diff
==============================================================================
--- cxf/trunk/bin/DoMerges.java (original)
+++ cxf/trunk/bin/DoMerges.java Wed Sep  2 14:12:20 2009
@@ -140,6 +140,7 @@
         System.out.println("Root: " + root);
         p.waitFor();
 
+        List<String> blocks = new ArrayList<String>();
 
         int count = 1;
         for (String ver : verList) {
@@ -188,29 +189,41 @@
                 doCommit();
                 break;
             case 'B':
-                p = Runtime.getRuntime().exec(getCommandLine(new String[] {"svnmerge.py",
"block", "-r", ver}));
-                reader = new BufferedReader(new InputStreamReader(p.getInputStream()));
+                blocks.add(ver);
+                break;
+            case 'I':
+                System.out.println("Ignoring");
+                break;
+            }
+        }
+
+        if (!blocks.isEmpty()) {
+            StringBuilder ver = new StringBuilder();
+            for (String s : blocks) {
+                if (ver.length() > 0) {
+                    ver.append(',');
+                }
+                ver.append(s);
+            }
+            System.out.println("Blocking " + ver);
+            p = Runtime.getRuntime().exec(getCommandLine(new String[] {"svnmerge.py", "block",
"-r", ver.toString()}));
+            reader = new BufferedReader(new InputStreamReader(p.getInputStream()));
+            line = reader.readLine();
+            while (line != null) {
+                System.out.println(line);
+                line = reader.readLine();
+            }
+            if (p.waitFor() != 0) {
+                System.out.println("ERROR!");
+                reader = new BufferedReader(new InputStreamReader(p.getErrorStream()));
                 line = reader.readLine();
                 while (line != null) {
                     System.out.println(line);
                     line = reader.readLine();
                 }
-                if (p.waitFor() != 0) {
-                    System.out.println("ERROR!");
-                    reader = new BufferedReader(new InputStreamReader(p.getErrorStream()));
-                    line = reader.readLine();
-                    while (line != null) {
-                        System.out.println(line);
-                        line = reader.readLine();
-                    }
-                    System.exit(1);
-                }
-                doCommit();
-                break;
-            case 'I':
-                System.out.println("Ignoring");
-                break;
+                System.exit(1);
             }
+            doCommit();
         }
     }
 



Mime
View raw message