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
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)
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)
def __init__(self, path): self.p = hgutil.drop_scheme('file', path)
def __init__(self, path): self.p = hgutil.drop_scheme("file", path)
def urllocalpath(path): return util.drop_scheme('file', path)