--- a/tests/test-keyword Tue Feb 05 16:22:40 2008 +0100
+++ b/tests/test-keyword Wed Feb 06 00:24:49 2008 +0100
@@ -24,17 +24,29 @@
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 <user@example.com>'
+echo % bundle null revision containing empty symlink
+hg bundle --base null ../test-keyword.hg
+cd ..
+
hg init Test
cd Test
-echo % kwshrink should exit silently in empty/invalid repo
-hg kwshrink
+echo % pull from bundle
+hg pull --traceback -u ../test-keyword.hg
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
@@ -50,7 +62,7 @@
hg status
echo % commit
-hg --debug commit -mabsym -d '0 0' -u 'User Name <user@example.com>'
+hg --debug commit -mabsym -d '1 0' -u 'User Name <user@example.com>'
echo % status
hg status
echo % identify
@@ -84,7 +96,7 @@
echo '$Id$' > c
echo 'tests for different changenodes' >> c
echo % commit c
-hg commit -A -mcndiff -d '1 0' -u 'User Name <user@example.com>'
+hg commit -A -mcndiff -d '2 0' -u 'User Name <user@example.com>'
echo % force expansion
hg -v kwexpand
echo % compare changenodes in a c
@@ -114,7 +126,7 @@
hg kwfiles
echo % commit
-hg --debug commit -ma2c -d '1 0' -u 'User Name <user@example.com>'
+hg --debug commit -ma2c -d '2 0' -u 'User Name <user@example.com>'
echo % cat a c
cat a c
echo % touch copied c after 1 second
@@ -127,7 +139,7 @@
hg kwfiles
echo % diff --rev
-hg diff --rev 0 | grep -v 'b/c'
+hg diff --rev 1 | grep -v 'b/c'
echo % rollback
hg rollback
@@ -164,7 +176,7 @@
hg status
echo % commit
-hg --debug commit -l log -d '2 0' -u 'User Name <user@example.com>'
+hg --debug commit -l log -d '3 0' -u 'User Name <user@example.com>'
rm log
echo % status
hg status
@@ -191,7 +203,7 @@
echo % clone to test incoming
cd ..
-hg clone -r0 Test Test-a
+hg clone -r1 Test Test-a
cd Test-a
cat <<EOF >> .hg/hgrc
[paths]
@@ -204,7 +216,7 @@
sed -e 's/Id.*/& rejecttest/' a > a.new
mv a.new a
echo % commit rejecttest
-hg --debug commit -m'rejects?' -d '3 0' -u 'User Name <user@example.com>'
+hg --debug commit -m'rejects?' -d '4 0' -u 'User Name <user@example.com>'
echo % export
hg export -o ../rejecttest.diff tip
@@ -228,7 +240,7 @@
echo % kwexpand x/a should abort
hg --verbose kwexpand x/a
cd x
-hg --debug commit -m xa -d '3 0' -u 'User Name <user@example.com>'
+hg --debug commit -m xa -d '4 0' -u 'User Name <user@example.com>'
echo % cat a
cat a
echo % kwshrink a inside directory x
--- a/tests/test-keyword.out Tue Feb 05 16:22:40 2008 +0100
+++ b/tests/test-keyword.out Wed Feb 06 00:24:49 2008 +0100
@@ -85,6 +85,23 @@
Branch = {branches}
$Branch: demobranch $
% kwshrink should exit silently in empty/invalid repo
+% symlink nonexisting file
+% commit hook must fail with missing file
+cp: a: No such file or directory
+adding sym
+sym
+running hook commit.test: cp a hooktest
+warning: commit.test hook exited with status 1
+% bundle null revision containing empty symlink
+1 changesets found
+% pull from bundle
+pulling from ../test-keyword.hg
+requesting all changes
+adding changesets
+adding manifests
+adding file changes
+added 1 changesets with 1 changes to 1 files
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
% cat
expand $Id$
do not process $Id:
@@ -96,43 +113,38 @@
% addremove
adding a
adding b
-adding sym
% status
A a
A b
-A sym
% default keyword expansion including commit hook
% interrupted commit should not change state or run commit hook
a
b
-sym
transaction abort!
rollback completed
abort: empty commit message
% status
A a
A b
-A sym
% commit
a
b
-sym
overwriting a expanding keywords
running hook commit.test: cp a hooktest
% status
? hooktest
% identify
-f782df5f9602
+cecf1e2cc3d3
% cat
-expand $Id: a,v f782df5f9602 1970/01/01 00:00:00 user $
+expand $Id: a,v cecf1e2cc3d3 1970/01/01 00:00:01 user $
do not process $Id:
xxx $
-expand $Id: a,v f782df5f9602 1970/01/01 00:00:00 user $
+expand $Id: a,v cecf1e2cc3d3 1970/01/01 00:00:01 user $
do not process $Id:
xxx $
ignore $Id$
% hg kwcat
-expand $Id: a,v f782df5f9602 1970/01/01 00:00:00 user $
+expand $Id: a,v cecf1e2cc3d3 1970/01/01 00:00:01 user $
do not process $Id:
xxx $
ignore $Id$
@@ -144,10 +156,10 @@
% update
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
% cat
-expand $Id: a,v f782df5f9602 1970/01/01 00:00:00 user $
+expand $Id: a,v cecf1e2cc3d3 1970/01/01 00:00:01 user $
do not process $Id:
xxx $
-expand $Id: a,v f782df5f9602 1970/01/01 00:00:00 user $
+expand $Id: a,v cecf1e2cc3d3 1970/01/01 00:00:01 user $
do not process $Id:
xxx $
ignore $Id$
@@ -158,10 +170,10 @@
overwriting a expanding keywords
overwriting c expanding keywords
% compare changenodes in a c
-expand $Id: a,v f782df5f9602 1970/01/01 00:00:00 user $
+expand $Id: a,v cecf1e2cc3d3 1970/01/01 00:00:01 user $
do not process $Id:
xxx $
-$Id: c,v ba4426d1938e 1970/01/01 00:00:01 user $
+$Id: c,v c033759cd8fd 1970/01/01 00:00:02 user $
tests for different changenodes
% qinit -c
% qimport
@@ -169,14 +181,14 @@
% keywords should not be expanded in patch
# HG changeset patch
# User User Name <user@example.com>
-# Date 1 0
-# Node ID ba4426d1938ec9673e03ab274d88c44e24618f7f
-# Parent f782df5f9602483b4e51c31a12315f353bba380c
+# Date 2 0
+# Node ID c033759cd8fd162b7863dc4e5d1eea433603880f
+# Parent cecf1e2cc3d3447fcc20dd4eac5c4faa8a615df3
cndiff
-diff -r f782df5f9602 -r ba4426d1938e c
+diff -r cecf1e2cc3d3 -r c033759cd8fd c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ b/c Thu Jan 01 00:00:01 1970 +0000
++++ b/c Thu Jan 01 00:00:02 1970 +0000
@@ -0,0 +1,2 @@
+$Id$
+tests for different changenodes
@@ -186,7 +198,7 @@
applying mqtest.diff
Now at: mqtest.diff
% cat
-$Id: c,v ba4426d1938e 1970/01/01 00:00:01 user $
+$Id: c,v c033759cd8fd 1970/01/01 00:00:02 user $
tests for different changenodes
% qpop and move on
Patch queue now empty
@@ -199,10 +211,10 @@
c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292
overwriting c expanding keywords
% cat a c
-expand $Id: a,v f782df5f9602 1970/01/01 00:00:00 user $
+expand $Id: a,v cecf1e2cc3d3 1970/01/01 00:00:01 user $
do not process $Id:
xxx $
-expand $Id: c,v 0ba462c0f077 1970/01/01 00:00:01 user $
+expand $Id: c,v 1fed52d26fd0 1970/01/01 00:00:02 user $
do not process $Id:
xxx $
% touch copied c after 1 second
@@ -211,7 +223,7 @@
a
c
% diff --rev
-diff -r f782df5f9602 c
+diff -r cecf1e2cc3d3 c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -0,0 +1,3 @@
+expand $Id$
@@ -235,15 +247,15 @@
Xinfo = {author}: {desc}
$Xinfo: test: hg keyword config and expansion example $
% cat
-expand $Id: a,v f782df5f9602 1970/01/01 00:00:00 user $
+expand $Id: a,v cecf1e2cc3d3 1970/01/01 00:00:01 user $
do not process $Id:
xxx $
-expand $Id: a,v f782df5f9602 1970/01/01 00:00:00 user $
+expand $Id: a,v cecf1e2cc3d3 1970/01/01 00:00:01 user $
do not process $Id:
xxx $
ignore $Id$
% hg kwcat
-expand $Id: a f782df5f9602 Thu, 01 Jan 1970 00:00:00 +0000 user $
+expand $Id: a cecf1e2cc3d3 Thu, 01 Jan 1970 00:00:01 +0000 user $
do not process $Id:
xxx $
ignore $Id$
@@ -260,17 +272,17 @@
overwriting a expanding keywords
% status
% cat
-expand $Id: a 0729690beff6 Thu, 01 Jan 1970 00:00:02 +0000 user $
+expand $Id: a a576e5647736 Thu, 01 Jan 1970 00:00:03 +0000 user $
do not process $Id:
xxx $
$Xinfo: User Name <user@example.com>: firstline $
-expand $Id: a 0729690beff6 Thu, 01 Jan 1970 00:00:02 +0000 user $
+expand $Id: a a576e5647736 Thu, 01 Jan 1970 00:00:03 +0000 user $
do not process $Id:
xxx $
$Xinfo: User Name <user@example.com>: firstline $
ignore $Id$
% hg kwcat
-expand $Id: a 0729690beff6 Thu, 01 Jan 1970 00:00:02 +0000 user $
+expand $Id: a a576e5647736 Thu, 01 Jan 1970 00:00:03 +0000 user $
do not process $Id:
xxx $
$Xinfo: User Name <user@example.com>: firstline $
@@ -284,7 +296,7 @@
R a
% revert a
% cat a
-expand $Id: a 0729690beff6 Thu, 01 Jan 1970 00:00:02 +0000 user $
+expand $Id: a a576e5647736 Thu, 01 Jan 1970 00:00:03 +0000 user $
do not process $Id:
xxx $
$Xinfo: User Name <user@example.com>: firstline $
@@ -293,15 +305,15 @@
adding changesets
adding manifests
adding file changes
-added 1 changesets with 3 changes to 3 files
+added 2 changesets with 3 changes to 3 files
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
% incoming
comparing with test-keyword/Test
searching for changes
-changeset: 1:0729690beff6
+changeset: 2:a576e5647736
tag: tip
user: User Name <user@example.com>
-date: Thu Jan 01 00:00:02 1970 +0000
+date: Thu Jan 01 00:00:03 1970 +0000
summary: firstline
% commit rejecttest
@@ -311,11 +323,11 @@
% import
applying ../rejecttest.diff
% cat
-expand $Id: a 82983f13f138 Thu, 01 Jan 1970 00:00:03 +0000 user $ rejecttest
+expand $Id: a 97b8d4afd122 Thu, 01 Jan 1970 00:00:04 +0000 user $ rejecttest
do not process $Id: rejecttest
xxx $
$Xinfo: User Name <user@example.com>: rejects? $
-expand $Id: a 82983f13f138 Thu, 01 Jan 1970 00:00:03 +0000 user $ rejecttest
+expand $Id: a 97b8d4afd122 Thu, 01 Jan 1970 00:00:04 +0000 user $ rejecttest
do not process $Id: rejecttest
xxx $
$Xinfo: User Name <user@example.com>: rejects? $
@@ -335,7 +347,7 @@
x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e
overwriting x/a expanding keywords
% cat a
-expand $Id: x/a f27c134d2d9b Thu, 01 Jan 1970 00:00:03 +0000 user $
+expand $Id: x/a 6ae8e7fbf16c Thu, 01 Jan 1970 00:00:04 +0000 user $
do not process $Id:
xxx $
$Xinfo: User Name <user@example.com>: xa $
@@ -362,7 +374,7 @@
$Xinfo$
ignore $Id$
% hg kwcat
-expand $Id: a 0729690beff6 Thu, 01 Jan 1970 00:00:02 +0000 user $
+expand $Id: a a576e5647736 Thu, 01 Jan 1970 00:00:03 +0000 user $
do not process $Id:
xxx $
$Xinfo: User Name <user@example.com>: firstline $