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

Side by Side Diff: gclient_scm.py

Issue 18949002: Do not prompt for passwords (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 | 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) 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
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
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
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