Exemplo n.º 1
0
def expandscheme(ui, url, **opts):
    """given a repo path, provide the scheme-expanded path
    """
    repo = hg._peerlookup(url)
    if isinstance(repo, ShortRepository):
        url = repo.resolve(url)
    ui.write(url + "\n")
Exemplo n.º 2
0
def normalizepath(orig, path):
    if path:
        for scheme in schemes:
            if path.startswith(scheme + ":"):
                repo = hg._peerlookup(path)
                if isinstance(repo, ShortRepository):
                    path = repo.resolve(path)
    return orig(path)
Exemplo n.º 3
0
def expandschemes(ui, repo, *args, **opts):
    """given a repo path, provide the scheme-expanded path"""
    for name, path in sorted(pycompat.iteritems(ui.paths)):
        url = path.rawloc
        repo = hg._peerlookup(url)

        debugstatus = " (not expanded)"
        if isinstance(repo, ShortRepository):
            debugstatus = " (expanded from " + url + ")"
            url = repo.resolve(url)
        ui.write(_("paths." + name + "=" + url + debugstatus + "\n"))
Exemplo n.º 4
0
 def instance(self, ui, url, create):
     url = self.resolve(url)
     return hg._peerlookup(url).instance(ui, url, create)