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 import collections | 7 import collections |
8 import logging | 8 import logging |
9 import os | 9 import os |
10 import posixpath | 10 import posixpath |
(...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1023 backoff_time *= 1.3 | 1023 backoff_time *= 1.3 |
1024 | 1024 |
1025 def _Run(self, args, _options, git_filter=False, **kwargs): | 1025 def _Run(self, args, _options, git_filter=False, **kwargs): |
1026 kwargs.setdefault('cwd', self.checkout_path) | 1026 kwargs.setdefault('cwd', self.checkout_path) |
1027 kwargs.setdefault('nag_timer', self.nag_timer) | 1027 kwargs.setdefault('nag_timer', self.nag_timer) |
1028 kwargs.setdefault('nag_max', self.nag_max) | 1028 kwargs.setdefault('nag_max', self.nag_max) |
1029 if git_filter: | 1029 if git_filter: |
1030 kwargs['filter_fn'] = GitFilter(kwargs['nag_timer'] / 2, | 1030 kwargs['filter_fn'] = GitFilter(kwargs['nag_timer'] / 2, |
1031 kwargs.get('filter_fn')) | 1031 kwargs.get('filter_fn')) |
1032 kwargs.setdefault('print_stdout', False) | 1032 kwargs.setdefault('print_stdout', False) |
1033 # Don't prompt for passwords; just fail quickly and noisily. | |
Isaac (away)
2013/07/09 21:54:58
only if jobs > 1 ?
szager1
2013/07/09 22:23:09
Hmm... My concern here is that if we surface the p
| |
1034 env = kwargs.get('env') or kwargs.setdefault('env', os.environ.copy()) | |
1035 env.setdefault('GIT_ASKPASS', 'true') | |
1036 env.setdefault('SSH_ASKPASS', 'true') | |
Dirk Pranke
2013/07/10 00:26:35
I think you should have a comment here explaining
| |
1033 else: | 1037 else: |
1034 kwargs.setdefault('print_stdout', True) | 1038 kwargs.setdefault('print_stdout', True) |
1035 stdout = kwargs.get('stdout', sys.stdout) | 1039 stdout = kwargs.get('stdout', sys.stdout) |
1036 stdout.write('\n________ running \'git %s\' in \'%s\'\n' % ( | 1040 stdout.write('\n________ running \'git %s\' in \'%s\'\n' % ( |
1037 ' '.join(args), kwargs['cwd'])) | 1041 ' '.join(args), kwargs['cwd'])) |
1038 gclient_utils.CheckCallAndFilter(['git'] + args, **kwargs) | 1042 gclient_utils.CheckCallAndFilter(['git'] + args, **kwargs) |
1039 | 1043 |
1040 | 1044 |
1041 class SVNWrapper(SCMWrapper): | 1045 class SVNWrapper(SCMWrapper): |
1042 """ Wrapper for SVN """ | 1046 """ Wrapper for SVN """ |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1421 new_command.append('--force') | 1425 new_command.append('--force') |
1422 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1426 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
1423 new_command.extend(('--accept', 'theirs-conflict')) | 1427 new_command.extend(('--accept', 'theirs-conflict')) |
1424 elif options.manually_grab_svn_rev: | 1428 elif options.manually_grab_svn_rev: |
1425 new_command.append('--force') | 1429 new_command.append('--force') |
1426 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1430 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
1427 new_command.extend(('--accept', 'postpone')) | 1431 new_command.extend(('--accept', 'postpone')) |
1428 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1432 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
1429 new_command.extend(('--accept', 'postpone')) | 1433 new_command.extend(('--accept', 'postpone')) |
1430 return new_command | 1434 return new_command |
OLD | NEW |