Commit e2ce0c75 authored by maruel@chromium.org's avatar maruel@chromium.org

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
parent 8871f45f
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment