comparison 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
comparison
equal deleted inserted replaced
4229:24c22a3f2ef8 4230:c93562fb12cc
29 echo % import of plain diff should be ok with message 29 echo % import of plain diff should be ok with message
30 hg clone -r0 a b 30 hg clone -r0 a b
31 hg --cwd a diff -r0:1 > tip.patch 31 hg --cwd a diff -r0:1 > tip.patch
32 hg --cwd b import -mpatch ../tip.patch 32 hg --cwd b import -mpatch ../tip.patch
33 rm -r b 33 rm -r b
34
35 echo % hg -R repo import
36 # put the clone in a subdir - having a directory named "a"
37 # used to hide a bug.
38 mkdir dir
39 hg clone -r0 a dir/b
40 hg --cwd a export tip > dir/tip.patch
41 cd dir
42 hg -R b import tip.patch
43 cd ..
44 rm -r dir
34 45
35 echo % import from stdin 46 echo % import from stdin
36 hg clone -r0 a b 47 hg clone -r0 a b
37 hg --cwd a export tip | hg --cwd b import - 48 hg --cwd a export tip | hg --cwd b import -
38 rm -r b 49 rm -r b