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

Side by Side Diff: gclient_scm.py

Issue 1650993005: Allow blocking git-cache update with a timeout. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: nit Created 4 years, 10 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 | « gclient.py ('k') | git_cache.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 # 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 853 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 # HACK(hinoka): These repositories should be super shallow. 864 # HACK(hinoka): These repositories should be super shallow.
865 if 'flash' in mirror.url: 865 if 'flash' in mirror.url:
866 depth = 10 866 depth = 10
867 else: 867 else:
868 depth = 10000 868 depth = 10000
869 else: 869 else:
870 depth = None 870 depth = None
871 mirror.populate(verbose=options.verbose, 871 mirror.populate(verbose=options.verbose,
872 bootstrap=not getattr(options, 'no_bootstrap', False), 872 bootstrap=not getattr(options, 'no_bootstrap', False),
873 depth=depth, 873 depth=depth,
874 ignore_lock=getattr(options, 'ignore_locks', False)) 874 ignore_lock=getattr(options, 'ignore_locks', False),
875 lock_timeout=getattr(options, 'lock_timeout', 0))
875 mirror.unlock() 876 mirror.unlock()
876 877
877 def _Clone(self, revision, url, options): 878 def _Clone(self, revision, url, options):
878 """Clone a git repository from the given URL. 879 """Clone a git repository from the given URL.
879 880
880 Once we've cloned the repo, we checkout a working branch if the specified 881 Once we've cloned the repo, we checkout a working branch if the specified
881 revision is a branch head. If it is a tag or a specific commit, then we 882 revision is a branch head. If it is a tag or a specific commit, then we
882 leave HEAD detached as it makes future updates simpler -- in this case the 883 leave HEAD detached as it makes future updates simpler -- in this case the
883 user should first create a new branch or switch to an existing branch before 884 user should first create a new branch or switch to an existing branch before
884 making changes in the repo.""" 885 making changes in the repo."""
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after
1689 new_command.append('--force') 1690 new_command.append('--force')
1690 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: 1691 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]:
1691 new_command.extend(('--accept', 'theirs-conflict')) 1692 new_command.extend(('--accept', 'theirs-conflict'))
1692 elif options.manually_grab_svn_rev: 1693 elif options.manually_grab_svn_rev:
1693 new_command.append('--force') 1694 new_command.append('--force')
1694 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: 1695 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]:
1695 new_command.extend(('--accept', 'postpone')) 1696 new_command.extend(('--accept', 'postpone'))
1696 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: 1697 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]:
1697 new_command.extend(('--accept', 'postpone')) 1698 new_command.extend(('--accept', 'postpone'))
1698 return new_command 1699 return new_command
OLDNEW
« no previous file with comments | « gclient.py ('k') | git_cache.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698