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

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

Issue 591783003: Refactoring: Remove more legacy from release scripts. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Read version file relative to cwd. Created 6 years, 3 months 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
Index: tools/push-to-trunk/merge_to_branch.py
diff --git a/tools/push-to-trunk/merge_to_branch.py b/tools/push-to-trunk/merge_to_branch.py
index ec06f9c30362094a4c53246722e2644c3ef385a5..c5cabf0f18a60460871bce65ed4006d00d1f7637 100755
--- a/tools/push-to-trunk/merge_to_branch.py
+++ b/tools/push-to-trunk/merge_to_branch.py
@@ -41,7 +41,6 @@ CONFIG = {
PERSISTFILE_BASENAME: "/tmp/v8-merge-to-branch-tempfile",
ALREADY_MERGING_SENTINEL_FILE:
"/tmp/v8-merge-to-branch-tempfile-already-merging",
- VERSION_FILE: "src/version.cc",
TEMPORARY_PATCH_FILE: "/tmp/v8-prepare-merge-tempfile-temporary-patch",
COMMITMSG_FILE: "/tmp/v8-prepare-merge-tempfile-commitmsg",
COMMIT_HASHES_FILE: "/tmp/v8-merge-to-branch-tempfile-PATCH_COMMIT_HASHES",
@@ -184,14 +183,14 @@ class IncrementVersion(Step):
if self.Confirm("Automatically increment PATCH_LEVEL? (Saying 'n' will "
"fire up your EDITOR on %s so you can make arbitrary "
"changes. When you're done, save the file and exit your "
- "EDITOR.)" % self.Config(VERSION_FILE)):
- text = FileToText(self.Config(VERSION_FILE))
+ "EDITOR.)" % VERSION_FILE):
+ text = FileToText(os.path.join(self.default_cwd, VERSION_FILE))
text = MSub(r"(?<=#define PATCH_LEVEL)(?P<space>\s+)\d*$",
r"\g<space>%s" % new_patch,
text)
- TextToFile(text, self.Config(VERSION_FILE))
+ TextToFile(text, os.path.join(self.default_cwd, VERSION_FILE))
else:
- self.Editor(self.Config(VERSION_FILE))
+ self.Editor(os.path.join(self.default_cwd, VERSION_FILE))
self.ReadAndPersistVersion("new_")
self["version"] = "%s.%s.%s.%s" % (self["new_major"],
self["new_minor"],

Powered by Google App Engine
This is Rietveld 408576698