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

Side by Side Diff: gclient_scm.py

Issue 1050853002: gclient: Add '--no-bootstrap' sync option. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Period in help message Created 5 years, 8 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 | « gclient.py ('k') | 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 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Gclient-specific SCM-specific operations.""" 5 """Gclient-specific SCM-specific operations."""
6 6
7 from __future__ import print_function 7 from __future__ import print_function
8 8
9 import errno 9 import errno
10 import logging 10 import logging
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 def _UpdateMirror(mirror, options): 844 def _UpdateMirror(mirror, options):
845 """Update a git mirror by fetching the latest commits from the remote.""" 845 """Update a git mirror by fetching the latest commits from the remote."""
846 if getattr(options, 'shallow', False): 846 if getattr(options, 'shallow', False):
847 # HACK(hinoka): These repositories should be super shallow. 847 # HACK(hinoka): These repositories should be super shallow.
848 if 'flash' in mirror.url: 848 if 'flash' in mirror.url:
849 depth = 10 849 depth = 10
850 else: 850 else:
851 depth = 10000 851 depth = 10000
852 else: 852 else:
853 depth = None 853 depth = None
854 mirror.populate(verbose=options.verbose, bootstrap=True, depth=depth, 854 mirror.populate(verbose=options.verbose,
855 bootstrap=not getattr(options, 'no_bootstrap', False),
856 depth=depth,
855 ignore_lock=getattr(options, 'ignore_locks', False)) 857 ignore_lock=getattr(options, 'ignore_locks', False))
856 mirror.unlock() 858 mirror.unlock()
857 859
858 def _Clone(self, revision, url, options): 860 def _Clone(self, revision, url, options):
859 """Clone a git repository from the given URL. 861 """Clone a git repository from the given URL.
860 862
861 Once we've cloned the repo, we checkout a working branch if the specified 863 Once we've cloned the repo, we checkout a working branch if the specified
862 revision is a branch head. If it is a tag or a specific commit, then we 864 revision is a branch head. If it is a tag or a specific commit, then we
863 leave HEAD detached as it makes future updates simpler -- in this case the 865 leave HEAD detached as it makes future updates simpler -- in this case the
864 user should first create a new branch or switch to an existing branch before 866 user should first create a new branch or switch to an existing branch before
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
1623 new_command.append('--force') 1625 new_command.append('--force')
1624 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: 1626 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]:
1625 new_command.extend(('--accept', 'theirs-conflict')) 1627 new_command.extend(('--accept', 'theirs-conflict'))
1626 elif options.manually_grab_svn_rev: 1628 elif options.manually_grab_svn_rev:
1627 new_command.append('--force') 1629 new_command.append('--force')
1628 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: 1630 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]:
1629 new_command.extend(('--accept', 'postpone')) 1631 new_command.extend(('--accept', 'postpone'))
1630 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: 1632 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]:
1631 new_command.extend(('--accept', 'postpone')) 1633 new_command.extend(('--accept', 'postpone'))
1632 return new_command 1634 return new_command
OLDNEW
« no previous file with comments | « gclient.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698