mercurial/hg.py
changeset 2738 400a4a502001
parent 2719 532809ba1db5
child 2740 386f04d6ecb3
equal deleted inserted replaced
2737:a5c43944e1ee 2738:400a4a502001
    29     return httprepo.httprepository(ui, path.replace("hg://", "http://"))
    29     return httprepo.httprepository(ui, path.replace("hg://", "http://"))
    30 
    30 
    31 def local_(ui, path, create=0):
    31 def local_(ui, path, create=0):
    32     if path.startswith('file:'):
    32     if path.startswith('file:'):
    33         path = path[5:]
    33         path = path[5:]
       
    34     if not create and os.path.isfile(path):
       
    35         return bundlerepo.bundlerepository(ui, '', path)
    34     return localrepo.localrepository(ui, path, create)
    36     return localrepo.localrepository(ui, path, create)
    35 
    37 
    36 def ssh_(ui, path, create=0):
    38 def ssh_(ui, path, create=0):
    37     return sshrepo.sshrepository(ui, path, create)
    39     return sshrepo.sshrepository(ui, path, create)
    38 
    40