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

Side by Side Diff: gclient_scm.py

Issue 7104007: Make sure paths that look like http://git_server/repo.git@SHA get checked out (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 9 years, 6 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) 2010 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2010 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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 if not options.verbose: 481 if not options.verbose:
482 # git clone doesn't seem to insert a newline properly before printing 482 # git clone doesn't seem to insert a newline properly before printing
483 # to stdout 483 # to stdout
484 print('') 484 print('')
485 485
486 clone_cmd = ['clone'] 486 clone_cmd = ['clone']
487 if revision.startswith('refs/heads/'): 487 if revision.startswith('refs/heads/'):
488 clone_cmd.extend(['-b', revision.replace('refs/heads/', '')]) 488 clone_cmd.extend(['-b', revision.replace('refs/heads/', '')])
489 detach_head = False 489 detach_head = False
490 else: 490 else:
491 clone_cmd.append('--no-checkout')
cmp 2011/05/31 22:22:08 This would have made a working copy with no usable
492 detach_head = True 491 detach_head = True
493 if options.verbose: 492 if options.verbose:
494 clone_cmd.append('--verbose') 493 clone_cmd.append('--verbose')
495 clone_cmd.extend([url, self.checkout_path]) 494 clone_cmd.extend([url, self.checkout_path])
496 495
497 for _ in range(3): 496 for _ in range(3):
498 try: 497 try:
499 self._Run(clone_cmd, options, cwd=self._root_dir) 498 self._Run(clone_cmd, options, cwd=self._root_dir)
500 break 499 break
501 except (gclient_utils.Error, subprocess2.CalledProcessError), e: 500 except (gclient_utils.Error, subprocess2.CalledProcessError), e:
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 931
933 This method returns a new list to be used as a command.""" 932 This method returns a new list to be used as a command."""
934 new_command = command[:] 933 new_command = command[:]
935 if revision: 934 if revision:
936 new_command.extend(['--revision', str(revision).strip()]) 935 new_command.extend(['--revision', str(revision).strip()])
937 # --force was added to 'svn update' in svn 1.5. 936 # --force was added to 'svn update' in svn 1.5.
938 if ((options.force or options.manually_grab_svn_rev) and 937 if ((options.force or options.manually_grab_svn_rev) and
939 scm.SVN.AssertVersion("1.5")[0]): 938 scm.SVN.AssertVersion("1.5")[0]):
940 new_command.append('--force') 939 new_command.append('--force')
941 return new_command 940 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