From 95f0f4eb86b8782e0ca35970202fec991e0379a1 Mon Sep 17 00:00:00 2001 From: "scherkus@chromium.org" Date: Sat, 22 May 2010 00:55:26 +0000 Subject: [PATCH] Strip the subversion revision when passing it as an argument to --revision. Turns out svn treats extra whitespace as part of the revision number and throws an exception. BUG=44790 TEST=insert some spaces in your revision arguments, gclient should still work Review URL: http://codereview.chromium.org/2077017 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@47979 0039d316-1c4b-4281-b951-d872f2087c98 --- gclient_scm.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gclient_scm.py b/gclient_scm.py index fb2ec28d7..472cac8ba 100644 --- a/gclient_scm.py +++ b/gclient_scm.py @@ -1,4 +1,4 @@ -# Copyright (c) 2009 The Chromium Authors. All rights reserved. +# Copyright (c) 2010 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -682,7 +682,7 @@ class SVNWrapper(SCMWrapper): # We need to checkout. command = ['checkout', url, checkout_path] if revision: - command.extend(['--revision', str(revision)]) + command.extend(['--revision', str(revision).strip()]) scm.SVN.RunAndGetFileList(options, command, self._root_dir, file_list) return @@ -740,7 +740,7 @@ class SVNWrapper(SCMWrapper): # We need to checkout. command = ['checkout', url, checkout_path] if revision: - command.extend(['--revision', str(revision)]) + command.extend(['--revision', str(revision).strip()]) scm.SVN.RunAndGetFileList(options, command, self._root_dir, file_list) return @@ -754,7 +754,7 @@ class SVNWrapper(SCMWrapper): command = ["update", checkout_path] if revision: - command.extend(['--revision', str(revision)]) + command.extend(['--revision', str(revision).strip()]) scm.SVN.RunAndGetFileList(options, command, self._root_dir, file_list) def updatesingle(self, options, args, file_list): @@ -783,7 +783,7 @@ class SVNWrapper(SCMWrapper): command = ["export", os.path.join(self.url, filename), os.path.join(checkout_path, filename)] if options.revision: - command.extend(['--revision', str(options.revision)]) + command.extend(['--revision', str(options.revision).strip()]) scm.SVN.Run(command, self._root_dir) def revert(self, options, args, file_list):