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

Side by Side Diff: gclient.py

Issue 349643004: Add option to gclient to ignore cache locks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 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 | gclient_scm.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 # 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 1743 matching lines...) Expand 10 before | Expand all | Expand 10 after
1754 help='Skip svn up whenever possible by requesting ' 1754 help='Skip svn up whenever possible by requesting '
1755 'actual HEAD revision from the repository') 1755 'actual HEAD revision from the repository')
1756 parser.add_option('--upstream', action='store_true', 1756 parser.add_option('--upstream', action='store_true',
1757 help='Make repo state match upstream branch.') 1757 help='Make repo state match upstream branch.')
1758 parser.add_option('--output-json', 1758 parser.add_option('--output-json',
1759 help='Output a json document to this path containing ' 1759 help='Output a json document to this path containing '
1760 'summary information about the sync.') 1760 'summary information about the sync.')
1761 parser.add_option('--shallow', action='store_true', 1761 parser.add_option('--shallow', action='store_true',
1762 help='GIT ONLY - Do a shallow clone into the cache dir. ' 1762 help='GIT ONLY - Do a shallow clone into the cache dir. '
1763 'Requires Git 1.9+') 1763 'Requires Git 1.9+')
1764 parser.add_option('--ignore_locks', action='store_true',
1765 help='GIT ONLY - Ignore cache locks.')
1764 (options, args) = parser.parse_args(args) 1766 (options, args) = parser.parse_args(args)
1765 client = GClient.LoadCurrentConfig(options) 1767 client = GClient.LoadCurrentConfig(options)
1766 1768
1767 if not client: 1769 if not client:
1768 raise gclient_utils.Error('client not configured; see \'gclient config\'') 1770 raise gclient_utils.Error('client not configured; see \'gclient config\'')
1769 1771
1770 if options.revisions and options.head: 1772 if options.revisions and options.head:
1771 # TODO(maruel): Make it a parser.error if it doesn't break any builder. 1773 # TODO(maruel): Make it a parser.error if it doesn't break any builder.
1772 print('Warning: you cannot use both --head and --revision') 1774 print('Warning: you cannot use both --head and --revision')
1773 1775
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
2005 print >> sys.stderr, 'Error: %s' % str(e) 2007 print >> sys.stderr, 'Error: %s' % str(e)
2006 return 1 2008 return 1
2007 finally: 2009 finally:
2008 gclient_utils.PrintWarnings() 2010 gclient_utils.PrintWarnings()
2009 2011
2010 2012
2011 if '__main__' == __name__: 2013 if '__main__' == __name__:
2012 sys.exit(Main(sys.argv[1:])) 2014 sys.exit(Main(sys.argv[1:]))
2013 2015
2014 # vim: ts=2:sw=2:tw=80:et: 2016 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« no previous file with comments | « no previous file | gclient_scm.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698