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

Side by Side Diff: gclient_scm.py

Issue 18083033: Get rid of place-holder for commit-msg hook. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 7 years, 5 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 | git-templates/hooks/commit-msg » ('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 import collections 7 import collections
8 import logging 8 import logging
9 import os 9 import os
10 import posixpath 10 import posixpath
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 779
780 Once we've cloned the repo, we checkout a working branch if the specified 780 Once we've cloned the repo, we checkout a working branch if the specified
781 revision is a branch head. If it is a tag or a specific commit, then we 781 revision is a branch head. If it is a tag or a specific commit, then we
782 leave HEAD detached as it makes future updates simpler -- in this case the 782 leave HEAD detached as it makes future updates simpler -- in this case the
783 user should first create a new branch or switch to an existing branch before 783 user should first create a new branch or switch to an existing branch before
784 making changes in the repo.""" 784 making changes in the repo."""
785 if not options.verbose: 785 if not options.verbose:
786 # git clone doesn't seem to insert a newline properly before printing 786 # git clone doesn't seem to insert a newline properly before printing
787 # to stdout 787 # to stdout
788 print('') 788 print('')
789 clone_cmd = ['-c', 'core.deltaBaseCacheLimit=2g', 'clone', '--progress'] 789 template_path = os.path.join(
790 os.path.dirname(THIS_FILE_PATH), 'git-templates')
791 clone_cmd = ['-c', 'core.deltaBaseCacheLimit=2g', 'clone', '--progress',
792 '--template=%s' % template_path]
790 if self.cache_dir: 793 if self.cache_dir:
791 clone_cmd.append('--shared') 794 clone_cmd.append('--shared')
792 if revision.startswith('refs/heads/'): 795 if revision.startswith('refs/heads/'):
793 clone_cmd.extend(['-b', revision.replace('refs/heads/', '')]) 796 clone_cmd.extend(['-b', revision.replace('refs/heads/', '')])
794 detach_head = False 797 detach_head = False
795 else: 798 else:
796 detach_head = True 799 detach_head = True
797 if options.verbose: 800 if options.verbose:
798 clone_cmd.append('--verbose') 801 clone_cmd.append('--verbose')
799 clone_cmd.extend([url, self.checkout_path]) 802 clone_cmd.extend([url, self.checkout_path])
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
1432 new_command.append('--force') 1435 new_command.append('--force')
1433 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: 1436 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]:
1434 new_command.extend(('--accept', 'theirs-conflict')) 1437 new_command.extend(('--accept', 'theirs-conflict'))
1435 elif options.manually_grab_svn_rev: 1438 elif options.manually_grab_svn_rev:
1436 new_command.append('--force') 1439 new_command.append('--force')
1437 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: 1440 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]:
1438 new_command.extend(('--accept', 'postpone')) 1441 new_command.extend(('--accept', 'postpone'))
1439 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: 1442 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]:
1440 new_command.extend(('--accept', 'postpone')) 1443 new_command.extend(('--accept', 'postpone'))
1441 return new_command 1444 return new_command
OLDNEW
« no previous file with comments | « no previous file | git-templates/hooks/commit-msg » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698