##// END OF EJS Templates
expand paths to local repository or bundle in appropriate classes...
Alexander Solovyov -
r11154:17031fea stable
parent child Browse files
Show More
@@ -166,7 +166,7 b' class bundlerepository(localrepo.localre'
166 localrepo.localrepository.__init__(self, ui, self._tempparent)
166 localrepo.localrepository.__init__(self, ui, self._tempparent)
167
167
168 if path:
168 if path:
169 self._url = 'bundle:' + path + '+' + bundlename
169 self._url = 'bundle:' + util.expandpath(path) + '+' + bundlename
170 else:
170 else:
171 self._url = 'bundle:' + bundlename
171 self._url = 'bundle:' + bundlename
172
172
@@ -15,8 +15,8 b' import verify as _verify'
15 import errno, os, shutil
15 import errno, os, shutil
16
16
17 def _local(path):
17 def _local(path):
18 return (os.path.isfile(util.drop_scheme('file', path)) and
18 path = util.expandpath(util.drop_scheme('file', path))
19 bundlerepo or localrepo)
19 return (os.path.isfile(path) and bundlerepo or localrepo)
20
20
21 def addbranchrevs(lrepo, repo, branches, revs):
21 def addbranchrevs(lrepo, repo, branches, revs):
22 if not branches:
22 if not branches:
@@ -24,7 +24,7 b' class localrepository(repo.repository):'
24
24
25 def __init__(self, baseui, path=None, create=0):
25 def __init__(self, baseui, path=None, create=0):
26 repo.repository.__init__(self)
26 repo.repository.__init__(self)
27 self.root = os.path.realpath(path)
27 self.root = os.path.realpath(util.expandpath(path))
28 self.path = os.path.join(self.root, ".hg")
28 self.path = os.path.join(self.root, ".hg")
29 self.origroot = path
29 self.origroot = path
30 self.opener = util.opener(self.path)
30 self.opener = util.opener(self.path)
@@ -7,6 +7,7 b' schemes='
7 [schemes]
7 [schemes]
8 l = http://localhost:$HGPORT/
8 l = http://localhost:$HGPORT/
9 parts = http://{1}:$HGPORT/
9 parts = http://{1}:$HGPORT/
10 z = file:\$PWD/
10 EOF
11 EOF
11
12
12 hg init test
13 hg init test
@@ -22,5 +23,8 b' hg incoming l://'
22 echo % check that {1} syntax works
23 echo % check that {1} syntax works
23 hg incoming --debug parts://localhost | sed 's/[0-9]//g'
24 hg incoming --debug parts://localhost | sed 's/[0-9]//g'
24
25
26 echo % check that paths are expanded
27 PWD=`pwd` hg incoming z://
28
25 echo % errors
29 echo % errors
26 cat errors.log
30 cat errors.log
@@ -9,4 +9,8 b' comparing with parts://localhost'
9 sending heads command
9 sending heads command
10 searching for changes
10 searching for changes
11 no changes found
11 no changes found
12 % check that paths are expanded
13 comparing with z://
14 searching for changes
15 no changes found
12 % errors
16 % errors
General Comments 0
You need to be logged in to leave comments. Login now