Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: tools/push-to-trunk/common_includes.py

Issue 700493002: Fix workdir feature for release scripts. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/push-to-trunk/auto_roll.py ('k') | tools/push-to-trunk/test_scripts.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/push-to-trunk/common_includes.py
diff --git a/tools/push-to-trunk/common_includes.py b/tools/push-to-trunk/common_includes.py
index f545a24354c4625c8114a4abb2ae912c22180411..e95d55518322994d39de9e506d048e216f99b699 100644
--- a/tools/push-to-trunk/common_includes.py
+++ b/tools/push-to-trunk/common_includes.py
@@ -608,18 +608,6 @@ class Step(GitRecipesMixin):
msg = "Can't continue. Please delete branch %s and try again." % name
self.Die(msg)
- def BootstrapV8Checkout(self):
- if os.path.realpath(self.default_cwd) == os.path.realpath(V8_BASE):
- self.Die("Can't use v8 checkout with calling script as work checkout.")
- # Directory containing the working v8 checkout.
- work_dir = os.path.dirname(self.default_cwd)
- assert os.path.join(work_dir, "v8") == self.default_cwd
-
- if not os.path.exits(work_dir):
- os.makedirs(work_dir)
- if not os.path.exits(self.default_cwd):
- self.Command("fetch", "v8")
-
def InitialEnvironmentChecks(self, cwd):
# Cancel if this is not a git checkout.
if not os.path.exists(os.path.join(cwd, ".git")): # pragma: no cover
@@ -757,6 +745,19 @@ class Step(GitRecipesMixin):
cwd=self._options.svn)
+class BootstrapStep(Step):
+ MESSAGE = "Bootstapping v8 checkout."
+
+ def RunStep(self):
+ if os.path.realpath(self.default_cwd) == os.path.realpath(V8_BASE):
+ self.Die("Can't use v8 checkout with calling script as work checkout.")
+ # Directory containing the working v8 checkout.
+ if not os.path.exists(self._options.work_dir):
+ os.makedirs(self._options.work_dir)
+ if not os.path.exists(self.default_cwd):
+ self.Command("fetch", "v8", cwd=self._options.work_dir)
+
+
class UploadStep(Step):
MESSAGE = "Upload for code review."
@@ -928,7 +929,7 @@ class ScriptsBase(object):
os.remove(state_file)
steps = []
- for (number, step_class) in enumerate(step_classes):
+ for (number, step_class) in enumerate([BootstrapStep] + step_classes):
steps.append(MakeStep(step_class, number, self._state, self._config,
options, self._side_effect_handler))
for step in steps[options.step:]:
« no previous file with comments | « tools/push-to-trunk/auto_roll.py ('k') | tools/push-to-trunk/test_scripts.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698