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

Unified Diff: gclient.py

Issue 8276020: Prepare to make --revision <number> to be an error when multiple solutions are present. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 2 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/gclient_smoketest.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 2b9b04d249bd804e5d9af94ca82a1e6aff5aabbd..27d2ed14972852c35486abe210ac19232bdca6b0 100644
--- a/gclient.py
+++ b/gclient.py
@@ -847,6 +847,17 @@ solutions = [
client = GClient(path, options)
client.SetConfig(gclient_utils.FileRead(
os.path.join(path, options.config_filename)))
+
+ if (options.revisions and
+ len(client.dependencies) > 1 and
+ any('@' not in r for r in options.revisions)):
+ print >> sys.stderr, (
+ 'You must specify the full solution name like --revision %s@%s\n'
+ 'when you have multiple solutions setup in your .gclient file.\n'
+ 'Other solutions present are: %s.') % (
+ client.dependencies[0].name,
+ options.revisions[0],
+ ', '.join(s.name for s in client.dependencies[1:]))
return client
def SetDefaultConfig(self, solution_name, deps_file, solution_url,
« no previous file with comments | « no previous file | tests/gclient_smoketest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698