Add a method for performing cherrypick-merges.
authormatthew_hanson@apple.com <matthew_hanson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Nov 2014 04:49:52 +0000 (04:49 +0000)
committermatthew_hanson@apple.com <matthew_hanson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Nov 2014 04:49:52 +0000 (04:49 +0000)
https://bugs.webkit.org/show_bug.cgi?id=138375

Adds support for cherrypick-merges.

Reviewed by NOBODY (OOPS!).

* Scripts/webkitpy/common/checkout/scm/git.py:
(Git.cherrypick_merge): Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@175606 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/common/checkout/scm/git.py

index ac81dd39d2899614d89eb0c02552cc5fba1575aa..162ebf0688eade797e33a14d3553484925598f25 100644 (file)
@@ -1,3 +1,15 @@
+2014-11-04  Matthew Hanson  <matthew_hanson@apple.com>
+
+        Add a method for performing cherrypick-merges.
+        https://bugs.webkit.org/show_bug.cgi?id=138375
+
+        Reviewed by Ryosuke Niwa.
+
+        Adds support for cherrypick-merges.
+
+        * Scripts/webkitpy/common/checkout/scm/git.py:
+        (Git.cherrypick_merge): Added.
+
 2014-11-04  Matthew Hanson  <matthew_hanson@apple.com>
 
         Add a way to ascertain the SVN URL associated with a Git branch.
index ae614d2a4293633d791ac8749fe501d26d78d358..76f7e2f99f6749813d77bc9c18c8983d31a208c7 100644 (file)
@@ -498,6 +498,10 @@ class Git(SCM, SVNRepository):
         first_remote_branch_ref = remote_branch_refs.split('\n')[0]
         return first_remote_branch_ref.split(':')[1]
 
+    def cherrypick_merge(self, commit):
+        git_args = ['cherry-pick', '-n', commit]
+        return self._run_git(git_args)
+
     def commit_locally_with_message(self, message):
         self._run_git(['commit', '--all', '-F', '-'], input=message)