Beispiel #1
0
def reposetup(ui, repo):
    if not isinstance(repo, gitrepo.gitrepo):
        klass = hgrepo.generate_repo_subclass(repo.__class__)
        repo.__class__ = klass
        
    global cached_repo
    cached_repo = repo
Beispiel #2
0
def reposetup(ui, repo):
    if not isinstance(repo, gitrepo.gitrepo):
        klass = hgrepo.generate_repo_subclass(repo.__class__)
        repo.__class__ = klass
        
    global cached_repo
    cached_repo = repo
Beispiel #3
0
def reposetup(ui, repo):
    if not isinstance(repo, gitrepo.gitrepo):

        if (getattr(dirstate, 'rootcache', False)
                and hgutil.safehasattr(repo, 'vfs')
                and os.path.exists(compat.gitvfs(repo).join('git'))):
            # only install our dirstate wrapper if it has a hope of working
            import gitdirstate
            dirstate.dirstate = gitdirstate.gitdirstate

        klass = hgrepo.generate_repo_subclass(repo.__class__)
        repo.__class__ = klass
Beispiel #4
0
def reposetup(ui, repo):
    if not isinstance(repo, gitrepo.gitrepo):

        if (getattr(dirstate, 'rootcache', False) and
            (not ignoremod or getattr(ignore, 'readpats', False))):
            # only install our dirstate wrapper if it has a hope of working
            import gitdirstate
            if ignoremod:
                def ignorewrap(orig, *args, **kwargs):
                    return gitdirstate.gignore(*args, **kwargs)
                extensions.wrapfunction(ignore, 'ignore', ignorewrap)
            dirstate.dirstate = gitdirstate.gitdirstate

        klass = hgrepo.generate_repo_subclass(repo.__class__)
        repo.__class__ = klass
Beispiel #5
0
def reposetup(ui, repo):
    if not isinstance(repo, gitrepo.gitrepo):

        if (getattr(dirstate, 'rootcache', False) and
            (not ignoremod or getattr(ignore, 'readpats', False)) and
            hgutil.safehasattr(repo, 'vfs') and
            os.path.exists(_gitvfs(repo).join('git'))):
            # only install our dirstate wrapper if it has a hope of working
            import gitdirstate
            if ignoremod:
                def ignorewrap(orig, *args, **kwargs):
                    return gitdirstate.gignore(*args, **kwargs)
                extensions.wrapfunction(ignore, 'ignore', ignorewrap)
            dirstate.dirstate = gitdirstate.gitdirstate

        klass = hgrepo.generate_repo_subclass(repo.__class__)
        repo.__class__ = klass
Beispiel #6
0
def reposetup(ui, repo):
    klass = hgrepo.generate_repo_subclass(repo.__class__)
    repo.__class__ = klass