Mercurial > hg
annotate tests/test-mq-qfold.t @ 20305:e5a2177d97f0
tests: stop tracking tests/gpg/random_seed
test-gpg.t left the random_seed file as modified. That was slightly confusing
... and it was accidentally changed in ea4996754d91.
The seed is created on demand and there is no reason to track it. There is also
no reason to leak state between test runs so we let the test clean up after
running.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Mon, 20 Jan 2014 01:29:54 +0100 |
parents | 97ffc68f71d3 |
children | 1e686e55780c |
rev | line source |
---|---|
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
1 $ echo "[extensions]" >> $HGRCPATH |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
2 $ echo "mq=" >> $HGRCPATH |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
3 $ echo "[mq]" >> $HGRCPATH |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
4 $ echo "git=keep" >> $HGRCPATH |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
5 $ echo "[diff]" >> $HGRCPATH |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
6 $ echo "nodates=1" >> $HGRCPATH |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
7 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
8 init: |
8426 | 9 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
10 $ hg init repo |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
11 $ cd repo |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
12 $ echo a > a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
13 $ hg ci -Am adda |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
14 adding a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
15 $ echo a >> a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
16 $ hg qnew -f p1 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
17 $ echo b >> a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
18 $ hg qnew -f p2 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
19 $ echo c >> a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
20 $ hg qnew -f p3 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
21 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
22 Fold in the middle of the queue: |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
23 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
24 $ hg qpop p1 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
25 popping p3 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
26 popping p2 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
27 now at: p1 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
28 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
29 $ hg qdiff |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
30 diff -r 07f494440405 a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
31 --- a/a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
32 +++ b/a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
33 @@ -1,1 +1,2 @@ |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
34 a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
35 +a |
8426 | 36 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
37 $ hg qfold p2 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
38 $ grep git .hg/patches/p1 && echo 'git patch found!' |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
39 [1] |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
40 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
41 $ hg qser |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
42 p1 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
43 p3 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
44 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
45 $ hg qdiff |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
46 diff -r 07f494440405 a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
47 --- a/a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
48 +++ b/a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
49 @@ -1,1 +1,3 @@ |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
50 a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
51 +a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
52 +b |
8426 | 53 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
54 Fold with local changes: |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
55 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
56 $ echo d >> a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
57 $ hg qfold p3 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
58 abort: local changes found, refresh first |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
59 [255] |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
60 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
61 $ hg diff -c . |
12376
97ffc68f71d3
tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents:
12375
diff
changeset
|
62 diff -r 07f494440405 -r ???????????? a (glob) |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
63 --- a/a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
64 +++ b/a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
65 @@ -1,1 +1,3 @@ |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
66 a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
67 +a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
68 +b |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
69 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
70 $ hg revert -a --no-backup |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
71 reverting a |
10397
8cb81d75730c
mq: add parent node IDs to MQ patches on qrefresh/qnew
Steve Losh <steve@stevelosh.com>
parents:
10190
diff
changeset
|
72 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
73 Fold git patch into a regular patch, expect git patch: |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
74 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
75 $ echo a >> a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
76 $ hg qnew -f regular |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
77 $ hg cp a aa |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
78 $ hg qnew --git -f git |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
79 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
80 $ hg qpop |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
81 popping git |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
82 now at: regular |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
83 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
84 $ hg qfold git |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
85 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
86 $ cat .hg/patches/regular |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
87 # HG changeset patch |
12376
97ffc68f71d3
tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents:
12375
diff
changeset
|
88 # Parent ???????????????????????????????????????? (glob) |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
89 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
90 diff --git a/a b/a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
91 --- a/a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
92 +++ b/a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
93 @@ -1,3 +1,4 @@ |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
94 a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
95 a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
96 b |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
97 +a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
98 diff --git a/a b/aa |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
99 copy from a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
100 copy to aa |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
101 --- a/a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
102 +++ b/aa |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
103 @@ -1,3 +1,4 @@ |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
104 a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
105 a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
106 b |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
107 +a |
10186
296a0b14a686
mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents:
8426
diff
changeset
|
108 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
109 $ hg qpop |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
110 popping regular |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
111 now at: p1 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
112 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
113 $ hg qdel regular |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
114 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
115 Fold regular patch into a git patch, expect git patch: |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
116 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
117 $ hg cp a aa |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
118 $ hg qnew --git -f git |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
119 $ echo b >> aa |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
120 $ hg qnew -f regular |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
121 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
122 $ hg qpop |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
123 popping regular |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
124 now at: git |
10186
296a0b14a686
mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents:
8426
diff
changeset
|
125 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
126 $ hg qfold regular |
10186
296a0b14a686
mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents:
8426
diff
changeset
|
127 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
128 $ cat .hg/patches/git |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
129 # HG changeset patch |
12376
97ffc68f71d3
tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents:
12375
diff
changeset
|
130 # Parent ???????????????????????????????????????? (glob) |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
131 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
132 diff --git a/a b/aa |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
133 copy from a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
134 copy to aa |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
135 --- a/a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
136 +++ b/aa |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
137 @@ -1,3 +1,4 @@ |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
138 a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
139 a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
140 b |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
141 +b |
8426 | 142 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10397
diff
changeset
|
143 $ cd .. |
8426 | 144 |