2011-03-30 Maciej Stachowiak <mjs@apple.com>
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Mar 2011 07:56:19 +0000 (07:56 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Mar 2011 07:56:19 +0000 (07:56 +0000)
        Reviewed by Adam Barth.

        make webkit-patch upload respect -d
        https://bugs.webkit.org/show_bug.cgi?id=57425

        * Scripts/webkitpy/common/checkout/scm.py:
        * Scripts/webkitpy/tool/steps/commit.py:

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

Tools/ChangeLog
Tools/Scripts/webkitpy/common/checkout/scm.py
Tools/Scripts/webkitpy/tool/steps/commit.py

index 67a8e52fa69507b9e941c78de5bd24ac746a80a0..000e2bf207d37819cda2e0427a2f01ca9cca45d4 100644 (file)
@@ -1,3 +1,13 @@
+2011-03-30  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Adam Barth.
+
+        make webkit-patch upload respect -d
+        https://bugs.webkit.org/show_bug.cgi?id=57425
+
+        * Scripts/webkitpy/common/checkout/scm.py:
+        * Scripts/webkitpy/tool/steps/commit.py:
+
 2011-03-30  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Adam Barth.
index 1b65fedf807e89f6a5da8cd32238f05c944b5b5f..e4364022b11b31e5286af064058a170403fdea22 100644 (file)
@@ -291,7 +291,7 @@ class SCM:
     def revert_files(self, file_paths):
         self._subclass_must_implement()
 
-    def commit_with_message(self, message, username=None, git_commit=None, force_squash=False):
+    def commit_with_message(self, message, username=None, git_commit=None, force_squash=False, changed_files=None):
         self._subclass_must_implement()
 
     def svn_commit_log(self, svn_revision):
@@ -556,7 +556,7 @@ class SVN(SCM):
         # FIXME: This should probably use cwd=self.checkout_root.
         self.run(['svn', 'revert'] + file_paths)
 
-    def commit_with_message(self, message, username=None, git_commit=None, force_squash=False):
+    def commit_with_message(self, message, username=None, git_commit=None, force_squash=False, changed_files=None):
         # git-commit and force are not used by SVN.
         svn_commit_args = ["svn", "commit"]
 
@@ -567,6 +567,9 @@ class SVN(SCM):
 
         svn_commit_args.extend(["-m", message])
 
+        if changed_files:
+            svn_commit_args.extend(changed_files)
+
         if self.dryrun:
             _log = logging.getLogger("webkitpy.common.system")
             _log.debug('Would run SVN command: "' + " ".join(svn_commit_args) + '"')
@@ -831,7 +834,7 @@ class Git(SCM):
             if num_local_commits > 1 or (num_local_commits > 0 and not working_directory_is_clean):
                 raise AmbiguousCommitError(num_local_commits, working_directory_is_clean)
 
-    def commit_with_message(self, message, username=None, git_commit=None, force_squash=False):
+    def commit_with_message(self, message, username=None, git_commit=None, force_squash=False, changed_files=None):
         # Username is ignored during Git commits.
         working_directory_is_clean = self.working_directory_is_clean()
 
index 859acbf8c258b2edb054a0aa6aba848bd93c1e23..5dc4efb93d3ed65e3890907987bac6581049c9ad 100644 (file)
@@ -58,7 +58,7 @@ class Commit(AbstractStep):
 
             try:
                 scm = self._tool.scm()
-                commit_text = scm.commit_with_message(self._commit_message, git_commit=self._options.git_commit, username=username, force_squash=force_squash)
+                commit_text = scm.commit_with_message(self._commit_message, git_commit=self._options.git_commit, username=username, force_squash=force_squash, changed_files=self._changed_files(state))
                 svn_revision = scm.svn_revision_from_commit_text(commit_text)
                 log("Committed r%s: <%s>" % (svn_revision, urls.view_revision_url(svn_revision)))
                 self._state["commit_text"] = commit_text