[PATCH 3 of 3] keyword: test recording

Christian Ebert blacktrash at gmx.net
Fri Apr 23 21:32:06 CDT 2010


# HG changeset patch
# User Christian Ebert <blacktrash at gmx.net>
# Date 1272076084 -7200
# Node ID 40848b7cdac2d6da6b6f327cca128fe3afcae080
# Parent  0206486c7fa7125a049a9379ff8d96dabbce2076
keyword: test recording

diff --git a/tests/test-keyword b/tests/test-keyword
--- a/tests/test-keyword
+++ b/tests/test-keyword
@@ -5,7 +5,10 @@
 keyword =
 mq =
 notify =
+record =
 transplant =
+[ui]
+interactive = true
 EOF
 
 # demo before [keyword] files are set up
@@ -139,6 +142,25 @@
 echo % compare changenodes in a c
 cat a c
 
+echo % record
+cp "$HGRCPATH" $HGRCPATH.bak
+sed -e '1 a \foo' a > a.tmp
+mv a.tmp a
+echo bar >> a
+hg record -d '1 10' -m rectest<<EOF
+y
+y
+n
+EOF
+echo
+hg identify
+hg status
+echo % cat modified file
+cat a
+hg diff | grep -v 'b/a'
+hg rollback
+hg update -C
+
 echo % init --mq
 hg init --mq
 echo % qimport
diff --git a/tests/test-keyword.out b/tests/test-keyword.out
--- a/tests/test-keyword.out
+++ b/tests/test-keyword.out
@@ -132,6 +132,39 @@
 xxx $
 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
 tests for different changenodes
+% record
+diff --git a/a b/a
+2 hunks, 2 lines changed
+examine changes to 'a'? [Ynsfdaq?] 
+@@ -1,3 +1,4 @@
+ expand $Id$
++foo
+ do not process $Id:
+ xxx $
+record change 1/2 to 'a'? [Ynsfdaq?] 
+@@ -2,2 +3,3 @@
+ do not process $Id:
+ xxx $
++bar
+record change 2/2 to 'a'? [Ynsfdaq?] 
+
+d17e03c92c97+ tip
+M a
+% cat modified file
+expand $Id: a,v d17e03c92c97 1970/01/01 00:00:01 test $
+foo
+do not process $Id:
+xxx $
+bar
+diff -r d17e03c92c97 a
+--- a/a	Wed Dec 31 23:59:51 1969 -0000
+@@ -2,3 +2,4 @@
+ foo
+ do not process $Id:
+ xxx $
++bar
+rolling back to revision 3 (undo commit)
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 % init --mq
 % qimport
 % commit --mq


More information about the Mercurial-devel mailing list