Mercurial > hg > mercurial-crew-with-dirclash
diff tests/test-import @ 2782:0148869345f7
merge with self.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Fri, 04 Aug 2006 10:38:17 -0700 |
parents | 871ca5b9d348 |
children | 0b9ac7dfcf56 |
line wrap: on
line diff
--- a/tests/test-import +++ b/tests/test-import @@ -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 @@ python mkmsg.py | hg --cwd b import - 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