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

Unified Diff: git_cl.py

Issue 2117183004: Implement git cl upload --dry-run or --use-commit-queue for Gerrit. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@set-commit
Patch Set: Created 4 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cl.py
diff --git a/git_cl.py b/git_cl.py
index b05c8066af0ea507854f8a751878a8f42ce7f6df..23bcc1af06be905b120b139b8d327196e4ec1de9 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -1418,6 +1418,11 @@ class Changelist(object):
print_stats(options.similarity, options.find_copies, git_diff_args)
ret = self.CMDUploadChange(options, git_diff_args, change)
Michael Achenbach 2016/07/06 07:30:39 Dumb question: How is 'self' referring to the 'imp
tandrii(chromium) 2016/07/06 10:38:25 __getattr__
if not ret:
+ if options.use_commit_queue:
Michael Achenbach 2016/07/06 07:30:39 nit: Maybe give dry-run precedence over commit? If
tandrii(chromium) 2016/07/06 10:38:25 added a check early on.
+ self.SetCQState(_CQState.COMMIT)
+ elif options.cq_dry_run:
+ self.SetCQState(_CQState.DRY_RUN)
+
git_set_branch_value('last-upload-hash',
RunGit(['rev-parse', 'HEAD']).strip())
# Run post upload hooks, if specified.
@@ -2009,9 +2014,6 @@ class _RietveldChangelistImpl(_ChangelistCodereviewBase):
if project:
upload_args.extend(['--project', project])
- if options.cq_dry_run:
- upload_args.extend(['--cq_dry_run'])
-
try:
upload_args = ['upload'] + upload_args + args
logging.info('upload.RealMain(%s)', upload_args)
@@ -2035,9 +2037,6 @@ class _RietveldChangelistImpl(_ChangelistCodereviewBase):
if not self.GetIssue():
self.SetIssue(issue)
self.SetPatchset(patchset)
-
- if options.use_commit_queue:
- self.SetCQState(_CQState.COMMIT)
return 0
« 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