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

Side by Side Diff: gclient_scm.py

Issue 504473002: Sometimes options won't have a 'shallow' field. Don't freak out. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years, 4 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 # 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 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 # mirror_kwargs['refs'].extend(['refs/tags/lkgr', 'refs/tags/lkcr']) 789 # mirror_kwargs['refs'].extend(['refs/tags/lkgr', 'refs/tags/lkcr'])
790 if hasattr(options, 'with_branch_heads') and options.with_branch_heads: 790 if hasattr(options, 'with_branch_heads') and options.with_branch_heads:
791 mirror_kwargs['refs'].append('refs/branch-heads/*') 791 mirror_kwargs['refs'].append('refs/branch-heads/*')
792 if hasattr(options, 'with_tags') and options.with_tags: 792 if hasattr(options, 'with_tags') and options.with_tags:
793 mirror_kwargs['refs'].append('refs/tags/*') 793 mirror_kwargs['refs'].append('refs/tags/*')
794 return git_cache.Mirror(url, **mirror_kwargs) 794 return git_cache.Mirror(url, **mirror_kwargs)
795 795
796 @staticmethod 796 @staticmethod
797 def _UpdateMirror(mirror, options): 797 def _UpdateMirror(mirror, options):
798 """Update a git mirror by fetching the latest commits from the remote.""" 798 """Update a git mirror by fetching the latest commits from the remote."""
799 if options.shallow: 799 if getattr(options, 'shallow', False):
ghost stip (do not use) 2014/08/22 20:59:02 doesn't options default to None? or is this someth
800 # HACK(hinoka): These repositories should be super shallow. 800 # HACK(hinoka): These repositories should be super shallow.
801 if 'flash' in mirror.url: 801 if 'flash' in mirror.url:
802 depth = 10 802 depth = 10
803 else: 803 else:
804 depth = 10000 804 depth = 10000
805 else: 805 else:
806 depth = None 806 depth = None
807 mirror.populate(verbose=options.verbose, bootstrap=True, depth=depth, 807 mirror.populate(verbose=options.verbose, bootstrap=True, depth=depth,
808 ignore_lock=options.ignore_locks) 808 ignore_lock=options.ignore_locks)
809 mirror.unlock() 809 mirror.unlock()
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
1575 new_command.append('--force') 1575 new_command.append('--force')
1576 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: 1576 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]:
1577 new_command.extend(('--accept', 'theirs-conflict')) 1577 new_command.extend(('--accept', 'theirs-conflict'))
1578 elif options.manually_grab_svn_rev: 1578 elif options.manually_grab_svn_rev:
1579 new_command.append('--force') 1579 new_command.append('--force')
1580 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: 1580 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]:
1581 new_command.extend(('--accept', 'postpone')) 1581 new_command.extend(('--accept', 'postpone'))
1582 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: 1582 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]:
1583 new_command.extend(('--accept', 'postpone')) 1583 new_command.extend(('--accept', 'postpone'))
1584 return new_command 1584 return new_command
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