mercurial/hg.py
changeset 14606 6e631c24c6d9
parent 14605 9f1139cf5c76
child 14607 bd1acea552ff
equal deleted inserted replaced
14605:9f1139cf5c76 14606:6e631c24c6d9
    59     if u.fragment:
    59     if u.fragment:
    60         branch = u.fragment
    60         branch = u.fragment
    61         u.fragment = None
    61         u.fragment = None
    62     return str(u), (branch, branches or [])
    62     return str(u), (branch, branches or [])
    63 
    63 
    64 peerschemes = {
    64 schemes = {
    65     'bundle': bundlerepo,
    65     'bundle': bundlerepo,
    66     'file': _local,
    66     'file': _local,
    67     'http': httprepo,
    67     'http': httprepo,
    68     'https': httprepo,
    68     'https': httprepo,
    69     'ssh': sshrepo,
    69     'ssh': sshrepo,
    71 }
    71 }
    72 
    72 
    73 def _peerlookup(path):
    73 def _peerlookup(path):
    74     u = util.url(path)
    74     u = util.url(path)
    75     scheme = u.scheme or 'file'
    75     scheme = u.scheme or 'file'
    76     thing = peerschemes.get(scheme) or peerschemes['file']
    76     thing = schemes.get(scheme) or schemes['file']
    77     try:
    77     try:
    78         return thing(path)
    78         return thing(path)
    79     except TypeError:
    79     except TypeError:
    80         return thing
    80         return thing
    81 
    81