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

Unified Diff: gclient.py

Issue 2285003: Add more smoke test for gclient config and gclient revinfo. (Closed)
Patch Set: Created 10 years, 7 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 | tests/fake_repos.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient.py
diff --git a/gclient.py b/gclient.py
index 80b524bc0afd1e759006c084a58fd6dd259b641d..926b1785c62011a7ff29e0b751a169465334f82c 100644
--- a/gclient.py
+++ b/gclient.py
@@ -834,9 +834,10 @@ URL.
parser.add_option("--name",
help="overrides the default name for the solution")
(options, args) = parser.parse_args(args)
- if len(args) < 1 and not options.spec:
- raise gclient_utils.Error("required argument missing; see 'gclient help "
- "config'")
+ if ((options.spec and args) or len(args) > 2 or
+ (not options.spec and not args)):
+ parser.error('Inconsistent arguments. Use either --spec or one or 2 args')
+
if os.path.exists(options.config_filename):
raise gclient_utils.Error("%s file already exists in the current directory"
% options.config_filename)
« no previous file with comments | « no previous file | tests/fake_repos.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698