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

Side by Side Diff: gclient_scm.py

Issue 184793003: Need to run git cache exists in a directory we know for sure that exists (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
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
« 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 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 +
685 ['--shallow', '--cache-dir', self.cache_dir, url], 685 ['--shallow', '--cache-dir', self.cache_dir, url],
686 options, cwd=self._root_dir, retry=True) 686 options, cwd=self._root_dir, retry=True)
687 return self._Run(['cache', 'exists', '--cache-dir', self.cache_dir, url], 687 return self._Run(['cache', 'exists', '--cache-dir', self.cache_dir, url],
688 options).strip() 688 options, cwd=self._root_dir, ).strip()
689 689
690 def _Clone(self, revision, url, options): 690 def _Clone(self, revision, url, options):
691 """Clone a git repository from the given URL. 691 """Clone a git repository from the given URL.
692 692
693 Once we've cloned the repo, we checkout a working branch if the specified 693 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 694 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 695 leave HEAD detached as it makes future updates simpler -- in this case the
696 user should first create a new branch or switch to an existing branch before 696 user should first create a new branch or switch to an existing branch before
697 making changes in the repo.""" 697 making changes in the repo."""
698 if not options.verbose: 698 if not options.verbose:
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
1401 new_command.append('--force') 1401 new_command.append('--force')
1402 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: 1402 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]:
1403 new_command.extend(('--accept', 'theirs-conflict')) 1403 new_command.extend(('--accept', 'theirs-conflict'))
1404 elif options.manually_grab_svn_rev: 1404 elif options.manually_grab_svn_rev:
1405 new_command.append('--force') 1405 new_command.append('--force')
1406 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: 1406 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]:
1407 new_command.extend(('--accept', 'postpone')) 1407 new_command.extend(('--accept', 'postpone'))
1408 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: 1408 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]:
1409 new_command.extend(('--accept', 'postpone')) 1409 new_command.extend(('--accept', 'postpone'))
1410 return new_command 1410 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