diff mercurial/hg.py @ 2737:400a4a502001

pull: allow to pull from bundle file without need for bundle: syntax
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Sun, 30 Jul 2006 21:46:38 -0700
parents 532809ba1db5
children 386f04d6ecb3
line wrap: on
line diff
--- 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):