mercurial/hg.py
changeset 2737 400a4a502001
parent 2719 532809ba1db5
child 2740 386f04d6ecb3
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -31,6 +31,8 @@ def hg(ui, path):
 def local_(ui, path, create=0):
     if path.startswith('file:'):
         path = path[5:]
+    if not create and os.path.isfile(path):
+        return bundlerepo.bundlerepository(ui, '', path)
     return localrepo.localrepository(ui, path, create)
 
 def ssh_(ui, path, create=0):