Mercurial > hg-stable
changeset 41319:87a6e3c953e0 stable
subrepo: avoid false unsafe path detection on Windows
Subrepo paths are not normalized for the OS, so what was happening in the
subsequent root path check was:
root -> $TESTTMP\issue1852a\sub/repo
util.expandpath(...) -> $TESTTMP\issue1852a\sub/repo
os.path.realpath(...) -> $TESTTMP\issue1852a\sub\repo
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Tue, 05 Feb 2019 20:50:54 -0500 |
parents | 8b2892d5a9f2 |
children | 8f0e8b179842 |
files | mercurial/subrepo.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/subrepo.py Fri Feb 01 13:44:09 2019 -0500 +++ b/mercurial/subrepo.py Tue Feb 05 20:50:54 2019 -0500 @@ -405,7 +405,7 @@ super(hgsubrepo, self).__init__(ctx, path) self._state = state r = ctx.repo() - root = r.wjoin(path) + root = r.wjoin(util.localpath(path)) create = allowcreate and not r.wvfs.exists('%s/.hg' % path) # repository constructor does expand variables in path, which is # unsafe since subrepo path might come from untrusted source.