Revision: 23633
Author:   [email protected]
Date:     Wed Sep  3 08:29:53 2014 UTC
Log:      Add dry-run feature to auto roll scripts.

BUG=408523
LOG=n
[email protected]

Review URL: https://codereview.chromium.org/529423002
https://code.google.com/p/v8/source/detail?r=23633

Modified:
 /branches/bleeding_edge/tools/push-to-trunk/auto_roll.py
 /branches/bleeding_edge/tools/push-to-trunk/chromium_roll.py
 /branches/bleeding_edge/tools/push-to-trunk/common_includes.py

=======================================
--- /branches/bleeding_edge/tools/push-to-trunk/auto_roll.py Wed Sep 3 06:50:18 2014 UTC +++ /branches/bleeding_edge/tools/push-to-trunk/auto_roll.py Wed Sep 3 08:29:53 2014 UTC
@@ -100,6 +100,8 @@
       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,
@@ -111,8 +113,7 @@
     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
=======================================
--- /branches/bleeding_edge/tools/push-to-trunk/chromium_roll.py Wed Sep 3 06:50:18 2014 UTC +++ /branches/bleeding_edge/tools/push-to-trunk/chromium_roll.py Wed Sep 3 08:29:53 2014 UTC
@@ -87,10 +87,15 @@
                  % 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):
=======================================
--- /branches/bleeding_edge/tools/push-to-trunk/common_includes.py Thu Jul 24 07:36:25 2014 UTC +++ /branches/bleeding_edge/tools/push-to-trunk/common_includes.py Wed Sep 3 08:29:53 2014 UTC
@@ -592,6 +592,8 @@
     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="",

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to