# HG changeset patch # User Marcin Kuzminski # Date 2018-06-05 14:08:20 # Node ID 62954e5c11499c421c9f758a939bd9ef6412fb81 # Parent 3a2a7383706a4229eaf7ef3116dba66cbbf1a6ce mercurial: fix problems with latest httppeer changes in mercurial 4.6 series. 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