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

Unified Diff: tools/autoroller/roll_chromium_revision.py

Issue 2566223007: Autoroller: Add --ignore-unclean-workdir flag (Closed)
Patch Set: _ Created 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/autoroller/roll_chromium_revision.py
diff --git a/tools/autoroller/roll_chromium_revision.py b/tools/autoroller/roll_chromium_revision.py
index 787e3db7fbf3625423a6979d41a8fd9838dfc2a2..f46b55e9ab175232f2cdeffb8f380f968bf487b4 100755
--- a/tools/autoroller/roll_chromium_revision.py
+++ b/tools/autoroller/roll_chromium_revision.py
@@ -449,6 +449,9 @@ def main():
help=('Calculate changes and modify DEPS, but don\'t create '
'any local branch, commit, upload CL or send any '
'tryjobs.'))
+ p.add_argument('-i', '--ignore-changes', action='store_true', default=False,
phoglund 2016/12/14 10:24:50 ignore-unclean-workdir?
kjellander_webrtc 2016/12/14 11:54:06 That's better; I changed it.
+ help='Ignore if the current branch is not master or if there '
+ 'are uncommitted changes (default: %(default)s).')
p.add_argument('--skip-cq', action='store_true', default=False,
help='Skip sending the CL to the CQ (default: %(default)s)')
p.add_argument('-v', '--verbose', action='store_true', default=False,
@@ -460,14 +463,15 @@ def main():
else:
logging.basicConfig(level=logging.INFO)
- if not _IsTreeClean():
+ if not opts.ignore_changes and not _IsTreeClean():
logging.error('Please clean your local checkout first.')
return 1
if opts.clean:
_RemovePreviousRollBranch(opts.dry_run)
- _EnsureUpdatedMasterBranch(opts.dry_run)
+ if not opts.ignore_changes:
+ _EnsureUpdatedMasterBranch(opts.dry_run)
new_cr_rev = opts.revision
if not new_cr_rev:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698