cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [3/3] git commit: Do a better job of trying to detect if a given commit has already been committed on the branch
Date Thu, 20 Mar 2014 19:41:32 GMT
Do a better job of trying to detect if a given commit has already been committed on the branch


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/b0e1987c
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/b0e1987c
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/b0e1987c

Branch: refs/heads/2.7.x-fixes
Commit: b0e1987c5043c9b6efbe3a4cf7c1d763b1d87181
Parents: b4a8355
Author: Daniel Kulp <dkulp@apache.org>
Authored: Thu Mar 20 15:40:06 2014 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Thu Mar 20 15:41:01 2014 -0400

----------------------------------------------------------------------
 bin/DoMerges.java | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/b0e1987c/bin/DoMerges.java
----------------------------------------------------------------------
diff --git a/bin/DoMerges.java b/bin/DoMerges.java
index 9109be4..603d3c7 100644
--- a/bin/DoMerges.java
+++ b/bin/DoMerges.java
@@ -580,16 +580,25 @@ public class DoMerges {
     private static boolean compareLogs(String[] f, String[] logLines) throws IOException
{
         ArrayList<String> onBranch = new ArrayList<String>(f.length);
         for (String s : f) {
+            if (s.trim().startsWith("Conflicts:")) {
+                break;
+            }
             if (s.trim().length() > 0 
                 && s.charAt(0) == ' '
                 && !s.contains("git-svn-id")) {
                 onBranch.add(s.trim());
             }
         }
+        List<String> ll = new ArrayList<String>();
         for (String s : logLines) {
-            onBranch.remove(s.trim());
+            if (s.trim().length() > 0 
+                && !onBranch.remove(s.trim())
+                && !s.startsWith("Author: ")
+                && !s.startsWith("Date: ")) {                
+                ll.add(s);
+            } 
         }
-        if (onBranch.isEmpty()) {
+        if (ll.isEmpty()) {
             //everything in the source log is in a log on this branch, let's prompt to record
the merge
             System.out.println("Found possible commit already on branch:");
             for (String s : f) {


Mime
View raw message