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

Unified Diff: apply_issue.py

Issue 171763003: Apply Issue shim for disabling checkout when bot update ran. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Add --force flag and --git_ref flag Created 6 years, 10 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
« no previous file with comments | « no previous file | checkout.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apply_issue.py
diff --git a/apply_issue.py b/apply_issue.py
index c8cbfec32c55d6db9f3143dcc1ed8228d85c0df6..b4ad8946f8e63d0e4fb1a3bd204edb8e72d46c4f 100755
--- a/apply_issue.py
+++ b/apply_issue.py
@@ -72,7 +72,17 @@ def main():
parser.add_option('--revision-mapping', default='{}',
help='When running gclient, annotate the got_revisions '
'using the revision-mapping.')
+ parser.add_option('-f', '--force', action='store_true',
+ help='Really run apply_issue, even if .update.flag '
+ 'is detected.')
+ parser.add_option('-b', '--base_ref', help='Base git ref to patch on top of, '
+ 'used for verification.')
options, args = parser.parse_args()
+ if (os.path.isfile(os.path.join(os.getcwd(), 'update.flag'))
+ and not options.force):
+ print 'update.flag file found: bot_update has run and checkout is already '
+ print 'in a consistent state. No actions will be performed in this step.'
+ return 0
logging.basicConfig(
format='%(levelname)5s %(module)11s(%(lineno)4d): %(message)s',
level=[logging.WARNING, logging.INFO, logging.DEBUG][
@@ -151,7 +161,8 @@ def main():
if scm_type == 'svn':
scm_obj = checkout.SvnCheckout(full_dir, None, None, None, None)
elif scm_type == 'git':
- scm_obj = checkout.GitCheckout(full_dir, None, None, None, None)
+ scm_obj = checkout.GitCheckout(full_dir, None, None, None, None,
+ base_ref=options.base_ref)
elif scm_type == None:
scm_obj = checkout.RawCheckout(full_dir, None, None)
else:
« no previous file with comments | « no previous file | checkout.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698