Changeset - c363f492c117
[Not reviewed]
default
0 2 0
Mads Kiilerich - 7 years ago 2018-10-29 01:07:18
mads@kiilerich.com
hg: refactor compat wrapping of repository
2 files changed with 4 insertions and 5 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/vcs/backends/hg/repository.py
Show inline comments
 
@@ -30,7 +30,7 @@ from kallithea.lib.vcs.utils.ordered_dic
 
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 @@ class MercurialRepository(BaseRepository
 

	
 
                # 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" \
kallithea/lib/vcs/utils/hgcompat.py
Show inline comments
 
@@ -18,7 +18,6 @@ from mercurial.context import memctx, me
 
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 @@ if inspect.getargspec(memfilectx.__init_
 

	
 

	
 
# 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):
0 comments (0 inline, 0 general)