diff options
Diffstat (limited to 'Tools/Scripts/webkitpy/common/checkout')
-rw-r--r-- | Tools/Scripts/webkitpy/common/checkout/api.py | 6 | ||||
-rw-r--r-- | Tools/Scripts/webkitpy/common/checkout/changelog.py | 4 | ||||
-rw-r--r-- | Tools/Scripts/webkitpy/common/checkout/scm.py | 22 |
3 files changed, 20 insertions, 12 deletions
diff --git a/Tools/Scripts/webkitpy/common/checkout/api.py b/Tools/Scripts/webkitpy/common/checkout/api.py index 170b822..5c21028 100644 --- a/Tools/Scripts/webkitpy/common/checkout/api.py +++ b/Tools/Scripts/webkitpy/common/checkout/api.py @@ -35,7 +35,7 @@ from webkitpy.common.checkout.commitinfo import CommitInfo from webkitpy.common.checkout.scm import CommitMessage from webkitpy.common.checkout.deps import DEPS from webkitpy.common.memoized import memoized -from webkitpy.common.net.bugzilla import parse_bug_id +from webkitpy.common.net.bugzilla import parse_bug_id_from_changelog from webkitpy.common.system.executive import Executive, run_command, ScriptError from webkitpy.common.system.deprecated_logging import log @@ -85,7 +85,7 @@ class Checkout(object): return None changelog_entry = changelog_entries[0] changelog_data = { - "bug_id": parse_bug_id(changelog_entry.contents()), + "bug_id": parse_bug_id_from_changelog(changelog_entry.contents()), "author_name": changelog_entry.author_name(), "author_email": changelog_entry.author_email(), "author": changelog_entry.author(), @@ -145,7 +145,7 @@ class Checkout(object): def bug_id_for_this_commit(self, git_commit, changed_files=None): try: - return parse_bug_id(self.commit_message_for_this_commit(git_commit, changed_files).message()) + return parse_bug_id_from_changelog(self.commit_message_for_this_commit(git_commit, changed_files).message()) except ScriptError, e: pass # We might not have ChangeLogs. diff --git a/Tools/Scripts/webkitpy/common/checkout/changelog.py b/Tools/Scripts/webkitpy/common/checkout/changelog.py index ccdf9ca..a86b7a9 100644 --- a/Tools/Scripts/webkitpy/common/checkout/changelog.py +++ b/Tools/Scripts/webkitpy/common/checkout/changelog.py @@ -36,7 +36,7 @@ import textwrap from webkitpy.common.system.deprecated_logging import log from webkitpy.common.config.committers import CommitterList -from webkitpy.common.net.bugzilla import parse_bug_id +from webkitpy.common.net.bugzilla import parse_bug_id_from_changelog class ChangeLogEntry(object): @@ -87,7 +87,7 @@ class ChangeLogEntry(object): return self._contents def bug_id(self): - return parse_bug_id(self._contents) + return parse_bug_id_from_changelog(self._contents) # FIXME: Various methods on ChangeLog should move into ChangeLogEntry instead. diff --git a/Tools/Scripts/webkitpy/common/checkout/scm.py b/Tools/Scripts/webkitpy/common/checkout/scm.py index 70f65b5..e436402 100644 --- a/Tools/Scripts/webkitpy/common/checkout/scm.py +++ b/Tools/Scripts/webkitpy/common/checkout/scm.py @@ -29,6 +29,7 @@ # # Python module for interacting with an SCM system (like SVN or Git) +import logging import os import re import sys @@ -290,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): @@ -555,12 +556,8 @@ 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. - if self.dryrun: - # Return a string which looks like a commit so that things which parse this output will succeed. - return "Dry run, no commit.\nCommitted revision 0." - svn_commit_args = ["svn", "commit"] if not username and not self.has_authorization_for_realm(): @@ -569,6 +566,17 @@ class SVN(SCM): svn_commit_args.extend(["--username", username]) 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) + '"') + + # Return a string which looks like a commit so that things which parse this output will succeed. + return "Dry run, no commit.\nCommitted revision 0." + # FIXME: Should this use cwd=self.checkout_root? return self.run(svn_commit_args, error_handler=commit_error_handler) @@ -826,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() |