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

Side by Side Diff: gclient.py

Issue 1160113003: Treat 'revert' like 'update' in gclient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 5 years, 6 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 | 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 1484 matching lines...) Expand 10 before | Expand all | Expand 10 after
1495 Args: 1495 Args:
1496 command: The command to use (e.g., 'status' or 'diff') 1496 command: The command to use (e.g., 'status' or 'diff')
1497 args: list of str - extra arguments to add to the command line. 1497 args: list of str - extra arguments to add to the command line.
1498 """ 1498 """
1499 if not self.dependencies: 1499 if not self.dependencies:
1500 raise gclient_utils.Error('No solution specified') 1500 raise gclient_utils.Error('No solution specified')
1501 1501
1502 revision_overrides = {} 1502 revision_overrides = {}
1503 # It's unnecessary to check for revision overrides for 'recurse'. 1503 # It's unnecessary to check for revision overrides for 'recurse'.
1504 # Save a few seconds by not calling _EnforceRevisions() in that case. 1504 # Save a few seconds by not calling _EnforceRevisions() in that case.
1505 if command not in ('diff', 'recurse', 'runhooks', 'status'): 1505 if command not in ('diff', 'recurse', 'runhooks', 'status', 'revert'):
1506 self._CheckConfig() 1506 self._CheckConfig()
1507 revision_overrides = self._EnforceRevisions() 1507 revision_overrides = self._EnforceRevisions()
1508 pm = None 1508 pm = None
1509 # Disable progress for non-tty stdout. 1509 # Disable progress for non-tty stdout.
1510 if (sys.stdout.isatty() and not self._options.verbose and progress): 1510 if (sys.stdout.isatty() and not self._options.verbose and progress):
1511 if command in ('update', 'revert'): 1511 if command in ('update', 'revert'):
1512 pm = Progress('Syncing projects', 1) 1512 pm = Progress('Syncing projects', 1)
1513 elif command == 'recurse': 1513 elif command == 'recurse':
1514 pm = Progress(' '.join(args), 1) 1514 pm = Progress(' '.join(args), 1)
1515 work_queue = gclient_utils.ExecutionQueue( 1515 work_queue = gclient_utils.ExecutionQueue(
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after
2309 2309
2310 2310
2311 if '__main__' == __name__: 2311 if '__main__' == __name__:
2312 try: 2312 try:
2313 sys.exit(main(sys.argv[1:])) 2313 sys.exit(main(sys.argv[1:]))
2314 except KeyboardInterrupt: 2314 except KeyboardInterrupt:
2315 sys.stderr.write('interrupted\n') 2315 sys.stderr.write('interrupted\n')
2316 sys.exit(1) 2316 sys.exit(1)
2317 2317
2318 # vim: ts=2:sw=2:tw=80:et: 2318 # 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