changeset 11156:b203a95fe68b

Merge with stable
author Matt Mackall <mpm@selenic.com>
date Tue, 11 May 2010 17:03:44 -0500
parents 245a67fe2574 (current diff) 17031fea4e95 (diff)
children a2c32edc407b
files mercurial/hg.py mercurial/localrepo.py
diffstat 5 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/bundlerepo.py	Tue May 11 16:28:09 2010 -0500
+++ b/mercurial/bundlerepo.py	Tue May 11 17:03:44 2010 -0500
@@ -166,7 +166,7 @@
             localrepo.localrepository.__init__(self, ui, self._tempparent)
 
         if path:
-            self._url = 'bundle:' + path + '+' + bundlename
+            self._url = 'bundle:' + util.expandpath(path) + '+' + bundlename
         else:
             self._url = 'bundle:' + bundlename
 
--- a/mercurial/hg.py	Tue May 11 16:28:09 2010 -0500
+++ b/mercurial/hg.py	Tue May 11 17:03:44 2010 -0500
@@ -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:
--- a/mercurial/localrepo.py	Tue May 11 16:28:09 2010 -0500
+++ b/mercurial/localrepo.py	Tue May 11 17:03:44 2010 -0500
@@ -25,7 +25,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)
--- a/tests/test-schemes	Tue May 11 16:28:09 2010 -0500
+++ b/tests/test-schemes	Tue May 11 17:03:44 2010 -0500
@@ -7,6 +7,7 @@
 [schemes]
 l = http://localhost:$HGPORT/
 parts = http://{1}:$HGPORT/
+z = file:\$PWD/
 EOF
 
 hg init test
@@ -22,5 +23,8 @@
 echo % check that {1} syntax works
 hg incoming --debug parts://localhost | sed 's/[0-9]//g'
 
+echo % check that paths are expanded
+PWD=`pwd` hg incoming z://
+
 echo % errors
 cat errors.log
--- a/tests/test-schemes.out	Tue May 11 16:28:09 2010 -0500
+++ b/tests/test-schemes.out	Tue May 11 17:03:44 2010 -0500
@@ -9,4 +9,8 @@
 sending heads command
 searching for changes
 no changes found
+% check that paths are expanded
+comparing with z://
+searching for changes
+no changes found
 % errors