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

Unified Diff: gclient.py

Issue 3828010: gclient recurse fails if .gclient_entries doesn't exist. (Closed)
Patch Set: Created 10 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 | no next file » | 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 6482efaa95e99c57539caaacc94d66859c0928b2..6b25cbec86a50801ccdb54e6a8ee8f4ecd9abce9 100644
--- a/gclient.py
+++ b/gclient.py
@@ -878,7 +878,13 @@ def CMDrecurse(parser, args):
parser.add_option('-s', '--scm', action='append', default=[],
help='choose scm types to operate upon')
options, args = parser.parse_args(args)
- root, entries = gclient_utils.GetGClientRootAndEntries()
+ root_and_entries = gclient_utils.GetGClientRootAndEntries()
+ if not root_and_entries:
+ print >> sys.stderr, (
+ 'You need to run gclient sync at least once to use \'recurse\'.\n'
+ 'This is because .gclient_entries needs to exist and be up to date.')
+ return 1
+ root, entries = root_and_entries
scm_set = set()
for scm in options.scm:
scm_set.update(scm.split(','))
« 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