if self._options.sheriff:
args.extend([
"--sheriff", "--googlers-mapping", self._options.googlers_mapping])
+ if self._options.dry_run:
+ args.extend(["--dry-run"])
R = chromium_roll.ChromiumRoll
self._side_effect_handler.Call(
R(chromium_roll.CONFIG, self._side_effect_handler).Run,
parser.add_argument("-c", "--chromium", required=True,
help=("The path to your Chromium src/ "
"directory to automate the V8 roll."))
- parser.add_argument("--roll",
- help="Make Chromium roll. Dry run if unspecified.",
+ parser.add_argument("--roll", help="Call Chromium roll script.",
default=False, action="store_true")
def _ProcessOptions(self, options): # pragma: no cover
% self["sheriff"])
self.GitCommit("%s%s\n\nTBR=%s" %
(commit_title, sheriff, self._options.reviewer))
- self.GitUpload(author=self._options.author,
- force=True,
- cq=self._options.use_commit_queue)
- print "CL uploaded."
+ if not self._options.dry_run:
+ self.GitUpload(author=self._options.author,
+ force=True,
+ cq=self._options.use_commit_queue)
+ print "CL uploaded."
+ else:
+ self.GitCheckout("master")
+ self.GitDeleteBranch("v8-roll-%s" % self["trunk_revision"])
+ print "Dry run - don't upload."
class SwitchV8(Step):
parser = argparse.ArgumentParser(description=self._Description())
parser.add_argument("-a", "--author", default="",
help="The author email used for rietveld.")
+ parser.add_argument("--dry-run", default=False, action="store_true",
+ help="Perform only read-only actions.")
parser.add_argument("-g", "--googlers-mapping",
help="Path to the script mapping google accounts.")
parser.add_argument("-r", "--reviewer", default="",