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

Unified Diff: git_cl.py

Issue 11418171: Don't call settings.GetIsGerrit() before parser.parse_args() (Closed) Base URL: svn://chrome-svn/chrome/trunk/tools/depot_tools/
Patch Set: Created 8 years, 1 month 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 | tests/git_cl_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cl.py
===================================================================
--- git_cl.py (revision 169567)
+++ git_cl.py (working copy)
@@ -1246,12 +1246,15 @@
help="Emulate Subversion's auto properties feature.")
parser.add_option('-c', '--use-commit-queue', action='store_true',
help='tell the commit queue to commit this patchset')
- if settings.GetIsGerrit():
- parser.add_option('--target_branch', dest='target_branch', default='master',
- help='target branch to upload')
+ parser.add_option('--target_branch',
+ help='When uploading to gerrit, remote branch to '
+ 'use for CL. Default: master')
add_git_similarity(parser)
(options, args) = parser.parse_args(args)
+ if options.target_branch and not settings.GetIsGerrit():
+ parser.error('Use --target_branch for non gerrit repository.')
+
# Print warning if the user used the -m/--message argument. This will soon
# change to -t/--title.
if options.message:
« no previous file with comments | « no previous file | tests/git_cl_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698