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

Side by Side Diff: gclient.py

Issue 278043005: Pass shallow flag through gclient to git_cache.py (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years, 7 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 1720 matching lines...) Expand 10 before | Expand all | Expand 10 after
1731 'platform(s); \'all\' will process all deps_os ' 1731 'platform(s); \'all\' will process all deps_os '
1732 'references') 1732 'references')
1733 parser.add_option('-m', '--manually_grab_svn_rev', action='store_true', 1733 parser.add_option('-m', '--manually_grab_svn_rev', action='store_true',
1734 help='Skip svn up whenever possible by requesting ' 1734 help='Skip svn up whenever possible by requesting '
1735 'actual HEAD revision from the repository') 1735 'actual HEAD revision from the repository')
1736 parser.add_option('--upstream', action='store_true', 1736 parser.add_option('--upstream', action='store_true',
1737 help='Make repo state match upstream branch.') 1737 help='Make repo state match upstream branch.')
1738 parser.add_option('--output-json', 1738 parser.add_option('--output-json',
1739 help='Output a json document to this path containing ' 1739 help='Output a json document to this path containing '
1740 'summary information about the sync.') 1740 'summary information about the sync.')
1741 parser.add_option('--shallow', action='store_true',
1742 help='GIT ONLY - Do a shallow clone into the cache dir. '
1743 'Requires Git 1.9+')
1741 (options, args) = parser.parse_args(args) 1744 (options, args) = parser.parse_args(args)
1742 client = GClient.LoadCurrentConfig(options) 1745 client = GClient.LoadCurrentConfig(options)
1743 1746
1744 if not client: 1747 if not client:
1745 raise gclient_utils.Error('client not configured; see \'gclient config\'') 1748 raise gclient_utils.Error('client not configured; see \'gclient config\'')
1746 1749
1747 if options.revisions and options.head: 1750 if options.revisions and options.head:
1748 # TODO(maruel): Make it a parser.error if it doesn't break any builder. 1751 # TODO(maruel): Make it a parser.error if it doesn't break any builder.
1749 print('Warning: you cannot use both --head and --revision') 1752 print('Warning: you cannot use both --head and --revision')
1750 1753
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
1982 print >> sys.stderr, 'Error: %s' % str(e) 1985 print >> sys.stderr, 'Error: %s' % str(e)
1983 return 1 1986 return 1
1984 finally: 1987 finally:
1985 gclient_utils.PrintWarnings() 1988 gclient_utils.PrintWarnings()
1986 1989
1987 1990
1988 if '__main__' == __name__: 1991 if '__main__' == __name__:
1989 sys.exit(Main(sys.argv[1:])) 1992 sys.exit(Main(sys.argv[1:]))
1990 1993
1991 # vim: ts=2:sw=2:tw=80:et: 1994 # 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