Mercurial > hg
comparison hgext/convert/subversion.py @ 9860:9c43089b372a
convert/svn: fix warning when repo detection failed
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Mon, 16 Nov 2009 14:09:31 +0100 |
parents | 2e51cc30fc30 |
children | a02d43acbc04 |
comparison
equal
deleted
inserted
replaced
9859:951ec6c7d703 | 9860:9c43089b372a |
---|---|
152 rsp = opener.open('%s://%s/!svn/ver/0/.svn' % (proto, path)) | 152 rsp = opener.open('%s://%s/!svn/ver/0/.svn' % (proto, path)) |
153 data = rsp.read() | 153 data = rsp.read() |
154 except urllib2.HTTPError, inst: | 154 except urllib2.HTTPError, inst: |
155 if inst.code != 404: | 155 if inst.code != 404: |
156 # Except for 404 we cannot know for sure this is not an svn repo | 156 # Except for 404 we cannot know for sure this is not an svn repo |
157 ui.warn(_('svn: cannot probe remote repository, assume it could be ' | 157 ui.warn(_('svn: cannot probe remote repository, assume it could ' |
158 'a subversion repository. Use --source if you know better.\n')) | 158 'be a subversion repository. Use --source-type if you ' |
159 'know better.\n')) | |
159 return True | 160 return True |
160 data = inst.fp.read() | 161 data = inst.fp.read() |
161 except: | 162 except: |
162 # Could be urllib2.URLError if the URL is invalid or anything else. | 163 # Could be urllib2.URLError if the URL is invalid or anything else. |
163 return False | 164 return False |