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

Side by Side Diff: gclient_scm.py

Issue 198103012: Remove --shallow from git cache call in gclient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years, 9 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 import logging 7 import logging
8 import os 8 import os
9 import posixpath 9 import posixpath
10 import re 10 import re
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 674
675 def _CreateOrUpdateCache(self, url, options): 675 def _CreateOrUpdateCache(self, url, options):
676 """Make a new git mirror or update existing mirror for |url|, and return the 676 """Make a new git mirror or update existing mirror for |url|, and return the
677 mirror URI to clone from. 677 mirror URI to clone from.
678 678
679 If no cache-dir is specified, just return |url| unchanged. 679 If no cache-dir is specified, just return |url| unchanged.
680 """ 680 """
681 if not self.cache_dir: 681 if not self.cache_dir:
682 return url 682 return url
683 v = ['-v'] if options.verbose else [] 683 v = ['-v'] if options.verbose else []
684 self._Run(['cache', 'populate'] + v + 684 self._Run(['cache', 'populate'] + v + ['--cache-dir', self.cache_dir, url],
685 ['--shallow', '--cache-dir', self.cache_dir, url],
686 options, cwd=self._root_dir, retry=True) 685 options, cwd=self._root_dir, retry=True)
687 return self._Run(['cache', 'exists', '--cache-dir', self.cache_dir, url], 686 return self._Run(['cache', 'exists', '--cache-dir', self.cache_dir, url],
688 options, cwd=self._root_dir, ).strip() 687 options, cwd=self._root_dir, ).strip()
689 688
690 def _Clone(self, revision, url, options): 689 def _Clone(self, revision, url, options):
691 """Clone a git repository from the given URL. 690 """Clone a git repository from the given URL.
692 691
693 Once we've cloned the repo, we checkout a working branch if the specified 692 Once we've cloned the repo, we checkout a working branch if the specified
694 revision is a branch head. If it is a tag or a specific commit, then we 693 revision is a branch head. If it is a tag or a specific commit, then we
695 leave HEAD detached as it makes future updates simpler -- in this case the 694 leave HEAD detached as it makes future updates simpler -- in this case the
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
1401 new_command.append('--force') 1400 new_command.append('--force')
1402 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: 1401 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]:
1403 new_command.extend(('--accept', 'theirs-conflict')) 1402 new_command.extend(('--accept', 'theirs-conflict'))
1404 elif options.manually_grab_svn_rev: 1403 elif options.manually_grab_svn_rev:
1405 new_command.append('--force') 1404 new_command.append('--force')
1406 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: 1405 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]:
1407 new_command.extend(('--accept', 'postpone')) 1406 new_command.extend(('--accept', 'postpone'))
1408 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: 1407 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]:
1409 new_command.extend(('--accept', 'postpone')) 1408 new_command.extend(('--accept', 'postpone'))
1410 return new_command 1409 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