Mercurial > hg
diff tests/test-mq-merge @ 10185:7637fe4f525d stable
mq: preserve --git flag when merging patches
Without this, merging a patch queue without diff.git=1 downgrades all git
patches to regular patches, losing data in the process.
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Fri, 01 Jan 2010 19:53:05 +0100 |
parents | f18f14bae172 |
children | fcc15ba18c03 |
line wrap: on
line diff
--- a/tests/test-mq-merge Fri Jan 01 19:53:05 2010 +0100 +++ b/tests/test-mq-merge Fri Jan 01 19:53:05 2010 +0100 @@ -56,18 +56,27 @@ echo % init t2 hg init t2 cd t2 +echo '[diff]' > .hg/hgrc +echo 'nodates = 1' >> .hg/hgrc echo a > a hg ci -Am init -echo b >> a +echo b > a hg ci -m changea hg up -C 0 +hg cp a aa echo c >> a -hg qnew -f -e patcha +hg qnew --git -f -e patcha +echo d >> a +hg qnew -d '0 0' -f -e patcha2 echo % create the reference queue hg qsave -c -e -n refqueue 2> /dev/null hg up -C 1 echo % merge -hg qpush -m -n refqueue 2>&1 | \ +HGMERGE=internal:other hg qpush -a -m -n refqueue 2>&1 | \ sed 's/merging with queue at.*refqueue/merging with queue at refqueue/' +echo % check patcha is still a git patch +cat .hg/patches/patcha +echo % check patcha2 is still a regular patch +grep git .hg/patches/patcha2 && echo 'git patch found!' cd ..