diff mercurial/hg.py @ 11154:17031fea4e95 stable

expand paths to local repository or bundle in appropriate classes This avoids problem with unexpanded paths when it's not possible to expand it at higher level (for example, if file:~/path/ is supplied as path in schemes).
author Alexander Solovyov <piranha@piranha.org.ua>
date Mon, 07 Dec 2009 12:31:45 +0200
parents 4a70178f9bde
children b203a95fe68b e4dbaa40096d
line wrap: on
line diff
--- a/mercurial/hg.py	Tue May 11 20:13:52 2010 +0200
+++ b/mercurial/hg.py	Mon Dec 07 12:31:45 2009 +0200
@@ -15,8 +15,8 @@
 import errno, os, shutil
 
 def _local(path):
-    return (os.path.isfile(util.drop_scheme('file', path)) and
-            bundlerepo or localrepo)
+    path = util.expandpath(util.drop_scheme('file', path))
+    return (os.path.isfile(path) and bundlerepo or localrepo)
 
 def addbranchrevs(lrepo, repo, branches, revs):
     if not branches: