Пример #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
Пример #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)
Пример #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)
Пример #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)
Пример #5
0
 def __init__(self, path):
     self.p = hgutil.drop_scheme('file', path)
Пример #6
0
 def __init__(self, path):
     self.p = hgutil.drop_scheme('file', path)
Пример #7
0
 def __init__(self, path):
     self.p = hgutil.drop_scheme("file", path)
Пример #8
0
 def urllocalpath(path):
     return util.drop_scheme('file', path)