Skip to content
Snippets Groups Projects
Commit 8742275b authored by Dan Villiom Podlaski Christiansen's avatar Dan Villiom Podlaski Christiansen
Browse files

hgrepo: move wrapping out of __init__.py

parent 765c596a
No related branches found
No related tags found
1 merge request!107Refactor __init__.py to many modules; use exthelper
......@@ -204,8 +204,7 @@
from . import gitdirstate
dirstate.dirstate = gitdirstate.gitdirstate
klass = hgrepo.generate_repo_subclass(repo.__class__)
repo.__class__ = klass
hgrepo.reposetup(ui, repo)
extensions.wrapfunction(manifest.manifestdict, b'diff',
......
......@@ -7,9 +7,8 @@
from .gitrepo import gitrepo
from . import util
def generate_repo_subclass(baseclass):
class hgrepo(baseclass):
def reposetup(ui, repo):
class hgrepo(repo.__class__):
@util.transform_notgit
def findoutgoing(self, remote, base=None, heads=None, force=False):
if isinstance(remote, gitrepo):
......@@ -56,4 +55,5 @@
return tagscache
return hgrepo
repo.__class__ = hgrepo
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment