changeset 10367:b8801b58bbd8 stable

test-mq-qrefresh: test qrefresh when tip != qtip
author Patrick Mezard <pmezard@gmail.com>
date Sun, 07 Feb 2010 11:38:36 +0100
parents d355cebde5e6
children f05e0d54f424 58e040c51231
files tests/test-mq-qrefresh tests/test-mq-qrefresh.out
diffstat 2 files changed, 45 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-mq-qrefresh	Sat Feb 06 18:36:27 2010 +0100
+++ b/tests/test-mq-qrefresh	Sun Feb 07 11:38:36 2010 +0100
@@ -155,6 +155,31 @@
 hg qdiff --nodates
 cd ..
 
+echo '% issue2025: qrefresh does not honor filtering options when tip != qtip'
+hg init repo-2025
+cd repo-2025
+echo a > a
+echo b > b
+hg ci -qAm addab
+echo a >> a
+echo b >> b
+hg qnew -f patch
+hg up -qC 0
+echo c > c
+hg ci -qAm addc
+hg up -qC 1
+echo '% refresh with tip != qtip'
+hg --config diff.nodates=1 qrefresh -I b 2>&1 \
+    | sed 's/saving bundle.*/saving bundle.../g'
+echo '% status after refresh'
+hg st
+echo '% b after refresh'
+cat b
+echo '% patch file after refresh'
+cat .hg/patches/patch
+cd ..
+
+
 echo % issue1441 with git patches
 hg init repo-1441-git
 cd repo-1441-git
--- a/tests/test-mq-qrefresh.out	Sat Feb 06 18:36:27 2010 +0100
+++ b/tests/test-mq-qrefresh.out	Sun Feb 07 11:38:36 2010 +0100
@@ -259,6 +259,26 @@
 +++ b/b
 @@ -0,0 +1,1 @@
 +a
+% issue2025: qrefresh does not honor filtering options when tip != qtip
+% refresh with tip != qtip
+saving bundle...
+adding branch
+adding changesets
+adding manifests
+adding file changes
+added 1 changesets with 1 changes to 1 files
+% status after refresh
+M a
+% b after refresh
+b
+b
+% patch file after refresh
+diff -r 1a60229be7ac b
+--- a/b
++++ b/b
+@@ -1,1 +1,2 @@
+ b
++b
 % issue1441 with git patches
 diff --git a/b b/b
 new file mode 100644