From 54d1f1ae2f223c035e98e0dab6001945bd55784a Mon Sep 17 00:00:00 2001 From: "maruel@chromium.org" Date: Fri, 8 Jan 2010 19:53:47 +0000 Subject: [PATCH] Abort gclient sync when a svn command fails. TEST=a svn locked directory will stop a gclient sync BUG=none Review URL: http://codereview.chromium.org/529002 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@35815 0039d316-1c4b-4281-b951-d872f2087c98 --- scm.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scm.py b/scm.py index 42a764c90..3481219ba 100644 --- a/scm.py +++ b/scm.py @@ -333,6 +333,7 @@ class SVN(object): for i in range(1, 10): previous_list_len = len(file_list) failure = [] + def CaptureMatchingLines(line): match = compiled_pattern.search(line) if match: @@ -341,6 +342,7 @@ class SVN(object): # We can't raise an exception. We can't alias a variable. Use a cheap # way. failure.append(True) + try: SVN.RunAndFilterOutput(args, in_directory, @@ -355,6 +357,8 @@ class SVN(object): # An aborted checkout is now an update. args[0] = 'update' continue + # No progress was made, bail out. + raise break @staticmethod