keyword: test recording
authorChristian Ebert <blacktrash@gmx.net>
Mon, 26 Apr 2010 04:01:13 +0200
changeset 11046 6e9b9f6c117c
parent 11045 eb67196d20fa
child 11047 c7dbd6c4877a
keyword: test recording
tests/test-keyword
tests/test-keyword.out
--- a/tests/test-keyword	Mon Apr 26 04:01:07 2010 +0200
+++ b/tests/test-keyword	Mon Apr 26 04:01:13 2010 +0200
@@ -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
--- a/tests/test-keyword.out	Mon Apr 26 04:01:07 2010 +0200
+++ b/tests/test-keyword.out	Mon Apr 26 04:01:13 2010 +0200
@@ -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