Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
10184:8a47347d298b | 10185:7637fe4f525d |
---|---|
54 # Classic MQ merge sequence *with an explicit named queue* | 54 # Classic MQ merge sequence *with an explicit named queue* |
55 echo | 55 echo |
56 echo % init t2 | 56 echo % init t2 |
57 hg init t2 | 57 hg init t2 |
58 cd t2 | 58 cd t2 |
59 echo '[diff]' > .hg/hgrc | |
60 echo 'nodates = 1' >> .hg/hgrc | |
59 echo a > a | 61 echo a > a |
60 hg ci -Am init | 62 hg ci -Am init |
61 echo b >> a | 63 echo b > a |
62 hg ci -m changea | 64 hg ci -m changea |
63 hg up -C 0 | 65 hg up -C 0 |
66 hg cp a aa | |
64 echo c >> a | 67 echo c >> a |
65 hg qnew -f -e patcha | 68 hg qnew --git -f -e patcha |
69 echo d >> a | |
70 hg qnew -d '0 0' -f -e patcha2 | |
66 echo % create the reference queue | 71 echo % create the reference queue |
67 hg qsave -c -e -n refqueue 2> /dev/null | 72 hg qsave -c -e -n refqueue 2> /dev/null |
68 hg up -C 1 | 73 hg up -C 1 |
69 echo % merge | 74 echo % merge |
70 hg qpush -m -n refqueue 2>&1 | \ | 75 HGMERGE=internal:other hg qpush -a -m -n refqueue 2>&1 | \ |
71 sed 's/merging with queue at.*refqueue/merging with queue at refqueue/' | 76 sed 's/merging with queue at.*refqueue/merging with queue at refqueue/' |
77 echo % check patcha is still a git patch | |
78 cat .hg/patches/patcha | |
79 echo % check patcha2 is still a regular patch | |
80 grep git .hg/patches/patcha2 && echo 'git patch found!' | |
72 cd .. | 81 cd .. |
73 | 82 |