From e2ce0c75c30e3948a279f92934a8475705758ca5 Mon Sep 17 00:00:00 2001 From: "maruel@chromium.org" Date: Wed, 23 Sep 2009 16:14:18 +0000 Subject: [PATCH] Print nice error in url error. TEST=none BUG=http://code.google.com/p/gclient/issues/detail?id=12 Review URL: http://codereview.chromium.org/227003 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@26931 0039d316-1c4b-4281-b951-d872f2087c98 --- gclient_scm.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gclient_scm.py b/gclient_scm.py index 51a3f5f8d..66483cc83 100644 --- a/gclient_scm.py +++ b/gclient_scm.py @@ -168,6 +168,10 @@ class SVNWrapper(SCMWrapper): if from_info['URL'] != components[0]: to_info = CaptureSVNInfo(url, '.') + if not to_info.get('Repository Root') or not to_info.get('UUID'): + # The url is invalid or the server is not accessible, it's safer to bail + # out right now. + raise gclient_utils.Error('This url is unreachable: %s' % url) can_switch = ((from_info['Repository Root'] != to_info['Repository Root']) and (from_info['UUID'] == to_info['UUID'])) if can_switch: