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

Side by Side Diff: gclient.py

Issue 10750007: [depot_tools] Allow gclient runhooks to work offline w/safesync_url. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: pylint + removing revinfo Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/trychange_unittest.py » ('j') | 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 7
8 Files 8 Files
9 .gclient : Current client configuration, written by 'config' command. 9 .gclient : Current client configuration, written by 'config' command.
10 Format is a Python script defining 'solutions', a list whose 10 Format is a Python script defining 'solutions', a list whose
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 1000
1001 Args: 1001 Args:
1002 command: The command to use (e.g., 'status' or 'diff') 1002 command: The command to use (e.g., 'status' or 'diff')
1003 args: list of str - extra arguments to add to the command line. 1003 args: list of str - extra arguments to add to the command line.
1004 """ 1004 """
1005 if not self.dependencies: 1005 if not self.dependencies:
1006 raise gclient_utils.Error('No solution specified') 1006 raise gclient_utils.Error('No solution specified')
1007 revision_overrides = {} 1007 revision_overrides = {}
1008 # It's unnecessary to check for revision overrides for 'recurse'. 1008 # It's unnecessary to check for revision overrides for 'recurse'.
1009 # Save a few seconds by not calling _EnforceRevisions() in that case. 1009 # Save a few seconds by not calling _EnforceRevisions() in that case.
1010 if command is not 'recurse': 1010 if command not in ('diff', 'recurse', 'runhooks', 'status'):
1011 revision_overrides = self._EnforceRevisions() 1011 revision_overrides = self._EnforceRevisions()
1012 pm = None 1012 pm = None
1013 # Disable progress for non-tty stdout. 1013 # Disable progress for non-tty stdout.
1014 if (sys.stdout.isatty() and not self._options.verbose): 1014 if (sys.stdout.isatty() and not self._options.verbose):
1015 if command in ('update', 'revert'): 1015 if command in ('update', 'revert'):
1016 pm = Progress('Syncing projects', 1) 1016 pm = Progress('Syncing projects', 1)
1017 elif command is 'recurse': 1017 elif command is 'recurse':
1018 pm = Progress(' '.join(args), 1) 1018 pm = Progress(' '.join(args), 1)
1019 work_queue = gclient_utils.ExecutionQueue(self._options.jobs, pm) 1019 work_queue = gclient_utils.ExecutionQueue(self._options.jobs, pm)
1020 for s in self.dependencies: 1020 for s in self.dependencies:
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
1601 except (gclient_utils.Error, subprocess2.CalledProcessError), e: 1601 except (gclient_utils.Error, subprocess2.CalledProcessError), e:
1602 print >> sys.stderr, 'Error: %s' % str(e) 1602 print >> sys.stderr, 'Error: %s' % str(e)
1603 return 1 1603 return 1
1604 1604
1605 1605
1606 if '__main__' == __name__: 1606 if '__main__' == __name__:
1607 fix_encoding.fix_encoding() 1607 fix_encoding.fix_encoding()
1608 sys.exit(Main(sys.argv[1:])) 1608 sys.exit(Main(sys.argv[1:]))
1609 1609
1610 # vim: ts=2:sw=2:tw=80:et: 1610 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« no previous file with comments | « no previous file | tests/trychange_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698