2011-03-30 Maciej Stachowiak <mjs@apple.com>
[WebKit.git] / Tools / Scripts / webkitpy / common / checkout / scm.py
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()