@@ -279,14 +279,15 @@ class MercurialRepository(BaseRepository
when the return code is non 200
"""
# check first if it's not an local url
if os.path.isdir(url) or url.startswith('file:'):
return True
url_prefix = None
if '+' in url[:url.find('://')]:
url = url[url.find('+') + 1:]
url_prefix, url = url.split('+', 1)
handlers = []
url_obj = hg_url(url)
test_uri, authinfo = url_obj.authinfo()
url_obj.passwd = '*****'
cleaned_uri = str(url_obj)
@@ -314,19 +315,20 @@ class MercurialRepository(BaseRepository
if resp.code != 200:
raise Exception('Return Code is not 200')
except Exception, e:
# means it cannot be cloned
raise urllib2.URLError("[%s] org_exc: %s" % (cleaned_uri, e))
# now check if it's a proper hg repo
try:
httppeer(repoui or ui.ui(), url).lookup('tip')
raise urllib2.URLError(
"url [%s] does not look like an hg repo org_exc: %s"
% (cleaned_uri, e))
if not url_prefix: # skip svn+http://... (and git+... too)
def _get_repo(self, create, src_url=None, update_after_clone=False):
Function will check for mercurial repository in given path and return
Status change: