Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
10185:7637fe4f525d | 10186:296a0b14a686 |
---|---|
23 hg qnew -f p3 | 23 hg qnew -f p3 |
24 echo '% fold in the middle of the queue' | 24 echo '% fold in the middle of the queue' |
25 hg qpop p1 | 25 hg qpop p1 |
26 hg qdiff | filterdiff | 26 hg qdiff | filterdiff |
27 hg qfold p2 | 27 hg qfold p2 |
28 grep git .hg/patches/p1 && echo 'git patch found!' | |
28 hg qser | 29 hg qser |
29 hg qdiff | filterdiff | 30 hg qdiff | filterdiff |
30 echo '% fold with local changes' | 31 echo '% fold with local changes' |
31 echo d >> a | 32 echo d >> a |
32 hg qfold p3 | 33 hg qfold p3 |
33 hg diff -c . | filterdiff | 34 hg diff -c . | filterdiff |
35 hg revert -a --no-backup | |
36 | |
37 echo '% fold git patch into a regular patch, expect git patch' | |
38 echo a >> a | |
39 hg qnew -f regular | |
40 hg cp a aa | |
41 hg qnew --git -f git | |
42 hg qpop | |
43 hg qfold git | |
44 cat .hg/patches/regular | |
45 hg qpop | |
46 hg qdel regular | |
47 | |
48 echo '% fold regular patch into a git patch, expect git patch' | |
49 hg cp a aa | |
50 hg qnew --git -f git | |
51 echo b >> aa | |
52 hg qnew -f regular | |
53 hg qpop | |
54 hg qfold regular | |
55 cat .hg/patches/git | |
56 | |
34 cd .. | 57 cd .. |
35 | 58 |
36 | 59 |