Mercurial > public > mercurial-scm > hg-stable
diff tests/test-import @ 4230:c93562fb12cc
Fix handling of paths when run outside the repo.
The main problem was that dirstate.getcwd() returned just "",
which was interpreted as "we're at the repo root". It now returns
an absolute path.
The util.pathto function was also changed to deal with the "cwd is
an absolute path" case.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Fri, 16 Mar 2007 00:22:58 -0300 |
parents | 9dcf9d45cab8 |
children | a7915f79d4cc |
line wrap: on
line diff
--- a/tests/test-import Fri Mar 16 00:22:57 2007 -0300 +++ b/tests/test-import Fri Mar 16 00:22:58 2007 -0300 @@ -32,6 +32,17 @@ hg --cwd b import -mpatch ../tip.patch rm -r b +echo % hg -R repo import +# put the clone in a subdir - having a directory named "a" +# used to hide a bug. +mkdir dir +hg clone -r0 a dir/b +hg --cwd a export tip > dir/tip.patch +cd dir +hg -R b import tip.patch +cd .. +rm -r dir + echo % import from stdin hg clone -r0 a b hg --cwd a export tip | hg --cwd b import -