diff tests/test-mq-qfold @ 10186:296a0b14a686 stable 1.4.2

mq: preserve --git flag when folding patches Without this, folding a git patch into a regular one downgrades the resulting patch to a regular patch.
author Patrick Mezard <pmezard@gmail.com>
date Fri, 01 Jan 2010 19:53:05 +0100
parents 2ff17c4de1da
children 9c2c94934f0d
line wrap: on
line diff
--- a/tests/test-mq-qfold	Fri Jan 01 19:53:05 2010 +0100
+++ b/tests/test-mq-qfold	Fri Jan 01 19:53:05 2010 +0100
@@ -25,12 +25,35 @@
 hg qpop p1
 hg qdiff | filterdiff
 hg qfold p2
+grep git .hg/patches/p1 && echo 'git patch found!'
 hg qser
 hg qdiff | filterdiff
 echo '% fold with local changes'
 echo d >> a
 hg qfold p3
 hg diff -c . | filterdiff
+hg revert -a --no-backup
+
+echo '% fold git patch into a regular patch, expect git patch'
+echo a >> a
+hg qnew -f regular
+hg cp a aa
+hg qnew --git -f git
+hg qpop
+hg qfold git
+cat .hg/patches/regular
+hg qpop
+hg qdel regular
+
+echo '% fold regular patch into a git patch, expect git patch'
+hg cp a aa
+hg qnew --git -f git
+echo b >> aa
+hg qnew -f regular
+hg qpop
+hg qfold regular
+cat .hg/patches/git
+
 cd ..