# HG changeset patch # User Mads Kiilerich # Date 1540771638 -3600 # Node ID c363f492c117c92d76e8d7cec56562e4a74cf9b0 # Parent 451b3f9d814ee4a7c4afb4fbda688d15a10668ed hg: refactor compat wrapping of repository diff -r 451b3f9d814e -r c363f492c117 kallithea/lib/vcs/backends/hg/repository.py --- a/kallithea/lib/vcs/backends/hg/repository.py Mon Oct 29 01:07:15 2018 +0100 +++ b/kallithea/lib/vcs/backends/hg/repository.py Mon Oct 29 01:07:18 2018 +0100 @@ -30,7 +30,7 @@ from kallithea.lib.vcs.utils.paths import abspath from kallithea.lib.vcs.utils.hgcompat import ( ui, nullid, match, patch, diffopts, clone, get_contact, - localrepository, RepoLookupError, Abort, RepoError, hex, scmutil, hg_url, + localrepo, RepoLookupError, Abort, RepoError, hex, scmutil, hg_url, httpbasicauthhandler, httpdigestauthhandler, peer, httppeer, sshpeer, tag ) @@ -364,7 +364,7 @@ # Don't try to create if we've already cloned repo create = False - return localrepository(self.baseui, self.path, create=create) + return localrepo.localrepository(self.baseui, self.path, create=create) except (Abort, RepoError) as err: if create: msg = "Cannot create repository at %s. Original error was %s" \ diff -r 451b3f9d814e -r c363f492c117 kallithea/lib/vcs/utils/hgcompat.py --- a/kallithea/lib/vcs/utils/hgcompat.py Mon Oct 29 01:07:15 2018 +0100 +++ b/kallithea/lib/vcs/utils/hgcompat.py Mon Oct 29 01:07:18 2018 +0100 @@ -18,7 +18,6 @@ from mercurial.error import RepoError, RepoLookupError, Abort from mercurial.hgweb import hgweb_mod from mercurial.hgweb.common import get_contact -from mercurial.localrepo import localrepository from mercurial.match import match from mercurial.mdiff import diffopts from mercurial.node import hex @@ -45,9 +44,9 @@ # workaround for 3.3 94ac64bcf6fe and not calling largefiles reposetup correctly -localrepository._lfstatuswriters = [lambda *msg, **opts: None] +localrepo.localrepository._lfstatuswriters = [lambda *msg, **opts: None] # 3.5 7699d3212994 added the invariant that repo.lfstatus must exist before hitting overridearchive -localrepository.lfstatus = False +localrepo.localrepository.lfstatus = False # Mercurial 4.2 moved tag from localrepo to the tags module def tag(repo, *args):