Exemple #1
0
 def instance(ui, path, create):
     path = util.drop_scheme('lbranch', path)
     root = lbranchroot(ui)
     if not root:
         raise util.Abort('local branch parent not available')
     repo = hg.repository(ui, root)
     repo.loadlocalbranch(path)
     return repo
Exemple #2
0
def _local(path):
    p = hgutil.drop_scheme('file', path)
    if (os.path.exists(os.path.join(p, '.git')) and
        not os.path.exists(os.path.join(p, '.hg'))):
        return gitrepo
    # detect a bare repository
    if (os.path.exists(os.path.join(p, 'HEAD')) and
        os.path.exists(os.path.join(p, 'objects')) and
        os.path.exists(os.path.join(p, 'refs')) and
        not os.path.exists(os.path.join(p, '.hg'))):
        return gitrepo
    return _oldlocal(path)
Exemple #3
0
def _local(path):
    p = hgutil.drop_scheme('file', path)
    if (os.path.exists(os.path.join(p, '.git'))
            and not os.path.exists(os.path.join(p, '.hg'))):
        return gitrepo
    # detect a bare repository
    if (os.path.exists(os.path.join(p, 'HEAD'))
            and os.path.exists(os.path.join(p, 'objects'))
            and os.path.exists(os.path.join(p, 'refs'))
            and not os.path.exists(os.path.join(p, '.hg'))):
        return gitrepo
    return _oldlocal(path)
Exemple #4
0
def _local(path):
    p = util.drop_scheme("file", path)
    if os.path.exists(os.path.join(p, ".git")) and not os.path.exists(os.path.join(p, ".hg")):
        return gitrepo
    # detect a bare repository
    if (
        os.path.exists(os.path.join(p, "HEAD"))
        and os.path.exists(os.path.join(p, "objects"))
        and os.path.exists(os.path.join(p, "refs"))
        and not os.path.exists(os.path.join(p, ".hg"))
    ):
        return gitrepo
    return _oldlocal(path)
Exemple #5
0
 def __init__(self, path):
     self.p = hgutil.drop_scheme('file', path)
Exemple #6
0
 def __init__(self, path):
     self.p = hgutil.drop_scheme('file', path)
Exemple #7
0
 def __init__(self, path):
     self.p = hgutil.drop_scheme("file", path)
Exemple #8
0
 def urllocalpath(path):
     return util.drop_scheme('file', path)