OLD | NEW |
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 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
774 def _UpdateMirror(mirror, options): | 774 def _UpdateMirror(mirror, options): |
775 """Update a git mirror by fetching the latest commits from the remote.""" | 775 """Update a git mirror by fetching the latest commits from the remote.""" |
776 if options.shallow: | 776 if options.shallow: |
777 # HACK(hinoka): These repositories should be super shallow. | 777 # HACK(hinoka): These repositories should be super shallow. |
778 if 'flash' in mirror.url: | 778 if 'flash' in mirror.url: |
779 depth = 10 | 779 depth = 10 |
780 else: | 780 else: |
781 depth = 10000 | 781 depth = 10000 |
782 else: | 782 else: |
783 depth = None | 783 depth = None |
784 mirror.populate(verbose=options.verbose, bootstrap=True, depth=depth) | 784 mirror.populate(verbose=options.verbose, bootstrap=True, depth=depth, |
| 785 ignore_lock=options.ignore_locks) |
785 mirror.unlock() | 786 mirror.unlock() |
786 | 787 |
787 def _Clone(self, revision, url, options): | 788 def _Clone(self, revision, url, options): |
788 """Clone a git repository from the given URL. | 789 """Clone a git repository from the given URL. |
789 | 790 |
790 Once we've cloned the repo, we checkout a working branch if the specified | 791 Once we've cloned the repo, we checkout a working branch if the specified |
791 revision is a branch head. If it is a tag or a specific commit, then we | 792 revision is a branch head. If it is a tag or a specific commit, then we |
792 leave HEAD detached as it makes future updates simpler -- in this case the | 793 leave HEAD detached as it makes future updates simpler -- in this case the |
793 user should first create a new branch or switch to an existing branch before | 794 user should first create a new branch or switch to an existing branch before |
794 making changes in the repo.""" | 795 making changes in the repo.""" |
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1489 new_command.append('--force') | 1490 new_command.append('--force') |
1490 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1491 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
1491 new_command.extend(('--accept', 'theirs-conflict')) | 1492 new_command.extend(('--accept', 'theirs-conflict')) |
1492 elif options.manually_grab_svn_rev: | 1493 elif options.manually_grab_svn_rev: |
1493 new_command.append('--force') | 1494 new_command.append('--force') |
1494 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1495 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
1495 new_command.extend(('--accept', 'postpone')) | 1496 new_command.extend(('--accept', 'postpone')) |
1496 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1497 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
1497 new_command.extend(('--accept', 'postpone')) | 1498 new_command.extend(('--accept', 'postpone')) |
1498 return new_command | 1499 return new_command |
OLD | NEW |