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

Side by Side Diff: gclient_scm.py

Issue 1162153004: Add env variable to suppress the notice about deprecated SVN (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Fix spelling Created 5 years, 6 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 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 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after
1162 class SVNWrapper(SCMWrapper): 1162 class SVNWrapper(SCMWrapper):
1163 """ Wrapper for SVN """ 1163 """ Wrapper for SVN """
1164 name = 'svn' 1164 name = 'svn'
1165 _PRINTED_DEPRECATION = False 1165 _PRINTED_DEPRECATION = False
1166 1166
1167 _MESSAGE = ( 1167 _MESSAGE = (
1168 'Oh hai! You are using subversion. Chrome infra is eager to get rid of', 1168 'Oh hai! You are using subversion. Chrome infra is eager to get rid of',
1169 'svn support so please switch to git.', 1169 'svn support so please switch to git.',
1170 'Tracking bug: http://crbug.com/475320', 1170 'Tracking bug: http://crbug.com/475320',
1171 'Request a new git repository at: ', 1171 'Request a new git repository at: ',
1172 ' https://code.google.com/p/chromium/issues/entry?template=Infra-Git', 1172 ' https://code.google.com/p/chromium/issues/entry?template=Infra-Git')
1173 '',
1174 'If subversion support is needed, pin your depot_tools to ',
1175 'c20f470011e2ea4d81527976f3bded2c13e258af and set the env var',
1176 'DEPOT_TOOLS_UPDATE=0',
1177 'Thank you for your business!')
1178 1173
1179 def __init__(self, *args, **kwargs): 1174 def __init__(self, *args, **kwargs):
1180 super(SVNWrapper, self).__init__(*args, **kwargs) 1175 super(SVNWrapper, self).__init__(*args, **kwargs)
1181 if not SVNWrapper._PRINTED_DEPRECATION: 1176 suppress_deprecated_notice = os.environ.get(
1177 'SUPPRESS_DEPRECATED_SVN_NOTICE', False)
1178 if not SVNWrapper._PRINTED_DEPRECATION and not suppress_deprecated_notice:
1182 SVNWrapper._PRINTED_DEPRECATION = True 1179 SVNWrapper._PRINTED_DEPRECATION = True
1183 sys.stderr.write('\n'.join(self._MESSAGE) + '\n') 1180 sys.stderr.write('\n'.join(self._MESSAGE) + '\n')
1184 1181
1185 @staticmethod 1182 @staticmethod
1186 def BinaryExists(): 1183 def BinaryExists():
1187 """Returns true if the command exists.""" 1184 """Returns true if the command exists."""
1188 try: 1185 try:
1189 result, version = scm.SVN.AssertVersion('1.4') 1186 result, version = scm.SVN.AssertVersion('1.4')
1190 if not result: 1187 if not result:
1191 raise gclient_utils.Error('SVN version is older than 1.4: %s' % version) 1188 raise gclient_utils.Error('SVN version is older than 1.4: %s' % version)
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
1640 new_command.append('--force') 1637 new_command.append('--force')
1641 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: 1638 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]:
1642 new_command.extend(('--accept', 'theirs-conflict')) 1639 new_command.extend(('--accept', 'theirs-conflict'))
1643 elif options.manually_grab_svn_rev: 1640 elif options.manually_grab_svn_rev:
1644 new_command.append('--force') 1641 new_command.append('--force')
1645 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: 1642 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]:
1646 new_command.extend(('--accept', 'postpone')) 1643 new_command.extend(('--accept', 'postpone'))
1647 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: 1644 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]:
1648 new_command.extend(('--accept', 'postpone')) 1645 new_command.extend(('--accept', 'postpone'))
1649 return new_command 1646 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