[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

abarth at webkit.org abarth at webkit.org
Thu Apr 8 02:23:10 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 19a447b017d21fc4d1c98bad9a2b2703e9a39f3f
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Mar 16 04:15:20 2010 +0000

    2010-03-15  Adam Barth  <abarth at webkit.org>
    
            Reviewed by Eric Seidel.
    
            webkit-patch rollout should error out on conflicts
            https://bugs.webkit.org/show_bug.cgi?id=36151
    
            Instead of blindingly plowing ahead, we now throw an exception if there
            are conflicts after applying a reverse diff.
    
            * Scripts/webkitpy/scm.py:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@56032 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 2254a88..9e2010a 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,15 @@
+2010-03-15  Adam Barth  <abarth at webkit.org>
+
+        Reviewed by Eric Seidel.
+
+        webkit-patch rollout should error out on conflicts
+        https://bugs.webkit.org/show_bug.cgi?id=36151
+
+        Instead of blindingly plowing ahead, we now throw an exception if there
+        are conflicts after applying a reverse diff.
+
+        * Scripts/webkitpy/scm.py:
+
 2010-03-15  Chris Fleizach  <cfleizach at apple.com>
 
         Unreviewed layout test fix.
diff --git a/WebKitTools/Scripts/webkitpy/scm.py b/WebKitTools/Scripts/webkitpy/scm.py
index 3f2373e..86eb0ad 100644
--- a/WebKitTools/Scripts/webkitpy/scm.py
+++ b/WebKitTools/Scripts/webkitpy/scm.py
@@ -210,6 +210,9 @@ class SCM:
     def changed_files(self):
         raise NotImplementedError, "subclasses must implement"
 
+    def conflicted_files(self):
+        raise NotImplementedError, "subclasses must implement"
+
     def display_name(self):
         raise NotImplementedError, "subclasses must implement"
 
@@ -334,6 +337,13 @@ class SVN(SCM):
             status_regexp = "^(?P<status>[ACDMR]).{5} (?P<filename>.+)$"
         return self.run_status_and_extract_filenames(self.status_command(), status_regexp)
 
+    def conflicted_files(self):
+        if self.svn_version() > "1.6":
+            status_regexp = "^(?P<status>[C]).{6} (?P<filename>.+)$"
+        else:
+            status_regexp = "^(?P<status>[C]).{5} (?P<filename>.+)$"
+        return self.run_status_and_extract_filenames(self.status_command(), status_regexp)
+
     @staticmethod
     def supports_local_commits():
         return False
@@ -432,7 +442,12 @@ class Git(SCM):
         status_command = ['git', 'diff', '-r', '--name-status', '-C', '-M', 'HEAD']
         status_regexp = '^(?P<status>[ADM])\t(?P<filename>.+)$'
         return self.run_status_and_extract_filenames(status_command, status_regexp)
-    
+
+    def conflicted_files(self):
+        status_command = ['git', 'diff', '--name-status', '-C', '-M', '--diff-filter=U']
+        status_regexp = '^(?P<status>[U])\t(?P<filename>.+)$'
+        return self.run_status_and_extract_filenames(status_command, status_regexp)
+
     @staticmethod
     def supports_local_commits():
         return True
@@ -459,7 +474,6 @@ class Git(SCM):
             raise ScriptError(message='Failed to find git commit for revision %s, git svn log output: "%s"' % (revision, git_commit))
 
         # I think this will always fail due to ChangeLogs.
-        # FIXME: We need to detec specific failure conditions and handle them.
         run_command(['git', 'revert', '--no-commit', git_commit], error_handler=Executive.ignore_error)
 
         # Fix any ChangeLogs if necessary.
@@ -467,6 +481,10 @@ class Git(SCM):
         if len(changelog_paths):
             run_command([self.script_path('resolve-ChangeLogs')] + changelog_paths)
 
+        conflicts = self.conflicted_files()
+        if len(conflicts):
+            raise ScriptError(message="Failed to apply reverse diff for revision %s because of the following conflicts:\n%s" % (revision, "\n".join(conflicts)))
+
     def revert_files(self, file_paths):
         run_command(['git', 'checkout', 'HEAD'] + file_paths)
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list