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

Side by Side Diff: gclient.py

Issue 1789713004: Log the location where we start to search .gclient for (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Meta checkout manager supporting both Subversion and GIT.""" 6 """Meta checkout manager supporting both Subversion and GIT."""
7 # Files 7 # Files
8 # .gclient : Current client configuration, written by 'config' command. 8 # .gclient : Current client configuration, written by 'config' command.
9 # Format is a Python script defining 'solutions', a list whose 9 # Format is a Python script defining 'solutions', a list whose
10 # entries each are maps binding the strings "name" and "url" 10 # entries each are maps binding the strings "name" and "url"
(...skipping 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after
1371 return client 1371 return client
1372 1372
1373 @staticmethod 1373 @staticmethod
1374 def LoadCurrentConfig(options): 1374 def LoadCurrentConfig(options):
1375 """Searches for and loads a .gclient file relative to the current working 1375 """Searches for and loads a .gclient file relative to the current working
1376 dir. Returns a GClient object.""" 1376 dir. Returns a GClient object."""
1377 if options.spec: 1377 if options.spec:
1378 client = GClient('.', options) 1378 client = GClient('.', options)
1379 client.SetConfig(options.spec) 1379 client.SetConfig(options.spec)
1380 else: 1380 else:
1381 print ('Looking for %s starting from %s', options.config_filename,
1382 os.getcwd())
1381 path = gclient_utils.FindGclientRoot(os.getcwd(), options.config_filename) 1383 path = gclient_utils.FindGclientRoot(os.getcwd(), options.config_filename)
Paweł Hajdan Jr. 2016/03/11 22:26:13 While you're here, why not instrument FindGclientR
Sergiy Byelozyorov 2016/03/11 22:29:00 Not sure what to instrument inside FindGclientRoot
1382 if not path: 1384 if not path:
1383 return None 1385 return None
1384 client = GClient(path, options) 1386 client = GClient(path, options)
1385 client.SetConfig(gclient_utils.FileRead( 1387 client.SetConfig(gclient_utils.FileRead(
1386 os.path.join(path, options.config_filename))) 1388 os.path.join(path, options.config_filename)))
1387 client = client.MigrateConfigToGit(path, options) 1389 client = client.MigrateConfigToGit(path, options)
1388 1390
1389 if (options.revisions and 1391 if (options.revisions and
1390 len(client.dependencies) > 1 and 1392 len(client.dependencies) > 1 and
1391 any('@' not in r for r in options.revisions)): 1393 any('@' not in r for r in options.revisions)):
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after
2322 2324
2323 2325
2324 if '__main__' == __name__: 2326 if '__main__' == __name__:
2325 try: 2327 try:
2326 sys.exit(main(sys.argv[1:])) 2328 sys.exit(main(sys.argv[1:]))
2327 except KeyboardInterrupt: 2329 except KeyboardInterrupt:
2328 sys.stderr.write('interrupted\n') 2330 sys.stderr.write('interrupted\n')
2329 sys.exit(1) 2331 sys.exit(1)
2330 2332
2331 # vim: ts=2:sw=2:tw=80:et: 2333 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« 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