diff --git a/vcsserver/hg.py b/vcsserver/hg.py --- a/vcsserver/hg.py +++ b/vcsserver/hg.py @@ -32,7 +32,7 @@ from vcsserver.base import RepoFactory, from vcsserver.hgcompat import ( archival, bin, clone, config as hgconfig, diffopts, hex, hg_url as url_parser, httpbasicauthhandler, httpdigestauthhandler, - httppeer, localrepository, match, memctx, exchange, memfilectx, nullrev, + makepeer, localrepository, match, memctx, exchange, memfilectx, nullrev, patch, peer, revrange, ui, hg_tag, Abort, LookupError, RepoError, RepoLookupError, InterventionRequired, RequirementError) @@ -383,7 +383,9 @@ class HgRemote(object): log.debug( "Verifying if URL is a Mercurial repository: %s", cleaned_uri) - httppeer(make_ui_from_config(config), url).lookup('tip') + ui = make_ui_from_config(config) + peer_checker = makepeer(ui, url) + peer_checker.lookup('tip') except Exception as e: log.warning("URL is not a valid Mercurial repository: %s", cleaned_uri) diff --git a/vcsserver/hgcompat.py b/vcsserver/hgcompat.py --- a/vcsserver/hgcompat.py +++ b/vcsserver/hgcompat.py @@ -51,7 +51,7 @@ from mercurial.node import bin, hex from mercurial.encoding import tolocal from mercurial.discovery import findcommonoutgoing from mercurial.hg import peer -from mercurial.httppeer import httppeer +from mercurial.httppeer import makepeer from mercurial.util import url as hg_url from mercurial.scmutil import revrange from mercurial.node import nullrev