cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1176011 - /cxf/trunk/bin/DoMerges.java
Date Mon, 26 Sep 2011 19:44:06 GMT
Author: dkulp
Date: Mon Sep 26 19:44:06 2011
New Revision: 1176011

URL: http://svn.apache.org/viewvc?rev=1176011&view=rev
Log:
Print out the URL to the viewvc change and the URL for any JIRA's that
may be part of the commit log to make it easier to review the changes.

Modified:
    cxf/trunk/bin/DoMerges.java

Modified: cxf/trunk/bin/DoMerges.java
URL: http://svn.apache.org/viewvc/cxf/trunk/bin/DoMerges.java?rev=1176011&r1=1176010&r2=1176011&view=diff
==============================================================================
--- cxf/trunk/bin/DoMerges.java (original)
+++ cxf/trunk/bin/DoMerges.java Mon Sep 26 19:44:06 2011
@@ -16,9 +16,10 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
+import java.io.*;
 import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 
 /* dkulp - Stupid little program I use to help merge changes from 
@@ -266,7 +267,6 @@ public class DoMerges {
         System.out.println("Merging versions (" + verList.size() + "): " + verList);
 
 
-
         String root = null;
 
         p = Runtime.getRuntime().exec(new String[] {"svn", "info"});
@@ -283,18 +283,35 @@ public class DoMerges {
 
         List<String> blocks = new ArrayList<String>();
         List<String> records = new ArrayList<String>();
+        List<String> jiras = new ArrayList<String>();
+        Pattern jiraPattern = Pattern.compile("([A-Z]{2,10}+-\\d+)");
 
         for (int cur = 0; cur < verList.size(); cur++) {
+            jiras.clear();
             String ver = verList.get(cur);
             System.out.println("Merging: " + ver + " (" + (cur + 1) + "/" + verList.size()
+ ")");
+            System.out.println("http://svn.apache.org/viewvc?view=revision&revision="
+ ver);
+
             p = Runtime.getRuntime().exec(new String[] {"svn", "log", "-r" , ver, root});
             reader = new BufferedReader(new InputStreamReader(p.getInputStream()));
             line = reader.readLine();
+            StringWriter swriter = new StringWriter();
+            BufferedWriter writer = new BufferedWriter(swriter);
             while (line != null) {
-                System.out.println(line);
+                writer.write(line);
+                writer.newLine();
+                Matcher m = jiraPattern.matcher(line);
+                while (m.find()) {
+                    jiras.add(m.group());
+                }
                 line = reader.readLine();
             }
             p.waitFor();
+            writer.flush();
+            for (String s : jiras) {
+                System.out.println("https://issues.apache.org/jira/browse/" + s);
+            }
+            System.out.println(swriter.toString());
 
             while (System.in.available() > 0) {
                 System.in.read();



Mime
View raw message