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

Unified Diff: cros_mark_as_stable.py

Issue 5783001: Add support to pushing unstable changes for the chrome pfq. (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: Sanity check after sync Created 10 years 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 | « bin/cros_mark_chrome_as_stable_unittest.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cros_mark_as_stable.py
diff --git a/cros_mark_as_stable.py b/cros_mark_as_stable.py
index 7e170d2952d8bae8f0a06cdf928555831745b536..9a8706263578201ddd2a72783d47a2fe60b18d2b 100755
--- a/cros_mark_as_stable.py
+++ b/cros_mark_as_stable.py
@@ -396,7 +396,8 @@ class EBuildStableMarker(object):
@classmethod
def MarkAsStable(cls, unstable_ebuild_path, new_stable_ebuild_path,
- commit_keyword, commit_value, redirect_file=None):
+ commit_keyword, commit_value, redirect_file=None,
+ make_stable=True):
"""Static function that creates a revved stable ebuild.
This function assumes you have already figured out the name of the new
@@ -412,6 +413,7 @@ class EBuildStableMarker(object):
stable.
commit_value: Value to set the above keyword to.
redirect_file: Optionally redirect output of new ebuild somewhere else.
+ make_stable: Actually make the ebuild stable.
"""
shutil.copyfile(unstable_ebuild_path, new_stable_ebuild_path)
for line in fileinput.input(new_stable_ebuild_path, inplace=1):
@@ -420,7 +422,10 @@ class EBuildStableMarker(object):
redirect_file = sys.stdout
if line.startswith('KEYWORDS'):
# Actually mark this file as stable by removing ~'s.
- redirect_file.write(line.replace('~', ''))
+ if make_stable:
+ redirect_file.write(line.replace('~', ''))
+ else:
+ redirect_file.write(line)
elif line.startswith('EAPI'):
# Always add new commit_id after EAPI definition.
redirect_file.write(line)
« no previous file with comments | « bin/cros_mark_chrome_as_stable_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698