mercurial/hg.py
changeset 2579 0875cda033fd
parent 2555 d6605381c6df
child 2595 edb66cb05ded
equal deleted inserted replaced
2578:cf4f0322851d 2579:0875cda033fd
    59 
    59 
    60 def repository(ui, path=None, create=0):
    60 def repository(ui, path=None, create=0):
    61     if not path: path = ''
    61     if not path: path = ''
    62     scheme = path
    62     scheme = path
    63     if scheme:
    63     if scheme:
    64         c = scheme.find(':')
    64         scheme = scheme.split(":", 1)[0]
    65         scheme = c >= 0 and scheme[:c]
       
    66     ctor = schemes.get(scheme) or schemes['file']
    65     ctor = schemes.get(scheme) or schemes['file']
    67     if create:
    66     if create:
    68         try:
    67         try:
    69             return ctor(ui, path, create)
    68             return ctor(ui, path, create)
    70         except TypeError:
    69         except TypeError: