tests/test-mq-qrefresh
changeset 7113 f7fc5f5ecd62
parent 6801 71e339714586
child 7177 09ed32b79656
--- a/tests/test-mq-qrefresh	Sat Oct 18 03:53:54 2008 -0500
+++ b/tests/test-mq-qrefresh	Fri Oct 17 21:26:39 2008 +0200
@@ -82,6 +82,29 @@
 cat .hg/patches/mqbase | \
 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
     -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/"
+
+echo % qrefresh --short
+echo 'orphan' > orphanchild
+hg add orphanchild
+hg qrefresh nonexistingfilename
+hg qrefresh --short 1/base
+hg qrefresh --short 2/base
+
+echo % qdiff
+hg qdiff | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
+               -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/"
+
+echo % patch file contents
+cat .hg/patches/mqbase | \
+sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
+    -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/"
+
+echo % diff shows orphan ...
+hg st
+hg diff | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
+              -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" \
+              -e "s/^\(diff\).*/\1/"
+
 cd ..