Add env variable to suppress the notice about deprecated SVN
Also removed part of the message that encourages users to disable updates to
depot_tools. If the users do not enable updates, it prevents landing changes into
project repositories that depend on having latest version of the depot_tools, e.g.
https://codereview.chromium.org/1152823005/.
R=akuegel@chromium.org
TBR=maruel@chromium.org, iannucci@chromium.org
BUG=475320
Review URL: https://codereview.chromium.org/1162153004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295486 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/gclient_scm.py b/gclient_scm.py
index 55a73f4..cf19e35 100644
--- a/gclient_scm.py
+++ b/gclient_scm.py
@@ -1169,16 +1169,13 @@
'svn support so please switch to git.',
'Tracking bug: http://crbug.com/475320',
'Request a new git repository at: ',
- ' https://code.google.com/p/chromium/issues/entry?template=Infra-Git',
- '',
- 'If subversion support is needed, pin your depot_tools to ',
- 'c20f470011e2ea4d81527976f3bded2c13e258af and set the env var',
- 'DEPOT_TOOLS_UPDATE=0',
- 'Thank you for your business!')
+ ' https://code.google.com/p/chromium/issues/entry?template=Infra-Git')
def __init__(self, *args, **kwargs):
super(SVNWrapper, self).__init__(*args, **kwargs)
- if not SVNWrapper._PRINTED_DEPRECATION:
+ suppress_deprecated_notice = os.environ.get(
+ 'SUPPRESS_DEPRECATED_SVN_NOTICE', False)
+ if not SVNWrapper._PRINTED_DEPRECATION and not suppress_deprecated_notice:
SVNWrapper._PRINTED_DEPRECATION = True
sys.stderr.write('\n'.join(self._MESSAGE) + '\n')