Mercurial > hg > gitweb
diff tests/test-import @ 2773:871ca5b9d348
Import say a file is not tracked after patching : test case
author | "Mathieu Clabaut <mathieu.clabaut@gmail.com>" |
---|---|
date | Wed, 02 Aug 2006 09:29:17 +0200 |
parents | f22e3e8fd457 |
children | 0b9ac7dfcf56 |
line wrap: on
line diff
--- a/tests/test-import Wed Aug 02 20:33:57 2006 -0700 +++ b/tests/test-import Wed Aug 02 09:29:17 2006 +0200 @@ -1,7 +1,10 @@ #!/bin/sh hg init a +mkdir a/d1 +mkdir a/d1/d2 echo line 1 > a/a +echo line 1 > a/d1/d2/a hg --cwd a ci -d '0 0' -Ama echo line 2 >> a/a @@ -79,3 +82,19 @@ hg --cwd b tip | grep second rm -rf b +# bug non regression test +# importing a patch in a subdirectory failed at the commit stage +echo line 2 >> a/d1/d2/a +hg --cwd a ci -u someoneelse -d '1 0' -m'subdir change' +echo % hg import in a subdirectory +hg clone -r0 a b +hg --cwd a export tip | sed -e 's/d1\/d2\///' > tip.patch +pushd b/d1/d2 2>&1 > /dev/null +hg import ../../../tip.patch +popd 2>&1 > /dev/null +echo "% message should be 'subdir change'" +hg --cwd b tip | grep 'subdir change' +echo "% committer should be 'someoneelse'" +hg --cwd b tip | grep someoneelse +echo "% should be empty" +hg --cwd b status