From 81344141c12bafbf4b90e0ffb805a4f8645819f9 Mon Sep 17 00:00:00 2001 From: "maruel@chromium.org" Date: Thu, 24 Sep 2009 19:36:53 +0000 Subject: [PATCH] Fix the prompt so the user can interact with svn. When using svn for try job for the first time, svn will ask for the credentials. TEST=none BUG=none Review URL: http://codereview.chromium.org/223024 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@27103 0039d316-1c4b-4281-b951-d872f2087c98 --- trychange.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/trychange.py b/trychange.py index c99388d8b..0b3bef533 100755 --- a/trychange.py +++ b/trychange.py @@ -15,6 +15,7 @@ import optparse import os import shutil import socket +import subprocess import sys import tempfile import traceback @@ -317,11 +318,14 @@ def _SendChangeSVN(options): try: # Don't use '--non-interactive', since we want it to prompt for # crendentials if necessary. - command = ['svn', 'checkout', '--depth', 'empty', + command = ['svn', 'checkout', '--depth', 'empty', '-q', options.svn_repo, temp_dir] if options.email: command += ['--username', options.email] - RunCommand(command) + # Don't use RunCommand() since svn may prompt for information. + use_shell = sys.platform.startswith("win") + subprocess.Popen(command, shell=use_shell).communicate() + # TODO(maruel): Use a subdirectory per user? current_time = str(datetime.datetime.now()).replace(':', '.') file_name = (EscapeDot(options.user) + '.' + EscapeDot(options.name) +