Reviewed by Adam Barth.
Document check-style's use of force_clean.
* Scripts/bugzilla-tool:
* Scripts/modules/scm.py:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@51015
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2009-11-16 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Document check-style's use of force_clean.
+
+ * Scripts/bugzilla-tool:
+ * Scripts/modules/scm.py:
+
2009-11-16 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
log("Patch failed to apply and check style")
log(e.output)
- tool.scm().ensure_clean_working_directory(True)
+ # This is safe because in order to get here the working directory had to be
+ # clean at the beginning. Clean it out again before we exit.
+ tool.scm().ensure_clean_working_directory(force_clean=True)
def execute(self, options, args, tool):
bug_id = args[0]
os.chdir(scm.checkout_root)
scm.ensure_no_local_commits(options.force_clean)
if options.clean:
- scm.ensure_clean_working_directory(options.force_clean)
+ scm.ensure_clean_working_directory(force_clean=options.force_clean)
@classmethod
def build_and_commit(cls, scm, options):
def script_path(self, script_name):
return os.path.join(self.scripts_directory(), script_name)
- def ensure_clean_working_directory(self, force):
- if not force and not self.working_directory_is_clean():
+ def ensure_clean_working_directory(self, force_clean):
+ if not force_clean and not self.working_directory_is_clean():
print self.run_command(self.status_command(), error_handler=ignore_error)
raise ScriptError(message="Working directory has modifications, pass --force-clean or --no-clean to continue.")