comparison 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
comparison
equal deleted inserted replaced
11143:e0a0af140f2e 11154:17031fea4e95
13 import merge as _merge 13 import merge as _merge
14 import verify as _verify 14 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:
23 return revs or None, revs and revs[0] or None 23 return revs or None, revs and revs[0] or None
24 revs = revs and list(revs) or [] 24 revs = revs and list(revs) or []