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 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
798 """Update a git mirror by fetching the latest commits from the remote.""" | 798 """Update a git mirror by fetching the latest commits from the remote.""" |
799 if getattr(options, 'shallow', False): | 799 if getattr(options, 'shallow', False): |
800 # HACK(hinoka): These repositories should be super shallow. | 800 # HACK(hinoka): These repositories should be super shallow. |
801 if 'flash' in mirror.url: | 801 if 'flash' in mirror.url: |
802 depth = 10 | 802 depth = 10 |
803 else: | 803 else: |
804 depth = 10000 | 804 depth = 10000 |
805 else: | 805 else: |
806 depth = None | 806 depth = None |
807 mirror.populate(verbose=options.verbose, bootstrap=True, depth=depth, | 807 mirror.populate(verbose=options.verbose, bootstrap=True, depth=depth, |
808 ignore_lock=options.ignore_locks) | 808 ignore_lock=getattr(options, 'ignore_locks', False)) |
809 mirror.unlock() | 809 mirror.unlock() |
810 | 810 |
811 def _Clone(self, revision, url, options): | 811 def _Clone(self, revision, url, options): |
812 """Clone a git repository from the given URL. | 812 """Clone a git repository from the given URL. |
813 | 813 |
814 Once we've cloned the repo, we checkout a working branch if the specified | 814 Once we've cloned the repo, we checkout a working branch if the specified |
815 revision is a branch head. If it is a tag or a specific commit, then we | 815 revision is a branch head. If it is a tag or a specific commit, then we |
816 leave HEAD detached as it makes future updates simpler -- in this case the | 816 leave HEAD detached as it makes future updates simpler -- in this case the |
817 user should first create a new branch or switch to an existing branch before | 817 user should first create a new branch or switch to an existing branch before |
818 making changes in the repo.""" | 818 making changes in the repo.""" |
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1575 new_command.append('--force') | 1575 new_command.append('--force') |
1576 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1576 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
1577 new_command.extend(('--accept', 'theirs-conflict')) | 1577 new_command.extend(('--accept', 'theirs-conflict')) |
1578 elif options.manually_grab_svn_rev: | 1578 elif options.manually_grab_svn_rev: |
1579 new_command.append('--force') | 1579 new_command.append('--force') |
1580 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1580 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
1581 new_command.extend(('--accept', 'postpone')) | 1581 new_command.extend(('--accept', 'postpone')) |
1582 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1582 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
1583 new_command.extend(('--accept', 'postpone')) | 1583 new_command.extend(('--accept', 'postpone')) |
1584 return new_command | 1584 return new_command |
OLD | NEW |