cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r813523 - /cxf/trunk/bin/DoMerges.java
Date Thu, 10 Sep 2009 17:38:56 GMT
Author: dkulp
Date: Thu Sep 10 17:38:56 2009
New Revision: 813523

URL: http://svn.apache.org/viewvc?rev=813523&view=rev
Log:
Remove the various svn:mergeinfo things that svn 1.5/1.6 likes to leave
all over the place that then causes extra merge conflicts and such

Modified:
    cxf/trunk/bin/DoMerges.java

Modified: cxf/trunk/bin/DoMerges.java
URL: http://svn.apache.org/viewvc/cxf/trunk/bin/DoMerges.java?rev=813523&r1=813522&r2=813523&view=diff
==============================================================================
--- cxf/trunk/bin/DoMerges.java (original)
+++ cxf/trunk/bin/DoMerges.java Thu Sep 10 17:38:56 2009
@@ -44,6 +44,36 @@
 public class DoMerges {
     public static boolean auto = false;
 
+    static void removeSvnMergeInfo() throws Exception {
+        Process p = Runtime.getRuntime().exec(new String[] {"svn", "st", "."});
+        BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));
+        List<String> list = new ArrayList<String>();
+        String line = reader.readLine();
+        while (line != null) {
+            if (line.charAt(1) == 'M') {
+                list.add(line.substring(5).trim());
+            } else if (line.charAt(1) == 'C' && line.charAt(0) != 'C') {
+                Process p2 = Runtime.getRuntime().exec(new String[] {"svn", "resolved", line.substring(5).trim()});
+                if (p2.waitFor() != 0) {
+                    Thread.sleep(10);
+                }
+
+                list.add(line.substring(5).trim());
+            }
+            line = reader.readLine();
+        }
+        p.waitFor();
+
+        for (String s : list) { 
+            p = Runtime.getRuntime().exec(new String[] {"svn", "propdel", "svn:mergeinfo",
s});
+            reader = new BufferedReader(new InputStreamReader(p.getInputStream()));
+            line = reader.readLine();
+            while (line != null) {
+                line = reader.readLine();
+            }
+            p.waitFor();
+        }
+    }
     static void doCommit() throws Exception {
         while (System.in.available() > 0) {
             System.in.read();
@@ -185,7 +215,7 @@
                     }
                     System.exit(1);
                 }
-
+                removeSvnMergeInfo();
                 doCommit();
                 break;
             case 'B':



Mime
View raw message