diff -r ce5eb725d0c6 -r 0683aaf458d8 tests/test-keyword --- a/tests/test-keyword Wed Feb 06 11:32:34 2008 +0100 +++ b/tests/test-keyword Wed Feb 06 17:25:37 2008 +0100 @@ -24,29 +24,17 @@ hg --quiet kwdemo "Branch = {branches}" -hg init t -cd t -echo % kwshrink should exit silently in empty/invalid repo -hg kwshrink - -echo % symlink nonexisting file -ln -s a sym -echo % commit hook must fail with missing file -hg --debug commit -A -msym -d '0 0' -u 'User Name ' -echo % bundle null revision containing empty symlink -hg bundle --base null ../test-keyword.hg -cd .. - hg init Test cd Test -echo % pull from bundle -hg pull --traceback -u ../test-keyword.hg +echo % kwshrink should exit silently in empty/invalid repo +hg kwshrink echo 'expand $Id$' > a echo 'do not process $Id:' >> a echo 'xxx $' >> a echo 'ignore $Id$' > b +ln -s a sym echo % cat cat sym a b @@ -62,15 +50,15 @@ hg status echo % commit -hg --debug commit -mabsym -d '1 0' -u 'User Name ' +hg --debug commit -mabsym -d '0 0' -u 'User Name ' echo % status hg status echo % identify hg --quiet identify echo % cat cat sym a b -echo % hg kwcat -hg kwcat sym a b +echo % hg cat +hg cat sym a b echo echo % diff a hooktest @@ -96,18 +84,14 @@ echo '$Id$' > c echo 'tests for different changenodes' >> c echo % commit c -hg commit -A -mcndiff -d '2 0' -u 'User Name ' +hg commit -A -mcndiff -d '1 0' -u 'User Name ' echo % force expansion hg -v kwexpand echo % compare changenodes in a c cat a c -echo % qinit -c -hg qinit -c echo % qimport hg qimport -r tip -n mqtest.diff -echo % qcommit -hg qcommit -mqtest echo % keywords should not be expanded in patch cat .hg/patches/mqtest.diff echo % qpop @@ -126,7 +110,7 @@ hg kwfiles echo % commit -hg --debug commit -ma2c -d '2 0' -u 'User Name ' +hg --debug commit -ma2c -d '1 0' -u 'User Name ' echo % cat a c cat a c echo % touch copied c after 1 second @@ -139,7 +123,7 @@ hg kwfiles echo % diff --rev -hg diff --rev 1 | grep -v 'b/c' +hg diff --rev 0 | grep -v 'b/c' echo % rollback hg rollback @@ -160,8 +144,8 @@ echo % cat cat sym a b -echo % hg kwcat -hg kwcat sym a b +echo % hg cat +hg cat sym a b echo echo '$Xinfo$' >> a @@ -176,15 +160,15 @@ hg status echo % commit -hg --debug commit -l log -d '3 0' -u 'User Name ' +hg --debug commit -l log -d '2 0' -u 'User Name ' rm log echo % status hg status echo % cat cat sym a b -echo % hg kwcat -hg kwcat sym a b +echo % hg cat +hg cat sym a b echo echo % remove @@ -203,7 +187,7 @@ echo % clone to test incoming cd .. -hg clone -r1 Test Test-a +hg clone -r0 Test Test-a cd Test-a cat <> .hg/hgrc [paths] @@ -216,7 +200,7 @@ sed -e 's/Id.*/& rejecttest/' a > a.new mv a.new a echo % commit rejecttest -hg --debug commit -m'rejects?' -d '4 0' -u 'User Name ' +hg --debug commit -m'rejects?' -d '3 0' -u 'User Name ' echo % export hg export -o ../rejecttest.diff tip @@ -240,7 +224,7 @@ echo % kwexpand x/a should abort hg --verbose kwexpand x/a cd x -hg --debug commit -m xa -d '4 0' -u 'User Name ' +hg --debug commit -m xa -d '3 0' -u 'User Name ' echo % cat a cat a echo % kwshrink a inside directory x @@ -252,11 +236,18 @@ echo % kwexpand nonexistent hg kwexpand nonexistent +echo % switch off expansion echo % kwshrink with unknown file u cp a u hg --verbose kwshrink echo % cat cat sym a b -echo % hg kwcat -hg kwcat sym a b +echo % hg cat +hg cat sym a b echo +rm $HGRCPATH +echo % cat +cat sym a b +echo % hg cat +hg cat sym a b +echo