diff mercurial/localrepo.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 a101a743c570
children b203a95fe68b 054549ccb680
line wrap: on
line diff
--- a/mercurial/localrepo.py	Tue May 11 20:13:52 2010 +0200
+++ b/mercurial/localrepo.py	Mon Dec 07 12:31:45 2009 +0200
@@ -24,7 +24,7 @@
 
     def __init__(self, baseui, path=None, create=0):
         repo.repository.__init__(self)
-        self.root = os.path.realpath(path)
+        self.root = os.path.realpath(util.expandpath(path))
         self.path = os.path.join(self.root, ".hg")
         self.origroot = path
         self.opener = util.opener(self.path)