Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3299)

Unified Diff: gclient_scm.py

Issue 227003: Print nice error in url error. (Closed)
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient_scm.py
diff --git a/gclient_scm.py b/gclient_scm.py
index 51a3f5f8db4d081638f4cd0423b841bffae6b53c..66483cc83f68c284ea833b9482a208dbbbd425ea 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:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698