Show More
@@ -1,901 +1,901 b'' | |||||
1 |
|
1 | |||
2 | $ cat <<EOF >> $HGRCPATH |
|
2 | $ cat <<EOF >> $HGRCPATH | |
3 | > [extensions] |
|
3 | > [extensions] | |
4 | > mq = |
|
4 | > mq = | |
5 | > [diff] |
|
5 | > [diff] | |
6 | > nodates = true |
|
6 | > nodates = true | |
7 | > EOF |
|
7 | > EOF | |
8 | $ catpatch() { |
|
8 | $ catpatch() { | |
9 | > cat .hg/patches/$1.patch | sed -e "s/^diff \-r [0-9a-f]* /diff -r ... /" \ |
|
9 | > cat .hg/patches/$1.patch | sed -e "s/^diff \-r [0-9a-f]* /diff -r ... /" \ | |
10 | > -e "s/^\(# Parent \).*/\1/" |
|
10 | > -e "s/^\(# Parent \).*/\1/" | |
11 | > } |
|
11 | > } | |
12 | $ catlog() { |
|
12 | $ catlog() { | |
13 | > catpatch $1 |
|
13 | > catpatch $1 | |
14 | > hg log --template "{rev}: {desc} - {author}\n" |
|
14 | > hg log --template "{rev}: {node|short} {desc} - {author}\n" | |
15 | > } |
|
15 | > } | |
16 | $ catlogd() { |
|
16 | $ catlogd() { | |
17 | > catpatch $1 |
|
17 | > catpatch $1 | |
18 | > hg log --template "{rev}: {desc} - {author} - {date}\n" |
|
18 | > hg log --template "{rev}: {node|short} {desc} - {author} - {date}\n" | |
19 | > } |
|
19 | > } | |
20 | $ drop() { |
|
20 | $ drop() { | |
21 | > hg qpop |
|
21 | > hg qpop | |
22 | > hg qdel $1.patch |
|
22 | > hg qdel $1.patch | |
23 | > } |
|
23 | > } | |
24 | $ runtest() { |
|
24 | $ runtest() { | |
25 | > echo ==== init |
|
25 | > echo ==== init | |
26 | > hg init a |
|
26 | > hg init a | |
27 | > cd a |
|
27 | > cd a | |
28 | > hg qinit |
|
28 | > hg qinit | |
29 | > |
|
29 | > | |
30 | > |
|
30 | > | |
31 | > echo ==== qnew -d |
|
31 | > echo ==== qnew -d | |
32 | > hg qnew -d '3 0' 1.patch |
|
32 | > hg qnew -d '3 0' 1.patch | |
33 | > catlogd 1 |
|
33 | > catlogd 1 | |
34 | > |
|
34 | > | |
35 | > echo ==== qref |
|
35 | > echo ==== qref | |
36 | > echo "1" >1 |
|
36 | > echo "1" >1 | |
37 | > hg add |
|
37 | > hg add | |
38 | > hg qref |
|
38 | > hg qref | |
39 | > catlogd 1 |
|
39 | > catlogd 1 | |
40 | > |
|
40 | > | |
41 | > echo ==== qref -d |
|
41 | > echo ==== qref -d | |
42 | > hg qref -d '4 0' |
|
42 | > hg qref -d '4 0' | |
43 | > catlogd 1 |
|
43 | > catlogd 1 | |
44 | > |
|
44 | > | |
45 | > |
|
45 | > | |
46 | > echo ==== qnew |
|
46 | > echo ==== qnew | |
47 | > hg qnew 2.patch |
|
47 | > hg qnew 2.patch | |
48 | > echo "2" >2 |
|
48 | > echo "2" >2 | |
49 | > hg add |
|
49 | > hg add | |
50 | > hg qref |
|
50 | > hg qref | |
51 | > catlog 2 |
|
51 | > catlog 2 | |
52 | > |
|
52 | > | |
53 | > echo ==== qref -d |
|
53 | > echo ==== qref -d | |
54 | > hg qref -d '5 0' |
|
54 | > hg qref -d '5 0' | |
55 | > catlog 2 |
|
55 | > catlog 2 | |
56 | > |
|
56 | > | |
57 | > drop 2 |
|
57 | > drop 2 | |
58 | > |
|
58 | > | |
59 | > |
|
59 | > | |
60 | > echo ==== qnew -d -m |
|
60 | > echo ==== qnew -d -m | |
61 | > hg qnew -d '6 0' -m "Three" 3.patch |
|
61 | > hg qnew -d '6 0' -m "Three" 3.patch | |
62 | > catlogd 3 |
|
62 | > catlogd 3 | |
63 | > |
|
63 | > | |
64 | > echo ==== qref |
|
64 | > echo ==== qref | |
65 | > echo "3" >3 |
|
65 | > echo "3" >3 | |
66 | > hg add |
|
66 | > hg add | |
67 | > hg qref |
|
67 | > hg qref | |
68 | > catlogd 3 |
|
68 | > catlogd 3 | |
69 | > |
|
69 | > | |
70 | > echo ==== qref -m |
|
70 | > echo ==== qref -m | |
71 | > hg qref -m "Drei" |
|
71 | > hg qref -m "Drei" | |
72 | > catlogd 3 |
|
72 | > catlogd 3 | |
73 | > |
|
73 | > | |
74 | > echo ==== qref -d |
|
74 | > echo ==== qref -d | |
75 | > hg qref -d '7 0' |
|
75 | > hg qref -d '7 0' | |
76 | > catlogd 3 |
|
76 | > catlogd 3 | |
77 | > |
|
77 | > | |
78 | > echo ==== qref -d -m |
|
78 | > echo ==== qref -d -m | |
79 | > hg qref -d '8 0' -m "Three (again)" |
|
79 | > hg qref -d '8 0' -m "Three (again)" | |
80 | > catlogd 3 |
|
80 | > catlogd 3 | |
81 | > |
|
81 | > | |
82 | > |
|
82 | > | |
83 | > echo ==== qnew -m |
|
83 | > echo ==== qnew -m | |
84 | > hg qnew -m "Four" 4.patch |
|
84 | > hg qnew -m "Four" 4.patch | |
85 | > echo "4" >4 |
|
85 | > echo "4" >4 | |
86 | > hg add |
|
86 | > hg add | |
87 | > hg qref |
|
87 | > hg qref | |
88 | > catlog 4 |
|
88 | > catlog 4 | |
89 | > |
|
89 | > | |
90 | > echo ==== qref -d |
|
90 | > echo ==== qref -d | |
91 | > hg qref -d '9 0' |
|
91 | > hg qref -d '9 0' | |
92 | > catlog 4 |
|
92 | > catlog 4 | |
93 | > |
|
93 | > | |
94 | > drop 4 |
|
94 | > drop 4 | |
95 | > |
|
95 | > | |
96 | > |
|
96 | > | |
97 | > echo ==== qnew with HG header |
|
97 | > echo ==== qnew with HG header | |
98 | > hg qnew --config 'mq.plain=true' 5.patch |
|
98 | > hg qnew --config 'mq.plain=true' 5.patch | |
99 | > hg qpop |
|
99 | > hg qpop | |
100 | > echo "# HG changeset patch" >>.hg/patches/5.patch |
|
100 | > echo "# HG changeset patch" >>.hg/patches/5.patch | |
101 | > echo "# Date 10 0" >>.hg/patches/5.patch |
|
101 | > echo "# Date 10 0" >>.hg/patches/5.patch | |
102 | > hg qpush 2>&1 | grep 'Now at' |
|
102 | > hg qpush 2>&1 | grep 'Now at' | |
103 | > catlogd 5 |
|
103 | > catlogd 5 | |
104 | > |
|
104 | > | |
105 | > echo ==== hg qref |
|
105 | > echo ==== hg qref | |
106 | > echo "5" >5 |
|
106 | > echo "5" >5 | |
107 | > hg add |
|
107 | > hg add | |
108 | > hg qref |
|
108 | > hg qref | |
109 | > catlogd 5 |
|
109 | > catlogd 5 | |
110 | > |
|
110 | > | |
111 | > echo ==== hg qref -d |
|
111 | > echo ==== hg qref -d | |
112 | > hg qref -d '11 0' |
|
112 | > hg qref -d '11 0' | |
113 | > catlogd 5 |
|
113 | > catlogd 5 | |
114 | > |
|
114 | > | |
115 | > |
|
115 | > | |
116 | > echo ==== qnew with plain header |
|
116 | > echo ==== qnew with plain header | |
117 | > hg qnew --config 'mq.plain=true' -d '12 0' 6.patch |
|
117 | > hg qnew --config 'mq.plain=true' -d '12 0' 6.patch | |
118 | > hg qpop |
|
118 | > hg qpop | |
119 | > hg qpush 2>&1 | grep 'now at' |
|
119 | > hg qpush 2>&1 | grep 'now at' | |
120 | > catlog 6 |
|
120 | > catlog 6 | |
121 | > |
|
121 | > | |
122 | > echo ==== hg qref |
|
122 | > echo ==== hg qref | |
123 | > echo "6" >6 |
|
123 | > echo "6" >6 | |
124 | > hg add |
|
124 | > hg add | |
125 | > hg qref |
|
125 | > hg qref | |
126 | > catlogd 6 |
|
126 | > catlogd 6 | |
127 | > |
|
127 | > | |
128 | > echo ==== hg qref -d |
|
128 | > echo ==== hg qref -d | |
129 | > hg qref -d '13 0' |
|
129 | > hg qref -d '13 0' | |
130 | > catlogd 6 |
|
130 | > catlogd 6 | |
131 | > |
|
131 | > | |
132 | > drop 6 |
|
132 | > drop 6 | |
133 | > |
|
133 | > | |
134 | > |
|
134 | > | |
135 | > echo ==== qnew -u |
|
135 | > echo ==== qnew -u | |
136 | > hg qnew -u jane 6.patch |
|
136 | > hg qnew -u jane 6.patch | |
137 | > echo "6" >6 |
|
137 | > echo "6" >6 | |
138 | > hg add |
|
138 | > hg add | |
139 | > hg qref |
|
139 | > hg qref | |
140 | > catlog 6 |
|
140 | > catlog 6 | |
141 | > |
|
141 | > | |
142 | > echo ==== qref -d |
|
142 | > echo ==== qref -d | |
143 | > hg qref -d '12 0' |
|
143 | > hg qref -d '12 0' | |
144 | > catlog 6 |
|
144 | > catlog 6 | |
145 | > |
|
145 | > | |
146 | > drop 6 |
|
146 | > drop 6 | |
147 | > |
|
147 | > | |
148 | > |
|
148 | > | |
149 | > echo ==== qnew -d |
|
149 | > echo ==== qnew -d | |
150 | > hg qnew -d '13 0' 7.patch |
|
150 | > hg qnew -d '13 0' 7.patch | |
151 | > echo "7" >7 |
|
151 | > echo "7" >7 | |
152 | > hg add |
|
152 | > hg add | |
153 | > hg qref |
|
153 | > hg qref | |
154 | > catlog 7 |
|
154 | > catlog 7 | |
155 | > |
|
155 | > | |
156 | > echo ==== qref -u |
|
156 | > echo ==== qref -u | |
157 | > hg qref -u john |
|
157 | > hg qref -u john | |
158 | > catlogd 7 |
|
158 | > catlogd 7 | |
159 | > |
|
159 | > | |
160 | > |
|
160 | > | |
161 | > echo ==== qnew |
|
161 | > echo ==== qnew | |
162 | > hg qnew 8.patch |
|
162 | > hg qnew 8.patch | |
163 | > echo "8" >8 |
|
163 | > echo "8" >8 | |
164 | > hg add |
|
164 | > hg add | |
165 | > hg qref |
|
165 | > hg qref | |
166 | > catlog 8 |
|
166 | > catlog 8 | |
167 | > |
|
167 | > | |
168 | > echo ==== qref -u -d |
|
168 | > echo ==== qref -u -d | |
169 | > hg qref -u john -d '14 0' |
|
169 | > hg qref -u john -d '14 0' | |
170 | > catlog 8 |
|
170 | > catlog 8 | |
171 | > |
|
171 | > | |
172 | > drop 8 |
|
172 | > drop 8 | |
173 | > |
|
173 | > | |
174 | > |
|
174 | > | |
175 | > echo ==== qnew -m |
|
175 | > echo ==== qnew -m | |
176 | > hg qnew -m "Nine" 9.patch |
|
176 | > hg qnew -m "Nine" 9.patch | |
177 | > echo "9" >9 |
|
177 | > echo "9" >9 | |
178 | > hg add |
|
178 | > hg add | |
179 | > hg qref |
|
179 | > hg qref | |
180 | > catlog 9 |
|
180 | > catlog 9 | |
181 | > |
|
181 | > | |
182 | > echo ==== qref -u -d |
|
182 | > echo ==== qref -u -d | |
183 | > hg qref -u john -d '15 0' |
|
183 | > hg qref -u john -d '15 0' | |
184 | > catlog 9 |
|
184 | > catlog 9 | |
185 | > |
|
185 | > | |
186 | > drop 9 |
|
186 | > drop 9 | |
187 | > |
|
187 | > | |
188 | > |
|
188 | > | |
189 | > echo ==== "qpop -a / qpush -a" |
|
189 | > echo ==== "qpop -a / qpush -a" | |
190 | > hg qpop -a |
|
190 | > hg qpop -a | |
191 | > hg qpush -a |
|
191 | > hg qpush -a | |
192 | > hg log --template "{rev}: {desc} - {author} - {date}\n" |
|
192 | > hg log --template "{rev}: {node|short} {desc} - {author} - {date}\n" | |
193 | > } |
|
193 | > } | |
194 |
|
194 | |||
195 | ======= plain headers |
|
195 | ======= plain headers | |
196 |
|
196 | |||
197 | $ echo "[mq]" >> $HGRCPATH |
|
197 | $ echo "[mq]" >> $HGRCPATH | |
198 | $ echo "plain=true" >> $HGRCPATH |
|
198 | $ echo "plain=true" >> $HGRCPATH | |
199 | $ mkdir sandbox |
|
199 | $ mkdir sandbox | |
200 | $ (cd sandbox ; runtest) |
|
200 | $ (cd sandbox ; runtest) | |
201 | ==== init |
|
201 | ==== init | |
202 | ==== qnew -d |
|
202 | ==== qnew -d | |
203 | Date: 3 0 |
|
203 | Date: 3 0 | |
204 |
|
204 | |||
205 | 0: [mq]: 1.patch - test - 3.00 |
|
205 | 0: 758bd2596a39 [mq]: 1.patch - test - 3.00 | |
206 | ==== qref |
|
206 | ==== qref | |
207 | adding 1 |
|
207 | adding 1 | |
208 | Date: 3 0 |
|
208 | Date: 3 0 | |
209 |
|
209 | |||
210 | diff -r ... 1 |
|
210 | diff -r ... 1 | |
211 | --- /dev/null |
|
211 | --- /dev/null | |
212 | +++ b/1 |
|
212 | +++ b/1 | |
213 | @@ -0,0 +1,1 @@ |
|
213 | @@ -0,0 +1,1 @@ | |
214 | +1 |
|
214 | +1 | |
215 | 0: [mq]: 1.patch - test - 3.00 |
|
215 | 0: 8c640e9949a8 [mq]: 1.patch - test - 3.00 | |
216 | ==== qref -d |
|
216 | ==== qref -d | |
217 | Date: 4 0 |
|
217 | Date: 4 0 | |
218 |
|
218 | |||
219 | diff -r ... 1 |
|
219 | diff -r ... 1 | |
220 | --- /dev/null |
|
220 | --- /dev/null | |
221 | +++ b/1 |
|
221 | +++ b/1 | |
222 | @@ -0,0 +1,1 @@ |
|
222 | @@ -0,0 +1,1 @@ | |
223 | +1 |
|
223 | +1 | |
224 | 0: [mq]: 1.patch - test - 4.00 |
|
224 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
225 | ==== qnew |
|
225 | ==== qnew | |
226 | adding 2 |
|
226 | adding 2 | |
227 | diff -r ... 2 |
|
227 | diff -r ... 2 | |
228 | --- /dev/null |
|
228 | --- /dev/null | |
229 | +++ b/2 |
|
229 | +++ b/2 | |
230 | @@ -0,0 +1,1 @@ |
|
230 | @@ -0,0 +1,1 @@ | |
231 | +2 |
|
231 | +2 | |
232 | 1: [mq]: 2.patch - test |
|
232 | 1: fc7e8a2f6499 [mq]: 2.patch - test | |
233 | 0: [mq]: 1.patch - test |
|
233 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
234 | ==== qref -d |
|
234 | ==== qref -d | |
235 | Date: 5 0 |
|
235 | Date: 5 0 | |
236 |
|
236 | |||
237 | diff -r ... 2 |
|
237 | diff -r ... 2 | |
238 | --- /dev/null |
|
238 | --- /dev/null | |
239 | +++ b/2 |
|
239 | +++ b/2 | |
240 | @@ -0,0 +1,1 @@ |
|
240 | @@ -0,0 +1,1 @@ | |
241 | +2 |
|
241 | +2 | |
242 | 1: [mq]: 2.patch - test |
|
242 | 1: 1d9a6a118fd1 [mq]: 2.patch - test | |
243 | 0: [mq]: 1.patch - test |
|
243 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
244 | popping 2.patch |
|
244 | popping 2.patch | |
245 | now at: 1.patch |
|
245 | now at: 1.patch | |
246 | ==== qnew -d -m |
|
246 | ==== qnew -d -m | |
247 | Date: 6 0 |
|
247 | Date: 6 0 | |
248 |
|
248 | |||
249 | Three |
|
249 | Three | |
250 |
|
250 | |||
251 | 1: Three - test - 6.00 |
|
251 | 1: 2a9ef0bdefba Three - test - 6.00 | |
252 | 0: [mq]: 1.patch - test - 4.00 |
|
252 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
253 | ==== qref |
|
253 | ==== qref | |
254 | adding 3 |
|
254 | adding 3 | |
255 | Date: 6 0 |
|
255 | Date: 6 0 | |
256 |
|
256 | |||
257 | Three |
|
257 | Three | |
258 |
|
258 | |||
259 | diff -r ... 3 |
|
259 | diff -r ... 3 | |
260 | --- /dev/null |
|
260 | --- /dev/null | |
261 | +++ b/3 |
|
261 | +++ b/3 | |
262 | @@ -0,0 +1,1 @@ |
|
262 | @@ -0,0 +1,1 @@ | |
263 | +3 |
|
263 | +3 | |
264 | 1: Three - test - 6.00 |
|
264 | 1: 7f19ad9eea7b Three - test - 6.00 | |
265 | 0: [mq]: 1.patch - test - 4.00 |
|
265 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
266 | ==== qref -m |
|
266 | ==== qref -m | |
267 | Date: 6 0 |
|
267 | Date: 6 0 | |
268 |
|
268 | |||
269 | Drei |
|
269 | Drei | |
270 |
|
270 | |||
271 | diff -r ... 3 |
|
271 | diff -r ... 3 | |
272 | --- /dev/null |
|
272 | --- /dev/null | |
273 | +++ b/3 |
|
273 | +++ b/3 | |
274 | @@ -0,0 +1,1 @@ |
|
274 | @@ -0,0 +1,1 @@ | |
275 | +3 |
|
275 | +3 | |
276 | 1: Drei - test - 6.00 |
|
276 | 1: 7ff7377793e3 Drei - test - 6.00 | |
277 | 0: [mq]: 1.patch - test - 4.00 |
|
277 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
278 | ==== qref -d |
|
278 | ==== qref -d | |
279 | Date: 7 0 |
|
279 | Date: 7 0 | |
280 |
|
280 | |||
281 | Drei |
|
281 | Drei | |
282 |
|
282 | |||
283 | diff -r ... 3 |
|
283 | diff -r ... 3 | |
284 | --- /dev/null |
|
284 | --- /dev/null | |
285 | +++ b/3 |
|
285 | +++ b/3 | |
286 | @@ -0,0 +1,1 @@ |
|
286 | @@ -0,0 +1,1 @@ | |
287 | +3 |
|
287 | +3 | |
288 | 1: Drei - test - 7.00 |
|
288 | 1: d89d3144f518 Drei - test - 7.00 | |
289 | 0: [mq]: 1.patch - test - 4.00 |
|
289 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
290 | ==== qref -d -m |
|
290 | ==== qref -d -m | |
291 | Date: 8 0 |
|
291 | Date: 8 0 | |
292 |
|
292 | |||
293 | Three (again) |
|
293 | Three (again) | |
294 |
|
294 | |||
295 | diff -r ... 3 |
|
295 | diff -r ... 3 | |
296 | --- /dev/null |
|
296 | --- /dev/null | |
297 | +++ b/3 |
|
297 | +++ b/3 | |
298 | @@ -0,0 +1,1 @@ |
|
298 | @@ -0,0 +1,1 @@ | |
299 | +3 |
|
299 | +3 | |
300 | 1: Three (again) - test - 8.00 |
|
300 | 1: b1b6b0fe0e6d Three (again) - test - 8.00 | |
301 | 0: [mq]: 1.patch - test - 4.00 |
|
301 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
302 | ==== qnew -m |
|
302 | ==== qnew -m | |
303 | adding 4 |
|
303 | adding 4 | |
304 | Four |
|
304 | Four | |
305 |
|
305 | |||
306 | diff -r ... 4 |
|
306 | diff -r ... 4 | |
307 | --- /dev/null |
|
307 | --- /dev/null | |
308 | +++ b/4 |
|
308 | +++ b/4 | |
309 | @@ -0,0 +1,1 @@ |
|
309 | @@ -0,0 +1,1 @@ | |
310 | +4 |
|
310 | +4 | |
311 | 2: Four - test |
|
311 | 2: 74ded07d166b Four - test | |
312 | 1: Three (again) - test |
|
312 | 1: b1b6b0fe0e6d Three (again) - test | |
313 | 0: [mq]: 1.patch - test |
|
313 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
314 | ==== qref -d |
|
314 | ==== qref -d | |
315 | Date: 9 0 |
|
315 | Date: 9 0 | |
316 |
|
316 | |||
317 | Four |
|
317 | Four | |
318 |
|
318 | |||
319 | diff -r ... 4 |
|
319 | diff -r ... 4 | |
320 | --- /dev/null |
|
320 | --- /dev/null | |
321 | +++ b/4 |
|
321 | +++ b/4 | |
322 | @@ -0,0 +1,1 @@ |
|
322 | @@ -0,0 +1,1 @@ | |
323 | +4 |
|
323 | +4 | |
324 | 2: Four - test |
|
324 | 2: 1a651320cf8e Four - test | |
325 | 1: Three (again) - test |
|
325 | 1: b1b6b0fe0e6d Three (again) - test | |
326 | 0: [mq]: 1.patch - test |
|
326 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
327 | popping 4.patch |
|
327 | popping 4.patch | |
328 | now at: 3.patch |
|
328 | now at: 3.patch | |
329 | ==== qnew with HG header |
|
329 | ==== qnew with HG header | |
330 | popping 5.patch |
|
330 | popping 5.patch | |
331 | now at: 3.patch |
|
331 | now at: 3.patch | |
332 | # HG changeset patch |
|
332 | # HG changeset patch | |
333 | # Date 10 0 |
|
333 | # Date 10 0 | |
334 | 2: imported patch 5.patch - test - 10.00 |
|
334 | 2: d16a272220d2 imported patch 5.patch - test - 10.00 | |
335 | 1: Three (again) - test - 8.00 |
|
335 | 1: b1b6b0fe0e6d Three (again) - test - 8.00 | |
336 | 0: [mq]: 1.patch - test - 4.00 |
|
336 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
337 | ==== hg qref |
|
337 | ==== hg qref | |
338 | adding 5 |
|
338 | adding 5 | |
339 | # HG changeset patch |
|
339 | # HG changeset patch | |
340 | # Date 10 0 |
|
340 | # Date 10 0 | |
341 | # Parent |
|
341 | # Parent | |
342 |
|
342 | |||
343 | diff -r ... 5 |
|
343 | diff -r ... 5 | |
344 | --- /dev/null |
|
344 | --- /dev/null | |
345 | +++ b/5 |
|
345 | +++ b/5 | |
346 | @@ -0,0 +1,1 @@ |
|
346 | @@ -0,0 +1,1 @@ | |
347 | +5 |
|
347 | +5 | |
348 | 2: [mq]: 5.patch - test - 10.00 |
|
348 | 2: 5dbf69c07df9 [mq]: 5.patch - test - 10.00 | |
349 | 1: Three (again) - test - 8.00 |
|
349 | 1: b1b6b0fe0e6d Three (again) - test - 8.00 | |
350 | 0: [mq]: 1.patch - test - 4.00 |
|
350 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
351 | ==== hg qref -d |
|
351 | ==== hg qref -d | |
352 | # HG changeset patch |
|
352 | # HG changeset patch | |
353 | # Date 11 0 |
|
353 | # Date 11 0 | |
354 | # Parent |
|
354 | # Parent | |
355 |
|
355 | |||
356 | diff -r ... 5 |
|
356 | diff -r ... 5 | |
357 | --- /dev/null |
|
357 | --- /dev/null | |
358 | +++ b/5 |
|
358 | +++ b/5 | |
359 | @@ -0,0 +1,1 @@ |
|
359 | @@ -0,0 +1,1 @@ | |
360 | +5 |
|
360 | +5 | |
361 | 2: [mq]: 5.patch - test - 11.00 |
|
361 | 2: 049de6af0c1d [mq]: 5.patch - test - 11.00 | |
362 | 1: Three (again) - test - 8.00 |
|
362 | 1: b1b6b0fe0e6d Three (again) - test - 8.00 | |
363 | 0: [mq]: 1.patch - test - 4.00 |
|
363 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
364 | ==== qnew with plain header |
|
364 | ==== qnew with plain header | |
365 | popping 6.patch |
|
365 | popping 6.patch | |
366 | now at: 5.patch |
|
366 | now at: 5.patch | |
367 | now at: 6.patch |
|
367 | now at: 6.patch | |
368 | Date: 12 0 |
|
368 | Date: 12 0 | |
369 |
|
369 | |||
370 | 3: imported patch 6.patch - test |
|
370 | 3: 8ad9ebc22b96 imported patch 6.patch - test | |
371 | 2: [mq]: 5.patch - test |
|
371 | 2: 049de6af0c1d [mq]: 5.patch - test | |
372 | 1: Three (again) - test |
|
372 | 1: b1b6b0fe0e6d Three (again) - test | |
373 | 0: [mq]: 1.patch - test |
|
373 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
374 | ==== hg qref |
|
374 | ==== hg qref | |
375 | adding 6 |
|
375 | adding 6 | |
376 | Date: 12 0 |
|
376 | Date: 12 0 | |
377 |
|
377 | |||
378 | diff -r ... 6 |
|
378 | diff -r ... 6 | |
379 | --- /dev/null |
|
379 | --- /dev/null | |
380 | +++ b/6 |
|
380 | +++ b/6 | |
381 | @@ -0,0 +1,1 @@ |
|
381 | @@ -0,0 +1,1 @@ | |
382 | +6 |
|
382 | +6 | |
383 | 3: [mq]: 6.patch - test - 12.00 |
|
383 | 3: 038c46b02a56 [mq]: 6.patch - test - 12.00 | |
384 | 2: [mq]: 5.patch - test - 11.00 |
|
384 | 2: 049de6af0c1d [mq]: 5.patch - test - 11.00 | |
385 | 1: Three (again) - test - 8.00 |
|
385 | 1: b1b6b0fe0e6d Three (again) - test - 8.00 | |
386 | 0: [mq]: 1.patch - test - 4.00 |
|
386 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
387 | ==== hg qref -d |
|
387 | ==== hg qref -d | |
388 | Date: 13 0 |
|
388 | Date: 13 0 | |
389 |
|
389 | |||
390 | diff -r ... 6 |
|
390 | diff -r ... 6 | |
391 | --- /dev/null |
|
391 | --- /dev/null | |
392 | +++ b/6 |
|
392 | +++ b/6 | |
393 | @@ -0,0 +1,1 @@ |
|
393 | @@ -0,0 +1,1 @@ | |
394 | +6 |
|
394 | +6 | |
395 | 3: [mq]: 6.patch - test - 13.00 |
|
395 | 3: 2785642ea4b4 [mq]: 6.patch - test - 13.00 | |
396 | 2: [mq]: 5.patch - test - 11.00 |
|
396 | 2: 049de6af0c1d [mq]: 5.patch - test - 11.00 | |
397 | 1: Three (again) - test - 8.00 |
|
397 | 1: b1b6b0fe0e6d Three (again) - test - 8.00 | |
398 | 0: [mq]: 1.patch - test - 4.00 |
|
398 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
399 | popping 6.patch |
|
399 | popping 6.patch | |
400 | now at: 5.patch |
|
400 | now at: 5.patch | |
401 | ==== qnew -u |
|
401 | ==== qnew -u | |
402 | adding 6 |
|
402 | adding 6 | |
403 | From: jane |
|
403 | From: jane | |
404 |
|
404 | |||
405 | diff -r ... 6 |
|
405 | diff -r ... 6 | |
406 | --- /dev/null |
|
406 | --- /dev/null | |
407 | +++ b/6 |
|
407 | +++ b/6 | |
408 | @@ -0,0 +1,1 @@ |
|
408 | @@ -0,0 +1,1 @@ | |
409 | +6 |
|
409 | +6 | |
410 | 3: [mq]: 6.patch - jane |
|
410 | 3: a05a33f187ce [mq]: 6.patch - jane | |
411 | 2: [mq]: 5.patch - test |
|
411 | 2: 049de6af0c1d [mq]: 5.patch - test | |
412 | 1: Three (again) - test |
|
412 | 1: b1b6b0fe0e6d Three (again) - test | |
413 | 0: [mq]: 1.patch - test |
|
413 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
414 | ==== qref -d |
|
414 | ==== qref -d | |
415 | From: jane |
|
415 | From: jane | |
416 | Date: 12 0 |
|
416 | Date: 12 0 | |
417 |
|
417 | |||
418 | diff -r ... 6 |
|
418 | diff -r ... 6 | |
419 | --- /dev/null |
|
419 | --- /dev/null | |
420 | +++ b/6 |
|
420 | +++ b/6 | |
421 | @@ -0,0 +1,1 @@ |
|
421 | @@ -0,0 +1,1 @@ | |
422 | +6 |
|
422 | +6 | |
423 | 3: [mq]: 6.patch - jane |
|
423 | 3: 5702c529dfe9 [mq]: 6.patch - jane | |
424 | 2: [mq]: 5.patch - test |
|
424 | 2: 049de6af0c1d [mq]: 5.patch - test | |
425 | 1: Three (again) - test |
|
425 | 1: b1b6b0fe0e6d Three (again) - test | |
426 | 0: [mq]: 1.patch - test |
|
426 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
427 | popping 6.patch |
|
427 | popping 6.patch | |
428 | now at: 5.patch |
|
428 | now at: 5.patch | |
429 | ==== qnew -d |
|
429 | ==== qnew -d | |
430 | adding 7 |
|
430 | adding 7 | |
431 | Date: 13 0 |
|
431 | Date: 13 0 | |
432 |
|
432 | |||
433 | diff -r ... 7 |
|
433 | diff -r ... 7 | |
434 | --- /dev/null |
|
434 | --- /dev/null | |
435 | +++ b/7 |
|
435 | +++ b/7 | |
436 | @@ -0,0 +1,1 @@ |
|
436 | @@ -0,0 +1,1 @@ | |
437 | +7 |
|
437 | +7 | |
438 | 3: [mq]: 7.patch - test |
|
438 | 3: 8dd1eb8d4132 [mq]: 7.patch - test | |
439 | 2: [mq]: 5.patch - test |
|
439 | 2: 049de6af0c1d [mq]: 5.patch - test | |
440 | 1: Three (again) - test |
|
440 | 1: b1b6b0fe0e6d Three (again) - test | |
441 | 0: [mq]: 1.patch - test |
|
441 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
442 | ==== qref -u |
|
442 | ==== qref -u | |
443 | From: john |
|
443 | From: john | |
444 | Date: 13 0 |
|
444 | Date: 13 0 | |
445 |
|
445 | |||
446 | diff -r ... 7 |
|
446 | diff -r ... 7 | |
447 | --- /dev/null |
|
447 | --- /dev/null | |
448 | +++ b/7 |
|
448 | +++ b/7 | |
449 | @@ -0,0 +1,1 @@ |
|
449 | @@ -0,0 +1,1 @@ | |
450 | +7 |
|
450 | +7 | |
451 | 3: [mq]: 7.patch - john - 13.00 |
|
451 | 3: 4f9d07369cc4 [mq]: 7.patch - john - 13.00 | |
452 | 2: [mq]: 5.patch - test - 11.00 |
|
452 | 2: 049de6af0c1d [mq]: 5.patch - test - 11.00 | |
453 | 1: Three (again) - test - 8.00 |
|
453 | 1: b1b6b0fe0e6d Three (again) - test - 8.00 | |
454 | 0: [mq]: 1.patch - test - 4.00 |
|
454 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
455 | ==== qnew |
|
455 | ==== qnew | |
456 | adding 8 |
|
456 | adding 8 | |
457 | diff -r ... 8 |
|
457 | diff -r ... 8 | |
458 | --- /dev/null |
|
458 | --- /dev/null | |
459 | +++ b/8 |
|
459 | +++ b/8 | |
460 | @@ -0,0 +1,1 @@ |
|
460 | @@ -0,0 +1,1 @@ | |
461 | +8 |
|
461 | +8 | |
462 | 4: [mq]: 8.patch - test |
|
462 | 4: 868b62f09492 [mq]: 8.patch - test | |
463 | 3: [mq]: 7.patch - john |
|
463 | 3: 4f9d07369cc4 [mq]: 7.patch - john | |
464 | 2: [mq]: 5.patch - test |
|
464 | 2: 049de6af0c1d [mq]: 5.patch - test | |
465 | 1: Three (again) - test |
|
465 | 1: b1b6b0fe0e6d Three (again) - test | |
466 | 0: [mq]: 1.patch - test |
|
466 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
467 | ==== qref -u -d |
|
467 | ==== qref -u -d | |
468 | From: john |
|
468 | From: john | |
469 | Date: 14 0 |
|
469 | Date: 14 0 | |
470 |
|
470 | |||
471 | diff -r ... 8 |
|
471 | diff -r ... 8 | |
472 | --- /dev/null |
|
472 | --- /dev/null | |
473 | +++ b/8 |
|
473 | +++ b/8 | |
474 | @@ -0,0 +1,1 @@ |
|
474 | @@ -0,0 +1,1 @@ | |
475 | +8 |
|
475 | +8 | |
476 | 4: [mq]: 8.patch - john |
|
476 | 4: b1e878ae55b9 [mq]: 8.patch - john | |
477 | 3: [mq]: 7.patch - john |
|
477 | 3: 4f9d07369cc4 [mq]: 7.patch - john | |
478 | 2: [mq]: 5.patch - test |
|
478 | 2: 049de6af0c1d [mq]: 5.patch - test | |
479 | 1: Three (again) - test |
|
479 | 1: b1b6b0fe0e6d Three (again) - test | |
480 | 0: [mq]: 1.patch - test |
|
480 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
481 | popping 8.patch |
|
481 | popping 8.patch | |
482 | now at: 7.patch |
|
482 | now at: 7.patch | |
483 | ==== qnew -m |
|
483 | ==== qnew -m | |
484 | adding 9 |
|
484 | adding 9 | |
485 | Nine |
|
485 | Nine | |
486 |
|
486 | |||
487 | diff -r ... 9 |
|
487 | diff -r ... 9 | |
488 | --- /dev/null |
|
488 | --- /dev/null | |
489 | +++ b/9 |
|
489 | +++ b/9 | |
490 | @@ -0,0 +1,1 @@ |
|
490 | @@ -0,0 +1,1 @@ | |
491 | +9 |
|
491 | +9 | |
492 | 4: Nine - test |
|
492 | 4: 7251936ac2bf Nine - test | |
493 | 3: [mq]: 7.patch - john |
|
493 | 3: 4f9d07369cc4 [mq]: 7.patch - john | |
494 | 2: [mq]: 5.patch - test |
|
494 | 2: 049de6af0c1d [mq]: 5.patch - test | |
495 | 1: Three (again) - test |
|
495 | 1: b1b6b0fe0e6d Three (again) - test | |
496 | 0: [mq]: 1.patch - test |
|
496 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
497 | ==== qref -u -d |
|
497 | ==== qref -u -d | |
498 | From: john |
|
498 | From: john | |
499 | Date: 15 0 |
|
499 | Date: 15 0 | |
500 |
|
500 | |||
501 | Nine |
|
501 | Nine | |
502 |
|
502 | |||
503 | diff -r ... 9 |
|
503 | diff -r ... 9 | |
504 | --- /dev/null |
|
504 | --- /dev/null | |
505 | +++ b/9 |
|
505 | +++ b/9 | |
506 | @@ -0,0 +1,1 @@ |
|
506 | @@ -0,0 +1,1 @@ | |
507 | +9 |
|
507 | +9 | |
508 | 4: Nine - john |
|
508 | 4: a0de5bf6e9f7 Nine - john | |
509 | 3: [mq]: 7.patch - john |
|
509 | 3: 4f9d07369cc4 [mq]: 7.patch - john | |
510 | 2: [mq]: 5.patch - test |
|
510 | 2: 049de6af0c1d [mq]: 5.patch - test | |
511 | 1: Three (again) - test |
|
511 | 1: b1b6b0fe0e6d Three (again) - test | |
512 | 0: [mq]: 1.patch - test |
|
512 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
513 | popping 9.patch |
|
513 | popping 9.patch | |
514 | now at: 7.patch |
|
514 | now at: 7.patch | |
515 | ==== qpop -a / qpush -a |
|
515 | ==== qpop -a / qpush -a | |
516 | popping 7.patch |
|
516 | popping 7.patch | |
517 | popping 5.patch |
|
517 | popping 5.patch | |
518 | popping 3.patch |
|
518 | popping 3.patch | |
519 | popping 1.patch |
|
519 | popping 1.patch | |
520 | patch queue now empty |
|
520 | patch queue now empty | |
521 | applying 1.patch |
|
521 | applying 1.patch | |
522 | applying 3.patch |
|
522 | applying 3.patch | |
523 | applying 5.patch |
|
523 | applying 5.patch | |
524 | applying 7.patch |
|
524 | applying 7.patch | |
525 | now at: 7.patch |
|
525 | now at: 7.patch | |
526 | 3: imported patch 7.patch - john - 13.00 |
|
526 | 3: d26a5b7ffce1 imported patch 7.patch - john - 13.00 | |
527 | 2: imported patch 5.patch - test - 11.00 |
|
527 | 2: dda6cf77060a imported patch 5.patch - test - 11.00 | |
528 | 1: Three (again) - test - 8.00 |
|
528 | 1: 25e32d66c8c7 Three (again) - test - 8.00 | |
529 | 0: imported patch 1.patch - test - 4.00 |
|
529 | 0: e5011c0211fe imported patch 1.patch - test - 4.00 | |
530 | $ rm -r sandbox |
|
530 | $ rm -r sandbox | |
531 |
|
531 | |||
532 | ======= hg headers |
|
532 | ======= hg headers | |
533 |
|
533 | |||
534 | $ echo "plain=false" >> $HGRCPATH |
|
534 | $ echo "plain=false" >> $HGRCPATH | |
535 | $ mkdir sandbox |
|
535 | $ mkdir sandbox | |
536 | $ (cd sandbox ; runtest) |
|
536 | $ (cd sandbox ; runtest) | |
537 | ==== init |
|
537 | ==== init | |
538 | ==== qnew -d |
|
538 | ==== qnew -d | |
539 | # HG changeset patch |
|
539 | # HG changeset patch | |
540 | # Date 3 0 |
|
540 | # Date 3 0 | |
541 | # Parent |
|
541 | # Parent | |
542 |
|
542 | |||
543 | 0: [mq]: 1.patch - test - 3.00 |
|
543 | 0: 758bd2596a39 [mq]: 1.patch - test - 3.00 | |
544 | ==== qref |
|
544 | ==== qref | |
545 | adding 1 |
|
545 | adding 1 | |
546 | # HG changeset patch |
|
546 | # HG changeset patch | |
547 | # Date 3 0 |
|
547 | # Date 3 0 | |
548 | # Parent |
|
548 | # Parent | |
549 |
|
549 | |||
550 | diff -r ... 1 |
|
550 | diff -r ... 1 | |
551 | --- /dev/null |
|
551 | --- /dev/null | |
552 | +++ b/1 |
|
552 | +++ b/1 | |
553 | @@ -0,0 +1,1 @@ |
|
553 | @@ -0,0 +1,1 @@ | |
554 | +1 |
|
554 | +1 | |
555 | 0: [mq]: 1.patch - test - 3.00 |
|
555 | 0: 8c640e9949a8 [mq]: 1.patch - test - 3.00 | |
556 | ==== qref -d |
|
556 | ==== qref -d | |
557 | # HG changeset patch |
|
557 | # HG changeset patch | |
558 | # Date 4 0 |
|
558 | # Date 4 0 | |
559 | # Parent |
|
559 | # Parent | |
560 |
|
560 | |||
561 | diff -r ... 1 |
|
561 | diff -r ... 1 | |
562 | --- /dev/null |
|
562 | --- /dev/null | |
563 | +++ b/1 |
|
563 | +++ b/1 | |
564 | @@ -0,0 +1,1 @@ |
|
564 | @@ -0,0 +1,1 @@ | |
565 | +1 |
|
565 | +1 | |
566 | 0: [mq]: 1.patch - test - 4.00 |
|
566 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
567 | ==== qnew |
|
567 | ==== qnew | |
568 | adding 2 |
|
568 | adding 2 | |
569 | # HG changeset patch |
|
569 | # HG changeset patch | |
570 | # Parent |
|
570 | # Parent | |
571 |
|
571 | |||
572 | diff -r ... 2 |
|
572 | diff -r ... 2 | |
573 | --- /dev/null |
|
573 | --- /dev/null | |
574 | +++ b/2 |
|
574 | +++ b/2 | |
575 | @@ -0,0 +1,1 @@ |
|
575 | @@ -0,0 +1,1 @@ | |
576 | +2 |
|
576 | +2 | |
577 | 1: [mq]: 2.patch - test |
|
577 | 1: fc7e8a2f6499 [mq]: 2.patch - test | |
578 | 0: [mq]: 1.patch - test |
|
578 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
579 | ==== qref -d |
|
579 | ==== qref -d | |
580 | # HG changeset patch |
|
580 | # HG changeset patch | |
581 | # Date 5 0 |
|
581 | # Date 5 0 | |
582 | # Parent |
|
582 | # Parent | |
583 |
|
583 | |||
584 | diff -r ... 2 |
|
584 | diff -r ... 2 | |
585 | --- /dev/null |
|
585 | --- /dev/null | |
586 | +++ b/2 |
|
586 | +++ b/2 | |
587 | @@ -0,0 +1,1 @@ |
|
587 | @@ -0,0 +1,1 @@ | |
588 | +2 |
|
588 | +2 | |
589 | 1: [mq]: 2.patch - test |
|
589 | 1: 1d9a6a118fd1 [mq]: 2.patch - test | |
590 | 0: [mq]: 1.patch - test |
|
590 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
591 | popping 2.patch |
|
591 | popping 2.patch | |
592 | now at: 1.patch |
|
592 | now at: 1.patch | |
593 | ==== qnew -d -m |
|
593 | ==== qnew -d -m | |
594 | # HG changeset patch |
|
594 | # HG changeset patch | |
595 | # Date 6 0 |
|
595 | # Date 6 0 | |
596 | # Parent |
|
596 | # Parent | |
597 | Three |
|
597 | Three | |
598 |
|
598 | |||
599 | 1: Three - test - 6.00 |
|
599 | 1: 2a9ef0bdefba Three - test - 6.00 | |
600 | 0: [mq]: 1.patch - test - 4.00 |
|
600 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
601 | ==== qref |
|
601 | ==== qref | |
602 | adding 3 |
|
602 | adding 3 | |
603 | # HG changeset patch |
|
603 | # HG changeset patch | |
604 | # Date 6 0 |
|
604 | # Date 6 0 | |
605 | # Parent |
|
605 | # Parent | |
606 | Three |
|
606 | Three | |
607 |
|
607 | |||
608 | diff -r ... 3 |
|
608 | diff -r ... 3 | |
609 | --- /dev/null |
|
609 | --- /dev/null | |
610 | +++ b/3 |
|
610 | +++ b/3 | |
611 | @@ -0,0 +1,1 @@ |
|
611 | @@ -0,0 +1,1 @@ | |
612 | +3 |
|
612 | +3 | |
613 | 1: Three - test - 6.00 |
|
613 | 1: 7f19ad9eea7b Three - test - 6.00 | |
614 | 0: [mq]: 1.patch - test - 4.00 |
|
614 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
615 | ==== qref -m |
|
615 | ==== qref -m | |
616 | # HG changeset patch |
|
616 | # HG changeset patch | |
617 | # Date 6 0 |
|
617 | # Date 6 0 | |
618 | # Parent |
|
618 | # Parent | |
619 | Drei |
|
619 | Drei | |
620 |
|
620 | |||
621 | diff -r ... 3 |
|
621 | diff -r ... 3 | |
622 | --- /dev/null |
|
622 | --- /dev/null | |
623 | +++ b/3 |
|
623 | +++ b/3 | |
624 | @@ -0,0 +1,1 @@ |
|
624 | @@ -0,0 +1,1 @@ | |
625 | +3 |
|
625 | +3 | |
626 | 1: Drei - test - 6.00 |
|
626 | 1: 7ff7377793e3 Drei - test - 6.00 | |
627 | 0: [mq]: 1.patch - test - 4.00 |
|
627 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
628 | ==== qref -d |
|
628 | ==== qref -d | |
629 | # HG changeset patch |
|
629 | # HG changeset patch | |
630 | # Date 7 0 |
|
630 | # Date 7 0 | |
631 | # Parent |
|
631 | # Parent | |
632 | Drei |
|
632 | Drei | |
633 |
|
633 | |||
634 | diff -r ... 3 |
|
634 | diff -r ... 3 | |
635 | --- /dev/null |
|
635 | --- /dev/null | |
636 | +++ b/3 |
|
636 | +++ b/3 | |
637 | @@ -0,0 +1,1 @@ |
|
637 | @@ -0,0 +1,1 @@ | |
638 | +3 |
|
638 | +3 | |
639 | 1: Drei - test - 7.00 |
|
639 | 1: d89d3144f518 Drei - test - 7.00 | |
640 | 0: [mq]: 1.patch - test - 4.00 |
|
640 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
641 | ==== qref -d -m |
|
641 | ==== qref -d -m | |
642 | # HG changeset patch |
|
642 | # HG changeset patch | |
643 | # Date 8 0 |
|
643 | # Date 8 0 | |
644 | # Parent |
|
644 | # Parent | |
645 | Three (again) |
|
645 | Three (again) | |
646 |
|
646 | |||
647 | diff -r ... 3 |
|
647 | diff -r ... 3 | |
648 | --- /dev/null |
|
648 | --- /dev/null | |
649 | +++ b/3 |
|
649 | +++ b/3 | |
650 | @@ -0,0 +1,1 @@ |
|
650 | @@ -0,0 +1,1 @@ | |
651 | +3 |
|
651 | +3 | |
652 | 1: Three (again) - test - 8.00 |
|
652 | 1: b1b6b0fe0e6d Three (again) - test - 8.00 | |
653 | 0: [mq]: 1.patch - test - 4.00 |
|
653 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
654 | ==== qnew -m |
|
654 | ==== qnew -m | |
655 | adding 4 |
|
655 | adding 4 | |
656 | # HG changeset patch |
|
656 | # HG changeset patch | |
657 | # Parent |
|
657 | # Parent | |
658 | Four |
|
658 | Four | |
659 |
|
659 | |||
660 | diff -r ... 4 |
|
660 | diff -r ... 4 | |
661 | --- /dev/null |
|
661 | --- /dev/null | |
662 | +++ b/4 |
|
662 | +++ b/4 | |
663 | @@ -0,0 +1,1 @@ |
|
663 | @@ -0,0 +1,1 @@ | |
664 | +4 |
|
664 | +4 | |
665 | 2: Four - test |
|
665 | 2: 74ded07d166b Four - test | |
666 | 1: Three (again) - test |
|
666 | 1: b1b6b0fe0e6d Three (again) - test | |
667 | 0: [mq]: 1.patch - test |
|
667 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
668 | ==== qref -d |
|
668 | ==== qref -d | |
669 | # HG changeset patch |
|
669 | # HG changeset patch | |
670 | # Date 9 0 |
|
670 | # Date 9 0 | |
671 | # Parent |
|
671 | # Parent | |
672 | Four |
|
672 | Four | |
673 |
|
673 | |||
674 | diff -r ... 4 |
|
674 | diff -r ... 4 | |
675 | --- /dev/null |
|
675 | --- /dev/null | |
676 | +++ b/4 |
|
676 | +++ b/4 | |
677 | @@ -0,0 +1,1 @@ |
|
677 | @@ -0,0 +1,1 @@ | |
678 | +4 |
|
678 | +4 | |
679 | 2: Four - test |
|
679 | 2: 1a651320cf8e Four - test | |
680 | 1: Three (again) - test |
|
680 | 1: b1b6b0fe0e6d Three (again) - test | |
681 | 0: [mq]: 1.patch - test |
|
681 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
682 | popping 4.patch |
|
682 | popping 4.patch | |
683 | now at: 3.patch |
|
683 | now at: 3.patch | |
684 | ==== qnew with HG header |
|
684 | ==== qnew with HG header | |
685 | popping 5.patch |
|
685 | popping 5.patch | |
686 | now at: 3.patch |
|
686 | now at: 3.patch | |
687 | # HG changeset patch |
|
687 | # HG changeset patch | |
688 | # Date 10 0 |
|
688 | # Date 10 0 | |
689 | 2: imported patch 5.patch - test - 10.00 |
|
689 | 2: d16a272220d2 imported patch 5.patch - test - 10.00 | |
690 | 1: Three (again) - test - 8.00 |
|
690 | 1: b1b6b0fe0e6d Three (again) - test - 8.00 | |
691 | 0: [mq]: 1.patch - test - 4.00 |
|
691 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
692 | ==== hg qref |
|
692 | ==== hg qref | |
693 | adding 5 |
|
693 | adding 5 | |
694 | # HG changeset patch |
|
694 | # HG changeset patch | |
695 | # Date 10 0 |
|
695 | # Date 10 0 | |
696 | # Parent |
|
696 | # Parent | |
697 |
|
697 | |||
698 | diff -r ... 5 |
|
698 | diff -r ... 5 | |
699 | --- /dev/null |
|
699 | --- /dev/null | |
700 | +++ b/5 |
|
700 | +++ b/5 | |
701 | @@ -0,0 +1,1 @@ |
|
701 | @@ -0,0 +1,1 @@ | |
702 | +5 |
|
702 | +5 | |
703 | 2: [mq]: 5.patch - test - 10.00 |
|
703 | 2: 5dbf69c07df9 [mq]: 5.patch - test - 10.00 | |
704 | 1: Three (again) - test - 8.00 |
|
704 | 1: b1b6b0fe0e6d Three (again) - test - 8.00 | |
705 | 0: [mq]: 1.patch - test - 4.00 |
|
705 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
706 | ==== hg qref -d |
|
706 | ==== hg qref -d | |
707 | # HG changeset patch |
|
707 | # HG changeset patch | |
708 | # Date 11 0 |
|
708 | # Date 11 0 | |
709 | # Parent |
|
709 | # Parent | |
710 |
|
710 | |||
711 | diff -r ... 5 |
|
711 | diff -r ... 5 | |
712 | --- /dev/null |
|
712 | --- /dev/null | |
713 | +++ b/5 |
|
713 | +++ b/5 | |
714 | @@ -0,0 +1,1 @@ |
|
714 | @@ -0,0 +1,1 @@ | |
715 | +5 |
|
715 | +5 | |
716 | 2: [mq]: 5.patch - test - 11.00 |
|
716 | 2: 049de6af0c1d [mq]: 5.patch - test - 11.00 | |
717 | 1: Three (again) - test - 8.00 |
|
717 | 1: b1b6b0fe0e6d Three (again) - test - 8.00 | |
718 | 0: [mq]: 1.patch - test - 4.00 |
|
718 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
719 | ==== qnew with plain header |
|
719 | ==== qnew with plain header | |
720 | popping 6.patch |
|
720 | popping 6.patch | |
721 | now at: 5.patch |
|
721 | now at: 5.patch | |
722 | now at: 6.patch |
|
722 | now at: 6.patch | |
723 | Date: 12 0 |
|
723 | Date: 12 0 | |
724 |
|
724 | |||
725 | 3: imported patch 6.patch - test |
|
725 | 3: 8ad9ebc22b96 imported patch 6.patch - test | |
726 | 2: [mq]: 5.patch - test |
|
726 | 2: 049de6af0c1d [mq]: 5.patch - test | |
727 | 1: Three (again) - test |
|
727 | 1: b1b6b0fe0e6d Three (again) - test | |
728 | 0: [mq]: 1.patch - test |
|
728 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
729 | ==== hg qref |
|
729 | ==== hg qref | |
730 | adding 6 |
|
730 | adding 6 | |
731 | Date: 12 0 |
|
731 | Date: 12 0 | |
732 |
|
732 | |||
733 | diff -r ... 6 |
|
733 | diff -r ... 6 | |
734 | --- /dev/null |
|
734 | --- /dev/null | |
735 | +++ b/6 |
|
735 | +++ b/6 | |
736 | @@ -0,0 +1,1 @@ |
|
736 | @@ -0,0 +1,1 @@ | |
737 | +6 |
|
737 | +6 | |
738 | 3: [mq]: 6.patch - test - 12.00 |
|
738 | 3: 038c46b02a56 [mq]: 6.patch - test - 12.00 | |
739 | 2: [mq]: 5.patch - test - 11.00 |
|
739 | 2: 049de6af0c1d [mq]: 5.patch - test - 11.00 | |
740 | 1: Three (again) - test - 8.00 |
|
740 | 1: b1b6b0fe0e6d Three (again) - test - 8.00 | |
741 | 0: [mq]: 1.patch - test - 4.00 |
|
741 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
742 | ==== hg qref -d |
|
742 | ==== hg qref -d | |
743 | Date: 13 0 |
|
743 | Date: 13 0 | |
744 |
|
744 | |||
745 | diff -r ... 6 |
|
745 | diff -r ... 6 | |
746 | --- /dev/null |
|
746 | --- /dev/null | |
747 | +++ b/6 |
|
747 | +++ b/6 | |
748 | @@ -0,0 +1,1 @@ |
|
748 | @@ -0,0 +1,1 @@ | |
749 | +6 |
|
749 | +6 | |
750 | 3: [mq]: 6.patch - test - 13.00 |
|
750 | 3: 2785642ea4b4 [mq]: 6.patch - test - 13.00 | |
751 | 2: [mq]: 5.patch - test - 11.00 |
|
751 | 2: 049de6af0c1d [mq]: 5.patch - test - 11.00 | |
752 | 1: Three (again) - test - 8.00 |
|
752 | 1: b1b6b0fe0e6d Three (again) - test - 8.00 | |
753 | 0: [mq]: 1.patch - test - 4.00 |
|
753 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
754 | popping 6.patch |
|
754 | popping 6.patch | |
755 | now at: 5.patch |
|
755 | now at: 5.patch | |
756 | ==== qnew -u |
|
756 | ==== qnew -u | |
757 | adding 6 |
|
757 | adding 6 | |
758 | # HG changeset patch |
|
758 | # HG changeset patch | |
759 | # User jane |
|
759 | # User jane | |
760 | # Parent |
|
760 | # Parent | |
761 |
|
761 | |||
762 | diff -r ... 6 |
|
762 | diff -r ... 6 | |
763 | --- /dev/null |
|
763 | --- /dev/null | |
764 | +++ b/6 |
|
764 | +++ b/6 | |
765 | @@ -0,0 +1,1 @@ |
|
765 | @@ -0,0 +1,1 @@ | |
766 | +6 |
|
766 | +6 | |
767 | 3: [mq]: 6.patch - jane |
|
767 | 3: a05a33f187ce [mq]: 6.patch - jane | |
768 | 2: [mq]: 5.patch - test |
|
768 | 2: 049de6af0c1d [mq]: 5.patch - test | |
769 | 1: Three (again) - test |
|
769 | 1: b1b6b0fe0e6d Three (again) - test | |
770 | 0: [mq]: 1.patch - test |
|
770 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
771 | ==== qref -d |
|
771 | ==== qref -d | |
772 | # HG changeset patch |
|
772 | # HG changeset patch | |
773 | # User jane |
|
773 | # User jane | |
774 | # Date 12 0 |
|
774 | # Date 12 0 | |
775 | # Parent |
|
775 | # Parent | |
776 |
|
776 | |||
777 | diff -r ... 6 |
|
777 | diff -r ... 6 | |
778 | --- /dev/null |
|
778 | --- /dev/null | |
779 | +++ b/6 |
|
779 | +++ b/6 | |
780 | @@ -0,0 +1,1 @@ |
|
780 | @@ -0,0 +1,1 @@ | |
781 | +6 |
|
781 | +6 | |
782 | 3: [mq]: 6.patch - jane |
|
782 | 3: 5702c529dfe9 [mq]: 6.patch - jane | |
783 | 2: [mq]: 5.patch - test |
|
783 | 2: 049de6af0c1d [mq]: 5.patch - test | |
784 | 1: Three (again) - test |
|
784 | 1: b1b6b0fe0e6d Three (again) - test | |
785 | 0: [mq]: 1.patch - test |
|
785 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
786 | popping 6.patch |
|
786 | popping 6.patch | |
787 | now at: 5.patch |
|
787 | now at: 5.patch | |
788 | ==== qnew -d |
|
788 | ==== qnew -d | |
789 | adding 7 |
|
789 | adding 7 | |
790 | # HG changeset patch |
|
790 | # HG changeset patch | |
791 | # Date 13 0 |
|
791 | # Date 13 0 | |
792 | # Parent |
|
792 | # Parent | |
793 |
|
793 | |||
794 | diff -r ... 7 |
|
794 | diff -r ... 7 | |
795 | --- /dev/null |
|
795 | --- /dev/null | |
796 | +++ b/7 |
|
796 | +++ b/7 | |
797 | @@ -0,0 +1,1 @@ |
|
797 | @@ -0,0 +1,1 @@ | |
798 | +7 |
|
798 | +7 | |
799 | 3: [mq]: 7.patch - test |
|
799 | 3: 8dd1eb8d4132 [mq]: 7.patch - test | |
800 | 2: [mq]: 5.patch - test |
|
800 | 2: 049de6af0c1d [mq]: 5.patch - test | |
801 | 1: Three (again) - test |
|
801 | 1: b1b6b0fe0e6d Three (again) - test | |
802 | 0: [mq]: 1.patch - test |
|
802 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
803 | ==== qref -u |
|
803 | ==== qref -u | |
804 | # HG changeset patch |
|
804 | # HG changeset patch | |
805 | # User john |
|
805 | # User john | |
806 | # Date 13 0 |
|
806 | # Date 13 0 | |
807 | # Parent |
|
807 | # Parent | |
808 |
|
808 | |||
809 | diff -r ... 7 |
|
809 | diff -r ... 7 | |
810 | --- /dev/null |
|
810 | --- /dev/null | |
811 | +++ b/7 |
|
811 | +++ b/7 | |
812 | @@ -0,0 +1,1 @@ |
|
812 | @@ -0,0 +1,1 @@ | |
813 | +7 |
|
813 | +7 | |
814 | 3: [mq]: 7.patch - john - 13.00 |
|
814 | 3: 4f9d07369cc4 [mq]: 7.patch - john - 13.00 | |
815 | 2: [mq]: 5.patch - test - 11.00 |
|
815 | 2: 049de6af0c1d [mq]: 5.patch - test - 11.00 | |
816 | 1: Three (again) - test - 8.00 |
|
816 | 1: b1b6b0fe0e6d Three (again) - test - 8.00 | |
817 | 0: [mq]: 1.patch - test - 4.00 |
|
817 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
818 | ==== qnew |
|
818 | ==== qnew | |
819 | adding 8 |
|
819 | adding 8 | |
820 | # HG changeset patch |
|
820 | # HG changeset patch | |
821 | # Parent |
|
821 | # Parent | |
822 |
|
822 | |||
823 | diff -r ... 8 |
|
823 | diff -r ... 8 | |
824 | --- /dev/null |
|
824 | --- /dev/null | |
825 | +++ b/8 |
|
825 | +++ b/8 | |
826 | @@ -0,0 +1,1 @@ |
|
826 | @@ -0,0 +1,1 @@ | |
827 | +8 |
|
827 | +8 | |
828 | 4: [mq]: 8.patch - test |
|
828 | 4: 868b62f09492 [mq]: 8.patch - test | |
829 | 3: [mq]: 7.patch - john |
|
829 | 3: 4f9d07369cc4 [mq]: 7.patch - john | |
830 | 2: [mq]: 5.patch - test |
|
830 | 2: 049de6af0c1d [mq]: 5.patch - test | |
831 | 1: Three (again) - test |
|
831 | 1: b1b6b0fe0e6d Three (again) - test | |
832 | 0: [mq]: 1.patch - test |
|
832 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
833 | ==== qref -u -d |
|
833 | ==== qref -u -d | |
834 | # HG changeset patch |
|
834 | # HG changeset patch | |
835 | # User john |
|
835 | # User john | |
836 | # Date 14 0 |
|
836 | # Date 14 0 | |
837 | # Parent |
|
837 | # Parent | |
838 |
|
838 | |||
839 | diff -r ... 8 |
|
839 | diff -r ... 8 | |
840 | --- /dev/null |
|
840 | --- /dev/null | |
841 | +++ b/8 |
|
841 | +++ b/8 | |
842 | @@ -0,0 +1,1 @@ |
|
842 | @@ -0,0 +1,1 @@ | |
843 | +8 |
|
843 | +8 | |
844 | 4: [mq]: 8.patch - john |
|
844 | 4: b1e878ae55b9 [mq]: 8.patch - john | |
845 | 3: [mq]: 7.patch - john |
|
845 | 3: 4f9d07369cc4 [mq]: 7.patch - john | |
846 | 2: [mq]: 5.patch - test |
|
846 | 2: 049de6af0c1d [mq]: 5.patch - test | |
847 | 1: Three (again) - test |
|
847 | 1: b1b6b0fe0e6d Three (again) - test | |
848 | 0: [mq]: 1.patch - test |
|
848 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
849 | popping 8.patch |
|
849 | popping 8.patch | |
850 | now at: 7.patch |
|
850 | now at: 7.patch | |
851 | ==== qnew -m |
|
851 | ==== qnew -m | |
852 | adding 9 |
|
852 | adding 9 | |
853 | # HG changeset patch |
|
853 | # HG changeset patch | |
854 | # Parent |
|
854 | # Parent | |
855 | Nine |
|
855 | Nine | |
856 |
|
856 | |||
857 | diff -r ... 9 |
|
857 | diff -r ... 9 | |
858 | --- /dev/null |
|
858 | --- /dev/null | |
859 | +++ b/9 |
|
859 | +++ b/9 | |
860 | @@ -0,0 +1,1 @@ |
|
860 | @@ -0,0 +1,1 @@ | |
861 | +9 |
|
861 | +9 | |
862 | 4: Nine - test |
|
862 | 4: 7251936ac2bf Nine - test | |
863 | 3: [mq]: 7.patch - john |
|
863 | 3: 4f9d07369cc4 [mq]: 7.patch - john | |
864 | 2: [mq]: 5.patch - test |
|
864 | 2: 049de6af0c1d [mq]: 5.patch - test | |
865 | 1: Three (again) - test |
|
865 | 1: b1b6b0fe0e6d Three (again) - test | |
866 | 0: [mq]: 1.patch - test |
|
866 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
867 | ==== qref -u -d |
|
867 | ==== qref -u -d | |
868 | # HG changeset patch |
|
868 | # HG changeset patch | |
869 | # User john |
|
869 | # User john | |
870 | # Date 15 0 |
|
870 | # Date 15 0 | |
871 | # Parent |
|
871 | # Parent | |
872 | Nine |
|
872 | Nine | |
873 |
|
873 | |||
874 | diff -r ... 9 |
|
874 | diff -r ... 9 | |
875 | --- /dev/null |
|
875 | --- /dev/null | |
876 | +++ b/9 |
|
876 | +++ b/9 | |
877 | @@ -0,0 +1,1 @@ |
|
877 | @@ -0,0 +1,1 @@ | |
878 | +9 |
|
878 | +9 | |
879 | 4: Nine - john |
|
879 | 4: a0de5bf6e9f7 Nine - john | |
880 | 3: [mq]: 7.patch - john |
|
880 | 3: 4f9d07369cc4 [mq]: 7.patch - john | |
881 | 2: [mq]: 5.patch - test |
|
881 | 2: 049de6af0c1d [mq]: 5.patch - test | |
882 | 1: Three (again) - test |
|
882 | 1: b1b6b0fe0e6d Three (again) - test | |
883 | 0: [mq]: 1.patch - test |
|
883 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
884 | popping 9.patch |
|
884 | popping 9.patch | |
885 | now at: 7.patch |
|
885 | now at: 7.patch | |
886 | ==== qpop -a / qpush -a |
|
886 | ==== qpop -a / qpush -a | |
887 | popping 7.patch |
|
887 | popping 7.patch | |
888 | popping 5.patch |
|
888 | popping 5.patch | |
889 | popping 3.patch |
|
889 | popping 3.patch | |
890 | popping 1.patch |
|
890 | popping 1.patch | |
891 | patch queue now empty |
|
891 | patch queue now empty | |
892 | applying 1.patch |
|
892 | applying 1.patch | |
893 | applying 3.patch |
|
893 | applying 3.patch | |
894 | applying 5.patch |
|
894 | applying 5.patch | |
895 | applying 7.patch |
|
895 | applying 7.patch | |
896 | now at: 7.patch |
|
896 | now at: 7.patch | |
897 | 3: imported patch 7.patch - john - 13.00 |
|
897 | 3: d26a5b7ffce1 imported patch 7.patch - john - 13.00 | |
898 | 2: imported patch 5.patch - test - 11.00 |
|
898 | 2: dda6cf77060a imported patch 5.patch - test - 11.00 | |
899 | 1: Three (again) - test - 8.00 |
|
899 | 1: 25e32d66c8c7 Three (again) - test - 8.00 | |
900 | 0: imported patch 1.patch - test - 4.00 |
|
900 | 0: e5011c0211fe imported patch 1.patch - test - 4.00 | |
901 | $ rm -r sandbox |
|
901 | $ rm -r sandbox |
@@ -1,974 +1,974 b'' | |||||
1 |
|
1 | |||
2 | $ echo "[extensions]" >> $HGRCPATH |
|
2 | $ echo "[extensions]" >> $HGRCPATH | |
3 | $ echo "mq=" >> $HGRCPATH |
|
3 | $ echo "mq=" >> $HGRCPATH | |
4 | $ echo "[diff]" >> $HGRCPATH |
|
4 | $ echo "[diff]" >> $HGRCPATH | |
5 | $ echo "nodates=true" >> $HGRCPATH |
|
5 | $ echo "nodates=true" >> $HGRCPATH | |
6 | $ catlog() { |
|
6 | $ catlog() { | |
7 | > cat .hg/patches/$1.patch | sed -e "s/^diff \-r [0-9a-f]* /diff -r ... /" \ |
|
7 | > cat .hg/patches/$1.patch | sed -e "s/^diff \-r [0-9a-f]* /diff -r ... /" \ | |
8 | > -e "s/^\(# Parent \).*/\1/" |
|
8 | > -e "s/^\(# Parent \).*/\1/" | |
9 | > hg log --template "{rev}: {desc} - {author}\n" |
|
9 | > hg log --template "{rev}: {node|short} {desc} - {author}\n" | |
10 | > } |
|
10 | > } | |
11 | $ runtest() { |
|
11 | $ runtest() { | |
12 | > echo ==== init |
|
12 | > echo ==== init | |
13 | > hg init a |
|
13 | > hg init a | |
14 | > cd a |
|
14 | > cd a | |
15 | > hg qinit |
|
15 | > hg qinit | |
16 | > |
|
16 | > | |
17 | > |
|
17 | > | |
18 | > echo ==== qnew -U |
|
18 | > echo ==== qnew -U | |
19 | > hg qnew -U 1.patch |
|
19 | > hg qnew -U 1.patch | |
20 | > catlog 1 |
|
20 | > catlog 1 | |
21 | > |
|
21 | > | |
22 | > echo ==== qref |
|
22 | > echo ==== qref | |
23 | > echo "1" >1 |
|
23 | > echo "1" >1 | |
24 | > hg add |
|
24 | > hg add | |
25 | > hg qref |
|
25 | > hg qref | |
26 | > catlog 1 |
|
26 | > catlog 1 | |
27 | > |
|
27 | > | |
28 | > echo ==== qref -u |
|
28 | > echo ==== qref -u | |
29 | > hg qref -u mary |
|
29 | > hg qref -u mary | |
30 | > catlog 1 |
|
30 | > catlog 1 | |
31 | > |
|
31 | > | |
32 | > echo ==== qnew |
|
32 | > echo ==== qnew | |
33 | > hg qnew 2.patch |
|
33 | > hg qnew 2.patch | |
34 | > echo "2" >2 |
|
34 | > echo "2" >2 | |
35 | > hg add |
|
35 | > hg add | |
36 | > hg qref |
|
36 | > hg qref | |
37 | > catlog 2 |
|
37 | > catlog 2 | |
38 | > |
|
38 | > | |
39 | > echo ==== qref -u |
|
39 | > echo ==== qref -u | |
40 | > hg qref -u jane |
|
40 | > hg qref -u jane | |
41 | > catlog 2 |
|
41 | > catlog 2 | |
42 | > |
|
42 | > | |
43 | > |
|
43 | > | |
44 | > echo ==== qnew -U -m |
|
44 | > echo ==== qnew -U -m | |
45 | > hg qnew -U -m "Three" 3.patch |
|
45 | > hg qnew -U -m "Three" 3.patch | |
46 | > catlog 3 |
|
46 | > catlog 3 | |
47 | > |
|
47 | > | |
48 | > echo ==== qref |
|
48 | > echo ==== qref | |
49 | > echo "3" >3 |
|
49 | > echo "3" >3 | |
50 | > hg add |
|
50 | > hg add | |
51 | > hg qref |
|
51 | > hg qref | |
52 | > catlog 3 |
|
52 | > catlog 3 | |
53 | > |
|
53 | > | |
54 | > echo ==== qref -m |
|
54 | > echo ==== qref -m | |
55 | > hg qref -m "Drei" |
|
55 | > hg qref -m "Drei" | |
56 | > catlog 3 |
|
56 | > catlog 3 | |
57 | > |
|
57 | > | |
58 | > echo ==== qref -u |
|
58 | > echo ==== qref -u | |
59 | > hg qref -u mary |
|
59 | > hg qref -u mary | |
60 | > catlog 3 |
|
60 | > catlog 3 | |
61 | > |
|
61 | > | |
62 | > echo ==== qref -u -m |
|
62 | > echo ==== qref -u -m | |
63 | > hg qref -u maria -m "Three (again)" |
|
63 | > hg qref -u maria -m "Three (again)" | |
64 | > catlog 3 |
|
64 | > catlog 3 | |
65 | > |
|
65 | > | |
66 | > echo ==== qnew -m |
|
66 | > echo ==== qnew -m | |
67 | > hg qnew -m "Four" 4.patch |
|
67 | > hg qnew -m "Four" 4.patch | |
68 | > echo "4" >4of t |
|
68 | > echo "4" >4of t | |
69 | > hg add |
|
69 | > hg add | |
70 | > hg qref |
|
70 | > hg qref | |
71 | > catlog 4 |
|
71 | > catlog 4 | |
72 | > |
|
72 | > | |
73 | > echo ==== qref -u |
|
73 | > echo ==== qref -u | |
74 | > hg qref -u jane |
|
74 | > hg qref -u jane | |
75 | > catlog 4 |
|
75 | > catlog 4 | |
76 | > |
|
76 | > | |
77 | > |
|
77 | > | |
78 | > echo ==== qnew with HG header |
|
78 | > echo ==== qnew with HG header | |
79 | > hg qnew --config 'mq.plain=true' 5.patch |
|
79 | > hg qnew --config 'mq.plain=true' 5.patch | |
80 | > hg qpop |
|
80 | > hg qpop | |
81 | > echo "# HG changeset patch" >>.hg/patches/5.patch |
|
81 | > echo "# HG changeset patch" >>.hg/patches/5.patch | |
82 | > echo "# User johndoe" >>.hg/patches/5.patch |
|
82 | > echo "# User johndoe" >>.hg/patches/5.patch | |
83 | > hg qpush 2>&1 | grep 'now at' |
|
83 | > hg qpush 2>&1 | grep 'now at' | |
84 | > catlog 5 |
|
84 | > catlog 5 | |
85 | > |
|
85 | > | |
86 | > echo ==== hg qref |
|
86 | > echo ==== hg qref | |
87 | > echo "5" >5 |
|
87 | > echo "5" >5 | |
88 | > hg add |
|
88 | > hg add | |
89 | > hg qref |
|
89 | > hg qref | |
90 | > catlog 5 |
|
90 | > catlog 5 | |
91 | > |
|
91 | > | |
92 | > echo ==== hg qref -U |
|
92 | > echo ==== hg qref -U | |
93 | > hg qref -U |
|
93 | > hg qref -U | |
94 | > catlog 5 |
|
94 | > catlog 5 | |
95 | > |
|
95 | > | |
96 | > echo ==== hg qref -u |
|
96 | > echo ==== hg qref -u | |
97 | > hg qref -u johndeere |
|
97 | > hg qref -u johndeere | |
98 | > catlog 5 |
|
98 | > catlog 5 | |
99 | > |
|
99 | > | |
100 | > |
|
100 | > | |
101 | > echo ==== qnew with plain header |
|
101 | > echo ==== qnew with plain header | |
102 | > hg qnew --config 'mq.plain=true' -U 6.patch |
|
102 | > hg qnew --config 'mq.plain=true' -U 6.patch | |
103 | > hg qpop |
|
103 | > hg qpop | |
104 | > hg qpush 2>&1 | grep 'now at' |
|
104 | > hg qpush 2>&1 | grep 'now at' | |
105 | > catlog 6 |
|
105 | > catlog 6 | |
106 | > |
|
106 | > | |
107 | > echo ==== hg qref |
|
107 | > echo ==== hg qref | |
108 | > echo "6" >6 |
|
108 | > echo "6" >6 | |
109 | > hg add |
|
109 | > hg add | |
110 | > hg qref |
|
110 | > hg qref | |
111 | > catlog 6 |
|
111 | > catlog 6 | |
112 | > |
|
112 | > | |
113 | > echo ==== hg qref -U |
|
113 | > echo ==== hg qref -U | |
114 | > hg qref -U |
|
114 | > hg qref -U | |
115 | > catlog 6 |
|
115 | > catlog 6 | |
116 | > |
|
116 | > | |
117 | > echo ==== hg qref -u |
|
117 | > echo ==== hg qref -u | |
118 | > hg qref -u johndeere |
|
118 | > hg qref -u johndeere | |
119 | > catlog 6 |
|
119 | > catlog 6 | |
120 | > |
|
120 | > | |
121 | > |
|
121 | > | |
122 | > echo ==== "qpop -a / qpush -a" |
|
122 | > echo ==== "qpop -a / qpush -a" | |
123 | > hg qpop -a |
|
123 | > hg qpop -a | |
124 | > hg qpush -a |
|
124 | > hg qpush -a | |
125 | > hg log --template "{rev}: {desc} - {author}\n" |
|
125 | > hg log --template "{rev}: {node|short} {desc} - {author}\n" | |
126 | > } |
|
126 | > } | |
127 |
|
127 | |||
128 | ======= plain headers |
|
128 | ======= plain headers | |
129 |
|
129 | |||
130 | $ echo "[mq]" >> $HGRCPATH |
|
130 | $ echo "[mq]" >> $HGRCPATH | |
131 | $ echo "plain=true" >> $HGRCPATH |
|
131 | $ echo "plain=true" >> $HGRCPATH | |
132 | $ mkdir sandbox |
|
132 | $ mkdir sandbox | |
133 | $ (cd sandbox ; runtest) |
|
133 | $ (cd sandbox ; runtest) | |
134 | ==== init |
|
134 | ==== init | |
135 | ==== qnew -U |
|
135 | ==== qnew -U | |
136 | From: test |
|
136 | From: test | |
137 |
|
137 | |||
138 | 0: [mq]: 1.patch - test |
|
138 | 0: a054644889e5 [mq]: 1.patch - test | |
139 | ==== qref |
|
139 | ==== qref | |
140 | adding 1 |
|
140 | adding 1 | |
141 | From: test |
|
141 | From: test | |
142 |
|
142 | |||
143 | diff -r ... 1 |
|
143 | diff -r ... 1 | |
144 | --- /dev/null |
|
144 | --- /dev/null | |
145 | +++ b/1 |
|
145 | +++ b/1 | |
146 | @@ -0,0 +1,1 @@ |
|
146 | @@ -0,0 +1,1 @@ | |
147 | +1 |
|
147 | +1 | |
148 | 0: [mq]: 1.patch - test |
|
148 | 0: 2905f1e46ee0 [mq]: 1.patch - test | |
149 | ==== qref -u |
|
149 | ==== qref -u | |
150 | From: mary |
|
150 | From: mary | |
151 |
|
151 | |||
152 | diff -r ... 1 |
|
152 | diff -r ... 1 | |
153 | --- /dev/null |
|
153 | --- /dev/null | |
154 | +++ b/1 |
|
154 | +++ b/1 | |
155 | @@ -0,0 +1,1 @@ |
|
155 | @@ -0,0 +1,1 @@ | |
156 | +1 |
|
156 | +1 | |
157 | 0: [mq]: 1.patch - mary |
|
157 | 0: 3682f830e656 [mq]: 1.patch - mary | |
158 | ==== qnew |
|
158 | ==== qnew | |
159 | adding 2 |
|
159 | adding 2 | |
160 | diff -r ... 2 |
|
160 | diff -r ... 2 | |
161 | --- /dev/null |
|
161 | --- /dev/null | |
162 | +++ b/2 |
|
162 | +++ b/2 | |
163 | @@ -0,0 +1,1 @@ |
|
163 | @@ -0,0 +1,1 @@ | |
164 | +2 |
|
164 | +2 | |
165 | 1: [mq]: 2.patch - test |
|
165 | 1: 527f98a12a7a [mq]: 2.patch - test | |
166 | 0: [mq]: 1.patch - mary |
|
166 | 0: 3682f830e656 [mq]: 1.patch - mary | |
167 | ==== qref -u |
|
167 | ==== qref -u | |
168 | From: jane |
|
168 | From: jane | |
169 |
|
169 | |||
170 | diff -r ... 2 |
|
170 | diff -r ... 2 | |
171 | --- /dev/null |
|
171 | --- /dev/null | |
172 | +++ b/2 |
|
172 | +++ b/2 | |
173 | @@ -0,0 +1,1 @@ |
|
173 | @@ -0,0 +1,1 @@ | |
174 | +2 |
|
174 | +2 | |
175 | 1: [mq]: 2.patch - jane |
|
175 | 1: a425cde5f493 [mq]: 2.patch - jane | |
176 | 0: [mq]: 1.patch - mary |
|
176 | 0: 3682f830e656 [mq]: 1.patch - mary | |
177 | ==== qnew -U -m |
|
177 | ==== qnew -U -m | |
178 | From: test |
|
178 | From: test | |
179 |
|
179 | |||
180 | Three |
|
180 | Three | |
181 |
|
181 | |||
182 | 2: Three - test |
|
182 | 2: 0ffa16a9088e Three - test | |
183 | 1: [mq]: 2.patch - jane |
|
183 | 1: a425cde5f493 [mq]: 2.patch - jane | |
184 | 0: [mq]: 1.patch - mary |
|
184 | 0: 3682f830e656 [mq]: 1.patch - mary | |
185 | ==== qref |
|
185 | ==== qref | |
186 | adding 3 |
|
186 | adding 3 | |
187 | From: test |
|
187 | From: test | |
188 |
|
188 | |||
189 | Three |
|
189 | Three | |
190 |
|
190 | |||
191 | diff -r ... 3 |
|
191 | diff -r ... 3 | |
192 | --- /dev/null |
|
192 | --- /dev/null | |
193 | +++ b/3 |
|
193 | +++ b/3 | |
194 | @@ -0,0 +1,1 @@ |
|
194 | @@ -0,0 +1,1 @@ | |
195 | +3 |
|
195 | +3 | |
196 | 2: Three - test |
|
196 | 2: 83f1290c6086 Three - test | |
197 | 1: [mq]: 2.patch - jane |
|
197 | 1: a425cde5f493 [mq]: 2.patch - jane | |
198 | 0: [mq]: 1.patch - mary |
|
198 | 0: 3682f830e656 [mq]: 1.patch - mary | |
199 | ==== qref -m |
|
199 | ==== qref -m | |
200 | From: test |
|
200 | From: test | |
201 |
|
201 | |||
202 | Drei |
|
202 | Drei | |
203 |
|
203 | |||
204 | diff -r ... 3 |
|
204 | diff -r ... 3 | |
205 | --- /dev/null |
|
205 | --- /dev/null | |
206 | +++ b/3 |
|
206 | +++ b/3 | |
207 | @@ -0,0 +1,1 @@ |
|
207 | @@ -0,0 +1,1 @@ | |
208 | +3 |
|
208 | +3 | |
209 | 2: Drei - test |
|
209 | 2: b0d856328d4d Drei - test | |
210 | 1: [mq]: 2.patch - jane |
|
210 | 1: a425cde5f493 [mq]: 2.patch - jane | |
211 | 0: [mq]: 1.patch - mary |
|
211 | 0: 3682f830e656 [mq]: 1.patch - mary | |
212 | ==== qref -u |
|
212 | ==== qref -u | |
213 | From: mary |
|
213 | From: mary | |
214 |
|
214 | |||
215 | Drei |
|
215 | Drei | |
216 |
|
216 | |||
217 | diff -r ... 3 |
|
217 | diff -r ... 3 | |
218 | --- /dev/null |
|
218 | --- /dev/null | |
219 | +++ b/3 |
|
219 | +++ b/3 | |
220 | @@ -0,0 +1,1 @@ |
|
220 | @@ -0,0 +1,1 @@ | |
221 | +3 |
|
221 | +3 | |
222 | 2: Drei - mary |
|
222 | 2: bb9d4b28e6a6 Drei - mary | |
223 | 1: [mq]: 2.patch - jane |
|
223 | 1: a425cde5f493 [mq]: 2.patch - jane | |
224 | 0: [mq]: 1.patch - mary |
|
224 | 0: 3682f830e656 [mq]: 1.patch - mary | |
225 | ==== qref -u -m |
|
225 | ==== qref -u -m | |
226 | From: maria |
|
226 | From: maria | |
227 |
|
227 | |||
228 | Three (again) |
|
228 | Three (again) | |
229 |
|
229 | |||
230 | diff -r ... 3 |
|
230 | diff -r ... 3 | |
231 | --- /dev/null |
|
231 | --- /dev/null | |
232 | +++ b/3 |
|
232 | +++ b/3 | |
233 | @@ -0,0 +1,1 @@ |
|
233 | @@ -0,0 +1,1 @@ | |
234 | +3 |
|
234 | +3 | |
235 | 2: Three (again) - maria |
|
235 | 2: a6686ee84fc3 Three (again) - maria | |
236 | 1: [mq]: 2.patch - jane |
|
236 | 1: a425cde5f493 [mq]: 2.patch - jane | |
237 | 0: [mq]: 1.patch - mary |
|
237 | 0: 3682f830e656 [mq]: 1.patch - mary | |
238 | ==== qnew -m |
|
238 | ==== qnew -m | |
239 | adding 4of |
|
239 | adding 4of | |
240 | Four |
|
240 | Four | |
241 |
|
241 | |||
242 | diff -r ... 4of |
|
242 | diff -r ... 4of | |
243 | --- /dev/null |
|
243 | --- /dev/null | |
244 | +++ b/4of |
|
244 | +++ b/4of | |
245 | @@ -0,0 +1,1 @@ |
|
245 | @@ -0,0 +1,1 @@ | |
246 | +4 t |
|
246 | +4 t | |
247 | 3: Four - test |
|
247 | 3: b9f922d0da40 Four - test | |
248 | 2: Three (again) - maria |
|
248 | 2: a6686ee84fc3 Three (again) - maria | |
249 | 1: [mq]: 2.patch - jane |
|
249 | 1: a425cde5f493 [mq]: 2.patch - jane | |
250 | 0: [mq]: 1.patch - mary |
|
250 | 0: 3682f830e656 [mq]: 1.patch - mary | |
251 | ==== qref -u |
|
251 | ==== qref -u | |
252 | From: jane |
|
252 | From: jane | |
253 |
|
253 | |||
254 | Four |
|
254 | Four | |
255 |
|
255 | |||
256 | diff -r ... 4of |
|
256 | diff -r ... 4of | |
257 | --- /dev/null |
|
257 | --- /dev/null | |
258 | +++ b/4of |
|
258 | +++ b/4of | |
259 | @@ -0,0 +1,1 @@ |
|
259 | @@ -0,0 +1,1 @@ | |
260 | +4 t |
|
260 | +4 t | |
261 | 3: Four - jane |
|
261 | 3: 0dfb3111e7ee Four - jane | |
262 | 2: Three (again) - maria |
|
262 | 2: a6686ee84fc3 Three (again) - maria | |
263 | 1: [mq]: 2.patch - jane |
|
263 | 1: a425cde5f493 [mq]: 2.patch - jane | |
264 | 0: [mq]: 1.patch - mary |
|
264 | 0: 3682f830e656 [mq]: 1.patch - mary | |
265 | ==== qnew with HG header |
|
265 | ==== qnew with HG header | |
266 | popping 5.patch |
|
266 | popping 5.patch | |
267 | now at: 4.patch |
|
267 | now at: 4.patch | |
268 | now at: 5.patch |
|
268 | now at: 5.patch | |
269 | # HG changeset patch |
|
269 | # HG changeset patch | |
270 | # User johndoe |
|
270 | # User johndoe | |
271 | 4: imported patch 5.patch - johndoe |
|
271 | 4: 72bc4a0467ef imported patch 5.patch - johndoe | |
272 | 3: Four - jane |
|
272 | 3: 0dfb3111e7ee Four - jane | |
273 | 2: Three (again) - maria |
|
273 | 2: a6686ee84fc3 Three (again) - maria | |
274 | 1: [mq]: 2.patch - jane |
|
274 | 1: a425cde5f493 [mq]: 2.patch - jane | |
275 | 0: [mq]: 1.patch - mary |
|
275 | 0: 3682f830e656 [mq]: 1.patch - mary | |
276 | ==== hg qref |
|
276 | ==== hg qref | |
277 | adding 5 |
|
277 | adding 5 | |
278 | # HG changeset patch |
|
278 | # HG changeset patch | |
279 | # User johndoe |
|
279 | # User johndoe | |
280 | # Parent |
|
280 | # Parent | |
281 |
|
281 | |||
282 | diff -r ... 5 |
|
282 | diff -r ... 5 | |
283 | --- /dev/null |
|
283 | --- /dev/null | |
284 | +++ b/5 |
|
284 | +++ b/5 | |
285 | @@ -0,0 +1,1 @@ |
|
285 | @@ -0,0 +1,1 @@ | |
286 | +5 |
|
286 | +5 | |
287 | 4: [mq]: 5.patch - johndoe |
|
287 | 4: ff5c06112e5a [mq]: 5.patch - johndoe | |
288 | 3: Four - jane |
|
288 | 3: 0dfb3111e7ee Four - jane | |
289 | 2: Three (again) - maria |
|
289 | 2: a6686ee84fc3 Three (again) - maria | |
290 | 1: [mq]: 2.patch - jane |
|
290 | 1: a425cde5f493 [mq]: 2.patch - jane | |
291 | 0: [mq]: 1.patch - mary |
|
291 | 0: 3682f830e656 [mq]: 1.patch - mary | |
292 | ==== hg qref -U |
|
292 | ==== hg qref -U | |
293 | # HG changeset patch |
|
293 | # HG changeset patch | |
294 | # User test |
|
294 | # User test | |
295 | # Parent |
|
295 | # Parent | |
296 |
|
296 | |||
297 | diff -r ... 5 |
|
297 | diff -r ... 5 | |
298 | --- /dev/null |
|
298 | --- /dev/null | |
299 | +++ b/5 |
|
299 | +++ b/5 | |
300 | @@ -0,0 +1,1 @@ |
|
300 | @@ -0,0 +1,1 @@ | |
301 | +5 |
|
301 | +5 | |
302 | 4: [mq]: 5.patch - test |
|
302 | 4: c947416c22b1 [mq]: 5.patch - test | |
303 | 3: Four - jane |
|
303 | 3: 0dfb3111e7ee Four - jane | |
304 | 2: Three (again) - maria |
|
304 | 2: a6686ee84fc3 Three (again) - maria | |
305 | 1: [mq]: 2.patch - jane |
|
305 | 1: a425cde5f493 [mq]: 2.patch - jane | |
306 | 0: [mq]: 1.patch - mary |
|
306 | 0: 3682f830e656 [mq]: 1.patch - mary | |
307 | ==== hg qref -u |
|
307 | ==== hg qref -u | |
308 | # HG changeset patch |
|
308 | # HG changeset patch | |
309 | # User johndeere |
|
309 | # User johndeere | |
310 | # Parent |
|
310 | # Parent | |
311 |
|
311 | |||
312 | diff -r ... 5 |
|
312 | diff -r ... 5 | |
313 | --- /dev/null |
|
313 | --- /dev/null | |
314 | +++ b/5 |
|
314 | +++ b/5 | |
315 | @@ -0,0 +1,1 @@ |
|
315 | @@ -0,0 +1,1 @@ | |
316 | +5 |
|
316 | +5 | |
317 | 4: [mq]: 5.patch - johndeere |
|
317 | 4: 1d898e201a22 [mq]: 5.patch - johndeere | |
318 | 3: Four - jane |
|
318 | 3: 0dfb3111e7ee Four - jane | |
319 | 2: Three (again) - maria |
|
319 | 2: a6686ee84fc3 Three (again) - maria | |
320 | 1: [mq]: 2.patch - jane |
|
320 | 1: a425cde5f493 [mq]: 2.patch - jane | |
321 | 0: [mq]: 1.patch - mary |
|
321 | 0: 3682f830e656 [mq]: 1.patch - mary | |
322 | ==== qnew with plain header |
|
322 | ==== qnew with plain header | |
323 | popping 6.patch |
|
323 | popping 6.patch | |
324 | now at: 5.patch |
|
324 | now at: 5.patch | |
325 | now at: 6.patch |
|
325 | now at: 6.patch | |
326 | From: test |
|
326 | From: test | |
327 |
|
327 | |||
328 | 5: imported patch 6.patch - test |
|
328 | 5: 7825a18ec839 imported patch 6.patch - test | |
329 | 4: [mq]: 5.patch - johndeere |
|
329 | 4: 1d898e201a22 [mq]: 5.patch - johndeere | |
330 | 3: Four - jane |
|
330 | 3: 0dfb3111e7ee Four - jane | |
331 | 2: Three (again) - maria |
|
331 | 2: a6686ee84fc3 Three (again) - maria | |
332 | 1: [mq]: 2.patch - jane |
|
332 | 1: a425cde5f493 [mq]: 2.patch - jane | |
333 | 0: [mq]: 1.patch - mary |
|
333 | 0: 3682f830e656 [mq]: 1.patch - mary | |
334 | ==== hg qref |
|
334 | ==== hg qref | |
335 | adding 6 |
|
335 | adding 6 | |
336 | From: test |
|
336 | From: test | |
337 |
|
337 | |||
338 | diff -r ... 6 |
|
338 | diff -r ... 6 | |
339 | --- /dev/null |
|
339 | --- /dev/null | |
340 | +++ b/6 |
|
340 | +++ b/6 | |
341 | @@ -0,0 +1,1 @@ |
|
341 | @@ -0,0 +1,1 @@ | |
342 | +6 |
|
342 | +6 | |
343 | 5: [mq]: 6.patch - test |
|
343 | 5: 09d19592680d [mq]: 6.patch - test | |
344 | 4: [mq]: 5.patch - johndeere |
|
344 | 4: 1d898e201a22 [mq]: 5.patch - johndeere | |
345 | 3: Four - jane |
|
345 | 3: 0dfb3111e7ee Four - jane | |
346 | 2: Three (again) - maria |
|
346 | 2: a6686ee84fc3 Three (again) - maria | |
347 | 1: [mq]: 2.patch - jane |
|
347 | 1: a425cde5f493 [mq]: 2.patch - jane | |
348 | 0: [mq]: 1.patch - mary |
|
348 | 0: 3682f830e656 [mq]: 1.patch - mary | |
349 | ==== hg qref -U |
|
349 | ==== hg qref -U | |
350 | From: test |
|
350 | From: test | |
351 |
|
351 | |||
352 | diff -r ... 6 |
|
352 | diff -r ... 6 | |
353 | --- /dev/null |
|
353 | --- /dev/null | |
354 | +++ b/6 |
|
354 | +++ b/6 | |
355 | @@ -0,0 +1,1 @@ |
|
355 | @@ -0,0 +1,1 @@ | |
356 | +6 |
|
356 | +6 | |
357 | 5: [mq]: 6.patch - test |
|
357 | 5: 09d19592680d [mq]: 6.patch - test | |
358 | 4: [mq]: 5.patch - johndeere |
|
358 | 4: 1d898e201a22 [mq]: 5.patch - johndeere | |
359 | 3: Four - jane |
|
359 | 3: 0dfb3111e7ee Four - jane | |
360 | 2: Three (again) - maria |
|
360 | 2: a6686ee84fc3 Three (again) - maria | |
361 | 1: [mq]: 2.patch - jane |
|
361 | 1: a425cde5f493 [mq]: 2.patch - jane | |
362 | 0: [mq]: 1.patch - mary |
|
362 | 0: 3682f830e656 [mq]: 1.patch - mary | |
363 | ==== hg qref -u |
|
363 | ==== hg qref -u | |
364 | From: johndeere |
|
364 | From: johndeere | |
365 |
|
365 | |||
366 | diff -r ... 6 |
|
366 | diff -r ... 6 | |
367 | --- /dev/null |
|
367 | --- /dev/null | |
368 | +++ b/6 |
|
368 | +++ b/6 | |
369 | @@ -0,0 +1,1 @@ |
|
369 | @@ -0,0 +1,1 @@ | |
370 | +6 |
|
370 | +6 | |
371 | 5: [mq]: 6.patch - johndeere |
|
371 | 5: 32641ee07196 [mq]: 6.patch - johndeere | |
372 | 4: [mq]: 5.patch - johndeere |
|
372 | 4: 1d898e201a22 [mq]: 5.patch - johndeere | |
373 | 3: Four - jane |
|
373 | 3: 0dfb3111e7ee Four - jane | |
374 | 2: Three (again) - maria |
|
374 | 2: a6686ee84fc3 Three (again) - maria | |
375 | 1: [mq]: 2.patch - jane |
|
375 | 1: a425cde5f493 [mq]: 2.patch - jane | |
376 | 0: [mq]: 1.patch - mary |
|
376 | 0: 3682f830e656 [mq]: 1.patch - mary | |
377 | ==== qpop -a / qpush -a |
|
377 | ==== qpop -a / qpush -a | |
378 | popping 6.patch |
|
378 | popping 6.patch | |
379 | popping 5.patch |
|
379 | popping 5.patch | |
380 | popping 4.patch |
|
380 | popping 4.patch | |
381 | popping 3.patch |
|
381 | popping 3.patch | |
382 | popping 2.patch |
|
382 | popping 2.patch | |
383 | popping 1.patch |
|
383 | popping 1.patch | |
384 | patch queue now empty |
|
384 | patch queue now empty | |
385 | applying 1.patch |
|
385 | applying 1.patch | |
386 | applying 2.patch |
|
386 | applying 2.patch | |
387 | applying 3.patch |
|
387 | applying 3.patch | |
388 | applying 4.patch |
|
388 | applying 4.patch | |
389 | applying 5.patch |
|
389 | applying 5.patch | |
390 | applying 6.patch |
|
390 | applying 6.patch | |
391 | now at: 6.patch |
|
391 | now at: 6.patch | |
392 | 5: imported patch 6.patch - johndeere |
|
392 | 5: 1fb083c80457 imported patch 6.patch - johndeere | |
393 | 4: imported patch 5.patch - johndeere |
|
393 | 4: 7e96e969691d imported patch 5.patch - johndeere | |
394 | 3: Four - jane |
|
394 | 3: c7147533d3cd Four - jane | |
395 | 2: Three (again) - maria |
|
395 | 2: b383d04401ea Three (again) - maria | |
396 | 1: imported patch 2.patch - jane |
|
396 | 1: fac2da4efc3c imported patch 2.patch - jane | |
397 | 0: imported patch 1.patch - mary |
|
397 | 0: b6e237e8771b imported patch 1.patch - mary | |
398 | $ rm -r sandbox |
|
398 | $ rm -r sandbox | |
399 |
|
399 | |||
400 | ======= hg headers |
|
400 | ======= hg headers | |
401 |
|
401 | |||
402 | $ echo "plain=false" >> $HGRCPATH |
|
402 | $ echo "plain=false" >> $HGRCPATH | |
403 | $ mkdir sandbox |
|
403 | $ mkdir sandbox | |
404 | $ (cd sandbox ; runtest) |
|
404 | $ (cd sandbox ; runtest) | |
405 | ==== init |
|
405 | ==== init | |
406 | ==== qnew -U |
|
406 | ==== qnew -U | |
407 | # HG changeset patch |
|
407 | # HG changeset patch | |
408 | # User test |
|
408 | # User test | |
409 | # Parent |
|
409 | # Parent | |
410 |
|
410 | |||
411 | 0: [mq]: 1.patch - test |
|
411 | 0: a054644889e5 [mq]: 1.patch - test | |
412 | ==== qref |
|
412 | ==== qref | |
413 | adding 1 |
|
413 | adding 1 | |
414 | # HG changeset patch |
|
414 | # HG changeset patch | |
415 | # User test |
|
415 | # User test | |
416 | # Parent |
|
416 | # Parent | |
417 |
|
417 | |||
418 | diff -r ... 1 |
|
418 | diff -r ... 1 | |
419 | --- /dev/null |
|
419 | --- /dev/null | |
420 | +++ b/1 |
|
420 | +++ b/1 | |
421 | @@ -0,0 +1,1 @@ |
|
421 | @@ -0,0 +1,1 @@ | |
422 | +1 |
|
422 | +1 | |
423 | 0: [mq]: 1.patch - test |
|
423 | 0: 2905f1e46ee0 [mq]: 1.patch - test | |
424 | ==== qref -u |
|
424 | ==== qref -u | |
425 | # HG changeset patch |
|
425 | # HG changeset patch | |
426 | # User mary |
|
426 | # User mary | |
427 | # Parent |
|
427 | # Parent | |
428 |
|
428 | |||
429 | diff -r ... 1 |
|
429 | diff -r ... 1 | |
430 | --- /dev/null |
|
430 | --- /dev/null | |
431 | +++ b/1 |
|
431 | +++ b/1 | |
432 | @@ -0,0 +1,1 @@ |
|
432 | @@ -0,0 +1,1 @@ | |
433 | +1 |
|
433 | +1 | |
434 | 0: [mq]: 1.patch - mary |
|
434 | 0: 3682f830e656 [mq]: 1.patch - mary | |
435 | ==== qnew |
|
435 | ==== qnew | |
436 | adding 2 |
|
436 | adding 2 | |
437 | # HG changeset patch |
|
437 | # HG changeset patch | |
438 | # Parent |
|
438 | # Parent | |
439 |
|
439 | |||
440 | diff -r ... 2 |
|
440 | diff -r ... 2 | |
441 | --- /dev/null |
|
441 | --- /dev/null | |
442 | +++ b/2 |
|
442 | +++ b/2 | |
443 | @@ -0,0 +1,1 @@ |
|
443 | @@ -0,0 +1,1 @@ | |
444 | +2 |
|
444 | +2 | |
445 | 1: [mq]: 2.patch - test |
|
445 | 1: 527f98a12a7a [mq]: 2.patch - test | |
446 | 0: [mq]: 1.patch - mary |
|
446 | 0: 3682f830e656 [mq]: 1.patch - mary | |
447 | ==== qref -u |
|
447 | ==== qref -u | |
448 | # HG changeset patch |
|
448 | # HG changeset patch | |
449 | # User jane |
|
449 | # User jane | |
450 | # Parent |
|
450 | # Parent | |
451 |
|
451 | |||
452 | diff -r ... 2 |
|
452 | diff -r ... 2 | |
453 | --- /dev/null |
|
453 | --- /dev/null | |
454 | +++ b/2 |
|
454 | +++ b/2 | |
455 | @@ -0,0 +1,1 @@ |
|
455 | @@ -0,0 +1,1 @@ | |
456 | +2 |
|
456 | +2 | |
457 | 1: [mq]: 2.patch - jane |
|
457 | 1: a425cde5f493 [mq]: 2.patch - jane | |
458 | 0: [mq]: 1.patch - mary |
|
458 | 0: 3682f830e656 [mq]: 1.patch - mary | |
459 | ==== qnew -U -m |
|
459 | ==== qnew -U -m | |
460 | # HG changeset patch |
|
460 | # HG changeset patch | |
461 | # User test |
|
461 | # User test | |
462 | # Parent |
|
462 | # Parent | |
463 | Three |
|
463 | Three | |
464 |
|
464 | |||
465 | 2: Three - test |
|
465 | 2: 0ffa16a9088e Three - test | |
466 | 1: [mq]: 2.patch - jane |
|
466 | 1: a425cde5f493 [mq]: 2.patch - jane | |
467 | 0: [mq]: 1.patch - mary |
|
467 | 0: 3682f830e656 [mq]: 1.patch - mary | |
468 | ==== qref |
|
468 | ==== qref | |
469 | adding 3 |
|
469 | adding 3 | |
470 | # HG changeset patch |
|
470 | # HG changeset patch | |
471 | # User test |
|
471 | # User test | |
472 | # Parent |
|
472 | # Parent | |
473 | Three |
|
473 | Three | |
474 |
|
474 | |||
475 | diff -r ... 3 |
|
475 | diff -r ... 3 | |
476 | --- /dev/null |
|
476 | --- /dev/null | |
477 | +++ b/3 |
|
477 | +++ b/3 | |
478 | @@ -0,0 +1,1 @@ |
|
478 | @@ -0,0 +1,1 @@ | |
479 | +3 |
|
479 | +3 | |
480 | 2: Three - test |
|
480 | 2: 83f1290c6086 Three - test | |
481 | 1: [mq]: 2.patch - jane |
|
481 | 1: a425cde5f493 [mq]: 2.patch - jane | |
482 | 0: [mq]: 1.patch - mary |
|
482 | 0: 3682f830e656 [mq]: 1.patch - mary | |
483 | ==== qref -m |
|
483 | ==== qref -m | |
484 | # HG changeset patch |
|
484 | # HG changeset patch | |
485 | # User test |
|
485 | # User test | |
486 | # Parent |
|
486 | # Parent | |
487 | Drei |
|
487 | Drei | |
488 |
|
488 | |||
489 | diff -r ... 3 |
|
489 | diff -r ... 3 | |
490 | --- /dev/null |
|
490 | --- /dev/null | |
491 | +++ b/3 |
|
491 | +++ b/3 | |
492 | @@ -0,0 +1,1 @@ |
|
492 | @@ -0,0 +1,1 @@ | |
493 | +3 |
|
493 | +3 | |
494 | 2: Drei - test |
|
494 | 2: b0d856328d4d Drei - test | |
495 | 1: [mq]: 2.patch - jane |
|
495 | 1: a425cde5f493 [mq]: 2.patch - jane | |
496 | 0: [mq]: 1.patch - mary |
|
496 | 0: 3682f830e656 [mq]: 1.patch - mary | |
497 | ==== qref -u |
|
497 | ==== qref -u | |
498 | # HG changeset patch |
|
498 | # HG changeset patch | |
499 | # User mary |
|
499 | # User mary | |
500 | # Parent |
|
500 | # Parent | |
501 | Drei |
|
501 | Drei | |
502 |
|
502 | |||
503 | diff -r ... 3 |
|
503 | diff -r ... 3 | |
504 | --- /dev/null |
|
504 | --- /dev/null | |
505 | +++ b/3 |
|
505 | +++ b/3 | |
506 | @@ -0,0 +1,1 @@ |
|
506 | @@ -0,0 +1,1 @@ | |
507 | +3 |
|
507 | +3 | |
508 | 2: Drei - mary |
|
508 | 2: bb9d4b28e6a6 Drei - mary | |
509 | 1: [mq]: 2.patch - jane |
|
509 | 1: a425cde5f493 [mq]: 2.patch - jane | |
510 | 0: [mq]: 1.patch - mary |
|
510 | 0: 3682f830e656 [mq]: 1.patch - mary | |
511 | ==== qref -u -m |
|
511 | ==== qref -u -m | |
512 | # HG changeset patch |
|
512 | # HG changeset patch | |
513 | # User maria |
|
513 | # User maria | |
514 | # Parent |
|
514 | # Parent | |
515 | Three (again) |
|
515 | Three (again) | |
516 |
|
516 | |||
517 | diff -r ... 3 |
|
517 | diff -r ... 3 | |
518 | --- /dev/null |
|
518 | --- /dev/null | |
519 | +++ b/3 |
|
519 | +++ b/3 | |
520 | @@ -0,0 +1,1 @@ |
|
520 | @@ -0,0 +1,1 @@ | |
521 | +3 |
|
521 | +3 | |
522 | 2: Three (again) - maria |
|
522 | 2: a6686ee84fc3 Three (again) - maria | |
523 | 1: [mq]: 2.patch - jane |
|
523 | 1: a425cde5f493 [mq]: 2.patch - jane | |
524 | 0: [mq]: 1.patch - mary |
|
524 | 0: 3682f830e656 [mq]: 1.patch - mary | |
525 | ==== qnew -m |
|
525 | ==== qnew -m | |
526 | adding 4of |
|
526 | adding 4of | |
527 | # HG changeset patch |
|
527 | # HG changeset patch | |
528 | # Parent |
|
528 | # Parent | |
529 | Four |
|
529 | Four | |
530 |
|
530 | |||
531 | diff -r ... 4of |
|
531 | diff -r ... 4of | |
532 | --- /dev/null |
|
532 | --- /dev/null | |
533 | +++ b/4of |
|
533 | +++ b/4of | |
534 | @@ -0,0 +1,1 @@ |
|
534 | @@ -0,0 +1,1 @@ | |
535 | +4 t |
|
535 | +4 t | |
536 | 3: Four - test |
|
536 | 3: b9f922d0da40 Four - test | |
537 | 2: Three (again) - maria |
|
537 | 2: a6686ee84fc3 Three (again) - maria | |
538 | 1: [mq]: 2.patch - jane |
|
538 | 1: a425cde5f493 [mq]: 2.patch - jane | |
539 | 0: [mq]: 1.patch - mary |
|
539 | 0: 3682f830e656 [mq]: 1.patch - mary | |
540 | ==== qref -u |
|
540 | ==== qref -u | |
541 | # HG changeset patch |
|
541 | # HG changeset patch | |
542 | # User jane |
|
542 | # User jane | |
543 | # Parent |
|
543 | # Parent | |
544 | Four |
|
544 | Four | |
545 |
|
545 | |||
546 | diff -r ... 4of |
|
546 | diff -r ... 4of | |
547 | --- /dev/null |
|
547 | --- /dev/null | |
548 | +++ b/4of |
|
548 | +++ b/4of | |
549 | @@ -0,0 +1,1 @@ |
|
549 | @@ -0,0 +1,1 @@ | |
550 | +4 t |
|
550 | +4 t | |
551 | 3: Four - jane |
|
551 | 3: 0dfb3111e7ee Four - jane | |
552 | 2: Three (again) - maria |
|
552 | 2: a6686ee84fc3 Three (again) - maria | |
553 | 1: [mq]: 2.patch - jane |
|
553 | 1: a425cde5f493 [mq]: 2.patch - jane | |
554 | 0: [mq]: 1.patch - mary |
|
554 | 0: 3682f830e656 [mq]: 1.patch - mary | |
555 | ==== qnew with HG header |
|
555 | ==== qnew with HG header | |
556 | popping 5.patch |
|
556 | popping 5.patch | |
557 | now at: 4.patch |
|
557 | now at: 4.patch | |
558 | now at: 5.patch |
|
558 | now at: 5.patch | |
559 | # HG changeset patch |
|
559 | # HG changeset patch | |
560 | # User johndoe |
|
560 | # User johndoe | |
561 | 4: imported patch 5.patch - johndoe |
|
561 | 4: 72bc4a0467ef imported patch 5.patch - johndoe | |
562 | 3: Four - jane |
|
562 | 3: 0dfb3111e7ee Four - jane | |
563 | 2: Three (again) - maria |
|
563 | 2: a6686ee84fc3 Three (again) - maria | |
564 | 1: [mq]: 2.patch - jane |
|
564 | 1: a425cde5f493 [mq]: 2.patch - jane | |
565 | 0: [mq]: 1.patch - mary |
|
565 | 0: 3682f830e656 [mq]: 1.patch - mary | |
566 | ==== hg qref |
|
566 | ==== hg qref | |
567 | adding 5 |
|
567 | adding 5 | |
568 | # HG changeset patch |
|
568 | # HG changeset patch | |
569 | # User johndoe |
|
569 | # User johndoe | |
570 | # Parent |
|
570 | # Parent | |
571 |
|
571 | |||
572 | diff -r ... 5 |
|
572 | diff -r ... 5 | |
573 | --- /dev/null |
|
573 | --- /dev/null | |
574 | +++ b/5 |
|
574 | +++ b/5 | |
575 | @@ -0,0 +1,1 @@ |
|
575 | @@ -0,0 +1,1 @@ | |
576 | +5 |
|
576 | +5 | |
577 | 4: [mq]: 5.patch - johndoe |
|
577 | 4: ff5c06112e5a [mq]: 5.patch - johndoe | |
578 | 3: Four - jane |
|
578 | 3: 0dfb3111e7ee Four - jane | |
579 | 2: Three (again) - maria |
|
579 | 2: a6686ee84fc3 Three (again) - maria | |
580 | 1: [mq]: 2.patch - jane |
|
580 | 1: a425cde5f493 [mq]: 2.patch - jane | |
581 | 0: [mq]: 1.patch - mary |
|
581 | 0: 3682f830e656 [mq]: 1.patch - mary | |
582 | ==== hg qref -U |
|
582 | ==== hg qref -U | |
583 | # HG changeset patch |
|
583 | # HG changeset patch | |
584 | # User test |
|
584 | # User test | |
585 | # Parent |
|
585 | # Parent | |
586 |
|
586 | |||
587 | diff -r ... 5 |
|
587 | diff -r ... 5 | |
588 | --- /dev/null |
|
588 | --- /dev/null | |
589 | +++ b/5 |
|
589 | +++ b/5 | |
590 | @@ -0,0 +1,1 @@ |
|
590 | @@ -0,0 +1,1 @@ | |
591 | +5 |
|
591 | +5 | |
592 | 4: [mq]: 5.patch - test |
|
592 | 4: c947416c22b1 [mq]: 5.patch - test | |
593 | 3: Four - jane |
|
593 | 3: 0dfb3111e7ee Four - jane | |
594 | 2: Three (again) - maria |
|
594 | 2: a6686ee84fc3 Three (again) - maria | |
595 | 1: [mq]: 2.patch - jane |
|
595 | 1: a425cde5f493 [mq]: 2.patch - jane | |
596 | 0: [mq]: 1.patch - mary |
|
596 | 0: 3682f830e656 [mq]: 1.patch - mary | |
597 | ==== hg qref -u |
|
597 | ==== hg qref -u | |
598 | # HG changeset patch |
|
598 | # HG changeset patch | |
599 | # User johndeere |
|
599 | # User johndeere | |
600 | # Parent |
|
600 | # Parent | |
601 |
|
601 | |||
602 | diff -r ... 5 |
|
602 | diff -r ... 5 | |
603 | --- /dev/null |
|
603 | --- /dev/null | |
604 | +++ b/5 |
|
604 | +++ b/5 | |
605 | @@ -0,0 +1,1 @@ |
|
605 | @@ -0,0 +1,1 @@ | |
606 | +5 |
|
606 | +5 | |
607 | 4: [mq]: 5.patch - johndeere |
|
607 | 4: 1d898e201a22 [mq]: 5.patch - johndeere | |
608 | 3: Four - jane |
|
608 | 3: 0dfb3111e7ee Four - jane | |
609 | 2: Three (again) - maria |
|
609 | 2: a6686ee84fc3 Three (again) - maria | |
610 | 1: [mq]: 2.patch - jane |
|
610 | 1: a425cde5f493 [mq]: 2.patch - jane | |
611 | 0: [mq]: 1.patch - mary |
|
611 | 0: 3682f830e656 [mq]: 1.patch - mary | |
612 | ==== qnew with plain header |
|
612 | ==== qnew with plain header | |
613 | popping 6.patch |
|
613 | popping 6.patch | |
614 | now at: 5.patch |
|
614 | now at: 5.patch | |
615 | now at: 6.patch |
|
615 | now at: 6.patch | |
616 | From: test |
|
616 | From: test | |
617 |
|
617 | |||
618 | 5: imported patch 6.patch - test |
|
618 | 5: 7825a18ec839 imported patch 6.patch - test | |
619 | 4: [mq]: 5.patch - johndeere |
|
619 | 4: 1d898e201a22 [mq]: 5.patch - johndeere | |
620 | 3: Four - jane |
|
620 | 3: 0dfb3111e7ee Four - jane | |
621 | 2: Three (again) - maria |
|
621 | 2: a6686ee84fc3 Three (again) - maria | |
622 | 1: [mq]: 2.patch - jane |
|
622 | 1: a425cde5f493 [mq]: 2.patch - jane | |
623 | 0: [mq]: 1.patch - mary |
|
623 | 0: 3682f830e656 [mq]: 1.patch - mary | |
624 | ==== hg qref |
|
624 | ==== hg qref | |
625 | adding 6 |
|
625 | adding 6 | |
626 | From: test |
|
626 | From: test | |
627 |
|
627 | |||
628 | diff -r ... 6 |
|
628 | diff -r ... 6 | |
629 | --- /dev/null |
|
629 | --- /dev/null | |
630 | +++ b/6 |
|
630 | +++ b/6 | |
631 | @@ -0,0 +1,1 @@ |
|
631 | @@ -0,0 +1,1 @@ | |
632 | +6 |
|
632 | +6 | |
633 | 5: [mq]: 6.patch - test |
|
633 | 5: 09d19592680d [mq]: 6.patch - test | |
634 | 4: [mq]: 5.patch - johndeere |
|
634 | 4: 1d898e201a22 [mq]: 5.patch - johndeere | |
635 | 3: Four - jane |
|
635 | 3: 0dfb3111e7ee Four - jane | |
636 | 2: Three (again) - maria |
|
636 | 2: a6686ee84fc3 Three (again) - maria | |
637 | 1: [mq]: 2.patch - jane |
|
637 | 1: a425cde5f493 [mq]: 2.patch - jane | |
638 | 0: [mq]: 1.patch - mary |
|
638 | 0: 3682f830e656 [mq]: 1.patch - mary | |
639 | ==== hg qref -U |
|
639 | ==== hg qref -U | |
640 | From: test |
|
640 | From: test | |
641 |
|
641 | |||
642 | diff -r ... 6 |
|
642 | diff -r ... 6 | |
643 | --- /dev/null |
|
643 | --- /dev/null | |
644 | +++ b/6 |
|
644 | +++ b/6 | |
645 | @@ -0,0 +1,1 @@ |
|
645 | @@ -0,0 +1,1 @@ | |
646 | +6 |
|
646 | +6 | |
647 | 5: [mq]: 6.patch - test |
|
647 | 5: 09d19592680d [mq]: 6.patch - test | |
648 | 4: [mq]: 5.patch - johndeere |
|
648 | 4: 1d898e201a22 [mq]: 5.patch - johndeere | |
649 | 3: Four - jane |
|
649 | 3: 0dfb3111e7ee Four - jane | |
650 | 2: Three (again) - maria |
|
650 | 2: a6686ee84fc3 Three (again) - maria | |
651 | 1: [mq]: 2.patch - jane |
|
651 | 1: a425cde5f493 [mq]: 2.patch - jane | |
652 | 0: [mq]: 1.patch - mary |
|
652 | 0: 3682f830e656 [mq]: 1.patch - mary | |
653 | ==== hg qref -u |
|
653 | ==== hg qref -u | |
654 | From: johndeere |
|
654 | From: johndeere | |
655 |
|
655 | |||
656 | diff -r ... 6 |
|
656 | diff -r ... 6 | |
657 | --- /dev/null |
|
657 | --- /dev/null | |
658 | +++ b/6 |
|
658 | +++ b/6 | |
659 | @@ -0,0 +1,1 @@ |
|
659 | @@ -0,0 +1,1 @@ | |
660 | +6 |
|
660 | +6 | |
661 | 5: [mq]: 6.patch - johndeere |
|
661 | 5: 32641ee07196 [mq]: 6.patch - johndeere | |
662 | 4: [mq]: 5.patch - johndeere |
|
662 | 4: 1d898e201a22 [mq]: 5.patch - johndeere | |
663 | 3: Four - jane |
|
663 | 3: 0dfb3111e7ee Four - jane | |
664 | 2: Three (again) - maria |
|
664 | 2: a6686ee84fc3 Three (again) - maria | |
665 | 1: [mq]: 2.patch - jane |
|
665 | 1: a425cde5f493 [mq]: 2.patch - jane | |
666 | 0: [mq]: 1.patch - mary |
|
666 | 0: 3682f830e656 [mq]: 1.patch - mary | |
667 | ==== qpop -a / qpush -a |
|
667 | ==== qpop -a / qpush -a | |
668 | popping 6.patch |
|
668 | popping 6.patch | |
669 | popping 5.patch |
|
669 | popping 5.patch | |
670 | popping 4.patch |
|
670 | popping 4.patch | |
671 | popping 3.patch |
|
671 | popping 3.patch | |
672 | popping 2.patch |
|
672 | popping 2.patch | |
673 | popping 1.patch |
|
673 | popping 1.patch | |
674 | patch queue now empty |
|
674 | patch queue now empty | |
675 | applying 1.patch |
|
675 | applying 1.patch | |
676 | applying 2.patch |
|
676 | applying 2.patch | |
677 | applying 3.patch |
|
677 | applying 3.patch | |
678 | applying 4.patch |
|
678 | applying 4.patch | |
679 | applying 5.patch |
|
679 | applying 5.patch | |
680 | applying 6.patch |
|
680 | applying 6.patch | |
681 | now at: 6.patch |
|
681 | now at: 6.patch | |
682 | 5: imported patch 6.patch - johndeere |
|
682 | 5: 1fb083c80457 imported patch 6.patch - johndeere | |
683 | 4: imported patch 5.patch - johndeere |
|
683 | 4: 7e96e969691d imported patch 5.patch - johndeere | |
684 | 3: Four - jane |
|
684 | 3: c7147533d3cd Four - jane | |
685 | 2: Three (again) - maria |
|
685 | 2: b383d04401ea Three (again) - maria | |
686 | 1: imported patch 2.patch - jane |
|
686 | 1: fac2da4efc3c imported patch 2.patch - jane | |
687 | 0: imported patch 1.patch - mary |
|
687 | 0: b6e237e8771b imported patch 1.patch - mary | |
688 | $ rm -r sandbox |
|
688 | $ rm -r sandbox | |
689 | $ runtest |
|
689 | $ runtest | |
690 | ==== init |
|
690 | ==== init | |
691 | ==== qnew -U |
|
691 | ==== qnew -U | |
692 | # HG changeset patch |
|
692 | # HG changeset patch | |
693 | # User test |
|
693 | # User test | |
694 | # Parent |
|
694 | # Parent | |
695 |
|
695 | |||
696 | 0: [mq]: 1.patch - test |
|
696 | 0: a054644889e5 [mq]: 1.patch - test | |
697 | ==== qref |
|
697 | ==== qref | |
698 | adding 1 |
|
698 | adding 1 | |
699 | # HG changeset patch |
|
699 | # HG changeset patch | |
700 | # User test |
|
700 | # User test | |
701 | # Parent |
|
701 | # Parent | |
702 |
|
702 | |||
703 | diff -r ... 1 |
|
703 | diff -r ... 1 | |
704 | --- /dev/null |
|
704 | --- /dev/null | |
705 | +++ b/1 |
|
705 | +++ b/1 | |
706 | @@ -0,0 +1,1 @@ |
|
706 | @@ -0,0 +1,1 @@ | |
707 | +1 |
|
707 | +1 | |
708 | 0: [mq]: 1.patch - test |
|
708 | 0: 2905f1e46ee0 [mq]: 1.patch - test | |
709 | ==== qref -u |
|
709 | ==== qref -u | |
710 | # HG changeset patch |
|
710 | # HG changeset patch | |
711 | # User mary |
|
711 | # User mary | |
712 | # Parent |
|
712 | # Parent | |
713 |
|
713 | |||
714 | diff -r ... 1 |
|
714 | diff -r ... 1 | |
715 | --- /dev/null |
|
715 | --- /dev/null | |
716 | +++ b/1 |
|
716 | +++ b/1 | |
717 | @@ -0,0 +1,1 @@ |
|
717 | @@ -0,0 +1,1 @@ | |
718 | +1 |
|
718 | +1 | |
719 | 0: [mq]: 1.patch - mary |
|
719 | 0: 3682f830e656 [mq]: 1.patch - mary | |
720 | ==== qnew |
|
720 | ==== qnew | |
721 | adding 2 |
|
721 | adding 2 | |
722 | # HG changeset patch |
|
722 | # HG changeset patch | |
723 | # Parent |
|
723 | # Parent | |
724 |
|
724 | |||
725 | diff -r ... 2 |
|
725 | diff -r ... 2 | |
726 | --- /dev/null |
|
726 | --- /dev/null | |
727 | +++ b/2 |
|
727 | +++ b/2 | |
728 | @@ -0,0 +1,1 @@ |
|
728 | @@ -0,0 +1,1 @@ | |
729 | +2 |
|
729 | +2 | |
730 | 1: [mq]: 2.patch - test |
|
730 | 1: 527f98a12a7a [mq]: 2.patch - test | |
731 | 0: [mq]: 1.patch - mary |
|
731 | 0: 3682f830e656 [mq]: 1.patch - mary | |
732 | ==== qref -u |
|
732 | ==== qref -u | |
733 | # HG changeset patch |
|
733 | # HG changeset patch | |
734 | # User jane |
|
734 | # User jane | |
735 | # Parent |
|
735 | # Parent | |
736 |
|
736 | |||
737 | diff -r ... 2 |
|
737 | diff -r ... 2 | |
738 | --- /dev/null |
|
738 | --- /dev/null | |
739 | +++ b/2 |
|
739 | +++ b/2 | |
740 | @@ -0,0 +1,1 @@ |
|
740 | @@ -0,0 +1,1 @@ | |
741 | +2 |
|
741 | +2 | |
742 | 1: [mq]: 2.patch - jane |
|
742 | 1: a425cde5f493 [mq]: 2.patch - jane | |
743 | 0: [mq]: 1.patch - mary |
|
743 | 0: 3682f830e656 [mq]: 1.patch - mary | |
744 | ==== qnew -U -m |
|
744 | ==== qnew -U -m | |
745 | # HG changeset patch |
|
745 | # HG changeset patch | |
746 | # User test |
|
746 | # User test | |
747 | # Parent |
|
747 | # Parent | |
748 | Three |
|
748 | Three | |
749 |
|
749 | |||
750 | 2: Three - test |
|
750 | 2: 0ffa16a9088e Three - test | |
751 | 1: [mq]: 2.patch - jane |
|
751 | 1: a425cde5f493 [mq]: 2.patch - jane | |
752 | 0: [mq]: 1.patch - mary |
|
752 | 0: 3682f830e656 [mq]: 1.patch - mary | |
753 | ==== qref |
|
753 | ==== qref | |
754 | adding 3 |
|
754 | adding 3 | |
755 | # HG changeset patch |
|
755 | # HG changeset patch | |
756 | # User test |
|
756 | # User test | |
757 | # Parent |
|
757 | # Parent | |
758 | Three |
|
758 | Three | |
759 |
|
759 | |||
760 | diff -r ... 3 |
|
760 | diff -r ... 3 | |
761 | --- /dev/null |
|
761 | --- /dev/null | |
762 | +++ b/3 |
|
762 | +++ b/3 | |
763 | @@ -0,0 +1,1 @@ |
|
763 | @@ -0,0 +1,1 @@ | |
764 | +3 |
|
764 | +3 | |
765 | 2: Three - test |
|
765 | 2: 83f1290c6086 Three - test | |
766 | 1: [mq]: 2.patch - jane |
|
766 | 1: a425cde5f493 [mq]: 2.patch - jane | |
767 | 0: [mq]: 1.patch - mary |
|
767 | 0: 3682f830e656 [mq]: 1.patch - mary | |
768 | ==== qref -m |
|
768 | ==== qref -m | |
769 | # HG changeset patch |
|
769 | # HG changeset patch | |
770 | # User test |
|
770 | # User test | |
771 | # Parent |
|
771 | # Parent | |
772 | Drei |
|
772 | Drei | |
773 |
|
773 | |||
774 | diff -r ... 3 |
|
774 | diff -r ... 3 | |
775 | --- /dev/null |
|
775 | --- /dev/null | |
776 | +++ b/3 |
|
776 | +++ b/3 | |
777 | @@ -0,0 +1,1 @@ |
|
777 | @@ -0,0 +1,1 @@ | |
778 | +3 |
|
778 | +3 | |
779 | 2: Drei - test |
|
779 | 2: b0d856328d4d Drei - test | |
780 | 1: [mq]: 2.patch - jane |
|
780 | 1: a425cde5f493 [mq]: 2.patch - jane | |
781 | 0: [mq]: 1.patch - mary |
|
781 | 0: 3682f830e656 [mq]: 1.patch - mary | |
782 | ==== qref -u |
|
782 | ==== qref -u | |
783 | # HG changeset patch |
|
783 | # HG changeset patch | |
784 | # User mary |
|
784 | # User mary | |
785 | # Parent |
|
785 | # Parent | |
786 | Drei |
|
786 | Drei | |
787 |
|
787 | |||
788 | diff -r ... 3 |
|
788 | diff -r ... 3 | |
789 | --- /dev/null |
|
789 | --- /dev/null | |
790 | +++ b/3 |
|
790 | +++ b/3 | |
791 | @@ -0,0 +1,1 @@ |
|
791 | @@ -0,0 +1,1 @@ | |
792 | +3 |
|
792 | +3 | |
793 | 2: Drei - mary |
|
793 | 2: bb9d4b28e6a6 Drei - mary | |
794 | 1: [mq]: 2.patch - jane |
|
794 | 1: a425cde5f493 [mq]: 2.patch - jane | |
795 | 0: [mq]: 1.patch - mary |
|
795 | 0: 3682f830e656 [mq]: 1.patch - mary | |
796 | ==== qref -u -m |
|
796 | ==== qref -u -m | |
797 | # HG changeset patch |
|
797 | # HG changeset patch | |
798 | # User maria |
|
798 | # User maria | |
799 | # Parent |
|
799 | # Parent | |
800 | Three (again) |
|
800 | Three (again) | |
801 |
|
801 | |||
802 | diff -r ... 3 |
|
802 | diff -r ... 3 | |
803 | --- /dev/null |
|
803 | --- /dev/null | |
804 | +++ b/3 |
|
804 | +++ b/3 | |
805 | @@ -0,0 +1,1 @@ |
|
805 | @@ -0,0 +1,1 @@ | |
806 | +3 |
|
806 | +3 | |
807 | 2: Three (again) - maria |
|
807 | 2: a6686ee84fc3 Three (again) - maria | |
808 | 1: [mq]: 2.patch - jane |
|
808 | 1: a425cde5f493 [mq]: 2.patch - jane | |
809 | 0: [mq]: 1.patch - mary |
|
809 | 0: 3682f830e656 [mq]: 1.patch - mary | |
810 | ==== qnew -m |
|
810 | ==== qnew -m | |
811 | adding 4of |
|
811 | adding 4of | |
812 | # HG changeset patch |
|
812 | # HG changeset patch | |
813 | # Parent |
|
813 | # Parent | |
814 | Four |
|
814 | Four | |
815 |
|
815 | |||
816 | diff -r ... 4of |
|
816 | diff -r ... 4of | |
817 | --- /dev/null |
|
817 | --- /dev/null | |
818 | +++ b/4of |
|
818 | +++ b/4of | |
819 | @@ -0,0 +1,1 @@ |
|
819 | @@ -0,0 +1,1 @@ | |
820 | +4 t |
|
820 | +4 t | |
821 | 3: Four - test |
|
821 | 3: b9f922d0da40 Four - test | |
822 | 2: Three (again) - maria |
|
822 | 2: a6686ee84fc3 Three (again) - maria | |
823 | 1: [mq]: 2.patch - jane |
|
823 | 1: a425cde5f493 [mq]: 2.patch - jane | |
824 | 0: [mq]: 1.patch - mary |
|
824 | 0: 3682f830e656 [mq]: 1.patch - mary | |
825 | ==== qref -u |
|
825 | ==== qref -u | |
826 | # HG changeset patch |
|
826 | # HG changeset patch | |
827 | # User jane |
|
827 | # User jane | |
828 | # Parent |
|
828 | # Parent | |
829 | Four |
|
829 | Four | |
830 |
|
830 | |||
831 | diff -r ... 4of |
|
831 | diff -r ... 4of | |
832 | --- /dev/null |
|
832 | --- /dev/null | |
833 | +++ b/4of |
|
833 | +++ b/4of | |
834 | @@ -0,0 +1,1 @@ |
|
834 | @@ -0,0 +1,1 @@ | |
835 | +4 t |
|
835 | +4 t | |
836 | 3: Four - jane |
|
836 | 3: 0dfb3111e7ee Four - jane | |
837 | 2: Three (again) - maria |
|
837 | 2: a6686ee84fc3 Three (again) - maria | |
838 | 1: [mq]: 2.patch - jane |
|
838 | 1: a425cde5f493 [mq]: 2.patch - jane | |
839 | 0: [mq]: 1.patch - mary |
|
839 | 0: 3682f830e656 [mq]: 1.patch - mary | |
840 | ==== qnew with HG header |
|
840 | ==== qnew with HG header | |
841 | popping 5.patch |
|
841 | popping 5.patch | |
842 | now at: 4.patch |
|
842 | now at: 4.patch | |
843 | now at: 5.patch |
|
843 | now at: 5.patch | |
844 | # HG changeset patch |
|
844 | # HG changeset patch | |
845 | # User johndoe |
|
845 | # User johndoe | |
846 | 4: imported patch 5.patch - johndoe |
|
846 | 4: 72bc4a0467ef imported patch 5.patch - johndoe | |
847 | 3: Four - jane |
|
847 | 3: 0dfb3111e7ee Four - jane | |
848 | 2: Three (again) - maria |
|
848 | 2: a6686ee84fc3 Three (again) - maria | |
849 | 1: [mq]: 2.patch - jane |
|
849 | 1: a425cde5f493 [mq]: 2.patch - jane | |
850 | 0: [mq]: 1.patch - mary |
|
850 | 0: 3682f830e656 [mq]: 1.patch - mary | |
851 | ==== hg qref |
|
851 | ==== hg qref | |
852 | adding 5 |
|
852 | adding 5 | |
853 | # HG changeset patch |
|
853 | # HG changeset patch | |
854 | # User johndoe |
|
854 | # User johndoe | |
855 | # Parent |
|
855 | # Parent | |
856 |
|
856 | |||
857 | diff -r ... 5 |
|
857 | diff -r ... 5 | |
858 | --- /dev/null |
|
858 | --- /dev/null | |
859 | +++ b/5 |
|
859 | +++ b/5 | |
860 | @@ -0,0 +1,1 @@ |
|
860 | @@ -0,0 +1,1 @@ | |
861 | +5 |
|
861 | +5 | |
862 | 4: [mq]: 5.patch - johndoe |
|
862 | 4: ff5c06112e5a [mq]: 5.patch - johndoe | |
863 | 3: Four - jane |
|
863 | 3: 0dfb3111e7ee Four - jane | |
864 | 2: Three (again) - maria |
|
864 | 2: a6686ee84fc3 Three (again) - maria | |
865 | 1: [mq]: 2.patch - jane |
|
865 | 1: a425cde5f493 [mq]: 2.patch - jane | |
866 | 0: [mq]: 1.patch - mary |
|
866 | 0: 3682f830e656 [mq]: 1.patch - mary | |
867 | ==== hg qref -U |
|
867 | ==== hg qref -U | |
868 | # HG changeset patch |
|
868 | # HG changeset patch | |
869 | # User test |
|
869 | # User test | |
870 | # Parent |
|
870 | # Parent | |
871 |
|
871 | |||
872 | diff -r ... 5 |
|
872 | diff -r ... 5 | |
873 | --- /dev/null |
|
873 | --- /dev/null | |
874 | +++ b/5 |
|
874 | +++ b/5 | |
875 | @@ -0,0 +1,1 @@ |
|
875 | @@ -0,0 +1,1 @@ | |
876 | +5 |
|
876 | +5 | |
877 | 4: [mq]: 5.patch - test |
|
877 | 4: c947416c22b1 [mq]: 5.patch - test | |
878 | 3: Four - jane |
|
878 | 3: 0dfb3111e7ee Four - jane | |
879 | 2: Three (again) - maria |
|
879 | 2: a6686ee84fc3 Three (again) - maria | |
880 | 1: [mq]: 2.patch - jane |
|
880 | 1: a425cde5f493 [mq]: 2.patch - jane | |
881 | 0: [mq]: 1.patch - mary |
|
881 | 0: 3682f830e656 [mq]: 1.patch - mary | |
882 | ==== hg qref -u |
|
882 | ==== hg qref -u | |
883 | # HG changeset patch |
|
883 | # HG changeset patch | |
884 | # User johndeere |
|
884 | # User johndeere | |
885 | # Parent |
|
885 | # Parent | |
886 |
|
886 | |||
887 | diff -r ... 5 |
|
887 | diff -r ... 5 | |
888 | --- /dev/null |
|
888 | --- /dev/null | |
889 | +++ b/5 |
|
889 | +++ b/5 | |
890 | @@ -0,0 +1,1 @@ |
|
890 | @@ -0,0 +1,1 @@ | |
891 | +5 |
|
891 | +5 | |
892 | 4: [mq]: 5.patch - johndeere |
|
892 | 4: 1d898e201a22 [mq]: 5.patch - johndeere | |
893 | 3: Four - jane |
|
893 | 3: 0dfb3111e7ee Four - jane | |
894 | 2: Three (again) - maria |
|
894 | 2: a6686ee84fc3 Three (again) - maria | |
895 | 1: [mq]: 2.patch - jane |
|
895 | 1: a425cde5f493 [mq]: 2.patch - jane | |
896 | 0: [mq]: 1.patch - mary |
|
896 | 0: 3682f830e656 [mq]: 1.patch - mary | |
897 | ==== qnew with plain header |
|
897 | ==== qnew with plain header | |
898 | popping 6.patch |
|
898 | popping 6.patch | |
899 | now at: 5.patch |
|
899 | now at: 5.patch | |
900 | now at: 6.patch |
|
900 | now at: 6.patch | |
901 | From: test |
|
901 | From: test | |
902 |
|
902 | |||
903 | 5: imported patch 6.patch - test |
|
903 | 5: 7825a18ec839 imported patch 6.patch - test | |
904 | 4: [mq]: 5.patch - johndeere |
|
904 | 4: 1d898e201a22 [mq]: 5.patch - johndeere | |
905 | 3: Four - jane |
|
905 | 3: 0dfb3111e7ee Four - jane | |
906 | 2: Three (again) - maria |
|
906 | 2: a6686ee84fc3 Three (again) - maria | |
907 | 1: [mq]: 2.patch - jane |
|
907 | 1: a425cde5f493 [mq]: 2.patch - jane | |
908 | 0: [mq]: 1.patch - mary |
|
908 | 0: 3682f830e656 [mq]: 1.patch - mary | |
909 | ==== hg qref |
|
909 | ==== hg qref | |
910 | adding 6 |
|
910 | adding 6 | |
911 | From: test |
|
911 | From: test | |
912 |
|
912 | |||
913 | diff -r ... 6 |
|
913 | diff -r ... 6 | |
914 | --- /dev/null |
|
914 | --- /dev/null | |
915 | +++ b/6 |
|
915 | +++ b/6 | |
916 | @@ -0,0 +1,1 @@ |
|
916 | @@ -0,0 +1,1 @@ | |
917 | +6 |
|
917 | +6 | |
918 | 5: [mq]: 6.patch - test |
|
918 | 5: 09d19592680d [mq]: 6.patch - test | |
919 | 4: [mq]: 5.patch - johndeere |
|
919 | 4: 1d898e201a22 [mq]: 5.patch - johndeere | |
920 | 3: Four - jane |
|
920 | 3: 0dfb3111e7ee Four - jane | |
921 | 2: Three (again) - maria |
|
921 | 2: a6686ee84fc3 Three (again) - maria | |
922 | 1: [mq]: 2.patch - jane |
|
922 | 1: a425cde5f493 [mq]: 2.patch - jane | |
923 | 0: [mq]: 1.patch - mary |
|
923 | 0: 3682f830e656 [mq]: 1.patch - mary | |
924 | ==== hg qref -U |
|
924 | ==== hg qref -U | |
925 | From: test |
|
925 | From: test | |
926 |
|
926 | |||
927 | diff -r ... 6 |
|
927 | diff -r ... 6 | |
928 | --- /dev/null |
|
928 | --- /dev/null | |
929 | +++ b/6 |
|
929 | +++ b/6 | |
930 | @@ -0,0 +1,1 @@ |
|
930 | @@ -0,0 +1,1 @@ | |
931 | +6 |
|
931 | +6 | |
932 | 5: [mq]: 6.patch - test |
|
932 | 5: 09d19592680d [mq]: 6.patch - test | |
933 | 4: [mq]: 5.patch - johndeere |
|
933 | 4: 1d898e201a22 [mq]: 5.patch - johndeere | |
934 | 3: Four - jane |
|
934 | 3: 0dfb3111e7ee Four - jane | |
935 | 2: Three (again) - maria |
|
935 | 2: a6686ee84fc3 Three (again) - maria | |
936 | 1: [mq]: 2.patch - jane |
|
936 | 1: a425cde5f493 [mq]: 2.patch - jane | |
937 | 0: [mq]: 1.patch - mary |
|
937 | 0: 3682f830e656 [mq]: 1.patch - mary | |
938 | ==== hg qref -u |
|
938 | ==== hg qref -u | |
939 | From: johndeere |
|
939 | From: johndeere | |
940 |
|
940 | |||
941 | diff -r ... 6 |
|
941 | diff -r ... 6 | |
942 | --- /dev/null |
|
942 | --- /dev/null | |
943 | +++ b/6 |
|
943 | +++ b/6 | |
944 | @@ -0,0 +1,1 @@ |
|
944 | @@ -0,0 +1,1 @@ | |
945 | +6 |
|
945 | +6 | |
946 | 5: [mq]: 6.patch - johndeere |
|
946 | 5: 32641ee07196 [mq]: 6.patch - johndeere | |
947 | 4: [mq]: 5.patch - johndeere |
|
947 | 4: 1d898e201a22 [mq]: 5.patch - johndeere | |
948 | 3: Four - jane |
|
948 | 3: 0dfb3111e7ee Four - jane | |
949 | 2: Three (again) - maria |
|
949 | 2: a6686ee84fc3 Three (again) - maria | |
950 | 1: [mq]: 2.patch - jane |
|
950 | 1: a425cde5f493 [mq]: 2.patch - jane | |
951 | 0: [mq]: 1.patch - mary |
|
951 | 0: 3682f830e656 [mq]: 1.patch - mary | |
952 | ==== qpop -a / qpush -a |
|
952 | ==== qpop -a / qpush -a | |
953 | popping 6.patch |
|
953 | popping 6.patch | |
954 | popping 5.patch |
|
954 | popping 5.patch | |
955 | popping 4.patch |
|
955 | popping 4.patch | |
956 | popping 3.patch |
|
956 | popping 3.patch | |
957 | popping 2.patch |
|
957 | popping 2.patch | |
958 | popping 1.patch |
|
958 | popping 1.patch | |
959 | patch queue now empty |
|
959 | patch queue now empty | |
960 | applying 1.patch |
|
960 | applying 1.patch | |
961 | applying 2.patch |
|
961 | applying 2.patch | |
962 | applying 3.patch |
|
962 | applying 3.patch | |
963 | applying 4.patch |
|
963 | applying 4.patch | |
964 | applying 5.patch |
|
964 | applying 5.patch | |
965 | applying 6.patch |
|
965 | applying 6.patch | |
966 | now at: 6.patch |
|
966 | now at: 6.patch | |
967 | 5: imported patch 6.patch - johndeere |
|
967 | 5: 1fb083c80457 imported patch 6.patch - johndeere | |
968 | 4: imported patch 5.patch - johndeere |
|
968 | 4: 7e96e969691d imported patch 5.patch - johndeere | |
969 | 3: Four - jane |
|
969 | 3: c7147533d3cd Four - jane | |
970 | 2: Three (again) - maria |
|
970 | 2: b383d04401ea Three (again) - maria | |
971 | 1: imported patch 2.patch - jane |
|
971 | 1: fac2da4efc3c imported patch 2.patch - jane | |
972 | 0: imported patch 1.patch - mary |
|
972 | 0: b6e237e8771b imported patch 1.patch - mary | |
973 |
|
973 | |||
974 | $ cd .. |
|
974 | $ cd .. |
@@ -1,137 +1,137 b'' | |||||
1 | $ cat <<EOF >> $HGRCPATH |
|
1 | $ cat <<EOF >> $HGRCPATH | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > mq= |
|
3 | > mq= | |
4 | > [alias] |
|
4 | > [alias] | |
5 | > tlog = log --template "{rev}: {desc}\\n" |
|
5 | > tlog = log --template "{rev}: {node|short} {desc}\\n" | |
6 | > theads = heads --template "{rev}: {desc}\\n" |
|
6 | > theads = heads --template "{rev}: {desc}\\n" | |
7 | > tincoming = incoming --template "{rev}: {desc}\\n" |
|
7 | > tincoming = incoming --template "{rev}: {desc}\\n" | |
8 | > EOF |
|
8 | > EOF | |
9 |
|
9 | |||
10 | Setup main: |
|
10 | Setup main: | |
11 |
|
11 | |||
12 | $ hg init base |
|
12 | $ hg init base | |
13 | $ cd base |
|
13 | $ cd base | |
14 | $ echo "One" > one |
|
14 | $ echo "One" > one | |
15 | $ hg add |
|
15 | $ hg add | |
16 | adding one |
|
16 | adding one | |
17 | $ hg ci -m "main: one added" |
|
17 | $ hg ci -m "main: one added" | |
18 | $ echo "++" >> one |
|
18 | $ echo "++" >> one | |
19 | $ hg ci -m "main: one updated" |
|
19 | $ hg ci -m "main: one updated" | |
20 |
|
20 | |||
21 | Bundle main: |
|
21 | Bundle main: | |
22 |
|
22 | |||
23 | $ hg bundle --base=null ../main.hg |
|
23 | $ hg bundle --base=null ../main.hg | |
24 | 2 changesets found |
|
24 | 2 changesets found | |
25 |
|
25 | |||
26 | $ cd .. |
|
26 | $ cd .. | |
27 |
|
27 | |||
28 | Incoming to fresh repo: |
|
28 | Incoming to fresh repo: | |
29 |
|
29 | |||
30 | $ hg init fresh |
|
30 | $ hg init fresh | |
31 |
|
31 | |||
32 | $ hg -R fresh tincoming main.hg |
|
32 | $ hg -R fresh tincoming main.hg | |
33 | comparing with main.hg |
|
33 | comparing with main.hg | |
34 | 0: main: one added |
|
34 | 0: main: one added | |
35 | 1: main: one updated |
|
35 | 1: main: one updated | |
36 | $ test -f ./fresh/.hg/hg-bundle* && echo 'temp. bundle file remained' || true |
|
36 | $ test -f ./fresh/.hg/hg-bundle* && echo 'temp. bundle file remained' || true | |
37 |
|
37 | |||
38 | $ hg -R fresh tincoming bundle:fresh+main.hg |
|
38 | $ hg -R fresh tincoming bundle:fresh+main.hg | |
39 | comparing with bundle:fresh+main.hg |
|
39 | comparing with bundle:fresh+main.hg | |
40 | 0: main: one added |
|
40 | 0: main: one added | |
41 | 1: main: one updated |
|
41 | 1: main: one updated | |
42 |
|
42 | |||
43 |
|
43 | |||
44 | Setup queue: |
|
44 | Setup queue: | |
45 |
|
45 | |||
46 | $ cd base |
|
46 | $ cd base | |
47 | $ hg qinit -c |
|
47 | $ hg qinit -c | |
48 | $ hg qnew -m "patch: two added" two.patch |
|
48 | $ hg qnew -m "patch: two added" two.patch | |
49 | $ echo two > two |
|
49 | $ echo two > two | |
50 | $ hg add |
|
50 | $ hg add | |
51 | adding two |
|
51 | adding two | |
52 | $ hg qrefresh |
|
52 | $ hg qrefresh | |
53 | $ hg qcommit -m "queue: two.patch added" |
|
53 | $ hg qcommit -m "queue: two.patch added" | |
54 | $ hg qpop -a |
|
54 | $ hg qpop -a | |
55 | popping two.patch |
|
55 | popping two.patch | |
56 | patch queue now empty |
|
56 | patch queue now empty | |
57 |
|
57 | |||
58 | Bundle queue: |
|
58 | Bundle queue: | |
59 |
|
59 | |||
60 | $ hg -R .hg/patches bundle --base=null ../queue.hgq |
|
60 | $ hg -R .hg/patches bundle --base=null ../queue.hgq | |
61 | 1 changesets found |
|
61 | 1 changesets found | |
62 | $ test -f ./fresh/.hg/hg-bundle* && echo 'temp. bundle file remained' || true |
|
62 | $ test -f ./fresh/.hg/hg-bundle* && echo 'temp. bundle file remained' || true | |
63 |
|
63 | |||
64 | $ cd .. |
|
64 | $ cd .. | |
65 |
|
65 | |||
66 |
|
66 | |||
67 | Clone base: |
|
67 | Clone base: | |
68 |
|
68 | |||
69 | $ hg clone base copy |
|
69 | $ hg clone base copy | |
70 | updating to branch default |
|
70 | updating to branch default | |
71 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
71 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
72 | $ cd copy |
|
72 | $ cd copy | |
73 | $ hg qinit -c |
|
73 | $ hg qinit -c | |
74 |
|
74 | |||
75 | Incoming queue bundle: |
|
75 | Incoming queue bundle: | |
76 |
|
76 | |||
77 | $ hg -R .hg/patches tincoming ../queue.hgq |
|
77 | $ hg -R .hg/patches tincoming ../queue.hgq | |
78 | comparing with ../queue.hgq |
|
78 | comparing with ../queue.hgq | |
79 | 0: queue: two.patch added |
|
79 | 0: queue: two.patch added | |
80 | $ test -f .hg/hg-bundle* && echo 'temp. bundle file remained' || true |
|
80 | $ test -f .hg/hg-bundle* && echo 'temp. bundle file remained' || true | |
81 |
|
81 | |||
82 | Pull queue bundle: |
|
82 | Pull queue bundle: | |
83 |
|
83 | |||
84 | $ hg -R .hg/patches pull --update ../queue.hgq |
|
84 | $ hg -R .hg/patches pull --update ../queue.hgq | |
85 | pulling from ../queue.hgq |
|
85 | pulling from ../queue.hgq | |
86 | requesting all changes |
|
86 | requesting all changes | |
87 | adding changesets |
|
87 | adding changesets | |
88 | adding manifests |
|
88 | adding manifests | |
89 | adding file changes |
|
89 | adding file changes | |
90 | added 1 changesets with 3 changes to 3 files |
|
90 | added 1 changesets with 3 changes to 3 files | |
91 | new changesets d7553909353d |
|
91 | new changesets d7553909353d | |
92 | merging series |
|
92 | merging series | |
93 | 2 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
93 | 2 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
94 | $ test -f .hg/patches/hg-bundle* && echo 'temp. bundle file remained' || true |
|
94 | $ test -f .hg/patches/hg-bundle* && echo 'temp. bundle file remained' || true | |
95 |
|
95 | |||
96 | $ hg -R .hg/patches theads |
|
96 | $ hg -R .hg/patches theads | |
97 | 0: queue: two.patch added |
|
97 | 0: queue: two.patch added | |
98 |
|
98 | |||
99 | $ hg -R .hg/patches tlog |
|
99 | $ hg -R .hg/patches tlog | |
100 | 0: queue: two.patch added |
|
100 | 0: d7553909353d queue: two.patch added | |
101 |
|
101 | |||
102 | $ hg qseries |
|
102 | $ hg qseries | |
103 | two.patch |
|
103 | two.patch | |
104 |
|
104 | |||
105 | $ cd .. |
|
105 | $ cd .. | |
106 |
|
106 | |||
107 |
|
107 | |||
108 | Clone base again: |
|
108 | Clone base again: | |
109 |
|
109 | |||
110 | $ hg clone base copy2 |
|
110 | $ hg clone base copy2 | |
111 | updating to branch default |
|
111 | updating to branch default | |
112 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
112 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
113 | $ cd copy2 |
|
113 | $ cd copy2 | |
114 | $ hg qinit -c |
|
114 | $ hg qinit -c | |
115 |
|
115 | |||
116 | Unbundle queue bundle: |
|
116 | Unbundle queue bundle: | |
117 |
|
117 | |||
118 | $ hg -R .hg/patches unbundle --update ../queue.hgq |
|
118 | $ hg -R .hg/patches unbundle --update ../queue.hgq | |
119 | adding changesets |
|
119 | adding changesets | |
120 | adding manifests |
|
120 | adding manifests | |
121 | adding file changes |
|
121 | adding file changes | |
122 | added 1 changesets with 3 changes to 3 files |
|
122 | added 1 changesets with 3 changes to 3 files | |
123 | new changesets d7553909353d |
|
123 | new changesets d7553909353d | |
124 | merging series |
|
124 | merging series | |
125 | 2 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
125 | 2 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
126 |
|
126 | |||
127 | $ hg -R .hg/patches theads |
|
127 | $ hg -R .hg/patches theads | |
128 | 0: queue: two.patch added |
|
128 | 0: queue: two.patch added | |
129 |
|
129 | |||
130 | $ hg -R .hg/patches tlog |
|
130 | $ hg -R .hg/patches tlog | |
131 | 0: queue: two.patch added |
|
131 | 0: d7553909353d queue: two.patch added | |
132 |
|
132 | |||
133 | $ hg qseries |
|
133 | $ hg qseries | |
134 | two.patch |
|
134 | two.patch | |
135 |
|
135 | |||
136 | $ cd .. |
|
136 | $ cd .. | |
137 |
|
137 |
@@ -1,384 +1,384 b'' | |||||
1 | Test the "--base" flag of the rebase command. (Tests unrelated to the "--base" |
|
1 | Test the "--base" flag of the rebase command. (Tests unrelated to the "--base" | |
2 | flag should probably live in somewhere else) |
|
2 | flag should probably live in somewhere else) | |
3 |
|
3 | |||
4 | $ cat >> $HGRCPATH <<EOF |
|
4 | $ cat >> $HGRCPATH <<EOF | |
5 | > [extensions] |
|
5 | > [extensions] | |
6 | > rebase= |
|
6 | > rebase= | |
7 | > drawdag=$TESTDIR/drawdag.py |
|
7 | > drawdag=$TESTDIR/drawdag.py | |
8 | > |
|
8 | > | |
9 | > [phases] |
|
9 | > [phases] | |
10 | > publish=False |
|
10 | > publish=False | |
11 | > |
|
11 | > | |
12 | > [alias] |
|
12 | > [alias] | |
13 | > tglog = log -G --template "{rev}: {desc}" |
|
13 | > tglog = log -G --template "{rev}: {node|short} {desc}" | |
14 | > EOF |
|
14 | > EOF | |
15 |
|
15 | |||
16 | $ rebasewithdag() { |
|
16 | $ rebasewithdag() { | |
17 | > N=`$PYTHON -c "print($N+1)"` |
|
17 | > N=`$PYTHON -c "print($N+1)"` | |
18 | > hg init repo$N && cd repo$N |
|
18 | > hg init repo$N && cd repo$N | |
19 | > hg debugdrawdag |
|
19 | > hg debugdrawdag | |
20 | > hg rebase "$@" > _rebasetmp |
|
20 | > hg rebase "$@" > _rebasetmp | |
21 | > r=$? |
|
21 | > r=$? | |
22 | > grep -v 'saved backup bundle' _rebasetmp |
|
22 | > grep -v 'saved backup bundle' _rebasetmp | |
23 | > [ $r -eq 0 ] && hg tglog |
|
23 | > [ $r -eq 0 ] && hg tglog | |
24 | > cd .. |
|
24 | > cd .. | |
25 | > return $r |
|
25 | > return $r | |
26 | > } |
|
26 | > } | |
27 |
|
27 | |||
28 | Single branching point, without merge: |
|
28 | Single branching point, without merge: | |
29 |
|
29 | |||
30 | $ rebasewithdag -b D -d Z <<'EOS' |
|
30 | $ rebasewithdag -b D -d Z <<'EOS' | |
31 | > D E |
|
31 | > D E | |
32 | > |/ |
|
32 | > |/ | |
33 | > Z B C # C: branching point, E should be picked |
|
33 | > Z B C # C: branching point, E should be picked | |
34 | > \|/ # B should not be picked |
|
34 | > \|/ # B should not be picked | |
35 | > A |
|
35 | > A | |
36 | > | |
|
36 | > | | |
37 | > R |
|
37 | > R | |
38 | > EOS |
|
38 | > EOS | |
39 | rebasing 3:d6003a550c2c "C" (C) |
|
39 | rebasing 3:d6003a550c2c "C" (C) | |
40 | rebasing 5:4526cf523425 "D" (D) |
|
40 | rebasing 5:4526cf523425 "D" (D) | |
41 | rebasing 6:b296604d9846 "E" (E tip) |
|
41 | rebasing 6:b296604d9846 "E" (E tip) | |
42 | o 6: E |
|
42 | o 6: 4870f5e7df37 E | |
43 | | |
|
43 | | | |
44 | | o 5: D |
|
44 | | o 5: dc999528138a D | |
45 | |/ |
|
45 | |/ | |
46 | o 4: C |
|
46 | o 4: 6b3e11729672 C | |
47 | | |
|
47 | | | |
48 | o 3: Z |
|
48 | o 3: 57e70bad1ea3 Z | |
49 | | |
|
49 | | | |
50 | | o 2: B |
|
50 | | o 2: c1e6b162678d B | |
51 | |/ |
|
51 | |/ | |
52 | o 1: A |
|
52 | o 1: 21a6c4502885 A | |
53 | | |
|
53 | | | |
54 | o 0: R |
|
54 | o 0: b41ce7760717 R | |
55 |
|
55 | |||
56 | Multiple branching points caused by selecting a single merge changeset: |
|
56 | Multiple branching points caused by selecting a single merge changeset: | |
57 |
|
57 | |||
58 | $ rebasewithdag -b E -d Z <<'EOS' |
|
58 | $ rebasewithdag -b E -d Z <<'EOS' | |
59 | > E |
|
59 | > E | |
60 | > /| |
|
60 | > /| | |
61 | > B C D # B, C: multiple branching points |
|
61 | > B C D # B, C: multiple branching points | |
62 | > | |/ # D should not be picked |
|
62 | > | |/ # D should not be picked | |
63 | > Z | / |
|
63 | > Z | / | |
64 | > \|/ |
|
64 | > \|/ | |
65 | > A |
|
65 | > A | |
66 | > | |
|
66 | > | | |
67 | > R |
|
67 | > R | |
68 | > EOS |
|
68 | > EOS | |
69 | rebasing 2:c1e6b162678d "B" (B) |
|
69 | rebasing 2:c1e6b162678d "B" (B) | |
70 | rebasing 3:d6003a550c2c "C" (C) |
|
70 | rebasing 3:d6003a550c2c "C" (C) | |
71 | rebasing 6:54c8f00cb91c "E" (E tip) |
|
71 | rebasing 6:54c8f00cb91c "E" (E tip) | |
72 | o 6: E |
|
72 | o 6: 00598421b616 E | |
73 | |\ |
|
73 | |\ | |
74 | | o 5: C |
|
74 | | o 5: 6b3e11729672 C | |
75 | | | |
|
75 | | | | |
76 | o | 4: B |
|
76 | o | 4: 85260910e847 B | |
77 | |/ |
|
77 | |/ | |
78 | o 3: Z |
|
78 | o 3: 57e70bad1ea3 Z | |
79 | | |
|
79 | | | |
80 | | o 2: D |
|
80 | | o 2: 8924700906fe D | |
81 | |/ |
|
81 | |/ | |
82 | o 1: A |
|
82 | o 1: 21a6c4502885 A | |
83 | | |
|
83 | | | |
84 | o 0: R |
|
84 | o 0: b41ce7760717 R | |
85 |
|
85 | |||
86 | Rebase should not extend the "--base" revset using "descendants": |
|
86 | Rebase should not extend the "--base" revset using "descendants": | |
87 |
|
87 | |||
88 | $ rebasewithdag -b B -d Z <<'EOS' |
|
88 | $ rebasewithdag -b B -d Z <<'EOS' | |
89 | > E |
|
89 | > E | |
90 | > /| |
|
90 | > /| | |
91 | > Z B C # descendants(B) = B+E. With E, C will be included incorrectly |
|
91 | > Z B C # descendants(B) = B+E. With E, C will be included incorrectly | |
92 | > \|/ |
|
92 | > \|/ | |
93 | > A |
|
93 | > A | |
94 | > | |
|
94 | > | | |
95 | > R |
|
95 | > R | |
96 | > EOS |
|
96 | > EOS | |
97 | rebasing 2:c1e6b162678d "B" (B) |
|
97 | rebasing 2:c1e6b162678d "B" (B) | |
98 | rebasing 5:54c8f00cb91c "E" (E tip) |
|
98 | rebasing 5:54c8f00cb91c "E" (E tip) | |
99 | o 5: E |
|
99 | o 5: e583bf3ff54c E | |
100 | |\ |
|
100 | |\ | |
101 | | o 4: B |
|
101 | | o 4: 85260910e847 B | |
102 | | | |
|
102 | | | | |
103 | | o 3: Z |
|
103 | | o 3: 57e70bad1ea3 Z | |
104 | | | |
|
104 | | | | |
105 | o | 2: C |
|
105 | o | 2: d6003a550c2c C | |
106 | |/ |
|
106 | |/ | |
107 | o 1: A |
|
107 | o 1: 21a6c4502885 A | |
108 | | |
|
108 | | | |
109 | o 0: R |
|
109 | o 0: b41ce7760717 R | |
110 |
|
110 | |||
111 | Rebase should not simplify the "--base" revset using "roots": |
|
111 | Rebase should not simplify the "--base" revset using "roots": | |
112 |
|
112 | |||
113 | $ rebasewithdag -b B+E -d Z <<'EOS' |
|
113 | $ rebasewithdag -b B+E -d Z <<'EOS' | |
114 | > E |
|
114 | > E | |
115 | > /| |
|
115 | > /| | |
116 | > Z B C # roots(B+E) = B. Without E, C will be missed incorrectly |
|
116 | > Z B C # roots(B+E) = B. Without E, C will be missed incorrectly | |
117 | > \|/ |
|
117 | > \|/ | |
118 | > A |
|
118 | > A | |
119 | > | |
|
119 | > | | |
120 | > R |
|
120 | > R | |
121 | > EOS |
|
121 | > EOS | |
122 | rebasing 2:c1e6b162678d "B" (B) |
|
122 | rebasing 2:c1e6b162678d "B" (B) | |
123 | rebasing 3:d6003a550c2c "C" (C) |
|
123 | rebasing 3:d6003a550c2c "C" (C) | |
124 | rebasing 5:54c8f00cb91c "E" (E tip) |
|
124 | rebasing 5:54c8f00cb91c "E" (E tip) | |
125 | o 5: E |
|
125 | o 5: 00598421b616 E | |
126 | |\ |
|
126 | |\ | |
127 | | o 4: C |
|
127 | | o 4: 6b3e11729672 C | |
128 | | | |
|
128 | | | | |
129 | o | 3: B |
|
129 | o | 3: 85260910e847 B | |
130 | |/ |
|
130 | |/ | |
131 | o 2: Z |
|
131 | o 2: 57e70bad1ea3 Z | |
132 | | |
|
132 | | | |
133 | o 1: A |
|
133 | o 1: 21a6c4502885 A | |
134 | | |
|
134 | | | |
135 | o 0: R |
|
135 | o 0: b41ce7760717 R | |
136 |
|
136 | |||
137 | The destination is one of the two branching points of a merge: |
|
137 | The destination is one of the two branching points of a merge: | |
138 |
|
138 | |||
139 | $ rebasewithdag -b F -d Z <<'EOS' |
|
139 | $ rebasewithdag -b F -d Z <<'EOS' | |
140 | > F |
|
140 | > F | |
141 | > / \ |
|
141 | > / \ | |
142 | > E D |
|
142 | > E D | |
143 | > / / |
|
143 | > / / | |
144 | > Z C |
|
144 | > Z C | |
145 | > \ / |
|
145 | > \ / | |
146 | > B |
|
146 | > B | |
147 | > | |
|
147 | > | | |
148 | > A |
|
148 | > A | |
149 | > EOS |
|
149 | > EOS | |
150 | nothing to rebase |
|
150 | nothing to rebase | |
151 | [1] |
|
151 | [1] | |
152 |
|
152 | |||
153 | Multiple branching points caused by multiple bases (issue5420): |
|
153 | Multiple branching points caused by multiple bases (issue5420): | |
154 |
|
154 | |||
155 | $ rebasewithdag -b E1+E2+C2+B1 -d Z <<'EOS' |
|
155 | $ rebasewithdag -b E1+E2+C2+B1 -d Z <<'EOS' | |
156 | > Z E2 |
|
156 | > Z E2 | |
157 | > | / |
|
157 | > | / | |
158 | > F E1 C2 |
|
158 | > F E1 C2 | |
159 | > |/ / |
|
159 | > |/ / | |
160 | > E C1 B2 |
|
160 | > E C1 B2 | |
161 | > |/ / |
|
161 | > |/ / | |
162 | > C B1 |
|
162 | > C B1 | |
163 | > |/ |
|
163 | > |/ | |
164 | > B |
|
164 | > B | |
165 | > | |
|
165 | > | | |
166 | > A |
|
166 | > A | |
167 | > | |
|
167 | > | | |
168 | > R |
|
168 | > R | |
169 | > EOS |
|
169 | > EOS | |
170 | rebasing 3:a113dbaa660a "B1" (B1) |
|
170 | rebasing 3:a113dbaa660a "B1" (B1) | |
171 | rebasing 5:06ce7b1cc8c2 "B2" (B2) |
|
171 | rebasing 5:06ce7b1cc8c2 "B2" (B2) | |
172 | rebasing 6:0ac98cce32d3 "C1" (C1) |
|
172 | rebasing 6:0ac98cce32d3 "C1" (C1) | |
173 | rebasing 8:781512f5e33d "C2" (C2) |
|
173 | rebasing 8:781512f5e33d "C2" (C2) | |
174 | rebasing 9:428d8c18f641 "E1" (E1) |
|
174 | rebasing 9:428d8c18f641 "E1" (E1) | |
175 | rebasing 11:e1bf82f6b6df "E2" (E2) |
|
175 | rebasing 11:e1bf82f6b6df "E2" (E2) | |
176 | o 12: E2 |
|
176 | o 12: e4a37b6fdbd2 E2 | |
177 | | |
|
177 | | | |
178 | o 11: E1 |
|
178 | o 11: 9675bea983df E1 | |
179 | | |
|
179 | | | |
180 | | o 10: C2 |
|
180 | | o 10: 4faf5d4c80dc C2 | |
181 | | | |
|
181 | | | | |
182 | | o 9: C1 |
|
182 | | o 9: d4799b1ad57d C1 | |
183 | |/ |
|
183 | |/ | |
184 | | o 8: B2 |
|
184 | | o 8: 772732dc64d6 B2 | |
185 | | | |
|
185 | | | | |
186 | | o 7: B1 |
|
186 | | o 7: ad3ac528a49f B1 | |
187 | |/ |
|
187 | |/ | |
188 | o 6: Z |
|
188 | o 6: 2cbdfca6b9d5 Z | |
189 | | |
|
189 | | | |
190 | o 5: F |
|
190 | o 5: fcdb3293ec13 F | |
191 | | |
|
191 | | | |
192 | o 4: E |
|
192 | o 4: a4652bb8ac54 E | |
193 | | |
|
193 | | | |
194 | o 3: C |
|
194 | o 3: bd5548558fcf C | |
195 | | |
|
195 | | | |
196 | o 2: B |
|
196 | o 2: c1e6b162678d B | |
197 | | |
|
197 | | | |
198 | o 1: A |
|
198 | o 1: 21a6c4502885 A | |
199 | | |
|
199 | | | |
200 | o 0: R |
|
200 | o 0: b41ce7760717 R | |
201 |
|
201 | |||
202 | Multiple branching points with multiple merges: |
|
202 | Multiple branching points with multiple merges: | |
203 |
|
203 | |||
204 | $ rebasewithdag -b G+P -d Z <<'EOS' |
|
204 | $ rebasewithdag -b G+P -d Z <<'EOS' | |
205 | > G H P |
|
205 | > G H P | |
206 | > |\ /| |\ |
|
206 | > |\ /| |\ | |
207 | > F E D M N |
|
207 | > F E D M N | |
208 | > \|/| /| |\ |
|
208 | > \|/| /| |\ | |
209 | > Z C B I J K L |
|
209 | > Z C B I J K L | |
210 | > \|/ |/ |/ |
|
210 | > \|/ |/ |/ | |
211 | > A A A |
|
211 | > A A A | |
212 | > EOS |
|
212 | > EOS | |
213 | rebasing 2:dc0947a82db8 "C" (C) |
|
213 | rebasing 2:dc0947a82db8 "C" (C) | |
214 | rebasing 8:4e4f9194f9f1 "D" (D) |
|
214 | rebasing 8:4e4f9194f9f1 "D" (D) | |
215 | rebasing 9:03ca77807e91 "E" (E) |
|
215 | rebasing 9:03ca77807e91 "E" (E) | |
216 | rebasing 10:afc707c82df0 "F" (F) |
|
216 | rebasing 10:afc707c82df0 "F" (F) | |
217 | rebasing 13:690dfff91e9e "G" (G) |
|
217 | rebasing 13:690dfff91e9e "G" (G) | |
218 | rebasing 14:2893b886bb10 "H" (H) |
|
218 | rebasing 14:2893b886bb10 "H" (H) | |
219 | rebasing 3:08ebfeb61bac "I" (I) |
|
219 | rebasing 3:08ebfeb61bac "I" (I) | |
220 | rebasing 4:a0a5005cec67 "J" (J) |
|
220 | rebasing 4:a0a5005cec67 "J" (J) | |
221 | rebasing 5:83780307a7e8 "K" (K) |
|
221 | rebasing 5:83780307a7e8 "K" (K) | |
222 | rebasing 6:e131637a1cb6 "L" (L) |
|
222 | rebasing 6:e131637a1cb6 "L" (L) | |
223 | rebasing 11:d1f6d0c3c7e4 "M" (M) |
|
223 | rebasing 11:d1f6d0c3c7e4 "M" (M) | |
224 | rebasing 12:7aaec6f81888 "N" (N) |
|
224 | rebasing 12:7aaec6f81888 "N" (N) | |
225 | rebasing 15:325bc8f1760d "P" (P tip) |
|
225 | rebasing 15:325bc8f1760d "P" (P tip) | |
226 | o 15: P |
|
226 | o 15: 6ef6a0ea3b18 P | |
227 | |\ |
|
227 | |\ | |
228 | | o 14: N |
|
228 | | o 14: 20ba3610a7e5 N | |
229 | | |\ |
|
229 | | |\ | |
230 | o \ \ 13: M |
|
230 | o \ \ 13: cd4f6c06d2ab M | |
231 | |\ \ \ |
|
231 | |\ \ \ | |
232 | | | | o 12: L |
|
232 | | | | o 12: bca872041455 L | |
233 | | | | | |
|
233 | | | | | | |
234 | | | o | 11: K |
|
234 | | | o | 11: 7bbb6c8a6ad7 K | |
235 | | | |/ |
|
235 | | | |/ | |
236 | | o / 10: J |
|
236 | | o / 10: de0cbffe893e J | |
237 | | |/ |
|
237 | | |/ | |
238 | o / 9: I |
|
238 | o / 9: 0e710f176a88 I | |
239 | |/ |
|
239 | |/ | |
240 | | o 8: H |
|
240 | | o 8: 52507bab39ca H | |
241 | | |\ |
|
241 | | |\ | |
242 | | | | o 7: G |
|
242 | | | | o 7: bb5fe4652f0d G | |
243 | | | |/| |
|
243 | | | |/| | |
244 | | | | o 6: F |
|
244 | | | | o 6: f4ad4b31daf4 F | |
245 | | | | | |
|
245 | | | | | | |
246 | | | o | 5: E |
|
246 | | | o | 5: b168f85f2e78 E | |
247 | | | |/ |
|
247 | | | |/ | |
248 | | o | 4: D |
|
248 | | o | 4: 8d09fcdb5594 D | |
249 | | |\| |
|
249 | | |\| | |
250 | +---o 3: C |
|
250 | +---o 3: ab70b4c5a9c9 C | |
251 | | | |
|
251 | | | | |
252 | o | 2: Z |
|
252 | o | 2: 262e37e34f63 Z | |
253 | | | |
|
253 | | | | |
254 | | o 1: B |
|
254 | | o 1: 112478962961 B | |
255 | |/ |
|
255 | |/ | |
256 | o 0: A |
|
256 | o 0: 426bada5c675 A | |
257 |
|
257 | |||
258 | Slightly more complex merge case (mentioned in https://www.mercurial-scm.org/pipermail/mercurial-devel/2016-November/091074.html): |
|
258 | Slightly more complex merge case (mentioned in https://www.mercurial-scm.org/pipermail/mercurial-devel/2016-November/091074.html): | |
259 |
|
259 | |||
260 | $ rebasewithdag -b A3+B3 -d Z <<'EOF' |
|
260 | $ rebasewithdag -b A3+B3 -d Z <<'EOF' | |
261 | > Z C1 A3 B3 |
|
261 | > Z C1 A3 B3 | |
262 | > | / / \ / \ |
|
262 | > | / / \ / \ | |
263 | > M3 C0 A1 A2 B1 B2 |
|
263 | > M3 C0 A1 A2 B1 B2 | |
264 | > | / | | | | |
|
264 | > | / | | | | | |
265 | > M2 M1 C1 C1 M3 |
|
265 | > M2 M1 C1 C1 M3 | |
266 | > | |
|
266 | > | | |
267 | > M1 |
|
267 | > M1 | |
268 | > | |
|
268 | > | | |
269 | > M0 |
|
269 | > M0 | |
270 | > EOF |
|
270 | > EOF | |
271 | rebasing 4:8817fae53c94 "C0" (C0) |
|
271 | rebasing 4:8817fae53c94 "C0" (C0) | |
272 | rebasing 6:06ca5dfe3b5b "B2" (B2) |
|
272 | rebasing 6:06ca5dfe3b5b "B2" (B2) | |
273 | rebasing 7:73508237b032 "C1" (C1) |
|
273 | rebasing 7:73508237b032 "C1" (C1) | |
274 | rebasing 9:fdb955e2faed "A2" (A2) |
|
274 | rebasing 9:fdb955e2faed "A2" (A2) | |
275 | rebasing 11:4e449bd1a643 "A3" (A3) |
|
275 | rebasing 11:4e449bd1a643 "A3" (A3) | |
276 | rebasing 10:0a33b0519128 "B1" (B1) |
|
276 | rebasing 10:0a33b0519128 "B1" (B1) | |
277 | rebasing 12:209327807c3a "B3" (B3 tip) |
|
277 | rebasing 12:209327807c3a "B3" (B3 tip) | |
278 | o 12: B3 |
|
278 | o 12: ceb984566332 B3 | |
279 | |\ |
|
279 | |\ | |
280 | | o 11: B1 |
|
280 | | o 11: 19d93caac497 B1 | |
281 | | | |
|
281 | | | | |
282 | | | o 10: A3 |
|
282 | | | o 10: 058e73d3916b A3 | |
283 | | | |\ |
|
283 | | | |\ | |
284 | | +---o 9: A2 |
|
284 | | +---o 9: 0ba13ad72234 A2 | |
285 | | | | |
|
285 | | | | | |
286 | | o | 8: C1 |
|
286 | | o | 8: c122c2af10c6 C1 | |
287 | | | | |
|
287 | | | | | |
288 | o | | 7: B2 |
|
288 | o | | 7: 74275896650e B2 | |
289 | | | | |
|
289 | | | | | |
290 | | o | 6: C0 |
|
290 | | o | 6: 455ba9bd3ea2 C0 | |
291 | |/ / |
|
291 | |/ / | |
292 | o | 5: Z |
|
292 | o | 5: b3d7d2fda53b Z | |
293 | | | |
|
293 | | | | |
294 | o | 4: M3 |
|
294 | o | 4: 182ab6383dd7 M3 | |
295 | | | |
|
295 | | | | |
296 | o | 3: M2 |
|
296 | o | 3: 6c3f73563d5f M2 | |
297 | | | |
|
297 | | | | |
298 | | o 2: A1 |
|
298 | | o 2: 88c860fffcc2 A1 | |
299 | |/ |
|
299 | |/ | |
300 | o 1: M1 |
|
300 | o 1: bc852baa85dd M1 | |
301 | | |
|
301 | | | |
302 | o 0: M0 |
|
302 | o 0: dbdfc5c9bcd5 M0 | |
303 |
|
303 | |||
304 | Disconnected graph: |
|
304 | Disconnected graph: | |
305 |
|
305 | |||
306 | $ rebasewithdag -b B -d Z <<'EOS' |
|
306 | $ rebasewithdag -b B -d Z <<'EOS' | |
307 | > B |
|
307 | > B | |
308 | > | |
|
308 | > | | |
309 | > Z A |
|
309 | > Z A | |
310 | > EOS |
|
310 | > EOS | |
311 | nothing to rebase from 112478962961 to 48b9aae0607f |
|
311 | nothing to rebase from 112478962961 to 48b9aae0607f | |
312 | [1] |
|
312 | [1] | |
313 |
|
313 | |||
314 | Multiple roots. Roots are ancestors of dest: |
|
314 | Multiple roots. Roots are ancestors of dest: | |
315 |
|
315 | |||
316 | $ rebasewithdag -b B+D -d Z <<'EOF' |
|
316 | $ rebasewithdag -b B+D -d Z <<'EOF' | |
317 | > D Z B |
|
317 | > D Z B | |
318 | > \|\| |
|
318 | > \|\| | |
319 | > C A |
|
319 | > C A | |
320 | > EOF |
|
320 | > EOF | |
321 | rebasing 2:112478962961 "B" (B) |
|
321 | rebasing 2:112478962961 "B" (B) | |
322 | rebasing 3:b70f76719894 "D" (D) |
|
322 | rebasing 3:b70f76719894 "D" (D) | |
323 | o 4: D |
|
323 | o 4: 511efad7bf13 D | |
324 | | |
|
324 | | | |
325 | | o 3: B |
|
325 | | o 3: 25c4e279af62 B | |
326 | |/ |
|
326 | |/ | |
327 | o 2: Z |
|
327 | o 2: 3a49f54d7bb1 Z | |
328 | |\ |
|
328 | |\ | |
329 | | o 1: C |
|
329 | | o 1: 96cc3511f894 C | |
330 | | |
|
330 | | | |
331 | o 0: A |
|
331 | o 0: 426bada5c675 A | |
332 |
|
332 | |||
333 | Multiple roots. One root is not an ancestor of dest: |
|
333 | Multiple roots. One root is not an ancestor of dest: | |
334 |
|
334 | |||
335 | $ rebasewithdag -b B+D -d Z <<'EOF' |
|
335 | $ rebasewithdag -b B+D -d Z <<'EOF' | |
336 | > Z B D |
|
336 | > Z B D | |
337 | > \|\| |
|
337 | > \|\| | |
338 | > A C |
|
338 | > A C | |
339 | > EOF |
|
339 | > EOF | |
340 | nothing to rebase from f675d5a1c6a4+b70f76719894 to 262e37e34f63 |
|
340 | nothing to rebase from f675d5a1c6a4+b70f76719894 to 262e37e34f63 | |
341 | [1] |
|
341 | [1] | |
342 |
|
342 | |||
343 | Multiple roots. One root is not an ancestor of dest. Select using a merge: |
|
343 | Multiple roots. One root is not an ancestor of dest. Select using a merge: | |
344 |
|
344 | |||
345 | $ rebasewithdag -b E -d Z <<'EOF' |
|
345 | $ rebasewithdag -b E -d Z <<'EOF' | |
346 | > E |
|
346 | > E | |
347 | > |\ |
|
347 | > |\ | |
348 | > Z B D |
|
348 | > Z B D | |
349 | > \|\| |
|
349 | > \|\| | |
350 | > A C |
|
350 | > A C | |
351 | > EOF |
|
351 | > EOF | |
352 | rebasing 2:f675d5a1c6a4 "B" (B) |
|
352 | rebasing 2:f675d5a1c6a4 "B" (B) | |
353 | rebasing 5:f68696fe6af8 "E" (E tip) |
|
353 | rebasing 5:f68696fe6af8 "E" (E tip) | |
354 | o 5: E |
|
354 | o 5: f6e6f5081554 E | |
355 | |\ |
|
355 | |\ | |
356 | | o 4: B |
|
356 | | o 4: 30cabcba27be B | |
357 | | |\ |
|
357 | | |\ | |
358 | | | o 3: Z |
|
358 | | | o 3: 262e37e34f63 Z | |
359 | | | | |
|
359 | | | | | |
360 | o | | 2: D |
|
360 | o | | 2: b70f76719894 D | |
361 | |/ / |
|
361 | |/ / | |
362 | o / 1: C |
|
362 | o / 1: 96cc3511f894 C | |
363 | / |
|
363 | / | |
364 | o 0: A |
|
364 | o 0: 426bada5c675 A | |
365 |
|
365 | |||
366 | Multiple roots. Two children share two parents while dest has only one parent: |
|
366 | Multiple roots. Two children share two parents while dest has only one parent: | |
367 |
|
367 | |||
368 | $ rebasewithdag -b B+D -d Z <<'EOF' |
|
368 | $ rebasewithdag -b B+D -d Z <<'EOF' | |
369 | > Z B D |
|
369 | > Z B D | |
370 | > \|\|\ |
|
370 | > \|\|\ | |
371 | > A C A |
|
371 | > A C A | |
372 | > EOF |
|
372 | > EOF | |
373 | rebasing 2:f675d5a1c6a4 "B" (B) |
|
373 | rebasing 2:f675d5a1c6a4 "B" (B) | |
374 | rebasing 3:c2a779e13b56 "D" (D) |
|
374 | rebasing 3:c2a779e13b56 "D" (D) | |
375 | o 4: D |
|
375 | o 4: 5eecd056b5f8 D | |
376 | |\ |
|
376 | |\ | |
377 | +---o 3: B |
|
377 | +---o 3: 30cabcba27be B | |
378 | | |/ |
|
378 | | |/ | |
379 | | o 2: Z |
|
379 | | o 2: 262e37e34f63 Z | |
380 | | | |
|
380 | | | | |
381 | o | 1: C |
|
381 | o | 1: 96cc3511f894 C | |
382 | / |
|
382 | / | |
383 | o 0: A |
|
383 | o 0: 426bada5c675 A | |
384 |
|
384 |
@@ -1,245 +1,245 b'' | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > rebase= |
|
3 | > rebase= | |
4 | > drawdag=$TESTDIR/drawdag.py |
|
4 | > drawdag=$TESTDIR/drawdag.py | |
5 | > |
|
5 | > | |
6 | > [phases] |
|
6 | > [phases] | |
7 | > publish=False |
|
7 | > publish=False | |
8 | > |
|
8 | > | |
9 | > [alias] |
|
9 | > [alias] | |
10 | > tglog = log -G --template "{rev}: '{desc}' bookmarks: {bookmarks}\n" |
|
10 | > tglog = log -G --template "{rev}: {node|short} '{desc}' bookmarks: {bookmarks}\n" | |
11 | > EOF |
|
11 | > EOF | |
12 |
|
12 | |||
13 | Create a repo with several bookmarks |
|
13 | Create a repo with several bookmarks | |
14 | $ hg init a |
|
14 | $ hg init a | |
15 | $ cd a |
|
15 | $ cd a | |
16 |
|
16 | |||
17 | $ echo a > a |
|
17 | $ echo a > a | |
18 | $ hg ci -Am A |
|
18 | $ hg ci -Am A | |
19 | adding a |
|
19 | adding a | |
20 |
|
20 | |||
21 | $ echo b > b |
|
21 | $ echo b > b | |
22 | $ hg ci -Am B |
|
22 | $ hg ci -Am B | |
23 | adding b |
|
23 | adding b | |
24 | $ hg book 'X' |
|
24 | $ hg book 'X' | |
25 | $ hg book 'Y' |
|
25 | $ hg book 'Y' | |
26 |
|
26 | |||
27 | $ echo c > c |
|
27 | $ echo c > c | |
28 | $ hg ci -Am C |
|
28 | $ hg ci -Am C | |
29 | adding c |
|
29 | adding c | |
30 | $ hg book 'Z' |
|
30 | $ hg book 'Z' | |
31 |
|
31 | |||
32 | $ hg up -q 0 |
|
32 | $ hg up -q 0 | |
33 |
|
33 | |||
34 | $ echo d > d |
|
34 | $ echo d > d | |
35 | $ hg ci -Am D |
|
35 | $ hg ci -Am D | |
36 | adding d |
|
36 | adding d | |
37 | created new head |
|
37 | created new head | |
38 |
|
38 | |||
39 | $ hg book W |
|
39 | $ hg book W | |
40 |
|
40 | |||
41 | $ hg tglog |
|
41 | $ hg tglog | |
42 | @ 3: 'D' bookmarks: W |
|
42 | @ 3: 41acb9dca9eb 'D' bookmarks: W | |
43 | | |
|
43 | | | |
44 | | o 2: 'C' bookmarks: Y Z |
|
44 | | o 2: 49cb3485fa0c 'C' bookmarks: Y Z | |
45 | | | |
|
45 | | | | |
46 | | o 1: 'B' bookmarks: X |
|
46 | | o 1: 6c81ed0049f8 'B' bookmarks: X | |
47 | |/ |
|
47 | |/ | |
48 | o 0: 'A' bookmarks: |
|
48 | o 0: 1994f17a630e 'A' bookmarks: | |
49 |
|
49 | |||
50 |
|
50 | |||
51 | Move only rebased bookmarks |
|
51 | Move only rebased bookmarks | |
52 |
|
52 | |||
53 | $ cd .. |
|
53 | $ cd .. | |
54 | $ hg clone -q a a1 |
|
54 | $ hg clone -q a a1 | |
55 |
|
55 | |||
56 | $ cd a1 |
|
56 | $ cd a1 | |
57 | $ hg up -q Z |
|
57 | $ hg up -q Z | |
58 |
|
58 | |||
59 | Test deleting divergent bookmarks from dest (issue3685) |
|
59 | Test deleting divergent bookmarks from dest (issue3685) | |
60 |
|
60 | |||
61 | $ hg book -r 3 Z@diverge |
|
61 | $ hg book -r 3 Z@diverge | |
62 |
|
62 | |||
63 | ... and also test that bookmarks not on dest or not being moved aren't deleted |
|
63 | ... and also test that bookmarks not on dest or not being moved aren't deleted | |
64 |
|
64 | |||
65 | $ hg book -r 3 X@diverge |
|
65 | $ hg book -r 3 X@diverge | |
66 | $ hg book -r 0 Y@diverge |
|
66 | $ hg book -r 0 Y@diverge | |
67 |
|
67 | |||
68 | $ hg tglog |
|
68 | $ hg tglog | |
69 | o 3: 'D' bookmarks: W X@diverge Z@diverge |
|
69 | o 3: 41acb9dca9eb 'D' bookmarks: W X@diverge Z@diverge | |
70 | | |
|
70 | | | |
71 | | @ 2: 'C' bookmarks: Y Z |
|
71 | | @ 2: 49cb3485fa0c 'C' bookmarks: Y Z | |
72 | | | |
|
72 | | | | |
73 | | o 1: 'B' bookmarks: X |
|
73 | | o 1: 6c81ed0049f8 'B' bookmarks: X | |
74 | |/ |
|
74 | |/ | |
75 | o 0: 'A' bookmarks: Y@diverge |
|
75 | o 0: 1994f17a630e 'A' bookmarks: Y@diverge | |
76 |
|
76 | |||
77 | $ hg rebase -s Y -d 3 |
|
77 | $ hg rebase -s Y -d 3 | |
78 | rebasing 2:49cb3485fa0c "C" (Y Z) |
|
78 | rebasing 2:49cb3485fa0c "C" (Y Z) | |
79 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/49cb3485fa0c-126f3e97-rebase.hg (glob) |
|
79 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/49cb3485fa0c-126f3e97-rebase.hg (glob) | |
80 |
|
80 | |||
81 | $ hg tglog |
|
81 | $ hg tglog | |
82 | @ 3: 'C' bookmarks: Y Z |
|
82 | @ 3: 17fb3faba63c 'C' bookmarks: Y Z | |
83 | | |
|
83 | | | |
84 | o 2: 'D' bookmarks: W X@diverge |
|
84 | o 2: 41acb9dca9eb 'D' bookmarks: W X@diverge | |
85 | | |
|
85 | | | |
86 | | o 1: 'B' bookmarks: X |
|
86 | | o 1: 6c81ed0049f8 'B' bookmarks: X | |
87 | |/ |
|
87 | |/ | |
88 | o 0: 'A' bookmarks: Y@diverge |
|
88 | o 0: 1994f17a630e 'A' bookmarks: Y@diverge | |
89 |
|
89 | |||
90 | Do not try to keep active but deleted divergent bookmark |
|
90 | Do not try to keep active but deleted divergent bookmark | |
91 |
|
91 | |||
92 | $ cd .. |
|
92 | $ cd .. | |
93 | $ hg clone -q a a4 |
|
93 | $ hg clone -q a a4 | |
94 |
|
94 | |||
95 | $ cd a4 |
|
95 | $ cd a4 | |
96 | $ hg up -q 2 |
|
96 | $ hg up -q 2 | |
97 | $ hg book W@diverge |
|
97 | $ hg book W@diverge | |
98 |
|
98 | |||
99 | $ hg rebase -s W -d . |
|
99 | $ hg rebase -s W -d . | |
100 | rebasing 3:41acb9dca9eb "D" (W tip) |
|
100 | rebasing 3:41acb9dca9eb "D" (W tip) | |
101 | saved backup bundle to $TESTTMP/a4/.hg/strip-backup/41acb9dca9eb-b35a6a63-rebase.hg (glob) |
|
101 | saved backup bundle to $TESTTMP/a4/.hg/strip-backup/41acb9dca9eb-b35a6a63-rebase.hg (glob) | |
102 |
|
102 | |||
103 | $ hg bookmarks |
|
103 | $ hg bookmarks | |
104 | W 3:0d3554f74897 |
|
104 | W 3:0d3554f74897 | |
105 | X 1:6c81ed0049f8 |
|
105 | X 1:6c81ed0049f8 | |
106 | Y 2:49cb3485fa0c |
|
106 | Y 2:49cb3485fa0c | |
107 | Z 2:49cb3485fa0c |
|
107 | Z 2:49cb3485fa0c | |
108 |
|
108 | |||
109 | Keep bookmarks to the correct rebased changeset |
|
109 | Keep bookmarks to the correct rebased changeset | |
110 |
|
110 | |||
111 | $ cd .. |
|
111 | $ cd .. | |
112 | $ hg clone -q a a2 |
|
112 | $ hg clone -q a a2 | |
113 |
|
113 | |||
114 | $ cd a2 |
|
114 | $ cd a2 | |
115 | $ hg up -q Z |
|
115 | $ hg up -q Z | |
116 |
|
116 | |||
117 | $ hg rebase -s 1 -d 3 |
|
117 | $ hg rebase -s 1 -d 3 | |
118 | rebasing 1:6c81ed0049f8 "B" (X) |
|
118 | rebasing 1:6c81ed0049f8 "B" (X) | |
119 | rebasing 2:49cb3485fa0c "C" (Y Z) |
|
119 | rebasing 2:49cb3485fa0c "C" (Y Z) | |
120 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/6c81ed0049f8-a687065f-rebase.hg (glob) |
|
120 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/6c81ed0049f8-a687065f-rebase.hg (glob) | |
121 |
|
121 | |||
122 | $ hg tglog |
|
122 | $ hg tglog | |
123 | @ 3: 'C' bookmarks: Y Z |
|
123 | @ 3: 3d5fa227f4b5 'C' bookmarks: Y Z | |
124 | | |
|
124 | | | |
125 | o 2: 'B' bookmarks: X |
|
125 | o 2: e926fccfa8ec 'B' bookmarks: X | |
126 | | |
|
126 | | | |
127 | o 1: 'D' bookmarks: W |
|
127 | o 1: 41acb9dca9eb 'D' bookmarks: W | |
128 | | |
|
128 | | | |
129 | o 0: 'A' bookmarks: |
|
129 | o 0: 1994f17a630e 'A' bookmarks: | |
130 |
|
130 | |||
131 |
|
131 | |||
132 | Keep active bookmark on the correct changeset |
|
132 | Keep active bookmark on the correct changeset | |
133 |
|
133 | |||
134 | $ cd .. |
|
134 | $ cd .. | |
135 | $ hg clone -q a a3 |
|
135 | $ hg clone -q a a3 | |
136 |
|
136 | |||
137 | $ cd a3 |
|
137 | $ cd a3 | |
138 | $ hg up -q X |
|
138 | $ hg up -q X | |
139 |
|
139 | |||
140 | $ hg rebase -d W |
|
140 | $ hg rebase -d W | |
141 | rebasing 1:6c81ed0049f8 "B" (X) |
|
141 | rebasing 1:6c81ed0049f8 "B" (X) | |
142 | rebasing 2:49cb3485fa0c "C" (Y Z) |
|
142 | rebasing 2:49cb3485fa0c "C" (Y Z) | |
143 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/6c81ed0049f8-a687065f-rebase.hg (glob) |
|
143 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/6c81ed0049f8-a687065f-rebase.hg (glob) | |
144 |
|
144 | |||
145 | $ hg tglog |
|
145 | $ hg tglog | |
146 | o 3: 'C' bookmarks: Y Z |
|
146 | o 3: 3d5fa227f4b5 'C' bookmarks: Y Z | |
147 | | |
|
147 | | | |
148 | @ 2: 'B' bookmarks: X |
|
148 | @ 2: e926fccfa8ec 'B' bookmarks: X | |
149 | | |
|
149 | | | |
150 | o 1: 'D' bookmarks: W |
|
150 | o 1: 41acb9dca9eb 'D' bookmarks: W | |
151 | | |
|
151 | | | |
152 | o 0: 'A' bookmarks: |
|
152 | o 0: 1994f17a630e 'A' bookmarks: | |
153 |
|
153 | |||
154 | $ hg bookmarks |
|
154 | $ hg bookmarks | |
155 | W 1:41acb9dca9eb |
|
155 | W 1:41acb9dca9eb | |
156 | * X 2:e926fccfa8ec |
|
156 | * X 2:e926fccfa8ec | |
157 | Y 3:3d5fa227f4b5 |
|
157 | Y 3:3d5fa227f4b5 | |
158 | Z 3:3d5fa227f4b5 |
|
158 | Z 3:3d5fa227f4b5 | |
159 |
|
159 | |||
160 | rebase --continue with bookmarks present (issue3802) |
|
160 | rebase --continue with bookmarks present (issue3802) | |
161 |
|
161 | |||
162 | $ hg up 2 |
|
162 | $ hg up 2 | |
163 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
163 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
164 | (leaving bookmark X) |
|
164 | (leaving bookmark X) | |
165 | $ echo 'C' > c |
|
165 | $ echo 'C' > c | |
166 | $ hg add c |
|
166 | $ hg add c | |
167 | $ hg ci -m 'other C' |
|
167 | $ hg ci -m 'other C' | |
168 | created new head |
|
168 | created new head | |
169 | $ hg up 3 |
|
169 | $ hg up 3 | |
170 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
170 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
171 | $ hg rebase --dest 4 |
|
171 | $ hg rebase --dest 4 | |
172 | rebasing 3:3d5fa227f4b5 "C" (Y Z) |
|
172 | rebasing 3:3d5fa227f4b5 "C" (Y Z) | |
173 | merging c |
|
173 | merging c | |
174 | warning: conflicts while merging c! (edit, then use 'hg resolve --mark') |
|
174 | warning: conflicts while merging c! (edit, then use 'hg resolve --mark') | |
175 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
175 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
176 | [1] |
|
176 | [1] | |
177 | $ echo 'c' > c |
|
177 | $ echo 'c' > c | |
178 | $ hg resolve --mark c |
|
178 | $ hg resolve --mark c | |
179 | (no more unresolved files) |
|
179 | (no more unresolved files) | |
180 | continue: hg rebase --continue |
|
180 | continue: hg rebase --continue | |
181 | $ hg rebase --continue |
|
181 | $ hg rebase --continue | |
182 | rebasing 3:3d5fa227f4b5 "C" (Y Z) |
|
182 | rebasing 3:3d5fa227f4b5 "C" (Y Z) | |
183 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/3d5fa227f4b5-c6ea2371-rebase.hg (glob) |
|
183 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/3d5fa227f4b5-c6ea2371-rebase.hg (glob) | |
184 | $ hg tglog |
|
184 | $ hg tglog | |
185 | @ 4: 'C' bookmarks: Y Z |
|
185 | @ 4: 45c0f0ec1203 'C' bookmarks: Y Z | |
186 | | |
|
186 | | | |
187 | o 3: 'other C' bookmarks: |
|
187 | o 3: b0e10b7175fd 'other C' bookmarks: | |
188 | | |
|
188 | | | |
189 | o 2: 'B' bookmarks: X |
|
189 | o 2: e926fccfa8ec 'B' bookmarks: X | |
190 | | |
|
190 | | | |
191 | o 1: 'D' bookmarks: W |
|
191 | o 1: 41acb9dca9eb 'D' bookmarks: W | |
192 | | |
|
192 | | | |
193 | o 0: 'A' bookmarks: |
|
193 | o 0: 1994f17a630e 'A' bookmarks: | |
194 |
|
194 | |||
195 |
|
195 | |||
196 | ensure that bookmarks given the names of revset functions can be used |
|
196 | ensure that bookmarks given the names of revset functions can be used | |
197 | as --rev arguments (issue3950) |
|
197 | as --rev arguments (issue3950) | |
198 |
|
198 | |||
199 | $ hg update -q 3 |
|
199 | $ hg update -q 3 | |
200 | $ echo bimble > bimble |
|
200 | $ echo bimble > bimble | |
201 | $ hg add bimble |
|
201 | $ hg add bimble | |
202 | $ hg commit -q -m 'bisect' |
|
202 | $ hg commit -q -m 'bisect' | |
203 | $ echo e >> bimble |
|
203 | $ echo e >> bimble | |
204 | $ hg ci -m bisect2 |
|
204 | $ hg ci -m bisect2 | |
205 | $ echo e >> bimble |
|
205 | $ echo e >> bimble | |
206 | $ hg ci -m bisect3 |
|
206 | $ hg ci -m bisect3 | |
207 | $ hg book bisect |
|
207 | $ hg book bisect | |
208 | $ hg update -q Y |
|
208 | $ hg update -q Y | |
209 | $ hg rebase -r '"bisect"^^::"bisect"^' -r bisect -d Z |
|
209 | $ hg rebase -r '"bisect"^^::"bisect"^' -r bisect -d Z | |
210 | rebasing 5:345c90f326a4 "bisect" |
|
210 | rebasing 5:345c90f326a4 "bisect" | |
211 | rebasing 6:f677a2907404 "bisect2" |
|
211 | rebasing 6:f677a2907404 "bisect2" | |
212 | rebasing 7:325c16001345 "bisect3" (bisect tip) |
|
212 | rebasing 7:325c16001345 "bisect3" (bisect tip) | |
213 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/345c90f326a4-b4840586-rebase.hg (glob) |
|
213 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/345c90f326a4-b4840586-rebase.hg (glob) | |
214 |
|
214 | |||
215 | Bookmark and working parent get moved even if --keep is set (issue5682) |
|
215 | Bookmark and working parent get moved even if --keep is set (issue5682) | |
216 |
|
216 | |||
217 | $ hg init $TESTTMP/book-keep |
|
217 | $ hg init $TESTTMP/book-keep | |
218 | $ cd $TESTTMP/book-keep |
|
218 | $ cd $TESTTMP/book-keep | |
219 | $ hg debugdrawdag <<'EOS' |
|
219 | $ hg debugdrawdag <<'EOS' | |
220 | > B C |
|
220 | > B C | |
221 | > |/ |
|
221 | > |/ | |
222 | > A |
|
222 | > A | |
223 | > EOS |
|
223 | > EOS | |
224 | $ eval `hg tags -T 'hg bookmark -ir {node} {tag};\n' | grep -v tip` |
|
224 | $ eval `hg tags -T 'hg bookmark -ir {node} {tag};\n' | grep -v tip` | |
225 | $ rm .hg/localtags |
|
225 | $ rm .hg/localtags | |
226 | $ hg up -q B |
|
226 | $ hg up -q B | |
227 | $ hg tglog |
|
227 | $ hg tglog | |
228 | o 2: 'C' bookmarks: C |
|
228 | o 2: dc0947a82db8 'C' bookmarks: C | |
229 | | |
|
229 | | | |
230 | | @ 1: 'B' bookmarks: B |
|
230 | | @ 1: 112478962961 'B' bookmarks: B | |
231 | |/ |
|
231 | |/ | |
232 | o 0: 'A' bookmarks: A |
|
232 | o 0: 426bada5c675 'A' bookmarks: A | |
233 |
|
233 | |||
234 | $ hg rebase -r B -d C --keep |
|
234 | $ hg rebase -r B -d C --keep | |
235 | rebasing 1:112478962961 "B" (B) |
|
235 | rebasing 1:112478962961 "B" (B) | |
236 | $ hg tglog |
|
236 | $ hg tglog | |
237 | @ 3: 'B' bookmarks: B |
|
237 | @ 3: 9769fc65c4c5 'B' bookmarks: B | |
238 | | |
|
238 | | | |
239 | o 2: 'C' bookmarks: C |
|
239 | o 2: dc0947a82db8 'C' bookmarks: C | |
240 | | |
|
240 | | | |
241 | | o 1: 'B' bookmarks: |
|
241 | | o 1: 112478962961 'B' bookmarks: | |
242 | |/ |
|
242 | |/ | |
243 | o 0: 'A' bookmarks: A |
|
243 | o 0: 426bada5c675 'A' bookmarks: A | |
244 |
|
244 | |||
245 |
|
245 |
@@ -1,857 +1,857 b'' | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > rebase= |
|
3 | > rebase= | |
4 | > mq= |
|
4 | > mq= | |
5 | > |
|
5 | > | |
6 | > [phases] |
|
6 | > [phases] | |
7 | > publish=False |
|
7 | > publish=False | |
8 | > |
|
8 | > | |
9 | > [alias] |
|
9 | > [alias] | |
10 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" |
|
10 | > tglog = log -G --template "{rev}: {node|short} '{desc}' {branches}\n" | |
11 | > tglogp = log -G --template "{rev}:{phase} '{desc}' {branches}\n" |
|
11 | > tglogp = log -G --template "{rev}: {node|short} {phase} '{desc}' {branches}\n" | |
12 | > EOF |
|
12 | > EOF | |
13 |
|
13 | |||
14 | Create repo a: |
|
14 | Create repo a: | |
15 |
|
15 | |||
16 | $ hg init a |
|
16 | $ hg init a | |
17 | $ cd a |
|
17 | $ cd a | |
18 | $ hg unbundle "$TESTDIR/bundles/rebase.hg" |
|
18 | $ hg unbundle "$TESTDIR/bundles/rebase.hg" | |
19 | adding changesets |
|
19 | adding changesets | |
20 | adding manifests |
|
20 | adding manifests | |
21 | adding file changes |
|
21 | adding file changes | |
22 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
22 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
23 | new changesets cd010b8cd998:02de42196ebe |
|
23 | new changesets cd010b8cd998:02de42196ebe | |
24 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
24 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
25 | $ hg up tip |
|
25 | $ hg up tip | |
26 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
26 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
27 |
|
27 | |||
28 | $ hg tglog |
|
28 | $ hg tglog | |
29 | @ 7: 'H' |
|
29 | @ 7: 02de42196ebe 'H' | |
30 | | |
|
30 | | | |
31 | | o 6: 'G' |
|
31 | | o 6: eea13746799a 'G' | |
32 | |/| |
|
32 | |/| | |
33 | o | 5: 'F' |
|
33 | o | 5: 24b6387c8c8c 'F' | |
34 | | | |
|
34 | | | | |
35 | | o 4: 'E' |
|
35 | | o 4: 9520eea781bc 'E' | |
36 | |/ |
|
36 | |/ | |
37 | | o 3: 'D' |
|
37 | | o 3: 32af7686d403 'D' | |
38 | | | |
|
38 | | | | |
39 | | o 2: 'C' |
|
39 | | o 2: 5fddd98957c8 'C' | |
40 | | | |
|
40 | | | | |
41 | | o 1: 'B' |
|
41 | | o 1: 42ccdea3bb16 'B' | |
42 | |/ |
|
42 | |/ | |
43 | o 0: 'A' |
|
43 | o 0: cd010b8cd998 'A' | |
44 |
|
44 | |||
45 | $ cd .. |
|
45 | $ cd .. | |
46 |
|
46 | |||
47 |
|
47 | |||
48 | Rebasing B onto H and collapsing changesets with different phases: |
|
48 | Rebasing B onto H and collapsing changesets with different phases: | |
49 |
|
49 | |||
50 |
|
50 | |||
51 | $ hg clone -q -u 3 a a1 |
|
51 | $ hg clone -q -u 3 a a1 | |
52 | $ cd a1 |
|
52 | $ cd a1 | |
53 |
|
53 | |||
54 | $ hg phase --force --secret 3 |
|
54 | $ hg phase --force --secret 3 | |
55 |
|
55 | |||
56 | $ cat > $TESTTMP/editor.sh <<EOF |
|
56 | $ cat > $TESTTMP/editor.sh <<EOF | |
57 | > echo "==== before editing" |
|
57 | > echo "==== before editing" | |
58 | > cat \$1 |
|
58 | > cat \$1 | |
59 | > echo "====" |
|
59 | > echo "====" | |
60 | > echo "edited manually" >> \$1 |
|
60 | > echo "edited manually" >> \$1 | |
61 | > EOF |
|
61 | > EOF | |
62 | $ HGEDITOR="sh $TESTTMP/editor.sh" hg rebase --collapse --keepbranches -e --dest 7 |
|
62 | $ HGEDITOR="sh $TESTTMP/editor.sh" hg rebase --collapse --keepbranches -e --dest 7 | |
63 | rebasing 1:42ccdea3bb16 "B" |
|
63 | rebasing 1:42ccdea3bb16 "B" | |
64 | rebasing 2:5fddd98957c8 "C" |
|
64 | rebasing 2:5fddd98957c8 "C" | |
65 | rebasing 3:32af7686d403 "D" |
|
65 | rebasing 3:32af7686d403 "D" | |
66 | ==== before editing |
|
66 | ==== before editing | |
67 | Collapsed revision |
|
67 | Collapsed revision | |
68 | * B |
|
68 | * B | |
69 | * C |
|
69 | * C | |
70 | * D |
|
70 | * D | |
71 |
|
71 | |||
72 |
|
72 | |||
73 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
73 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
74 | HG: Leave message empty to abort commit. |
|
74 | HG: Leave message empty to abort commit. | |
75 | HG: -- |
|
75 | HG: -- | |
76 | HG: user: Nicolas Dumazet <nicdumz.commits@gmail.com> |
|
76 | HG: user: Nicolas Dumazet <nicdumz.commits@gmail.com> | |
77 | HG: branch 'default' |
|
77 | HG: branch 'default' | |
78 | HG: added B |
|
78 | HG: added B | |
79 | HG: added C |
|
79 | HG: added C | |
80 | HG: added D |
|
80 | HG: added D | |
81 | ==== |
|
81 | ==== | |
82 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/42ccdea3bb16-3cb021d3-rebase.hg (glob) |
|
82 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/42ccdea3bb16-3cb021d3-rebase.hg (glob) | |
83 |
|
83 | |||
84 | $ hg tglogp |
|
84 | $ hg tglogp | |
85 | @ 5:secret 'Collapsed revision |
|
85 | @ 5: 30882080ba93 secret 'Collapsed revision | |
86 | | * B |
|
86 | | * B | |
87 | | * C |
|
87 | | * C | |
88 | | * D |
|
88 | | * D | |
89 | | |
|
89 | | | |
90 | | |
|
90 | | | |
91 | | edited manually' |
|
91 | | edited manually' | |
92 | o 4:draft 'H' |
|
92 | o 4: 02de42196ebe draft 'H' | |
93 | | |
|
93 | | | |
94 | | o 3:draft 'G' |
|
94 | | o 3: eea13746799a draft 'G' | |
95 | |/| |
|
95 | |/| | |
96 | o | 2:draft 'F' |
|
96 | o | 2: 24b6387c8c8c draft 'F' | |
97 | | | |
|
97 | | | | |
98 | | o 1:draft 'E' |
|
98 | | o 1: 9520eea781bc draft 'E' | |
99 | |/ |
|
99 | |/ | |
100 | o 0:draft 'A' |
|
100 | o 0: cd010b8cd998 draft 'A' | |
101 |
|
101 | |||
102 | $ hg manifest --rev tip |
|
102 | $ hg manifest --rev tip | |
103 | A |
|
103 | A | |
104 | B |
|
104 | B | |
105 | C |
|
105 | C | |
106 | D |
|
106 | D | |
107 | F |
|
107 | F | |
108 | H |
|
108 | H | |
109 |
|
109 | |||
110 | $ cd .. |
|
110 | $ cd .. | |
111 |
|
111 | |||
112 |
|
112 | |||
113 | Rebasing E onto H: |
|
113 | Rebasing E onto H: | |
114 |
|
114 | |||
115 | $ hg clone -q -u . a a2 |
|
115 | $ hg clone -q -u . a a2 | |
116 | $ cd a2 |
|
116 | $ cd a2 | |
117 |
|
117 | |||
118 | $ hg phase --force --secret 6 |
|
118 | $ hg phase --force --secret 6 | |
119 | $ hg rebase --source 4 --collapse --dest 7 |
|
119 | $ hg rebase --source 4 --collapse --dest 7 | |
120 | rebasing 4:9520eea781bc "E" |
|
120 | rebasing 4:9520eea781bc "E" | |
121 | rebasing 6:eea13746799a "G" |
|
121 | rebasing 6:eea13746799a "G" | |
122 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/9520eea781bc-fcd8edd4-rebase.hg (glob) |
|
122 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/9520eea781bc-fcd8edd4-rebase.hg (glob) | |
123 |
|
123 | |||
124 | $ hg tglog |
|
124 | $ hg tglog | |
125 | o 6: 'Collapsed revision |
|
125 | o 6: 7dd333a2d1e4 'Collapsed revision | |
126 | | * E |
|
126 | | * E | |
127 | | * G' |
|
127 | | * G' | |
128 | @ 5: 'H' |
|
128 | @ 5: 02de42196ebe 'H' | |
129 | | |
|
129 | | | |
130 | o 4: 'F' |
|
130 | o 4: 24b6387c8c8c 'F' | |
131 | | |
|
131 | | | |
132 | | o 3: 'D' |
|
132 | | o 3: 32af7686d403 'D' | |
133 | | | |
|
133 | | | | |
134 | | o 2: 'C' |
|
134 | | o 2: 5fddd98957c8 'C' | |
135 | | | |
|
135 | | | | |
136 | | o 1: 'B' |
|
136 | | o 1: 42ccdea3bb16 'B' | |
137 | |/ |
|
137 | |/ | |
138 | o 0: 'A' |
|
138 | o 0: cd010b8cd998 'A' | |
139 |
|
139 | |||
140 | $ hg manifest --rev tip |
|
140 | $ hg manifest --rev tip | |
141 | A |
|
141 | A | |
142 | E |
|
142 | E | |
143 | F |
|
143 | F | |
144 | H |
|
144 | H | |
145 |
|
145 | |||
146 | $ cd .. |
|
146 | $ cd .. | |
147 |
|
147 | |||
148 | Rebasing G onto H with custom message: |
|
148 | Rebasing G onto H with custom message: | |
149 |
|
149 | |||
150 | $ hg clone -q -u . a a3 |
|
150 | $ hg clone -q -u . a a3 | |
151 | $ cd a3 |
|
151 | $ cd a3 | |
152 |
|
152 | |||
153 | $ hg rebase --base 6 -m 'custom message' |
|
153 | $ hg rebase --base 6 -m 'custom message' | |
154 | abort: message can only be specified with collapse |
|
154 | abort: message can only be specified with collapse | |
155 | [255] |
|
155 | [255] | |
156 |
|
156 | |||
157 | $ cat > $TESTTMP/checkeditform.sh <<EOF |
|
157 | $ cat > $TESTTMP/checkeditform.sh <<EOF | |
158 | > env | grep HGEDITFORM |
|
158 | > env | grep HGEDITFORM | |
159 | > true |
|
159 | > true | |
160 | > EOF |
|
160 | > EOF | |
161 | $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg rebase --source 4 --collapse -m 'custom message' -e --dest 7 |
|
161 | $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg rebase --source 4 --collapse -m 'custom message' -e --dest 7 | |
162 | rebasing 4:9520eea781bc "E" |
|
162 | rebasing 4:9520eea781bc "E" | |
163 | rebasing 6:eea13746799a "G" |
|
163 | rebasing 6:eea13746799a "G" | |
164 | HGEDITFORM=rebase.collapse |
|
164 | HGEDITFORM=rebase.collapse | |
165 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/9520eea781bc-fcd8edd4-rebase.hg (glob) |
|
165 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/9520eea781bc-fcd8edd4-rebase.hg (glob) | |
166 |
|
166 | |||
167 | $ hg tglog |
|
167 | $ hg tglog | |
168 | o 6: 'custom message' |
|
168 | o 6: 38ed6a6b026b 'custom message' | |
169 | | |
|
169 | | | |
170 | @ 5: 'H' |
|
170 | @ 5: 02de42196ebe 'H' | |
171 | | |
|
171 | | | |
172 | o 4: 'F' |
|
172 | o 4: 24b6387c8c8c 'F' | |
173 | | |
|
173 | | | |
174 | | o 3: 'D' |
|
174 | | o 3: 32af7686d403 'D' | |
175 | | | |
|
175 | | | | |
176 | | o 2: 'C' |
|
176 | | o 2: 5fddd98957c8 'C' | |
177 | | | |
|
177 | | | | |
178 | | o 1: 'B' |
|
178 | | o 1: 42ccdea3bb16 'B' | |
179 | |/ |
|
179 | |/ | |
180 | o 0: 'A' |
|
180 | o 0: cd010b8cd998 'A' | |
181 |
|
181 | |||
182 | $ hg manifest --rev tip |
|
182 | $ hg manifest --rev tip | |
183 | A |
|
183 | A | |
184 | E |
|
184 | E | |
185 | F |
|
185 | F | |
186 | H |
|
186 | H | |
187 |
|
187 | |||
188 | $ cd .. |
|
188 | $ cd .. | |
189 |
|
189 | |||
190 | Create repo b: |
|
190 | Create repo b: | |
191 |
|
191 | |||
192 | $ hg init b |
|
192 | $ hg init b | |
193 | $ cd b |
|
193 | $ cd b | |
194 |
|
194 | |||
195 | $ echo A > A |
|
195 | $ echo A > A | |
196 | $ hg ci -Am A |
|
196 | $ hg ci -Am A | |
197 | adding A |
|
197 | adding A | |
198 | $ echo B > B |
|
198 | $ echo B > B | |
199 | $ hg ci -Am B |
|
199 | $ hg ci -Am B | |
200 | adding B |
|
200 | adding B | |
201 |
|
201 | |||
202 | $ hg up -q 0 |
|
202 | $ hg up -q 0 | |
203 |
|
203 | |||
204 | $ echo C > C |
|
204 | $ echo C > C | |
205 | $ hg ci -Am C |
|
205 | $ hg ci -Am C | |
206 | adding C |
|
206 | adding C | |
207 | created new head |
|
207 | created new head | |
208 |
|
208 | |||
209 | $ hg merge |
|
209 | $ hg merge | |
210 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
210 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
211 | (branch merge, don't forget to commit) |
|
211 | (branch merge, don't forget to commit) | |
212 |
|
212 | |||
213 | $ echo D > D |
|
213 | $ echo D > D | |
214 | $ hg ci -Am D |
|
214 | $ hg ci -Am D | |
215 | adding D |
|
215 | adding D | |
216 |
|
216 | |||
217 | $ hg up -q 1 |
|
217 | $ hg up -q 1 | |
218 |
|
218 | |||
219 | $ echo E > E |
|
219 | $ echo E > E | |
220 | $ hg ci -Am E |
|
220 | $ hg ci -Am E | |
221 | adding E |
|
221 | adding E | |
222 | created new head |
|
222 | created new head | |
223 |
|
223 | |||
224 | $ echo F > F |
|
224 | $ echo F > F | |
225 | $ hg ci -Am F |
|
225 | $ hg ci -Am F | |
226 | adding F |
|
226 | adding F | |
227 |
|
227 | |||
228 | $ hg merge |
|
228 | $ hg merge | |
229 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
229 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
230 | (branch merge, don't forget to commit) |
|
230 | (branch merge, don't forget to commit) | |
231 | $ hg ci -m G |
|
231 | $ hg ci -m G | |
232 |
|
232 | |||
233 | $ hg up -q 0 |
|
233 | $ hg up -q 0 | |
234 |
|
234 | |||
235 | $ echo H > H |
|
235 | $ echo H > H | |
236 | $ hg ci -Am H |
|
236 | $ hg ci -Am H | |
237 | adding H |
|
237 | adding H | |
238 | created new head |
|
238 | created new head | |
239 |
|
239 | |||
240 | $ hg tglog |
|
240 | $ hg tglog | |
241 | @ 7: 'H' |
|
241 | @ 7: c65502d41787 'H' | |
242 | | |
|
242 | | | |
243 | | o 6: 'G' |
|
243 | | o 6: c772a8b2dc17 'G' | |
244 | | |\ |
|
244 | | |\ | |
245 | | | o 5: 'F' |
|
245 | | | o 5: 7f219660301f 'F' | |
246 | | | | |
|
246 | | | | | |
247 | | | o 4: 'E' |
|
247 | | | o 4: 8a5212ebc852 'E' | |
248 | | | | |
|
248 | | | | | |
249 | | o | 3: 'D' |
|
249 | | o | 3: 2870ad076e54 'D' | |
250 | | |\| |
|
250 | | |\| | |
251 | | o | 2: 'C' |
|
251 | | o | 2: c5cefa58fd55 'C' | |
252 | |/ / |
|
252 | |/ / | |
253 | | o 1: 'B' |
|
253 | | o 1: 27547f69f254 'B' | |
254 | |/ |
|
254 | |/ | |
255 | o 0: 'A' |
|
255 | o 0: 4a2df7238c3b 'A' | |
256 |
|
256 | |||
257 | $ cd .. |
|
257 | $ cd .. | |
258 |
|
258 | |||
259 |
|
259 | |||
260 | Rebase and collapse - more than one external (fail): |
|
260 | Rebase and collapse - more than one external (fail): | |
261 |
|
261 | |||
262 | $ hg clone -q -u . b b1 |
|
262 | $ hg clone -q -u . b b1 | |
263 | $ cd b1 |
|
263 | $ cd b1 | |
264 |
|
264 | |||
265 | $ hg rebase -s 2 --dest 7 --collapse |
|
265 | $ hg rebase -s 2 --dest 7 --collapse | |
266 | abort: unable to collapse on top of 7, there is more than one external parent: 1, 5 |
|
266 | abort: unable to collapse on top of 7, there is more than one external parent: 1, 5 | |
267 | [255] |
|
267 | [255] | |
268 |
|
268 | |||
269 | Rebase and collapse - E onto H: |
|
269 | Rebase and collapse - E onto H: | |
270 |
|
270 | |||
271 | $ hg rebase -s 4 --dest 7 --collapse # root (4) is not a merge |
|
271 | $ hg rebase -s 4 --dest 7 --collapse # root (4) is not a merge | |
272 | rebasing 4:8a5212ebc852 "E" |
|
272 | rebasing 4:8a5212ebc852 "E" | |
273 | rebasing 5:7f219660301f "F" |
|
273 | rebasing 5:7f219660301f "F" | |
274 | rebasing 6:c772a8b2dc17 "G" |
|
274 | rebasing 6:c772a8b2dc17 "G" | |
275 | saved backup bundle to $TESTTMP/b1/.hg/strip-backup/8a5212ebc852-75046b61-rebase.hg (glob) |
|
275 | saved backup bundle to $TESTTMP/b1/.hg/strip-backup/8a5212ebc852-75046b61-rebase.hg (glob) | |
276 |
|
276 | |||
277 | $ hg tglog |
|
277 | $ hg tglog | |
278 | o 5: 'Collapsed revision |
|
278 | o 5: f97c4725bd99 'Collapsed revision | |
279 | |\ * E |
|
279 | |\ * E | |
280 | | | * F |
|
280 | | | * F | |
281 | | | * G' |
|
281 | | | * G' | |
282 | | @ 4: 'H' |
|
282 | | @ 4: c65502d41787 'H' | |
283 | | | |
|
283 | | | | |
284 | o | 3: 'D' |
|
284 | o | 3: 2870ad076e54 'D' | |
285 | |\ \ |
|
285 | |\ \ | |
286 | | o | 2: 'C' |
|
286 | | o | 2: c5cefa58fd55 'C' | |
287 | | |/ |
|
287 | | |/ | |
288 | o / 1: 'B' |
|
288 | o / 1: 27547f69f254 'B' | |
289 | |/ |
|
289 | |/ | |
290 | o 0: 'A' |
|
290 | o 0: 4a2df7238c3b 'A' | |
291 |
|
291 | |||
292 | $ hg manifest --rev tip |
|
292 | $ hg manifest --rev tip | |
293 | A |
|
293 | A | |
294 | C |
|
294 | C | |
295 | D |
|
295 | D | |
296 | E |
|
296 | E | |
297 | F |
|
297 | F | |
298 | H |
|
298 | H | |
299 |
|
299 | |||
300 | $ cd .. |
|
300 | $ cd .. | |
301 |
|
301 | |||
302 |
|
302 | |||
303 |
|
303 | |||
304 |
|
304 | |||
305 | Test that branchheads cache is updated correctly when doing a strip in which |
|
305 | Test that branchheads cache is updated correctly when doing a strip in which | |
306 | the parent of the ancestor node to be stripped does not become a head and also, |
|
306 | the parent of the ancestor node to be stripped does not become a head and also, | |
307 | the parent of a node that is a child of the node stripped becomes a head (node |
|
307 | the parent of a node that is a child of the node stripped becomes a head (node | |
308 | 3). The code is now much simpler and we could just test a simpler scenario |
|
308 | 3). The code is now much simpler and we could just test a simpler scenario | |
309 | We keep it the test this way in case new complexity is injected. |
|
309 | We keep it the test this way in case new complexity is injected. | |
310 |
|
310 | |||
311 | $ hg clone -q -u . b b2 |
|
311 | $ hg clone -q -u . b b2 | |
312 | $ cd b2 |
|
312 | $ cd b2 | |
313 |
|
313 | |||
314 | $ hg heads --template="{rev}:{node} {branch}\n" |
|
314 | $ hg heads --template="{rev}:{node} {branch}\n" | |
315 | 7:c65502d4178782309ce0574c5ae6ee9485a9bafa default |
|
315 | 7:c65502d4178782309ce0574c5ae6ee9485a9bafa default | |
316 | 6:c772a8b2dc17629cec88a19d09c926c4814b12c7 default |
|
316 | 6:c772a8b2dc17629cec88a19d09c926c4814b12c7 default | |
317 |
|
317 | |||
318 | $ cat $TESTTMP/b2/.hg/cache/branch2-served |
|
318 | $ cat $TESTTMP/b2/.hg/cache/branch2-served | |
319 | c65502d4178782309ce0574c5ae6ee9485a9bafa 7 |
|
319 | c65502d4178782309ce0574c5ae6ee9485a9bafa 7 | |
320 | c772a8b2dc17629cec88a19d09c926c4814b12c7 o default |
|
320 | c772a8b2dc17629cec88a19d09c926c4814b12c7 o default | |
321 | c65502d4178782309ce0574c5ae6ee9485a9bafa o default |
|
321 | c65502d4178782309ce0574c5ae6ee9485a9bafa o default | |
322 |
|
322 | |||
323 | $ hg strip 4 |
|
323 | $ hg strip 4 | |
324 | saved backup bundle to $TESTTMP/b2/.hg/strip-backup/8a5212ebc852-75046b61-backup.hg (glob) |
|
324 | saved backup bundle to $TESTTMP/b2/.hg/strip-backup/8a5212ebc852-75046b61-backup.hg (glob) | |
325 |
|
325 | |||
326 | $ cat $TESTTMP/b2/.hg/cache/branch2-served |
|
326 | $ cat $TESTTMP/b2/.hg/cache/branch2-served | |
327 | c65502d4178782309ce0574c5ae6ee9485a9bafa 4 |
|
327 | c65502d4178782309ce0574c5ae6ee9485a9bafa 4 | |
328 | 2870ad076e541e714f3c2bc32826b5c6a6e5b040 o default |
|
328 | 2870ad076e541e714f3c2bc32826b5c6a6e5b040 o default | |
329 | c65502d4178782309ce0574c5ae6ee9485a9bafa o default |
|
329 | c65502d4178782309ce0574c5ae6ee9485a9bafa o default | |
330 |
|
330 | |||
331 | $ hg heads --template="{rev}:{node} {branch}\n" |
|
331 | $ hg heads --template="{rev}:{node} {branch}\n" | |
332 | 4:c65502d4178782309ce0574c5ae6ee9485a9bafa default |
|
332 | 4:c65502d4178782309ce0574c5ae6ee9485a9bafa default | |
333 | 3:2870ad076e541e714f3c2bc32826b5c6a6e5b040 default |
|
333 | 3:2870ad076e541e714f3c2bc32826b5c6a6e5b040 default | |
334 |
|
334 | |||
335 | $ cd .. |
|
335 | $ cd .. | |
336 |
|
336 | |||
337 |
|
337 | |||
338 |
|
338 | |||
339 |
|
339 | |||
340 |
|
340 | |||
341 |
|
341 | |||
342 | Create repo c: |
|
342 | Create repo c: | |
343 |
|
343 | |||
344 | $ hg init c |
|
344 | $ hg init c | |
345 | $ cd c |
|
345 | $ cd c | |
346 |
|
346 | |||
347 | $ echo A > A |
|
347 | $ echo A > A | |
348 | $ hg ci -Am A |
|
348 | $ hg ci -Am A | |
349 | adding A |
|
349 | adding A | |
350 | $ echo B > B |
|
350 | $ echo B > B | |
351 | $ hg ci -Am B |
|
351 | $ hg ci -Am B | |
352 | adding B |
|
352 | adding B | |
353 |
|
353 | |||
354 | $ hg up -q 0 |
|
354 | $ hg up -q 0 | |
355 |
|
355 | |||
356 | $ echo C > C |
|
356 | $ echo C > C | |
357 | $ hg ci -Am C |
|
357 | $ hg ci -Am C | |
358 | adding C |
|
358 | adding C | |
359 | created new head |
|
359 | created new head | |
360 |
|
360 | |||
361 | $ hg merge |
|
361 | $ hg merge | |
362 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
362 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
363 | (branch merge, don't forget to commit) |
|
363 | (branch merge, don't forget to commit) | |
364 |
|
364 | |||
365 | $ echo D > D |
|
365 | $ echo D > D | |
366 | $ hg ci -Am D |
|
366 | $ hg ci -Am D | |
367 | adding D |
|
367 | adding D | |
368 |
|
368 | |||
369 | $ hg up -q 1 |
|
369 | $ hg up -q 1 | |
370 |
|
370 | |||
371 | $ echo E > E |
|
371 | $ echo E > E | |
372 | $ hg ci -Am E |
|
372 | $ hg ci -Am E | |
373 | adding E |
|
373 | adding E | |
374 | created new head |
|
374 | created new head | |
375 | $ echo F > E |
|
375 | $ echo F > E | |
376 | $ hg ci -m 'F' |
|
376 | $ hg ci -m 'F' | |
377 |
|
377 | |||
378 | $ echo G > G |
|
378 | $ echo G > G | |
379 | $ hg ci -Am G |
|
379 | $ hg ci -Am G | |
380 | adding G |
|
380 | adding G | |
381 |
|
381 | |||
382 | $ hg merge |
|
382 | $ hg merge | |
383 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
383 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
384 | (branch merge, don't forget to commit) |
|
384 | (branch merge, don't forget to commit) | |
385 |
|
385 | |||
386 | $ hg ci -m H |
|
386 | $ hg ci -m H | |
387 |
|
387 | |||
388 | $ hg up -q 0 |
|
388 | $ hg up -q 0 | |
389 |
|
389 | |||
390 | $ echo I > I |
|
390 | $ echo I > I | |
391 | $ hg ci -Am I |
|
391 | $ hg ci -Am I | |
392 | adding I |
|
392 | adding I | |
393 | created new head |
|
393 | created new head | |
394 |
|
394 | |||
395 | $ hg tglog |
|
395 | $ hg tglog | |
396 | @ 8: 'I' |
|
396 | @ 8: 46d6f0e29c20 'I' | |
397 | | |
|
397 | | | |
398 | | o 7: 'H' |
|
398 | | o 7: 417d3b648079 'H' | |
399 | | |\ |
|
399 | | |\ | |
400 | | | o 6: 'G' |
|
400 | | | o 6: 55a44ad28289 'G' | |
401 | | | | |
|
401 | | | | | |
402 | | | o 5: 'F' |
|
402 | | | o 5: dca5924bb570 'F' | |
403 | | | | |
|
403 | | | | | |
404 | | | o 4: 'E' |
|
404 | | | o 4: 8a5212ebc852 'E' | |
405 | | | | |
|
405 | | | | | |
406 | | o | 3: 'D' |
|
406 | | o | 3: 2870ad076e54 'D' | |
407 | | |\| |
|
407 | | |\| | |
408 | | o | 2: 'C' |
|
408 | | o | 2: c5cefa58fd55 'C' | |
409 | |/ / |
|
409 | |/ / | |
410 | | o 1: 'B' |
|
410 | | o 1: 27547f69f254 'B' | |
411 | |/ |
|
411 | |/ | |
412 | o 0: 'A' |
|
412 | o 0: 4a2df7238c3b 'A' | |
413 |
|
413 | |||
414 | $ cd .. |
|
414 | $ cd .. | |
415 |
|
415 | |||
416 |
|
416 | |||
417 | Rebase and collapse - E onto I: |
|
417 | Rebase and collapse - E onto I: | |
418 |
|
418 | |||
419 | $ hg clone -q -u . c c1 |
|
419 | $ hg clone -q -u . c c1 | |
420 | $ cd c1 |
|
420 | $ cd c1 | |
421 |
|
421 | |||
422 | $ hg rebase -s 4 --dest 8 --collapse # root (4) is not a merge |
|
422 | $ hg rebase -s 4 --dest 8 --collapse # root (4) is not a merge | |
423 | rebasing 4:8a5212ebc852 "E" |
|
423 | rebasing 4:8a5212ebc852 "E" | |
424 | rebasing 5:dca5924bb570 "F" |
|
424 | rebasing 5:dca5924bb570 "F" | |
425 | merging E |
|
425 | merging E | |
426 | rebasing 6:55a44ad28289 "G" |
|
426 | rebasing 6:55a44ad28289 "G" | |
427 | rebasing 7:417d3b648079 "H" |
|
427 | rebasing 7:417d3b648079 "H" | |
428 | saved backup bundle to $TESTTMP/c1/.hg/strip-backup/8a5212ebc852-f95d0879-rebase.hg (glob) |
|
428 | saved backup bundle to $TESTTMP/c1/.hg/strip-backup/8a5212ebc852-f95d0879-rebase.hg (glob) | |
429 |
|
429 | |||
430 | $ hg tglog |
|
430 | $ hg tglog | |
431 | o 5: 'Collapsed revision |
|
431 | o 5: 340b34a63b39 'Collapsed revision | |
432 | |\ * E |
|
432 | |\ * E | |
433 | | | * F |
|
433 | | | * F | |
434 | | | * G |
|
434 | | | * G | |
435 | | | * H' |
|
435 | | | * H' | |
436 | | @ 4: 'I' |
|
436 | | @ 4: 46d6f0e29c20 'I' | |
437 | | | |
|
437 | | | | |
438 | o | 3: 'D' |
|
438 | o | 3: 2870ad076e54 'D' | |
439 | |\ \ |
|
439 | |\ \ | |
440 | | o | 2: 'C' |
|
440 | | o | 2: c5cefa58fd55 'C' | |
441 | | |/ |
|
441 | | |/ | |
442 | o / 1: 'B' |
|
442 | o / 1: 27547f69f254 'B' | |
443 | |/ |
|
443 | |/ | |
444 | o 0: 'A' |
|
444 | o 0: 4a2df7238c3b 'A' | |
445 |
|
445 | |||
446 | $ hg manifest --rev tip |
|
446 | $ hg manifest --rev tip | |
447 | A |
|
447 | A | |
448 | C |
|
448 | C | |
449 | D |
|
449 | D | |
450 | E |
|
450 | E | |
451 | G |
|
451 | G | |
452 | I |
|
452 | I | |
453 |
|
453 | |||
454 | $ hg up tip -q |
|
454 | $ hg up tip -q | |
455 | $ cat E |
|
455 | $ cat E | |
456 | F |
|
456 | F | |
457 |
|
457 | |||
458 | $ cd .. |
|
458 | $ cd .. | |
459 |
|
459 | |||
460 |
|
460 | |||
461 | Create repo d: |
|
461 | Create repo d: | |
462 |
|
462 | |||
463 | $ hg init d |
|
463 | $ hg init d | |
464 | $ cd d |
|
464 | $ cd d | |
465 |
|
465 | |||
466 | $ echo A > A |
|
466 | $ echo A > A | |
467 | $ hg ci -Am A |
|
467 | $ hg ci -Am A | |
468 | adding A |
|
468 | adding A | |
469 | $ echo B > B |
|
469 | $ echo B > B | |
470 | $ hg ci -Am B |
|
470 | $ hg ci -Am B | |
471 | adding B |
|
471 | adding B | |
472 | $ echo C > C |
|
472 | $ echo C > C | |
473 | $ hg ci -Am C |
|
473 | $ hg ci -Am C | |
474 | adding C |
|
474 | adding C | |
475 |
|
475 | |||
476 | $ hg up -q 1 |
|
476 | $ hg up -q 1 | |
477 |
|
477 | |||
478 | $ echo D > D |
|
478 | $ echo D > D | |
479 | $ hg ci -Am D |
|
479 | $ hg ci -Am D | |
480 | adding D |
|
480 | adding D | |
481 | created new head |
|
481 | created new head | |
482 | $ hg merge |
|
482 | $ hg merge | |
483 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
483 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
484 | (branch merge, don't forget to commit) |
|
484 | (branch merge, don't forget to commit) | |
485 |
|
485 | |||
486 | $ hg ci -m E |
|
486 | $ hg ci -m E | |
487 |
|
487 | |||
488 | $ hg up -q 0 |
|
488 | $ hg up -q 0 | |
489 |
|
489 | |||
490 | $ echo F > F |
|
490 | $ echo F > F | |
491 | $ hg ci -Am F |
|
491 | $ hg ci -Am F | |
492 | adding F |
|
492 | adding F | |
493 | created new head |
|
493 | created new head | |
494 |
|
494 | |||
495 | $ hg tglog |
|
495 | $ hg tglog | |
496 | @ 5: 'F' |
|
496 | @ 5: c137c2b8081f 'F' | |
497 | | |
|
497 | | | |
498 | | o 4: 'E' |
|
498 | | o 4: 0a42590ed746 'E' | |
499 | | |\ |
|
499 | | |\ | |
500 | | | o 3: 'D' |
|
500 | | | o 3: 7bbcd6078bcc 'D' | |
501 | | | | |
|
501 | | | | | |
502 | | o | 2: 'C' |
|
502 | | o | 2: f838bfaca5c7 'C' | |
503 | | |/ |
|
503 | | |/ | |
504 | | o 1: 'B' |
|
504 | | o 1: 27547f69f254 'B' | |
505 | |/ |
|
505 | |/ | |
506 | o 0: 'A' |
|
506 | o 0: 4a2df7238c3b 'A' | |
507 |
|
507 | |||
508 | $ cd .. |
|
508 | $ cd .. | |
509 |
|
509 | |||
510 |
|
510 | |||
511 | Rebase and collapse - B onto F: |
|
511 | Rebase and collapse - B onto F: | |
512 |
|
512 | |||
513 | $ hg clone -q -u . d d1 |
|
513 | $ hg clone -q -u . d d1 | |
514 | $ cd d1 |
|
514 | $ cd d1 | |
515 |
|
515 | |||
516 | $ hg rebase -s 1 --collapse --dest 5 |
|
516 | $ hg rebase -s 1 --collapse --dest 5 | |
517 | rebasing 1:27547f69f254 "B" |
|
517 | rebasing 1:27547f69f254 "B" | |
518 | rebasing 2:f838bfaca5c7 "C" |
|
518 | rebasing 2:f838bfaca5c7 "C" | |
519 | rebasing 3:7bbcd6078bcc "D" |
|
519 | rebasing 3:7bbcd6078bcc "D" | |
520 | rebasing 4:0a42590ed746 "E" |
|
520 | rebasing 4:0a42590ed746 "E" | |
521 | saved backup bundle to $TESTTMP/d1/.hg/strip-backup/27547f69f254-9a3f7d92-rebase.hg (glob) |
|
521 | saved backup bundle to $TESTTMP/d1/.hg/strip-backup/27547f69f254-9a3f7d92-rebase.hg (glob) | |
522 |
|
522 | |||
523 | $ hg tglog |
|
523 | $ hg tglog | |
524 | o 2: 'Collapsed revision |
|
524 | o 2: b72eaccb283f 'Collapsed revision | |
525 | | * B |
|
525 | | * B | |
526 | | * C |
|
526 | | * C | |
527 | | * D |
|
527 | | * D | |
528 | | * E' |
|
528 | | * E' | |
529 | @ 1: 'F' |
|
529 | @ 1: c137c2b8081f 'F' | |
530 | | |
|
530 | | | |
531 | o 0: 'A' |
|
531 | o 0: 4a2df7238c3b 'A' | |
532 |
|
532 | |||
533 | $ hg manifest --rev tip |
|
533 | $ hg manifest --rev tip | |
534 | A |
|
534 | A | |
535 | B |
|
535 | B | |
536 | C |
|
536 | C | |
537 | D |
|
537 | D | |
538 | F |
|
538 | F | |
539 |
|
539 | |||
540 | Interactions between collapse and keepbranches |
|
540 | Interactions between collapse and keepbranches | |
541 | $ cd .. |
|
541 | $ cd .. | |
542 | $ hg init e |
|
542 | $ hg init e | |
543 | $ cd e |
|
543 | $ cd e | |
544 | $ echo 'a' > a |
|
544 | $ echo 'a' > a | |
545 | $ hg ci -Am 'A' |
|
545 | $ hg ci -Am 'A' | |
546 | adding a |
|
546 | adding a | |
547 |
|
547 | |||
548 | $ hg branch 'one' |
|
548 | $ hg branch 'one' | |
549 | marked working directory as branch one |
|
549 | marked working directory as branch one | |
550 | (branches are permanent and global, did you want a bookmark?) |
|
550 | (branches are permanent and global, did you want a bookmark?) | |
551 | $ echo 'b' > b |
|
551 | $ echo 'b' > b | |
552 | $ hg ci -Am 'B' |
|
552 | $ hg ci -Am 'B' | |
553 | adding b |
|
553 | adding b | |
554 |
|
554 | |||
555 | $ hg branch 'two' |
|
555 | $ hg branch 'two' | |
556 | marked working directory as branch two |
|
556 | marked working directory as branch two | |
557 | $ echo 'c' > c |
|
557 | $ echo 'c' > c | |
558 | $ hg ci -Am 'C' |
|
558 | $ hg ci -Am 'C' | |
559 | adding c |
|
559 | adding c | |
560 |
|
560 | |||
561 | $ hg up -q 0 |
|
561 | $ hg up -q 0 | |
562 | $ echo 'd' > d |
|
562 | $ echo 'd' > d | |
563 | $ hg ci -Am 'D' |
|
563 | $ hg ci -Am 'D' | |
564 | adding d |
|
564 | adding d | |
565 |
|
565 | |||
566 | $ hg tglog |
|
566 | $ hg tglog | |
567 | @ 3: 'D' |
|
567 | @ 3: 41acb9dca9eb 'D' | |
568 | | |
|
568 | | | |
569 | | o 2: 'C' two |
|
569 | | o 2: 8ac4a08debf1 'C' two | |
570 | | | |
|
570 | | | | |
571 | | o 1: 'B' one |
|
571 | | o 1: 1ba175478953 'B' one | |
572 | |/ |
|
572 | |/ | |
573 | o 0: 'A' |
|
573 | o 0: 1994f17a630e 'A' | |
574 |
|
574 | |||
575 | $ hg rebase --keepbranches --collapse -s 1 -d 3 |
|
575 | $ hg rebase --keepbranches --collapse -s 1 -d 3 | |
576 | abort: cannot collapse multiple named branches |
|
576 | abort: cannot collapse multiple named branches | |
577 | [255] |
|
577 | [255] | |
578 |
|
578 | |||
579 | $ repeatchange() { |
|
579 | $ repeatchange() { | |
580 | > hg checkout $1 |
|
580 | > hg checkout $1 | |
581 | > hg cp d z |
|
581 | > hg cp d z | |
582 | > echo blah >> z |
|
582 | > echo blah >> z | |
583 | > hg commit -Am "$2" --user "$3" |
|
583 | > hg commit -Am "$2" --user "$3" | |
584 | > } |
|
584 | > } | |
585 | $ repeatchange 3 "E" "user1" |
|
585 | $ repeatchange 3 "E" "user1" | |
586 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
586 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
587 | $ repeatchange 3 "E" "user2" |
|
587 | $ repeatchange 3 "E" "user2" | |
588 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
588 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
589 | created new head |
|
589 | created new head | |
590 | $ hg tglog |
|
590 | $ hg tglog | |
591 | @ 5: 'E' |
|
591 | @ 5: fbfb97b1089a 'E' | |
592 | | |
|
592 | | | |
593 | | o 4: 'E' |
|
593 | | o 4: f338eb3c2c7c 'E' | |
594 | |/ |
|
594 | |/ | |
595 | o 3: 'D' |
|
595 | o 3: 41acb9dca9eb 'D' | |
596 | | |
|
596 | | | |
597 | | o 2: 'C' two |
|
597 | | o 2: 8ac4a08debf1 'C' two | |
598 | | | |
|
598 | | | | |
599 | | o 1: 'B' one |
|
599 | | o 1: 1ba175478953 'B' one | |
600 | |/ |
|
600 | |/ | |
601 | o 0: 'A' |
|
601 | o 0: 1994f17a630e 'A' | |
602 |
|
602 | |||
603 | $ hg rebase -s 5 -d 4 |
|
603 | $ hg rebase -s 5 -d 4 | |
604 | rebasing 5:fbfb97b1089a "E" (tip) |
|
604 | rebasing 5:fbfb97b1089a "E" (tip) | |
605 | note: rebase of 5:fbfb97b1089a created no changes to commit |
|
605 | note: rebase of 5:fbfb97b1089a created no changes to commit | |
606 | saved backup bundle to $TESTTMP/e/.hg/strip-backup/fbfb97b1089a-553e1d85-rebase.hg (glob) |
|
606 | saved backup bundle to $TESTTMP/e/.hg/strip-backup/fbfb97b1089a-553e1d85-rebase.hg (glob) | |
607 | $ hg tglog |
|
607 | $ hg tglog | |
608 | @ 4: 'E' |
|
608 | @ 4: f338eb3c2c7c 'E' | |
609 | | |
|
609 | | | |
610 | o 3: 'D' |
|
610 | o 3: 41acb9dca9eb 'D' | |
611 | | |
|
611 | | | |
612 | | o 2: 'C' two |
|
612 | | o 2: 8ac4a08debf1 'C' two | |
613 | | | |
|
613 | | | | |
614 | | o 1: 'B' one |
|
614 | | o 1: 1ba175478953 'B' one | |
615 | |/ |
|
615 | |/ | |
616 | o 0: 'A' |
|
616 | o 0: 1994f17a630e 'A' | |
617 |
|
617 | |||
618 | $ hg export tip |
|
618 | $ hg export tip | |
619 | # HG changeset patch |
|
619 | # HG changeset patch | |
620 | # User user1 |
|
620 | # User user1 | |
621 | # Date 0 0 |
|
621 | # Date 0 0 | |
622 | # Thu Jan 01 00:00:00 1970 +0000 |
|
622 | # Thu Jan 01 00:00:00 1970 +0000 | |
623 | # Node ID f338eb3c2c7cc5b5915676a2376ba7ac558c5213 |
|
623 | # Node ID f338eb3c2c7cc5b5915676a2376ba7ac558c5213 | |
624 | # Parent 41acb9dca9eb976e84cd21fcb756b4afa5a35c09 |
|
624 | # Parent 41acb9dca9eb976e84cd21fcb756b4afa5a35c09 | |
625 | E |
|
625 | E | |
626 |
|
626 | |||
627 | diff -r 41acb9dca9eb -r f338eb3c2c7c z |
|
627 | diff -r 41acb9dca9eb -r f338eb3c2c7c z | |
628 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
628 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
629 | +++ b/z Thu Jan 01 00:00:00 1970 +0000 |
|
629 | +++ b/z Thu Jan 01 00:00:00 1970 +0000 | |
630 | @@ -0,0 +1,2 @@ |
|
630 | @@ -0,0 +1,2 @@ | |
631 | +d |
|
631 | +d | |
632 | +blah |
|
632 | +blah | |
633 |
|
633 | |||
634 | $ cd .. |
|
634 | $ cd .. | |
635 |
|
635 | |||
636 | Rebase, collapse and copies |
|
636 | Rebase, collapse and copies | |
637 |
|
637 | |||
638 | $ hg init copies |
|
638 | $ hg init copies | |
639 | $ cd copies |
|
639 | $ cd copies | |
640 | $ hg unbundle "$TESTDIR/bundles/renames.hg" |
|
640 | $ hg unbundle "$TESTDIR/bundles/renames.hg" | |
641 | adding changesets |
|
641 | adding changesets | |
642 | adding manifests |
|
642 | adding manifests | |
643 | adding file changes |
|
643 | adding file changes | |
644 | added 4 changesets with 11 changes to 7 files (+1 heads) |
|
644 | added 4 changesets with 11 changes to 7 files (+1 heads) | |
645 | new changesets f447d5abf5ea:338e84e2e558 |
|
645 | new changesets f447d5abf5ea:338e84e2e558 | |
646 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
646 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
647 | $ hg up -q tip |
|
647 | $ hg up -q tip | |
648 | $ hg tglog |
|
648 | $ hg tglog | |
649 | @ 3: 'move2' |
|
649 | @ 3: 338e84e2e558 'move2' | |
650 | | |
|
650 | | | |
651 | o 2: 'move1' |
|
651 | o 2: 6e7340ee38c0 'move1' | |
652 | | |
|
652 | | | |
653 | | o 1: 'change' |
|
653 | | o 1: 1352765a01d4 'change' | |
654 | |/ |
|
654 | |/ | |
655 | o 0: 'add' |
|
655 | o 0: f447d5abf5ea 'add' | |
656 |
|
656 | |||
657 | $ hg rebase --collapse -d 1 |
|
657 | $ hg rebase --collapse -d 1 | |
658 | rebasing 2:6e7340ee38c0 "move1" |
|
658 | rebasing 2:6e7340ee38c0 "move1" | |
659 | merging a and d to d |
|
659 | merging a and d to d | |
660 | merging b and e to e |
|
660 | merging b and e to e | |
661 | merging c and f to f |
|
661 | merging c and f to f | |
662 | rebasing 3:338e84e2e558 "move2" (tip) |
|
662 | rebasing 3:338e84e2e558 "move2" (tip) | |
663 | merging f and c to c |
|
663 | merging f and c to c | |
664 | merging e and g to g |
|
664 | merging e and g to g | |
665 | saved backup bundle to $TESTTMP/copies/.hg/strip-backup/6e7340ee38c0-ef8ef003-rebase.hg (glob) |
|
665 | saved backup bundle to $TESTTMP/copies/.hg/strip-backup/6e7340ee38c0-ef8ef003-rebase.hg (glob) | |
666 | $ hg st |
|
666 | $ hg st | |
667 | $ hg st --copies --change tip |
|
667 | $ hg st --copies --change tip | |
668 | A d |
|
668 | A d | |
669 | a |
|
669 | a | |
670 | A g |
|
670 | A g | |
671 | b |
|
671 | b | |
672 | R b |
|
672 | R b | |
673 | $ hg up tip -q |
|
673 | $ hg up tip -q | |
674 | $ cat c |
|
674 | $ cat c | |
675 | c |
|
675 | c | |
676 | c |
|
676 | c | |
677 | $ cat d |
|
677 | $ cat d | |
678 | a |
|
678 | a | |
679 | a |
|
679 | a | |
680 | $ cat g |
|
680 | $ cat g | |
681 | b |
|
681 | b | |
682 | b |
|
682 | b | |
683 | $ hg log -r . --template "{file_copies}\n" |
|
683 | $ hg log -r . --template "{file_copies}\n" | |
684 | d (a)g (b) |
|
684 | d (a)g (b) | |
685 |
|
685 | |||
686 | Test collapsing a middle revision in-place |
|
686 | Test collapsing a middle revision in-place | |
687 |
|
687 | |||
688 | $ hg tglog |
|
688 | $ hg tglog | |
689 | @ 2: 'Collapsed revision |
|
689 | @ 2: 64b456429f67 'Collapsed revision | |
690 | | * move1 |
|
690 | | * move1 | |
691 | | * move2' |
|
691 | | * move2' | |
692 | o 1: 'change' |
|
692 | o 1: 1352765a01d4 'change' | |
693 | | |
|
693 | | | |
694 | o 0: 'add' |
|
694 | o 0: f447d5abf5ea 'add' | |
695 |
|
695 | |||
696 | $ hg rebase --collapse -r 1 -d 0 |
|
696 | $ hg rebase --collapse -r 1 -d 0 | |
697 | abort: can't remove original changesets with unrebased descendants |
|
697 | abort: can't remove original changesets with unrebased descendants | |
698 | (use --keep to keep original changesets) |
|
698 | (use --keep to keep original changesets) | |
699 | [255] |
|
699 | [255] | |
700 |
|
700 | |||
701 | Test collapsing in place |
|
701 | Test collapsing in place | |
702 |
|
702 | |||
703 | $ hg rebase --collapse -b . -d 0 |
|
703 | $ hg rebase --collapse -b . -d 0 | |
704 | rebasing 1:1352765a01d4 "change" |
|
704 | rebasing 1:1352765a01d4 "change" | |
705 | rebasing 2:64b456429f67 "Collapsed revision" (tip) |
|
705 | rebasing 2:64b456429f67 "Collapsed revision" (tip) | |
706 | saved backup bundle to $TESTTMP/copies/.hg/strip-backup/1352765a01d4-45a352ea-rebase.hg (glob) |
|
706 | saved backup bundle to $TESTTMP/copies/.hg/strip-backup/1352765a01d4-45a352ea-rebase.hg (glob) | |
707 | $ hg st --change tip --copies |
|
707 | $ hg st --change tip --copies | |
708 | M a |
|
708 | M a | |
709 | M c |
|
709 | M c | |
710 | A d |
|
710 | A d | |
711 | a |
|
711 | a | |
712 | A g |
|
712 | A g | |
713 | b |
|
713 | b | |
714 | R b |
|
714 | R b | |
715 | $ hg up tip -q |
|
715 | $ hg up tip -q | |
716 | $ cat a |
|
716 | $ cat a | |
717 | a |
|
717 | a | |
718 | a |
|
718 | a | |
719 | $ cat c |
|
719 | $ cat c | |
720 | c |
|
720 | c | |
721 | c |
|
721 | c | |
722 | $ cat d |
|
722 | $ cat d | |
723 | a |
|
723 | a | |
724 | a |
|
724 | a | |
725 | $ cat g |
|
725 | $ cat g | |
726 | b |
|
726 | b | |
727 | b |
|
727 | b | |
728 | $ cd .. |
|
728 | $ cd .. | |
729 |
|
729 | |||
730 |
|
730 | |||
731 | Test stripping a revision with another child |
|
731 | Test stripping a revision with another child | |
732 |
|
732 | |||
733 | $ hg init f |
|
733 | $ hg init f | |
734 | $ cd f |
|
734 | $ cd f | |
735 |
|
735 | |||
736 | $ echo A > A |
|
736 | $ echo A > A | |
737 | $ hg ci -Am A |
|
737 | $ hg ci -Am A | |
738 | adding A |
|
738 | adding A | |
739 | $ echo B > B |
|
739 | $ echo B > B | |
740 | $ hg ci -Am B |
|
740 | $ hg ci -Am B | |
741 | adding B |
|
741 | adding B | |
742 |
|
742 | |||
743 | $ hg up -q 0 |
|
743 | $ hg up -q 0 | |
744 |
|
744 | |||
745 | $ echo C > C |
|
745 | $ echo C > C | |
746 | $ hg ci -Am C |
|
746 | $ hg ci -Am C | |
747 | adding C |
|
747 | adding C | |
748 | created new head |
|
748 | created new head | |
749 |
|
749 | |||
750 | $ hg tglog |
|
750 | $ hg tglog | |
751 | @ 2: 'C' |
|
751 | @ 2: c5cefa58fd55 'C' | |
752 | | |
|
752 | | | |
753 | | o 1: 'B' |
|
753 | | o 1: 27547f69f254 'B' | |
754 | |/ |
|
754 | |/ | |
755 | o 0: 'A' |
|
755 | o 0: 4a2df7238c3b 'A' | |
756 |
|
756 | |||
757 |
|
757 | |||
758 |
|
758 | |||
759 | $ hg heads --template="{rev}:{node} {branch}: {desc}\n" |
|
759 | $ hg heads --template="{rev}:{node} {branch}: {desc}\n" | |
760 | 2:c5cefa58fd557f84b72b87f970135984337acbc5 default: C |
|
760 | 2:c5cefa58fd557f84b72b87f970135984337acbc5 default: C | |
761 | 1:27547f69f25460a52fff66ad004e58da7ad3fb56 default: B |
|
761 | 1:27547f69f25460a52fff66ad004e58da7ad3fb56 default: B | |
762 |
|
762 | |||
763 | $ hg strip 2 |
|
763 | $ hg strip 2 | |
764 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
764 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
765 | saved backup bundle to $TESTTMP/f/.hg/strip-backup/c5cefa58fd55-629429f4-backup.hg (glob) |
|
765 | saved backup bundle to $TESTTMP/f/.hg/strip-backup/c5cefa58fd55-629429f4-backup.hg (glob) | |
766 |
|
766 | |||
767 | $ hg tglog |
|
767 | $ hg tglog | |
768 | o 1: 'B' |
|
768 | o 1: 27547f69f254 'B' | |
769 | | |
|
769 | | | |
770 | @ 0: 'A' |
|
770 | @ 0: 4a2df7238c3b 'A' | |
771 |
|
771 | |||
772 |
|
772 | |||
773 |
|
773 | |||
774 | $ hg heads --template="{rev}:{node} {branch}: {desc}\n" |
|
774 | $ hg heads --template="{rev}:{node} {branch}: {desc}\n" | |
775 | 1:27547f69f25460a52fff66ad004e58da7ad3fb56 default: B |
|
775 | 1:27547f69f25460a52fff66ad004e58da7ad3fb56 default: B | |
776 |
|
776 | |||
777 | $ cd .. |
|
777 | $ cd .. | |
778 |
|
778 | |||
779 | Test collapsing changes that add then remove a file |
|
779 | Test collapsing changes that add then remove a file | |
780 |
|
780 | |||
781 | $ hg init collapseaddremove |
|
781 | $ hg init collapseaddremove | |
782 | $ cd collapseaddremove |
|
782 | $ cd collapseaddremove | |
783 |
|
783 | |||
784 | $ touch base |
|
784 | $ touch base | |
785 | $ hg commit -Am base |
|
785 | $ hg commit -Am base | |
786 | adding base |
|
786 | adding base | |
787 | $ touch a |
|
787 | $ touch a | |
788 | $ hg commit -Am a |
|
788 | $ hg commit -Am a | |
789 | adding a |
|
789 | adding a | |
790 | $ hg rm a |
|
790 | $ hg rm a | |
791 | $ touch b |
|
791 | $ touch b | |
792 | $ hg commit -Am b |
|
792 | $ hg commit -Am b | |
793 | adding b |
|
793 | adding b | |
794 | $ hg book foo |
|
794 | $ hg book foo | |
795 | $ hg rebase -d 0 -r "1::2" --collapse -m collapsed |
|
795 | $ hg rebase -d 0 -r "1::2" --collapse -m collapsed | |
796 | rebasing 1:6d8d9f24eec3 "a" |
|
796 | rebasing 1:6d8d9f24eec3 "a" | |
797 | rebasing 2:1cc73eca5ecc "b" (foo tip) |
|
797 | rebasing 2:1cc73eca5ecc "b" (foo tip) | |
798 | saved backup bundle to $TESTTMP/collapseaddremove/.hg/strip-backup/6d8d9f24eec3-77d3b6e2-rebase.hg (glob) |
|
798 | saved backup bundle to $TESTTMP/collapseaddremove/.hg/strip-backup/6d8d9f24eec3-77d3b6e2-rebase.hg (glob) | |
799 | $ hg log -G --template "{rev}: '{desc}' {bookmarks}" |
|
799 | $ hg log -G --template "{rev}: '{desc}' {bookmarks}" | |
800 | @ 1: 'collapsed' foo |
|
800 | @ 1: 'collapsed' foo | |
801 | | |
|
801 | | | |
802 | o 0: 'base' |
|
802 | o 0: 'base' | |
803 |
|
803 | |||
804 | $ hg manifest --rev tip |
|
804 | $ hg manifest --rev tip | |
805 | b |
|
805 | b | |
806 | base |
|
806 | base | |
807 |
|
807 | |||
808 | $ cd .. |
|
808 | $ cd .. | |
809 |
|
809 | |||
810 | Test that rebase --collapse will remember message after |
|
810 | Test that rebase --collapse will remember message after | |
811 | running into merge conflict and invoking rebase --continue. |
|
811 | running into merge conflict and invoking rebase --continue. | |
812 |
|
812 | |||
813 | $ hg init collapse_remember_message |
|
813 | $ hg init collapse_remember_message | |
814 | $ cd collapse_remember_message |
|
814 | $ cd collapse_remember_message | |
815 | $ touch a |
|
815 | $ touch a | |
816 | $ hg add a |
|
816 | $ hg add a | |
817 | $ hg commit -m "a" |
|
817 | $ hg commit -m "a" | |
818 | $ echo "a-default" > a |
|
818 | $ echo "a-default" > a | |
819 | $ hg commit -m "a-default" |
|
819 | $ hg commit -m "a-default" | |
820 | $ hg update -r 0 |
|
820 | $ hg update -r 0 | |
821 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
821 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
822 | $ hg branch dev |
|
822 | $ hg branch dev | |
823 | marked working directory as branch dev |
|
823 | marked working directory as branch dev | |
824 | (branches are permanent and global, did you want a bookmark?) |
|
824 | (branches are permanent and global, did you want a bookmark?) | |
825 | $ echo "a-dev" > a |
|
825 | $ echo "a-dev" > a | |
826 | $ hg commit -m "a-dev" |
|
826 | $ hg commit -m "a-dev" | |
827 | $ hg rebase --collapse -m "a-default-dev" -d 1 |
|
827 | $ hg rebase --collapse -m "a-default-dev" -d 1 | |
828 | rebasing 2:b8d8db2b242d "a-dev" (tip) |
|
828 | rebasing 2:b8d8db2b242d "a-dev" (tip) | |
829 | merging a |
|
829 | merging a | |
830 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
830 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
831 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
831 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
832 | [1] |
|
832 | [1] | |
833 | $ rm a.orig |
|
833 | $ rm a.orig | |
834 | $ hg resolve --mark a |
|
834 | $ hg resolve --mark a | |
835 | (no more unresolved files) |
|
835 | (no more unresolved files) | |
836 | continue: hg rebase --continue |
|
836 | continue: hg rebase --continue | |
837 | $ hg rebase --continue |
|
837 | $ hg rebase --continue | |
838 | rebasing 2:b8d8db2b242d "a-dev" (tip) |
|
838 | rebasing 2:b8d8db2b242d "a-dev" (tip) | |
839 | saved backup bundle to $TESTTMP/collapse_remember_message/.hg/strip-backup/b8d8db2b242d-f474c19a-rebase.hg (glob) |
|
839 | saved backup bundle to $TESTTMP/collapse_remember_message/.hg/strip-backup/b8d8db2b242d-f474c19a-rebase.hg (glob) | |
840 | $ hg log |
|
840 | $ hg log | |
841 | changeset: 2:45ba1d1a8665 |
|
841 | changeset: 2:45ba1d1a8665 | |
842 | tag: tip |
|
842 | tag: tip | |
843 | user: test |
|
843 | user: test | |
844 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
844 | date: Thu Jan 01 00:00:00 1970 +0000 | |
845 | summary: a-default-dev |
|
845 | summary: a-default-dev | |
846 |
|
846 | |||
847 | changeset: 1:3c8db56a44bc |
|
847 | changeset: 1:3c8db56a44bc | |
848 | user: test |
|
848 | user: test | |
849 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
849 | date: Thu Jan 01 00:00:00 1970 +0000 | |
850 | summary: a-default |
|
850 | summary: a-default | |
851 |
|
851 | |||
852 | changeset: 0:3903775176ed |
|
852 | changeset: 0:3903775176ed | |
853 | user: test |
|
853 | user: test | |
854 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
854 | date: Thu Jan 01 00:00:00 1970 +0000 | |
855 | summary: a |
|
855 | summary: a | |
856 |
|
856 | |||
857 | $ cd .. |
|
857 | $ cd .. |
@@ -1,452 +1,452 b'' | |||||
1 | Require a destination |
|
1 | Require a destination | |
2 | $ cat >> $HGRCPATH <<EOF |
|
2 | $ cat >> $HGRCPATH <<EOF | |
3 | > [extensions] |
|
3 | > [extensions] | |
4 | > rebase = |
|
4 | > rebase = | |
5 | > [commands] |
|
5 | > [commands] | |
6 | > rebase.requiredest = True |
|
6 | > rebase.requiredest = True | |
7 | > EOF |
|
7 | > EOF | |
8 | $ hg init repo |
|
8 | $ hg init repo | |
9 | $ cd repo |
|
9 | $ cd repo | |
10 | $ echo a >> a |
|
10 | $ echo a >> a | |
11 | $ hg commit -qAm aa |
|
11 | $ hg commit -qAm aa | |
12 | $ echo b >> b |
|
12 | $ echo b >> b | |
13 | $ hg commit -qAm bb |
|
13 | $ hg commit -qAm bb | |
14 | $ hg up ".^" |
|
14 | $ hg up ".^" | |
15 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
15 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
16 | $ echo c >> c |
|
16 | $ echo c >> c | |
17 | $ hg commit -qAm cc |
|
17 | $ hg commit -qAm cc | |
18 | $ hg rebase |
|
18 | $ hg rebase | |
19 | abort: you must specify a destination |
|
19 | abort: you must specify a destination | |
20 | (use: hg rebase -d REV) |
|
20 | (use: hg rebase -d REV) | |
21 | [255] |
|
21 | [255] | |
22 | $ hg rebase -d 1 |
|
22 | $ hg rebase -d 1 | |
23 | rebasing 2:5db65b93a12b "cc" (tip) |
|
23 | rebasing 2:5db65b93a12b "cc" (tip) | |
24 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/5db65b93a12b-4fb789ec-rebase.hg (glob) |
|
24 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/5db65b93a12b-4fb789ec-rebase.hg (glob) | |
25 | $ hg rebase -d 0 -r . -q |
|
25 | $ hg rebase -d 0 -r . -q | |
26 | $ HGPLAIN=1 hg rebase |
|
26 | $ HGPLAIN=1 hg rebase | |
27 | rebasing 2:889b0bc6a730 "cc" (tip) |
|
27 | rebasing 2:889b0bc6a730 "cc" (tip) | |
28 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/889b0bc6a730-41ec4f81-rebase.hg (glob) |
|
28 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/889b0bc6a730-41ec4f81-rebase.hg (glob) | |
29 | $ hg rebase -d 0 -r . -q |
|
29 | $ hg rebase -d 0 -r . -q | |
30 | $ hg --config commands.rebase.requiredest=False rebase |
|
30 | $ hg --config commands.rebase.requiredest=False rebase | |
31 | rebasing 2:279de9495438 "cc" (tip) |
|
31 | rebasing 2:279de9495438 "cc" (tip) | |
32 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/279de9495438-ab0a5128-rebase.hg (glob) |
|
32 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/279de9495438-ab0a5128-rebase.hg (glob) | |
33 |
|
33 | |||
34 | Requiring dest should not break continue or other rebase options |
|
34 | Requiring dest should not break continue or other rebase options | |
35 | $ hg up 1 -q |
|
35 | $ hg up 1 -q | |
36 | $ echo d >> c |
|
36 | $ echo d >> c | |
37 | $ hg commit -qAm dc |
|
37 | $ hg commit -qAm dc | |
38 | $ hg log -G -T '{rev} {desc}' |
|
38 | $ hg log -G -T '{rev} {desc}' | |
39 | @ 3 dc |
|
39 | @ 3 dc | |
40 | | |
|
40 | | | |
41 | | o 2 cc |
|
41 | | o 2 cc | |
42 | |/ |
|
42 | |/ | |
43 | o 1 bb |
|
43 | o 1 bb | |
44 | | |
|
44 | | | |
45 | o 0 aa |
|
45 | o 0 aa | |
46 |
|
46 | |||
47 | $ hg rebase -d 2 |
|
47 | $ hg rebase -d 2 | |
48 | rebasing 3:0537f6b50def "dc" (tip) |
|
48 | rebasing 3:0537f6b50def "dc" (tip) | |
49 | merging c |
|
49 | merging c | |
50 | warning: conflicts while merging c! (edit, then use 'hg resolve --mark') |
|
50 | warning: conflicts while merging c! (edit, then use 'hg resolve --mark') | |
51 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
51 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
52 | [1] |
|
52 | [1] | |
53 | $ echo d > c |
|
53 | $ echo d > c | |
54 | $ hg resolve --mark --all |
|
54 | $ hg resolve --mark --all | |
55 | (no more unresolved files) |
|
55 | (no more unresolved files) | |
56 | continue: hg rebase --continue |
|
56 | continue: hg rebase --continue | |
57 | $ hg rebase --continue |
|
57 | $ hg rebase --continue | |
58 | rebasing 3:0537f6b50def "dc" (tip) |
|
58 | rebasing 3:0537f6b50def "dc" (tip) | |
59 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/0537f6b50def-be4c7386-rebase.hg (glob) |
|
59 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/0537f6b50def-be4c7386-rebase.hg (glob) | |
60 |
|
60 | |||
61 | $ cd .. |
|
61 | $ cd .. | |
62 |
|
62 | |||
63 | Check rebase.requiredest interaction with pull --rebase |
|
63 | Check rebase.requiredest interaction with pull --rebase | |
64 | $ hg clone repo clone |
|
64 | $ hg clone repo clone | |
65 | updating to branch default |
|
65 | updating to branch default | |
66 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
66 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
67 | $ cd repo |
|
67 | $ cd repo | |
68 | $ echo e > e |
|
68 | $ echo e > e | |
69 | $ hg commit -qAm ee |
|
69 | $ hg commit -qAm ee | |
70 | $ cd .. |
|
70 | $ cd .. | |
71 | $ cd clone |
|
71 | $ cd clone | |
72 | $ echo f > f |
|
72 | $ echo f > f | |
73 | $ hg commit -qAm ff |
|
73 | $ hg commit -qAm ff | |
74 | $ hg pull --rebase |
|
74 | $ hg pull --rebase | |
75 | abort: rebase destination required by configuration |
|
75 | abort: rebase destination required by configuration | |
76 | (use hg pull followed by hg rebase -d DEST) |
|
76 | (use hg pull followed by hg rebase -d DEST) | |
77 | [255] |
|
77 | [255] | |
78 |
|
78 | |||
79 | Setup rebase with multiple destinations |
|
79 | Setup rebase with multiple destinations | |
80 |
|
80 | |||
81 | $ cd $TESTTMP |
|
81 | $ cd $TESTTMP | |
82 |
|
82 | |||
83 | $ cat >> $TESTTMP/maprevset.py <<EOF |
|
83 | $ cat >> $TESTTMP/maprevset.py <<EOF | |
84 | > from __future__ import absolute_import |
|
84 | > from __future__ import absolute_import | |
85 | > from mercurial import registrar, revset, revsetlang, smartset |
|
85 | > from mercurial import registrar, revset, revsetlang, smartset | |
86 | > revsetpredicate = registrar.revsetpredicate() |
|
86 | > revsetpredicate = registrar.revsetpredicate() | |
87 | > cache = {} |
|
87 | > cache = {} | |
88 | > @revsetpredicate('map') |
|
88 | > @revsetpredicate('map') | |
89 | > def map(repo, subset, x): |
|
89 | > def map(repo, subset, x): | |
90 | > """(set, mapping)""" |
|
90 | > """(set, mapping)""" | |
91 | > setarg, maparg = revsetlang.getargs(x, 2, 2, '') |
|
91 | > setarg, maparg = revsetlang.getargs(x, 2, 2, '') | |
92 | > rset = revset.getset(repo, smartset.fullreposet(repo), setarg) |
|
92 | > rset = revset.getset(repo, smartset.fullreposet(repo), setarg) | |
93 | > mapstr = revsetlang.getstring(maparg, '') |
|
93 | > mapstr = revsetlang.getstring(maparg, '') | |
94 | > map = dict(a.split(':') for a in mapstr.split(',')) |
|
94 | > map = dict(a.split(':') for a in mapstr.split(',')) | |
95 | > rev = rset.first() |
|
95 | > rev = rset.first() | |
96 | > desc = repo[rev].description() |
|
96 | > desc = repo[rev].description() | |
97 | > newdesc = map.get(desc) |
|
97 | > newdesc = map.get(desc) | |
98 | > if newdesc == 'null': |
|
98 | > if newdesc == 'null': | |
99 | > revs = [-1] |
|
99 | > revs = [-1] | |
100 | > else: |
|
100 | > else: | |
101 | > query = revsetlang.formatspec('desc(%s)', newdesc) |
|
101 | > query = revsetlang.formatspec('desc(%s)', newdesc) | |
102 | > revs = repo.revs(query) |
|
102 | > revs = repo.revs(query) | |
103 | > return smartset.baseset(revs) |
|
103 | > return smartset.baseset(revs) | |
104 | > EOF |
|
104 | > EOF | |
105 |
|
105 | |||
106 | $ cat >> $HGRCPATH <<EOF |
|
106 | $ cat >> $HGRCPATH <<EOF | |
107 | > [ui] |
|
107 | > [ui] | |
108 | > allowemptycommit=1 |
|
108 | > allowemptycommit=1 | |
109 | > [extensions] |
|
109 | > [extensions] | |
110 | > drawdag=$TESTDIR/drawdag.py |
|
110 | > drawdag=$TESTDIR/drawdag.py | |
111 | > [phases] |
|
111 | > [phases] | |
112 | > publish=False |
|
112 | > publish=False | |
113 | > [alias] |
|
113 | > [alias] | |
114 | > tglog = log -G --template "{rev}: {desc} {instabilities}" -r 'sort(all(), topo)' |
|
114 | > tglog = log -G --template "{rev}: {node|short} {desc} {instabilities}" -r 'sort(all(), topo)' | |
115 | > [extensions] |
|
115 | > [extensions] | |
116 | > maprevset=$TESTTMP/maprevset.py |
|
116 | > maprevset=$TESTTMP/maprevset.py | |
117 | > [experimental] |
|
117 | > [experimental] | |
118 | > evolution=true |
|
118 | > evolution=true | |
119 | > EOF |
|
119 | > EOF | |
120 |
|
120 | |||
121 | $ rebasewithdag() { |
|
121 | $ rebasewithdag() { | |
122 | > N=`$PYTHON -c "print($N+1)"` |
|
122 | > N=`$PYTHON -c "print($N+1)"` | |
123 | > hg init repo$N && cd repo$N |
|
123 | > hg init repo$N && cd repo$N | |
124 | > hg debugdrawdag |
|
124 | > hg debugdrawdag | |
125 | > hg rebase "$@" > _rebasetmp |
|
125 | > hg rebase "$@" > _rebasetmp | |
126 | > r=$? |
|
126 | > r=$? | |
127 | > grep -v 'saved backup bundle' _rebasetmp |
|
127 | > grep -v 'saved backup bundle' _rebasetmp | |
128 | > [ $r -eq 0 ] && rm -f .hg/localtags && hg tglog |
|
128 | > [ $r -eq 0 ] && rm -f .hg/localtags && hg tglog | |
129 | > cd .. |
|
129 | > cd .. | |
130 | > return $r |
|
130 | > return $r | |
131 | > } |
|
131 | > } | |
132 |
|
132 | |||
133 | Destination resolves to an empty set: |
|
133 | Destination resolves to an empty set: | |
134 |
|
134 | |||
135 | $ rebasewithdag -s B -d 'SRC - SRC' <<'EOS' |
|
135 | $ rebasewithdag -s B -d 'SRC - SRC' <<'EOS' | |
136 | > C |
|
136 | > C | |
137 | > | |
|
137 | > | | |
138 | > B |
|
138 | > B | |
139 | > | |
|
139 | > | | |
140 | > A |
|
140 | > A | |
141 | > EOS |
|
141 | > EOS | |
142 | nothing to rebase - empty destination |
|
142 | nothing to rebase - empty destination | |
143 | [1] |
|
143 | [1] | |
144 |
|
144 | |||
145 | Multiple destinations and --collapse are not compatible: |
|
145 | Multiple destinations and --collapse are not compatible: | |
146 |
|
146 | |||
147 | $ rebasewithdag -s C+E -d 'SRC^^' --collapse <<'EOS' |
|
147 | $ rebasewithdag -s C+E -d 'SRC^^' --collapse <<'EOS' | |
148 | > C F |
|
148 | > C F | |
149 | > | | |
|
149 | > | | | |
150 | > B E |
|
150 | > B E | |
151 | > | | |
|
151 | > | | | |
152 | > A D |
|
152 | > A D | |
153 | > EOS |
|
153 | > EOS | |
154 | abort: --collapse does not work with multiple destinations |
|
154 | abort: --collapse does not work with multiple destinations | |
155 | [255] |
|
155 | [255] | |
156 |
|
156 | |||
157 | Multiple destinations cannot be used with --base: |
|
157 | Multiple destinations cannot be used with --base: | |
158 |
|
158 | |||
159 | $ rebasewithdag -b B+E -d 'SRC^^' --collapse <<'EOS' |
|
159 | $ rebasewithdag -b B+E -d 'SRC^^' --collapse <<'EOS' | |
160 | > B E |
|
160 | > B E | |
161 | > | | |
|
161 | > | | | |
162 | > A D |
|
162 | > A D | |
163 | > EOS |
|
163 | > EOS | |
164 | abort: unknown revision 'SRC'! |
|
164 | abort: unknown revision 'SRC'! | |
165 | [255] |
|
165 | [255] | |
166 |
|
166 | |||
167 | Rebase to null should work: |
|
167 | Rebase to null should work: | |
168 |
|
168 | |||
169 | $ rebasewithdag -r A+C+D -d 'null' <<'EOS' |
|
169 | $ rebasewithdag -r A+C+D -d 'null' <<'EOS' | |
170 | > C D |
|
170 | > C D | |
171 | > | | |
|
171 | > | | | |
172 | > A B |
|
172 | > A B | |
173 | > EOS |
|
173 | > EOS | |
174 | already rebased 0:426bada5c675 "A" (A) |
|
174 | already rebased 0:426bada5c675 "A" (A) | |
175 | already rebased 2:dc0947a82db8 "C" (C) |
|
175 | already rebased 2:dc0947a82db8 "C" (C) | |
176 | rebasing 3:004dc1679908 "D" (D tip) |
|
176 | rebasing 3:004dc1679908 "D" (D tip) | |
177 | o 4: D |
|
177 | o 4: d8d8601abd5e D | |
178 |
|
178 | |||
179 | o 2: C |
|
179 | o 2: dc0947a82db8 C | |
180 | | |
|
180 | | | |
181 | | o 1: B |
|
181 | | o 1: fc2b737bb2e5 B | |
182 | | |
|
182 | | | |
183 | o 0: A |
|
183 | o 0: 426bada5c675 A | |
184 |
|
184 | |||
185 | Destination resolves to multiple changesets: |
|
185 | Destination resolves to multiple changesets: | |
186 |
|
186 | |||
187 | $ rebasewithdag -s B -d 'ALLSRC+SRC' <<'EOS' |
|
187 | $ rebasewithdag -s B -d 'ALLSRC+SRC' <<'EOS' | |
188 | > C |
|
188 | > C | |
189 | > | |
|
189 | > | | |
190 | > B |
|
190 | > B | |
191 | > | |
|
191 | > | | |
192 | > Z |
|
192 | > Z | |
193 | > EOS |
|
193 | > EOS | |
194 | abort: rebase destination for f0a671a46792 is not unique |
|
194 | abort: rebase destination for f0a671a46792 is not unique | |
195 | [255] |
|
195 | [255] | |
196 |
|
196 | |||
197 | Destination is an ancestor of source: |
|
197 | Destination is an ancestor of source: | |
198 |
|
198 | |||
199 | $ rebasewithdag -s B -d 'SRC' <<'EOS' |
|
199 | $ rebasewithdag -s B -d 'SRC' <<'EOS' | |
200 | > C |
|
200 | > C | |
201 | > | |
|
201 | > | | |
202 | > B |
|
202 | > B | |
203 | > | |
|
203 | > | | |
204 | > Z |
|
204 | > Z | |
205 | > EOS |
|
205 | > EOS | |
206 | abort: source and destination form a cycle |
|
206 | abort: source and destination form a cycle | |
207 | [255] |
|
207 | [255] | |
208 |
|
208 | |||
209 | Switch roots: |
|
209 | Switch roots: | |
210 |
|
210 | |||
211 | $ rebasewithdag -s 'all() - roots(all())' -d 'roots(all()) - ::SRC' <<'EOS' |
|
211 | $ rebasewithdag -s 'all() - roots(all())' -d 'roots(all()) - ::SRC' <<'EOS' | |
212 | > C F |
|
212 | > C F | |
213 | > | | |
|
213 | > | | | |
214 | > B E |
|
214 | > B E | |
215 | > | | |
|
215 | > | | | |
216 | > A D |
|
216 | > A D | |
217 | > EOS |
|
217 | > EOS | |
218 | rebasing 2:112478962961 "B" (B) |
|
218 | rebasing 2:112478962961 "B" (B) | |
219 | rebasing 4:26805aba1e60 "C" (C) |
|
219 | rebasing 4:26805aba1e60 "C" (C) | |
220 | rebasing 3:cd488e83d208 "E" (E) |
|
220 | rebasing 3:cd488e83d208 "E" (E) | |
221 | rebasing 5:0069ba24938a "F" (F tip) |
|
221 | rebasing 5:0069ba24938a "F" (F tip) | |
222 | o 9: F |
|
222 | o 9: d150ff263fc8 F | |
223 | | |
|
223 | | | |
224 | o 8: E |
|
224 | o 8: 66f30a1a2eab E | |
225 | | |
|
225 | | | |
226 | | o 7: C |
|
226 | | o 7: 93db94ffae0e C | |
227 | | | |
|
227 | | | | |
228 | | o 6: B |
|
228 | | o 6: d0071c3b0c88 B | |
229 | | | |
|
229 | | | | |
230 | | o 1: D |
|
230 | | o 1: 058c1e1fb10a D | |
231 | | |
|
231 | | | |
232 | o 0: A |
|
232 | o 0: 426bada5c675 A | |
233 |
|
233 | |||
234 | Different destinations for merge changesets with a same root: |
|
234 | Different destinations for merge changesets with a same root: | |
235 |
|
235 | |||
236 | $ rebasewithdag -s B -d '((parents(SRC)-B-A)::) - (::ALLSRC)' <<'EOS' |
|
236 | $ rebasewithdag -s B -d '((parents(SRC)-B-A)::) - (::ALLSRC)' <<'EOS' | |
237 | > C G |
|
237 | > C G | |
238 | > |\| |
|
238 | > |\| | |
239 | > | F |
|
239 | > | F | |
240 | > | |
|
240 | > | | |
241 | > B E |
|
241 | > B E | |
242 | > |\| |
|
242 | > |\| | |
243 | > A D |
|
243 | > A D | |
244 | > EOS |
|
244 | > EOS | |
245 | rebasing 3:a4256619d830 "B" (B) |
|
245 | rebasing 3:a4256619d830 "B" (B) | |
246 | rebasing 6:8e139e245220 "C" (C tip) |
|
246 | rebasing 6:8e139e245220 "C" (C tip) | |
247 | o 8: C |
|
247 | o 8: 51e2ce92e06a C | |
248 | |\ |
|
248 | |\ | |
249 | | o 7: B |
|
249 | | o 7: 2ed0c8546285 B | |
250 | | |\ |
|
250 | | |\ | |
251 | o | | 5: G |
|
251 | o | | 5: 8fdb2c1feb20 G | |
252 | | | | |
|
252 | | | | | |
253 | | | o 4: E |
|
253 | | | o 4: cd488e83d208 E | |
254 | | | | |
|
254 | | | | | |
255 | o | | 2: F |
|
255 | o | | 2: a6661b868de9 F | |
256 | / / |
|
256 | / / | |
257 | | o 1: D |
|
257 | | o 1: 058c1e1fb10a D | |
258 | | |
|
258 | | | |
259 | o 0: A |
|
259 | o 0: 426bada5c675 A | |
260 |
|
260 | |||
261 | Move to a previous parent: |
|
261 | Move to a previous parent: | |
262 |
|
262 | |||
263 | $ rebasewithdag -s E+F+G -d 'SRC^^' <<'EOS' |
|
263 | $ rebasewithdag -s E+F+G -d 'SRC^^' <<'EOS' | |
264 | > H |
|
264 | > H | |
265 | > | |
|
265 | > | | |
266 | > D G |
|
266 | > D G | |
267 | > |/ |
|
267 | > |/ | |
268 | > C F |
|
268 | > C F | |
269 | > |/ |
|
269 | > |/ | |
270 | > B E # E will be ignored, since E^^ is empty |
|
270 | > B E # E will be ignored, since E^^ is empty | |
271 | > |/ |
|
271 | > |/ | |
272 | > A |
|
272 | > A | |
273 | > EOS |
|
273 | > EOS | |
274 | rebasing 4:33441538d4aa "F" (F) |
|
274 | rebasing 4:33441538d4aa "F" (F) | |
275 | rebasing 6:cf43ad9da869 "G" (G) |
|
275 | rebasing 6:cf43ad9da869 "G" (G) | |
276 | rebasing 7:eef94f3b5f03 "H" (H tip) |
|
276 | rebasing 7:eef94f3b5f03 "H" (H tip) | |
277 | o 10: H |
|
277 | o 10: b3d84c6666cf H | |
278 | | |
|
278 | | | |
279 | | o 5: D |
|
279 | | o 5: f585351a92f8 D | |
280 | |/ |
|
280 | |/ | |
281 | o 3: C |
|
281 | o 3: 26805aba1e60 C | |
282 | | |
|
282 | | | |
283 | | o 9: G |
|
283 | | o 9: f7c28a1a15e2 G | |
284 | |/ |
|
284 | |/ | |
285 | o 1: B |
|
285 | o 1: 112478962961 B | |
286 | | |
|
286 | | | |
287 | | o 8: F |
|
287 | | o 8: 02aa697facf7 F | |
288 | |/ |
|
288 | |/ | |
289 | | o 2: E |
|
289 | | o 2: 7fb047a69f22 E | |
290 | |/ |
|
290 | |/ | |
291 | o 0: A |
|
291 | o 0: 426bada5c675 A | |
292 |
|
292 | |||
293 | Source overlaps with destination: |
|
293 | Source overlaps with destination: | |
294 |
|
294 | |||
295 | $ rebasewithdag -s 'B+C+D' -d 'map(SRC, "B:C,C:D")' <<'EOS' |
|
295 | $ rebasewithdag -s 'B+C+D' -d 'map(SRC, "B:C,C:D")' <<'EOS' | |
296 | > B C D |
|
296 | > B C D | |
297 | > \|/ |
|
297 | > \|/ | |
298 | > A |
|
298 | > A | |
299 | > EOS |
|
299 | > EOS | |
300 | rebasing 2:dc0947a82db8 "C" (C) |
|
300 | rebasing 2:dc0947a82db8 "C" (C) | |
301 | rebasing 1:112478962961 "B" (B) |
|
301 | rebasing 1:112478962961 "B" (B) | |
302 | o 5: B |
|
302 | o 5: 5fe9935d5222 B | |
303 | | |
|
303 | | | |
304 | o 4: C |
|
304 | o 4: 12d20731b9e0 C | |
305 | | |
|
305 | | | |
306 | o 3: D |
|
306 | o 3: b18e25de2cf5 D | |
307 | | |
|
307 | | | |
308 | o 0: A |
|
308 | o 0: 426bada5c675 A | |
309 |
|
309 | |||
310 | Detect cycles early: |
|
310 | Detect cycles early: | |
311 |
|
311 | |||
312 | $ rebasewithdag -r 'all()-Z' -d 'map(SRC, "A:B,B:C,C:D,D:B")' <<'EOS' |
|
312 | $ rebasewithdag -r 'all()-Z' -d 'map(SRC, "A:B,B:C,C:D,D:B")' <<'EOS' | |
313 | > A B C |
|
313 | > A B C | |
314 | > \|/ |
|
314 | > \|/ | |
315 | > | D |
|
315 | > | D | |
316 | > |/ |
|
316 | > |/ | |
317 | > Z |
|
317 | > Z | |
318 | > EOS |
|
318 | > EOS | |
319 | abort: source and destination form a cycle |
|
319 | abort: source and destination form a cycle | |
320 | [255] |
|
320 | [255] | |
321 |
|
321 | |||
322 | Detect source is ancestor of dest in runtime: |
|
322 | Detect source is ancestor of dest in runtime: | |
323 |
|
323 | |||
324 | $ rebasewithdag -r 'C+B' -d 'map(SRC, "C:B,B:D")' -q <<'EOS' |
|
324 | $ rebasewithdag -r 'C+B' -d 'map(SRC, "C:B,B:D")' -q <<'EOS' | |
325 | > D |
|
325 | > D | |
326 | > | |
|
326 | > | | |
327 | > B C |
|
327 | > B C | |
328 | > \| |
|
328 | > \| | |
329 | > A |
|
329 | > A | |
330 | > EOS |
|
330 | > EOS | |
331 | abort: source is ancestor of destination |
|
331 | abort: source is ancestor of destination | |
332 | [255] |
|
332 | [255] | |
333 |
|
333 | |||
334 | "Already rebased" fast path still works: |
|
334 | "Already rebased" fast path still works: | |
335 |
|
335 | |||
336 | $ rebasewithdag -r 'all()' -d 'SRC^' <<'EOS' |
|
336 | $ rebasewithdag -r 'all()' -d 'SRC^' <<'EOS' | |
337 | > E F |
|
337 | > E F | |
338 | > /| | |
|
338 | > /| | | |
339 | > B C D |
|
339 | > B C D | |
340 | > \|/ |
|
340 | > \|/ | |
341 | > A |
|
341 | > A | |
342 | > EOS |
|
342 | > EOS | |
343 | already rebased 1:112478962961 "B" (B) |
|
343 | already rebased 1:112478962961 "B" (B) | |
344 | already rebased 2:dc0947a82db8 "C" (C) |
|
344 | already rebased 2:dc0947a82db8 "C" (C) | |
345 | already rebased 3:b18e25de2cf5 "D" (D) |
|
345 | already rebased 3:b18e25de2cf5 "D" (D) | |
346 | already rebased 4:312782b8f06e "E" (E) |
|
346 | already rebased 4:312782b8f06e "E" (E) | |
347 | already rebased 5:ad6717a6a58e "F" (F tip) |
|
347 | already rebased 5:ad6717a6a58e "F" (F tip) | |
348 | o 5: F |
|
348 | o 5: ad6717a6a58e F | |
349 | | |
|
349 | | | |
350 | o 3: D |
|
350 | o 3: b18e25de2cf5 D | |
351 | | |
|
351 | | | |
352 | | o 4: E |
|
352 | | o 4: 312782b8f06e E | |
353 | | |\ |
|
353 | | |\ | |
354 | +---o 2: C |
|
354 | +---o 2: dc0947a82db8 C | |
355 | | | |
|
355 | | | | |
356 | | o 1: B |
|
356 | | o 1: 112478962961 B | |
357 | |/ |
|
357 | |/ | |
358 | o 0: A |
|
358 | o 0: 426bada5c675 A | |
359 |
|
359 | |||
360 | Massively rewrite the DAG: |
|
360 | Massively rewrite the DAG: | |
361 |
|
361 | |||
362 | $ rebasewithdag -r 'all()' -d 'map(SRC, "A:I,I:null,H:A,B:J,J:C,C:H,D:E,F:G,G:K,K:D,E:B")' <<'EOS' |
|
362 | $ rebasewithdag -r 'all()' -d 'map(SRC, "A:I,I:null,H:A,B:J,J:C,C:H,D:E,F:G,G:K,K:D,E:B")' <<'EOS' | |
363 | > D G K |
|
363 | > D G K | |
364 | > | | | |
|
364 | > | | | | |
365 | > C F J |
|
365 | > C F J | |
366 | > | | | |
|
366 | > | | | | |
367 | > B E I |
|
367 | > B E I | |
368 | > \| | |
|
368 | > \| | | |
369 | > A H |
|
369 | > A H | |
370 | > EOS |
|
370 | > EOS | |
371 | rebasing 4:701514e1408d "I" (I) |
|
371 | rebasing 4:701514e1408d "I" (I) | |
372 | rebasing 0:426bada5c675 "A" (A) |
|
372 | rebasing 0:426bada5c675 "A" (A) | |
373 | rebasing 1:e7050b6e5048 "H" (H) |
|
373 | rebasing 1:e7050b6e5048 "H" (H) | |
374 | rebasing 5:26805aba1e60 "C" (C) |
|
374 | rebasing 5:26805aba1e60 "C" (C) | |
375 | rebasing 7:cf89f86b485b "J" (J) |
|
375 | rebasing 7:cf89f86b485b "J" (J) | |
376 | rebasing 2:112478962961 "B" (B) |
|
376 | rebasing 2:112478962961 "B" (B) | |
377 | rebasing 3:7fb047a69f22 "E" (E) |
|
377 | rebasing 3:7fb047a69f22 "E" (E) | |
378 | rebasing 8:f585351a92f8 "D" (D) |
|
378 | rebasing 8:f585351a92f8 "D" (D) | |
379 | rebasing 10:ae41898d7875 "K" (K tip) |
|
379 | rebasing 10:ae41898d7875 "K" (K tip) | |
380 | rebasing 9:711f53bbef0b "G" (G) |
|
380 | rebasing 9:711f53bbef0b "G" (G) | |
381 | rebasing 6:64a8289d2492 "F" (F) |
|
381 | rebasing 6:64a8289d2492 "F" (F) | |
382 | o 21: F |
|
382 | o 21: 3735afb3713a F | |
383 | | |
|
383 | | | |
384 | o 20: G |
|
384 | o 20: 07698142d7a7 G | |
385 | | |
|
385 | | | |
386 | o 19: K |
|
386 | o 19: 33aba52e7e72 K | |
387 | | |
|
387 | | | |
388 | o 18: D |
|
388 | o 18: 9fdae89dc5a1 D | |
389 | | |
|
389 | | | |
390 | o 17: E |
|
390 | o 17: 277dda9a65ee E | |
391 | | |
|
391 | | | |
392 | o 16: B |
|
392 | o 16: 9c74fd8657ad B | |
393 | | |
|
393 | | | |
394 | o 15: J |
|
394 | o 15: 6527eb0688bb J | |
395 | | |
|
395 | | | |
396 | o 14: C |
|
396 | o 14: e94d655b928d C | |
397 | | |
|
397 | | | |
398 | o 13: H |
|
398 | o 13: 620d6d349459 H | |
399 | | |
|
399 | | | |
400 | o 12: A |
|
400 | o 12: a569a116758f A | |
401 | | |
|
401 | | | |
402 | o 11: I |
|
402 | o 11: 2bf1302f5c18 I | |
403 |
|
403 | |||
404 | Resolve instability: |
|
404 | Resolve instability: | |
405 |
|
405 | |||
406 | $ rebasewithdag <<'EOF' -r 'orphan()-obsolete()' -d 'max((successors(max(roots(ALLSRC) & ::SRC)^)-obsolete())::)' |
|
406 | $ rebasewithdag <<'EOF' -r 'orphan()-obsolete()' -d 'max((successors(max(roots(ALLSRC) & ::SRC)^)-obsolete())::)' | |
407 | > F2 |
|
407 | > F2 | |
408 | > | |
|
408 | > | | |
409 | > J E E2 |
|
409 | > J E E2 | |
410 | > | |/ |
|
410 | > | |/ | |
411 | > I2 I | E3 |
|
411 | > I2 I | E3 | |
412 | > \| |/ |
|
412 | > \| |/ | |
413 | > H | G |
|
413 | > H | G | |
414 | > | | | |
|
414 | > | | | | |
415 | > B2 D F |
|
415 | > B2 D F | |
416 | > | |/ # rebase: B -> B2 |
|
416 | > | |/ # rebase: B -> B2 | |
417 | > N C # amend: E -> E2 |
|
417 | > N C # amend: E -> E2 | |
418 | > | | # amend: E2 -> E3 |
|
418 | > | | # amend: E2 -> E3 | |
419 | > M B # rebase: F -> F2 |
|
419 | > M B # rebase: F -> F2 | |
420 | > \| # amend: I -> I2 |
|
420 | > \| # amend: I -> I2 | |
421 | > A |
|
421 | > A | |
422 | > EOF |
|
422 | > EOF | |
423 | rebasing 16:5c432343bf59 "J" (J tip) |
|
423 | rebasing 16:5c432343bf59 "J" (J tip) | |
424 | rebasing 3:26805aba1e60 "C" (C) |
|
424 | rebasing 3:26805aba1e60 "C" (C) | |
425 | rebasing 6:f585351a92f8 "D" (D) |
|
425 | rebasing 6:f585351a92f8 "D" (D) | |
426 | rebasing 10:ffebc37c5d0b "E3" (E3) |
|
426 | rebasing 10:ffebc37c5d0b "E3" (E3) | |
427 | rebasing 13:fb184bcfeee8 "F2" (F2) |
|
427 | rebasing 13:fb184bcfeee8 "F2" (F2) | |
428 | rebasing 11:dc838ab4c0da "G" (G) |
|
428 | rebasing 11:dc838ab4c0da "G" (G) | |
429 | o 22: G |
|
429 | o 22: 174f63d574a8 G | |
430 | | |
|
430 | | | |
431 | o 21: F2 |
|
431 | o 21: c9d9fbe76705 F2 | |
432 | | |
|
432 | | | |
433 | o 20: E3 |
|
433 | o 20: 0a03c2ede755 E3 | |
434 | | |
|
434 | | | |
435 | o 19: D |
|
435 | o 19: 228d9d2541b1 D | |
436 | | |
|
436 | | | |
437 | o 18: C |
|
437 | o 18: cd856b400c95 C | |
438 | | |
|
438 | | | |
439 | o 17: J |
|
439 | o 17: 9148200c858c J | |
440 | | |
|
440 | | | |
441 | o 15: I2 |
|
441 | o 15: eb74780f5094 I2 | |
442 | | |
|
442 | | | |
443 | o 12: H |
|
443 | o 12: 78309edd643f H | |
444 | | |
|
444 | | | |
445 | o 5: B2 |
|
445 | o 5: 4b4531bd8e1d B2 | |
446 | | |
|
446 | | | |
447 | o 4: N |
|
447 | o 4: 337c285c272b N | |
448 | | |
|
448 | | | |
449 | o 2: M |
|
449 | o 2: 699bc4b6fa22 M | |
450 | | |
|
450 | | | |
451 | o 0: A |
|
451 | o 0: 426bada5c675 A | |
452 |
|
452 |
@@ -1,317 +1,317 b'' | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > rebase= |
|
3 | > rebase= | |
4 | > |
|
4 | > | |
5 | > [alias] |
|
5 | > [alias] | |
6 | > tglog = log -G --template "{rev}: '{desc}'\n" |
|
6 | > tglog = log -G --template "{rev}: {node|short} '{desc}'\n" | |
7 | > |
|
7 | > | |
8 | > [extensions] |
|
8 | > [extensions] | |
9 | > drawdag=$TESTDIR/drawdag.py |
|
9 | > drawdag=$TESTDIR/drawdag.py | |
10 | > EOF |
|
10 | > EOF | |
11 |
|
11 | |||
12 | Rebasing D onto B detaching from C (one commit): |
|
12 | Rebasing D onto B detaching from C (one commit): | |
13 |
|
13 | |||
14 | $ hg init a1 |
|
14 | $ hg init a1 | |
15 | $ cd a1 |
|
15 | $ cd a1 | |
16 |
|
16 | |||
17 | $ hg debugdrawdag <<EOF |
|
17 | $ hg debugdrawdag <<EOF | |
18 | > D |
|
18 | > D | |
19 | > | |
|
19 | > | | |
20 | > C B |
|
20 | > C B | |
21 | > |/ |
|
21 | > |/ | |
22 | > A |
|
22 | > A | |
23 | > EOF |
|
23 | > EOF | |
24 | $ hg phase --force --secret D |
|
24 | $ hg phase --force --secret D | |
25 |
|
25 | |||
26 | $ hg rebase -s D -d B |
|
26 | $ hg rebase -s D -d B | |
27 | rebasing 3:e7b3f00ed42e "D" (D tip) |
|
27 | rebasing 3:e7b3f00ed42e "D" (D tip) | |
28 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/e7b3f00ed42e-6f368371-rebase.hg (glob) |
|
28 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/e7b3f00ed42e-6f368371-rebase.hg (glob) | |
29 |
|
29 | |||
30 | $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n" |
|
30 | $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n" | |
31 | o 3:secret 'D' |
|
31 | o 3:secret 'D' | |
32 | | |
|
32 | | | |
33 | | o 2:draft 'C' |
|
33 | | o 2:draft 'C' | |
34 | | | |
|
34 | | | | |
35 | o | 1:draft 'B' |
|
35 | o | 1:draft 'B' | |
36 | |/ |
|
36 | |/ | |
37 | o 0:draft 'A' |
|
37 | o 0:draft 'A' | |
38 |
|
38 | |||
39 | $ hg manifest --rev tip |
|
39 | $ hg manifest --rev tip | |
40 | A |
|
40 | A | |
41 | B |
|
41 | B | |
42 | D |
|
42 | D | |
43 |
|
43 | |||
44 | $ cd .. |
|
44 | $ cd .. | |
45 |
|
45 | |||
46 |
|
46 | |||
47 | Rebasing D onto B detaching from C (two commits): |
|
47 | Rebasing D onto B detaching from C (two commits): | |
48 |
|
48 | |||
49 | $ hg init a2 |
|
49 | $ hg init a2 | |
50 | $ cd a2 |
|
50 | $ cd a2 | |
51 |
|
51 | |||
52 | $ hg debugdrawdag <<EOF |
|
52 | $ hg debugdrawdag <<EOF | |
53 | > E |
|
53 | > E | |
54 | > | |
|
54 | > | | |
55 | > D |
|
55 | > D | |
56 | > | |
|
56 | > | | |
57 | > C B |
|
57 | > C B | |
58 | > |/ |
|
58 | > |/ | |
59 | > A |
|
59 | > A | |
60 | > EOF |
|
60 | > EOF | |
61 |
|
61 | |||
62 | $ hg rebase -s D -d B |
|
62 | $ hg rebase -s D -d B | |
63 | rebasing 3:e7b3f00ed42e "D" (D) |
|
63 | rebasing 3:e7b3f00ed42e "D" (D) | |
64 | rebasing 4:69a34c08022a "E" (E tip) |
|
64 | rebasing 4:69a34c08022a "E" (E tip) | |
65 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/e7b3f00ed42e-a2ec7cea-rebase.hg (glob) |
|
65 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/e7b3f00ed42e-a2ec7cea-rebase.hg (glob) | |
66 |
|
66 | |||
67 | $ hg tglog |
|
67 | $ hg tglog | |
68 | o 4: 'E' |
|
68 | o 4: ee79e0744528 'E' | |
69 | | |
|
69 | | | |
70 | o 3: 'D' |
|
70 | o 3: 10530e1d72d9 'D' | |
71 | | |
|
71 | | | |
72 | | o 2: 'C' |
|
72 | | o 2: dc0947a82db8 'C' | |
73 | | | |
|
73 | | | | |
74 | o | 1: 'B' |
|
74 | o | 1: 112478962961 'B' | |
75 | |/ |
|
75 | |/ | |
76 | o 0: 'A' |
|
76 | o 0: 426bada5c675 'A' | |
77 |
|
77 | |||
78 | $ hg manifest --rev tip |
|
78 | $ hg manifest --rev tip | |
79 | A |
|
79 | A | |
80 | B |
|
80 | B | |
81 | D |
|
81 | D | |
82 | E |
|
82 | E | |
83 |
|
83 | |||
84 | $ cd .. |
|
84 | $ cd .. | |
85 |
|
85 | |||
86 | Rebasing C onto B using detach (same as not using it): |
|
86 | Rebasing C onto B using detach (same as not using it): | |
87 |
|
87 | |||
88 | $ hg init a3 |
|
88 | $ hg init a3 | |
89 | $ cd a3 |
|
89 | $ cd a3 | |
90 |
|
90 | |||
91 | $ hg debugdrawdag <<EOF |
|
91 | $ hg debugdrawdag <<EOF | |
92 | > D |
|
92 | > D | |
93 | > | |
|
93 | > | | |
94 | > C B |
|
94 | > C B | |
95 | > |/ |
|
95 | > |/ | |
96 | > A |
|
96 | > A | |
97 | > EOF |
|
97 | > EOF | |
98 |
|
98 | |||
99 | $ hg rebase -s C -d B |
|
99 | $ hg rebase -s C -d B | |
100 | rebasing 2:dc0947a82db8 "C" (C) |
|
100 | rebasing 2:dc0947a82db8 "C" (C) | |
101 | rebasing 3:e7b3f00ed42e "D" (D tip) |
|
101 | rebasing 3:e7b3f00ed42e "D" (D tip) | |
102 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/dc0947a82db8-b8481714-rebase.hg (glob) |
|
102 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/dc0947a82db8-b8481714-rebase.hg (glob) | |
103 |
|
103 | |||
104 | $ hg tglog |
|
104 | $ hg tglog | |
105 | o 3: 'D' |
|
105 | o 3: 7375f3dbfb0f 'D' | |
106 | | |
|
106 | | | |
107 | o 2: 'C' |
|
107 | o 2: bbfdd6cb49aa 'C' | |
108 | | |
|
108 | | | |
109 | o 1: 'B' |
|
109 | o 1: 112478962961 'B' | |
110 | | |
|
110 | | | |
111 | o 0: 'A' |
|
111 | o 0: 426bada5c675 'A' | |
112 |
|
112 | |||
113 | $ hg manifest --rev tip |
|
113 | $ hg manifest --rev tip | |
114 | A |
|
114 | A | |
115 | B |
|
115 | B | |
116 | C |
|
116 | C | |
117 | D |
|
117 | D | |
118 |
|
118 | |||
119 | $ cd .. |
|
119 | $ cd .. | |
120 |
|
120 | |||
121 |
|
121 | |||
122 | Rebasing D onto B detaching from C and collapsing: |
|
122 | Rebasing D onto B detaching from C and collapsing: | |
123 |
|
123 | |||
124 | $ hg init a4 |
|
124 | $ hg init a4 | |
125 | $ cd a4 |
|
125 | $ cd a4 | |
126 |
|
126 | |||
127 | $ hg debugdrawdag <<EOF |
|
127 | $ hg debugdrawdag <<EOF | |
128 | > E |
|
128 | > E | |
129 | > | |
|
129 | > | | |
130 | > D |
|
130 | > D | |
131 | > | |
|
131 | > | | |
132 | > C B |
|
132 | > C B | |
133 | > |/ |
|
133 | > |/ | |
134 | > A |
|
134 | > A | |
135 | > EOF |
|
135 | > EOF | |
136 | $ hg phase --force --secret E |
|
136 | $ hg phase --force --secret E | |
137 |
|
137 | |||
138 | $ hg rebase --collapse -s D -d B |
|
138 | $ hg rebase --collapse -s D -d B | |
139 | rebasing 3:e7b3f00ed42e "D" (D) |
|
139 | rebasing 3:e7b3f00ed42e "D" (D) | |
140 | rebasing 4:69a34c08022a "E" (E tip) |
|
140 | rebasing 4:69a34c08022a "E" (E tip) | |
141 | saved backup bundle to $TESTTMP/a4/.hg/strip-backup/e7b3f00ed42e-a2ec7cea-rebase.hg (glob) |
|
141 | saved backup bundle to $TESTTMP/a4/.hg/strip-backup/e7b3f00ed42e-a2ec7cea-rebase.hg (glob) | |
142 |
|
142 | |||
143 | $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n" |
|
143 | $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n" | |
144 | o 3:secret 'Collapsed revision |
|
144 | o 3:secret 'Collapsed revision | |
145 | | * D |
|
145 | | * D | |
146 | | * E' |
|
146 | | * E' | |
147 | | o 2:draft 'C' |
|
147 | | o 2:draft 'C' | |
148 | | | |
|
148 | | | | |
149 | o | 1:draft 'B' |
|
149 | o | 1:draft 'B' | |
150 | |/ |
|
150 | |/ | |
151 | o 0:draft 'A' |
|
151 | o 0:draft 'A' | |
152 |
|
152 | |||
153 | $ hg manifest --rev tip |
|
153 | $ hg manifest --rev tip | |
154 | A |
|
154 | A | |
155 | B |
|
155 | B | |
156 | D |
|
156 | D | |
157 | E |
|
157 | E | |
158 |
|
158 | |||
159 | $ cd .. |
|
159 | $ cd .. | |
160 |
|
160 | |||
161 | Rebasing across null as ancestor |
|
161 | Rebasing across null as ancestor | |
162 | $ hg init a5 |
|
162 | $ hg init a5 | |
163 | $ cd a5 |
|
163 | $ cd a5 | |
164 |
|
164 | |||
165 | $ hg debugdrawdag <<EOF |
|
165 | $ hg debugdrawdag <<EOF | |
166 | > E |
|
166 | > E | |
167 | > | |
|
167 | > | | |
168 | > D |
|
168 | > D | |
169 | > | |
|
169 | > | | |
170 | > C |
|
170 | > C | |
171 | > | |
|
171 | > | | |
172 | > A B |
|
172 | > A B | |
173 | > EOF |
|
173 | > EOF | |
174 |
|
174 | |||
175 | $ hg rebase -s C -d B |
|
175 | $ hg rebase -s C -d B | |
176 | rebasing 2:dc0947a82db8 "C" (C) |
|
176 | rebasing 2:dc0947a82db8 "C" (C) | |
177 | rebasing 3:e7b3f00ed42e "D" (D) |
|
177 | rebasing 3:e7b3f00ed42e "D" (D) | |
178 | rebasing 4:69a34c08022a "E" (E tip) |
|
178 | rebasing 4:69a34c08022a "E" (E tip) | |
179 | saved backup bundle to $TESTTMP/a5/.hg/strip-backup/dc0947a82db8-3eefec98-rebase.hg (glob) |
|
179 | saved backup bundle to $TESTTMP/a5/.hg/strip-backup/dc0947a82db8-3eefec98-rebase.hg (glob) | |
180 |
|
180 | |||
181 | $ hg tglog |
|
181 | $ hg tglog | |
182 | o 4: 'E' |
|
182 | o 4: e3d0c70d606d 'E' | |
183 | | |
|
183 | | | |
184 | o 3: 'D' |
|
184 | o 3: e9153d36a1af 'D' | |
185 | | |
|
185 | | | |
186 | o 2: 'C' |
|
186 | o 2: a7ac28b870a8 'C' | |
187 | | |
|
187 | | | |
188 | o 1: 'B' |
|
188 | o 1: fc2b737bb2e5 'B' | |
189 |
|
189 | |||
190 | o 0: 'A' |
|
190 | o 0: 426bada5c675 'A' | |
191 |
|
191 | |||
192 | $ hg rebase -d 1 -s 3 |
|
192 | $ hg rebase -d 1 -s 3 | |
193 | rebasing 3:e9153d36a1af "D" |
|
193 | rebasing 3:e9153d36a1af "D" | |
194 | rebasing 4:e3d0c70d606d "E" (tip) |
|
194 | rebasing 4:e3d0c70d606d "E" (tip) | |
195 | saved backup bundle to $TESTTMP/a5/.hg/strip-backup/e9153d36a1af-db7388ed-rebase.hg (glob) |
|
195 | saved backup bundle to $TESTTMP/a5/.hg/strip-backup/e9153d36a1af-db7388ed-rebase.hg (glob) | |
196 | $ hg tglog |
|
196 | $ hg tglog | |
197 | o 4: 'E' |
|
197 | o 4: 2c24e540eccd 'E' | |
198 | | |
|
198 | | | |
199 | o 3: 'D' |
|
199 | o 3: 73f786ed52ff 'D' | |
200 | | |
|
200 | | | |
201 | | o 2: 'C' |
|
201 | | o 2: a7ac28b870a8 'C' | |
202 | |/ |
|
202 | |/ | |
203 | o 1: 'B' |
|
203 | o 1: fc2b737bb2e5 'B' | |
204 |
|
204 | |||
205 | o 0: 'A' |
|
205 | o 0: 426bada5c675 'A' | |
206 |
|
206 | |||
207 | $ cd .. |
|
207 | $ cd .. | |
208 |
|
208 | |||
209 | Verify that target is not selected as external rev (issue3085) |
|
209 | Verify that target is not selected as external rev (issue3085) | |
210 |
|
210 | |||
211 | $ hg init a6 |
|
211 | $ hg init a6 | |
212 | $ cd a6 |
|
212 | $ cd a6 | |
213 |
|
213 | |||
214 | $ hg debugdrawdag <<EOF |
|
214 | $ hg debugdrawdag <<EOF | |
215 | > H |
|
215 | > H | |
216 | > | G |
|
216 | > | G | |
217 | > |/| |
|
217 | > |/| | |
218 | > F E |
|
218 | > F E | |
219 | > |/ |
|
219 | > |/ | |
220 | > A |
|
220 | > A | |
221 | > EOF |
|
221 | > EOF | |
222 | $ hg up -q G |
|
222 | $ hg up -q G | |
223 |
|
223 | |||
224 | $ echo "I" >> E |
|
224 | $ echo "I" >> E | |
225 | $ hg ci -m "I" |
|
225 | $ hg ci -m "I" | |
226 | $ hg tag --local I |
|
226 | $ hg tag --local I | |
227 | $ hg merge H |
|
227 | $ hg merge H | |
228 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
228 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
229 | (branch merge, don't forget to commit) |
|
229 | (branch merge, don't forget to commit) | |
230 | $ hg ci -m "Merge" |
|
230 | $ hg ci -m "Merge" | |
231 | $ echo "J" >> F |
|
231 | $ echo "J" >> F | |
232 | $ hg ci -m "J" |
|
232 | $ hg ci -m "J" | |
233 | $ hg tglog |
|
233 | $ hg tglog | |
234 | @ 7: 'J' |
|
234 | @ 7: c6aaf0d259c0 'J' | |
235 | | |
|
235 | | | |
236 | o 6: 'Merge' |
|
236 | o 6: 0cfbc7e8faaf 'Merge' | |
237 | |\ |
|
237 | |\ | |
238 | | o 5: 'I' |
|
238 | | o 5: b92d164ad3cb 'I' | |
239 | | | |
|
239 | | | | |
240 | o | 4: 'H' |
|
240 | o | 4: 4ea5b230dea3 'H' | |
241 | | | |
|
241 | | | | |
242 | | o 3: 'G' |
|
242 | | o 3: c6001eacfde5 'G' | |
243 | |/| |
|
243 | |/| | |
244 | o | 2: 'F' |
|
244 | o | 2: 8908a377a434 'F' | |
245 | | | |
|
245 | | | | |
246 | | o 1: 'E' |
|
246 | | o 1: 7fb047a69f22 'E' | |
247 | |/ |
|
247 | |/ | |
248 | o 0: 'A' |
|
248 | o 0: 426bada5c675 'A' | |
249 |
|
249 | |||
250 | $ hg rebase -s I -d H --collapse --config ui.merge=internal:other |
|
250 | $ hg rebase -s I -d H --collapse --config ui.merge=internal:other | |
251 | rebasing 5:b92d164ad3cb "I" (I) |
|
251 | rebasing 5:b92d164ad3cb "I" (I) | |
252 | rebasing 6:0cfbc7e8faaf "Merge" |
|
252 | rebasing 6:0cfbc7e8faaf "Merge" | |
253 | rebasing 7:c6aaf0d259c0 "J" (tip) |
|
253 | rebasing 7:c6aaf0d259c0 "J" (tip) | |
254 | saved backup bundle to $TESTTMP/a6/.hg/strip-backup/b92d164ad3cb-88fd7ab7-rebase.hg (glob) |
|
254 | saved backup bundle to $TESTTMP/a6/.hg/strip-backup/b92d164ad3cb-88fd7ab7-rebase.hg (glob) | |
255 |
|
255 | |||
256 | $ hg tglog |
|
256 | $ hg tglog | |
257 | @ 5: 'Collapsed revision |
|
257 | @ 5: 65079693dac4 'Collapsed revision | |
258 | | * I |
|
258 | | * I | |
259 | | * Merge |
|
259 | | * Merge | |
260 | | * J' |
|
260 | | * J' | |
261 | o 4: 'H' |
|
261 | o 4: 4ea5b230dea3 'H' | |
262 | | |
|
262 | | | |
263 | | o 3: 'G' |
|
263 | | o 3: c6001eacfde5 'G' | |
264 | |/| |
|
264 | |/| | |
265 | o | 2: 'F' |
|
265 | o | 2: 8908a377a434 'F' | |
266 | | | |
|
266 | | | | |
267 | | o 1: 'E' |
|
267 | | o 1: 7fb047a69f22 'E' | |
268 | |/ |
|
268 | |/ | |
269 | o 0: 'A' |
|
269 | o 0: 426bada5c675 'A' | |
270 |
|
270 | |||
271 |
|
271 | |||
272 | $ hg log --rev tip |
|
272 | $ hg log --rev tip | |
273 | changeset: 5:65079693dac4 |
|
273 | changeset: 5:65079693dac4 | |
274 | tag: tip |
|
274 | tag: tip | |
275 | user: test |
|
275 | user: test | |
276 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
276 | date: Thu Jan 01 00:00:00 1970 +0000 | |
277 | summary: Collapsed revision |
|
277 | summary: Collapsed revision | |
278 |
|
278 | |||
279 |
|
279 | |||
280 | $ cd .. |
|
280 | $ cd .. | |
281 |
|
281 | |||
282 | Ensure --continue restores a correct state (issue3046) and phase: |
|
282 | Ensure --continue restores a correct state (issue3046) and phase: | |
283 | $ hg init a7 |
|
283 | $ hg init a7 | |
284 | $ cd a7 |
|
284 | $ cd a7 | |
285 |
|
285 | |||
286 | $ hg debugdrawdag <<EOF |
|
286 | $ hg debugdrawdag <<EOF | |
287 | > C B |
|
287 | > C B | |
288 | > |/ |
|
288 | > |/ | |
289 | > A |
|
289 | > A | |
290 | > EOF |
|
290 | > EOF | |
291 | $ hg up -q C |
|
291 | $ hg up -q C | |
292 | $ echo 'B2' > B |
|
292 | $ echo 'B2' > B | |
293 | $ hg ci -A -m 'B2' |
|
293 | $ hg ci -A -m 'B2' | |
294 | adding B |
|
294 | adding B | |
295 | $ hg phase --force --secret . |
|
295 | $ hg phase --force --secret . | |
296 | $ hg rebase -s . -d B --config ui.merge=internal:fail |
|
296 | $ hg rebase -s . -d B --config ui.merge=internal:fail | |
297 | rebasing 3:17b4880d2402 "B2" (tip) |
|
297 | rebasing 3:17b4880d2402 "B2" (tip) | |
298 | merging B |
|
298 | merging B | |
299 | warning: conflicts while merging B! (edit, then use 'hg resolve --mark') |
|
299 | warning: conflicts while merging B! (edit, then use 'hg resolve --mark') | |
300 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
300 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
301 | [1] |
|
301 | [1] | |
302 | $ hg resolve --all -t internal:local |
|
302 | $ hg resolve --all -t internal:local | |
303 | (no more unresolved files) |
|
303 | (no more unresolved files) | |
304 | continue: hg rebase --continue |
|
304 | continue: hg rebase --continue | |
305 | $ hg rebase -c |
|
305 | $ hg rebase -c | |
306 | rebasing 3:17b4880d2402 "B2" (tip) |
|
306 | rebasing 3:17b4880d2402 "B2" (tip) | |
307 | note: rebase of 3:17b4880d2402 created no changes to commit |
|
307 | note: rebase of 3:17b4880d2402 created no changes to commit | |
308 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/17b4880d2402-1ae1f6cc-rebase.hg (glob) |
|
308 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/17b4880d2402-1ae1f6cc-rebase.hg (glob) | |
309 | $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n" |
|
309 | $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n" | |
310 | o 2:draft 'C' |
|
310 | o 2:draft 'C' | |
311 | | |
|
311 | | | |
312 | | @ 1:draft 'B' |
|
312 | | @ 1:draft 'B' | |
313 | |/ |
|
313 | |/ | |
314 | o 0:draft 'A' |
|
314 | o 0:draft 'A' | |
315 |
|
315 | |||
316 |
|
316 | |||
317 | $ cd .. |
|
317 | $ cd .. |
@@ -1,465 +1,465 b'' | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > rebase= |
|
3 | > rebase= | |
4 | > |
|
4 | > | |
5 | > [phases] |
|
5 | > [phases] | |
6 | > publish=False |
|
6 | > publish=False | |
7 | > |
|
7 | > | |
8 | > [alias] |
|
8 | > [alias] | |
9 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" |
|
9 | > tglog = log -G --template "{rev}: {node|short} '{desc}' {branches}\n" | |
10 | > tglogp = log -G --template "{rev}:{phase} '{desc}' {branches}\n" |
|
10 | > tglogp = log -G --template "{rev}: {node|short} {phase} '{desc}' {branches}\n" | |
11 | > EOF |
|
11 | > EOF | |
12 |
|
12 | |||
13 |
|
13 | |||
14 | $ hg init a |
|
14 | $ hg init a | |
15 | $ cd a |
|
15 | $ cd a | |
16 |
|
16 | |||
17 | $ echo A > A |
|
17 | $ echo A > A | |
18 | $ hg ci -Am A |
|
18 | $ hg ci -Am A | |
19 | adding A |
|
19 | adding A | |
20 |
|
20 | |||
21 | $ echo B > B |
|
21 | $ echo B > B | |
22 | $ hg ci -Am B |
|
22 | $ hg ci -Am B | |
23 | adding B |
|
23 | adding B | |
24 |
|
24 | |||
25 | $ echo C >> A |
|
25 | $ echo C >> A | |
26 | $ hg ci -m C |
|
26 | $ hg ci -m C | |
27 |
|
27 | |||
28 | $ hg up -q -C 0 |
|
28 | $ hg up -q -C 0 | |
29 |
|
29 | |||
30 | $ echo D >> A |
|
30 | $ echo D >> A | |
31 | $ hg ci -m D |
|
31 | $ hg ci -m D | |
32 | created new head |
|
32 | created new head | |
33 |
|
33 | |||
34 | $ echo E > E |
|
34 | $ echo E > E | |
35 | $ hg ci -Am E |
|
35 | $ hg ci -Am E | |
36 | adding E |
|
36 | adding E | |
37 |
|
37 | |||
38 | $ cd .. |
|
38 | $ cd .. | |
39 |
|
39 | |||
40 |
|
40 | |||
41 | Changes during an interruption - continue: |
|
41 | Changes during an interruption - continue: | |
42 |
|
42 | |||
43 | $ hg clone -q -u . a a1 |
|
43 | $ hg clone -q -u . a a1 | |
44 | $ cd a1 |
|
44 | $ cd a1 | |
45 |
|
45 | |||
46 | $ hg tglog |
|
46 | $ hg tglog | |
47 | @ 4: 'E' |
|
47 | @ 4: ae36e8e3dfd7 'E' | |
48 | | |
|
48 | | | |
49 | o 3: 'D' |
|
49 | o 3: 46b37eabc604 'D' | |
50 | | |
|
50 | | | |
51 | | o 2: 'C' |
|
51 | | o 2: 965c486023db 'C' | |
52 | | | |
|
52 | | | | |
53 | | o 1: 'B' |
|
53 | | o 1: 27547f69f254 'B' | |
54 | |/ |
|
54 | |/ | |
55 | o 0: 'A' |
|
55 | o 0: 4a2df7238c3b 'A' | |
56 |
|
56 | |||
57 | Rebasing B onto E: |
|
57 | Rebasing B onto E: | |
58 |
|
58 | |||
59 | $ hg rebase -s 1 -d 4 |
|
59 | $ hg rebase -s 1 -d 4 | |
60 | rebasing 1:27547f69f254 "B" |
|
60 | rebasing 1:27547f69f254 "B" | |
61 | rebasing 2:965c486023db "C" |
|
61 | rebasing 2:965c486023db "C" | |
62 | merging A |
|
62 | merging A | |
63 | warning: conflicts while merging A! (edit, then use 'hg resolve --mark') |
|
63 | warning: conflicts while merging A! (edit, then use 'hg resolve --mark') | |
64 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
64 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
65 | [1] |
|
65 | [1] | |
66 |
|
66 | |||
67 | Force a commit on C during the interruption: |
|
67 | Force a commit on C during the interruption: | |
68 |
|
68 | |||
69 | $ hg up -q -C 2 --config 'extensions.rebase=!' |
|
69 | $ hg up -q -C 2 --config 'extensions.rebase=!' | |
70 |
|
70 | |||
71 | $ echo 'Extra' > Extra |
|
71 | $ echo 'Extra' > Extra | |
72 | $ hg add Extra |
|
72 | $ hg add Extra | |
73 | $ hg ci -m 'Extra' --config 'extensions.rebase=!' |
|
73 | $ hg ci -m 'Extra' --config 'extensions.rebase=!' | |
74 |
|
74 | |||
75 | Force this commit onto secret phase |
|
75 | Force this commit onto secret phase | |
76 |
|
76 | |||
77 | $ hg phase --force --secret 6 |
|
77 | $ hg phase --force --secret 6 | |
78 |
|
78 | |||
79 | $ hg tglogp |
|
79 | $ hg tglogp | |
80 | @ 6:secret 'Extra' |
|
80 | @ 6: deb5d2f93d8b secret 'Extra' | |
81 | | |
|
81 | | | |
82 | | o 5:draft 'B' |
|
82 | | o 5: 45396c49d53b draft 'B' | |
83 | | | |
|
83 | | | | |
84 | | o 4:draft 'E' |
|
84 | | o 4: ae36e8e3dfd7 draft 'E' | |
85 | | | |
|
85 | | | | |
86 | | o 3:draft 'D' |
|
86 | | o 3: 46b37eabc604 draft 'D' | |
87 | | | |
|
87 | | | | |
88 | o | 2:draft 'C' |
|
88 | o | 2: 965c486023db draft 'C' | |
89 | | | |
|
89 | | | | |
90 | o | 1:draft 'B' |
|
90 | o | 1: 27547f69f254 draft 'B' | |
91 | |/ |
|
91 | |/ | |
92 | o 0:draft 'A' |
|
92 | o 0: 4a2df7238c3b draft 'A' | |
93 |
|
93 | |||
94 | Resume the rebasing: |
|
94 | Resume the rebasing: | |
95 |
|
95 | |||
96 | $ hg rebase --continue |
|
96 | $ hg rebase --continue | |
97 | already rebased 1:27547f69f254 "B" as 45396c49d53b |
|
97 | already rebased 1:27547f69f254 "B" as 45396c49d53b | |
98 | rebasing 2:965c486023db "C" |
|
98 | rebasing 2:965c486023db "C" | |
99 | merging A |
|
99 | merging A | |
100 | warning: conflicts while merging A! (edit, then use 'hg resolve --mark') |
|
100 | warning: conflicts while merging A! (edit, then use 'hg resolve --mark') | |
101 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
101 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
102 | [1] |
|
102 | [1] | |
103 |
|
103 | |||
104 | Solve the conflict and go on: |
|
104 | Solve the conflict and go on: | |
105 |
|
105 | |||
106 | $ echo 'conflict solved' > A |
|
106 | $ echo 'conflict solved' > A | |
107 | $ rm A.orig |
|
107 | $ rm A.orig | |
108 | $ hg resolve -m A |
|
108 | $ hg resolve -m A | |
109 | (no more unresolved files) |
|
109 | (no more unresolved files) | |
110 | continue: hg rebase --continue |
|
110 | continue: hg rebase --continue | |
111 |
|
111 | |||
112 | $ hg rebase --continue |
|
112 | $ hg rebase --continue | |
113 | already rebased 1:27547f69f254 "B" as 45396c49d53b |
|
113 | already rebased 1:27547f69f254 "B" as 45396c49d53b | |
114 | rebasing 2:965c486023db "C" |
|
114 | rebasing 2:965c486023db "C" | |
115 | warning: orphaned descendants detected, not stripping 27547f69f254, 965c486023db |
|
115 | warning: orphaned descendants detected, not stripping 27547f69f254, 965c486023db | |
116 |
|
116 | |||
117 | $ hg tglogp |
|
117 | $ hg tglogp | |
118 | o 7:draft 'C' |
|
118 | o 7: d2d25e26288e draft 'C' | |
119 | | |
|
119 | | | |
120 | | o 6:secret 'Extra' |
|
120 | | o 6: deb5d2f93d8b secret 'Extra' | |
121 | | | |
|
121 | | | | |
122 | o | 5:draft 'B' |
|
122 | o | 5: 45396c49d53b draft 'B' | |
123 | | | |
|
123 | | | | |
124 | @ | 4:draft 'E' |
|
124 | @ | 4: ae36e8e3dfd7 draft 'E' | |
125 | | | |
|
125 | | | | |
126 | o | 3:draft 'D' |
|
126 | o | 3: 46b37eabc604 draft 'D' | |
127 | | | |
|
127 | | | | |
128 | | o 2:draft 'C' |
|
128 | | o 2: 965c486023db draft 'C' | |
129 | | | |
|
129 | | | | |
130 | | o 1:draft 'B' |
|
130 | | o 1: 27547f69f254 draft 'B' | |
131 | |/ |
|
131 | |/ | |
132 | o 0:draft 'A' |
|
132 | o 0: 4a2df7238c3b draft 'A' | |
133 |
|
133 | |||
134 | $ cd .. |
|
134 | $ cd .. | |
135 |
|
135 | |||
136 |
|
136 | |||
137 | Changes during an interruption - abort: |
|
137 | Changes during an interruption - abort: | |
138 |
|
138 | |||
139 | $ hg clone -q -u . a a2 |
|
139 | $ hg clone -q -u . a a2 | |
140 | $ cd a2 |
|
140 | $ cd a2 | |
141 |
|
141 | |||
142 | $ hg tglog |
|
142 | $ hg tglog | |
143 | @ 4: 'E' |
|
143 | @ 4: ae36e8e3dfd7 'E' | |
144 | | |
|
144 | | | |
145 | o 3: 'D' |
|
145 | o 3: 46b37eabc604 'D' | |
146 | | |
|
146 | | | |
147 | | o 2: 'C' |
|
147 | | o 2: 965c486023db 'C' | |
148 | | | |
|
148 | | | | |
149 | | o 1: 'B' |
|
149 | | o 1: 27547f69f254 'B' | |
150 | |/ |
|
150 | |/ | |
151 | o 0: 'A' |
|
151 | o 0: 4a2df7238c3b 'A' | |
152 |
|
152 | |||
153 | Rebasing B onto E: |
|
153 | Rebasing B onto E: | |
154 |
|
154 | |||
155 | $ hg rebase -s 1 -d 4 |
|
155 | $ hg rebase -s 1 -d 4 | |
156 | rebasing 1:27547f69f254 "B" |
|
156 | rebasing 1:27547f69f254 "B" | |
157 | rebasing 2:965c486023db "C" |
|
157 | rebasing 2:965c486023db "C" | |
158 | merging A |
|
158 | merging A | |
159 | warning: conflicts while merging A! (edit, then use 'hg resolve --mark') |
|
159 | warning: conflicts while merging A! (edit, then use 'hg resolve --mark') | |
160 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
160 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
161 | [1] |
|
161 | [1] | |
162 |
|
162 | |||
163 | Force a commit on B' during the interruption: |
|
163 | Force a commit on B' during the interruption: | |
164 |
|
164 | |||
165 | $ hg up -q -C 5 --config 'extensions.rebase=!' |
|
165 | $ hg up -q -C 5 --config 'extensions.rebase=!' | |
166 |
|
166 | |||
167 | $ echo 'Extra' > Extra |
|
167 | $ echo 'Extra' > Extra | |
168 | $ hg add Extra |
|
168 | $ hg add Extra | |
169 | $ hg ci -m 'Extra' --config 'extensions.rebase=!' |
|
169 | $ hg ci -m 'Extra' --config 'extensions.rebase=!' | |
170 |
|
170 | |||
171 | $ hg tglog |
|
171 | $ hg tglog | |
172 | @ 6: 'Extra' |
|
172 | @ 6: 402ee3642b59 'Extra' | |
173 | | |
|
173 | | | |
174 | o 5: 'B' |
|
174 | o 5: 45396c49d53b 'B' | |
175 | | |
|
175 | | | |
176 | o 4: 'E' |
|
176 | o 4: ae36e8e3dfd7 'E' | |
177 | | |
|
177 | | | |
178 | o 3: 'D' |
|
178 | o 3: 46b37eabc604 'D' | |
179 | | |
|
179 | | | |
180 | | o 2: 'C' |
|
180 | | o 2: 965c486023db 'C' | |
181 | | | |
|
181 | | | | |
182 | | o 1: 'B' |
|
182 | | o 1: 27547f69f254 'B' | |
183 | |/ |
|
183 | |/ | |
184 | o 0: 'A' |
|
184 | o 0: 4a2df7238c3b 'A' | |
185 |
|
185 | |||
186 | Abort the rebasing: |
|
186 | Abort the rebasing: | |
187 |
|
187 | |||
188 | $ hg rebase --abort |
|
188 | $ hg rebase --abort | |
189 | warning: new changesets detected on destination branch, can't strip |
|
189 | warning: new changesets detected on destination branch, can't strip | |
190 | rebase aborted |
|
190 | rebase aborted | |
191 |
|
191 | |||
192 | $ hg tglog |
|
192 | $ hg tglog | |
193 | @ 6: 'Extra' |
|
193 | @ 6: 402ee3642b59 'Extra' | |
194 | | |
|
194 | | | |
195 | o 5: 'B' |
|
195 | o 5: 45396c49d53b 'B' | |
196 | | |
|
196 | | | |
197 | o 4: 'E' |
|
197 | o 4: ae36e8e3dfd7 'E' | |
198 | | |
|
198 | | | |
199 | o 3: 'D' |
|
199 | o 3: 46b37eabc604 'D' | |
200 | | |
|
200 | | | |
201 | | o 2: 'C' |
|
201 | | o 2: 965c486023db 'C' | |
202 | | | |
|
202 | | | | |
203 | | o 1: 'B' |
|
203 | | o 1: 27547f69f254 'B' | |
204 | |/ |
|
204 | |/ | |
205 | o 0: 'A' |
|
205 | o 0: 4a2df7238c3b 'A' | |
206 |
|
206 | |||
207 | $ cd .. |
|
207 | $ cd .. | |
208 |
|
208 | |||
209 | Changes during an interruption - abort (again): |
|
209 | Changes during an interruption - abort (again): | |
210 |
|
210 | |||
211 | $ hg clone -q -u . a a3 |
|
211 | $ hg clone -q -u . a a3 | |
212 | $ cd a3 |
|
212 | $ cd a3 | |
213 |
|
213 | |||
214 | $ hg tglogp |
|
214 | $ hg tglogp | |
215 | @ 4:draft 'E' |
|
215 | @ 4: ae36e8e3dfd7 draft 'E' | |
216 | | |
|
216 | | | |
217 | o 3:draft 'D' |
|
217 | o 3: 46b37eabc604 draft 'D' | |
218 | | |
|
218 | | | |
219 | | o 2:draft 'C' |
|
219 | | o 2: 965c486023db draft 'C' | |
220 | | | |
|
220 | | | | |
221 | | o 1:draft 'B' |
|
221 | | o 1: 27547f69f254 draft 'B' | |
222 | |/ |
|
222 | |/ | |
223 | o 0:draft 'A' |
|
223 | o 0: 4a2df7238c3b draft 'A' | |
224 |
|
224 | |||
225 | Rebasing B onto E: |
|
225 | Rebasing B onto E: | |
226 |
|
226 | |||
227 | $ hg rebase -s 1 -d 4 |
|
227 | $ hg rebase -s 1 -d 4 | |
228 | rebasing 1:27547f69f254 "B" |
|
228 | rebasing 1:27547f69f254 "B" | |
229 | rebasing 2:965c486023db "C" |
|
229 | rebasing 2:965c486023db "C" | |
230 | merging A |
|
230 | merging A | |
231 | warning: conflicts while merging A! (edit, then use 'hg resolve --mark') |
|
231 | warning: conflicts while merging A! (edit, then use 'hg resolve --mark') | |
232 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
232 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
233 | [1] |
|
233 | [1] | |
234 |
|
234 | |||
235 | Change phase on B and B' |
|
235 | Change phase on B and B' | |
236 |
|
236 | |||
237 | $ hg up -q -C 5 --config 'extensions.rebase=!' |
|
237 | $ hg up -q -C 5 --config 'extensions.rebase=!' | |
238 | $ hg phase --public 1 |
|
238 | $ hg phase --public 1 | |
239 | $ hg phase --public 5 |
|
239 | $ hg phase --public 5 | |
240 | $ hg phase --secret -f 2 |
|
240 | $ hg phase --secret -f 2 | |
241 |
|
241 | |||
242 | $ hg tglogp |
|
242 | $ hg tglogp | |
243 | @ 5:public 'B' |
|
243 | @ 5: 45396c49d53b public 'B' | |
244 | | |
|
244 | | | |
245 | o 4:public 'E' |
|
245 | o 4: ae36e8e3dfd7 public 'E' | |
246 | | |
|
246 | | | |
247 | o 3:public 'D' |
|
247 | o 3: 46b37eabc604 public 'D' | |
248 | | |
|
248 | | | |
249 | | o 2:secret 'C' |
|
249 | | o 2: 965c486023db secret 'C' | |
250 | | | |
|
250 | | | | |
251 | | o 1:public 'B' |
|
251 | | o 1: 27547f69f254 public 'B' | |
252 | |/ |
|
252 | |/ | |
253 | o 0:public 'A' |
|
253 | o 0: 4a2df7238c3b public 'A' | |
254 |
|
254 | |||
255 | Abort the rebasing: |
|
255 | Abort the rebasing: | |
256 |
|
256 | |||
257 | $ hg rebase --abort |
|
257 | $ hg rebase --abort | |
258 | warning: can't clean up public changesets 45396c49d53b |
|
258 | warning: can't clean up public changesets 45396c49d53b | |
259 | rebase aborted |
|
259 | rebase aborted | |
260 |
|
260 | |||
261 | $ hg tglogp |
|
261 | $ hg tglogp | |
262 | @ 5:public 'B' |
|
262 | @ 5: 45396c49d53b public 'B' | |
263 | | |
|
263 | | | |
264 | o 4:public 'E' |
|
264 | o 4: ae36e8e3dfd7 public 'E' | |
265 | | |
|
265 | | | |
266 | o 3:public 'D' |
|
266 | o 3: 46b37eabc604 public 'D' | |
267 | | |
|
267 | | | |
268 | | o 2:secret 'C' |
|
268 | | o 2: 965c486023db secret 'C' | |
269 | | | |
|
269 | | | | |
270 | | o 1:public 'B' |
|
270 | | o 1: 27547f69f254 public 'B' | |
271 | |/ |
|
271 | |/ | |
272 | o 0:public 'A' |
|
272 | o 0: 4a2df7238c3b public 'A' | |
273 |
|
273 | |||
274 | Test rebase interrupted by hooks |
|
274 | Test rebase interrupted by hooks | |
275 |
|
275 | |||
276 | $ hg up 2 |
|
276 | $ hg up 2 | |
277 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
277 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
278 | $ echo F > F |
|
278 | $ echo F > F | |
279 | $ hg add F |
|
279 | $ hg add F | |
280 | $ hg ci -m F |
|
280 | $ hg ci -m F | |
281 |
|
281 | |||
282 | $ cd .. |
|
282 | $ cd .. | |
283 |
|
283 | |||
284 | (precommit version) |
|
284 | (precommit version) | |
285 |
|
285 | |||
286 | $ cp -R a3 hook-precommit |
|
286 | $ cp -R a3 hook-precommit | |
287 | $ cd hook-precommit |
|
287 | $ cd hook-precommit | |
288 | $ hg rebase --source 2 --dest 5 --tool internal:other --config 'hooks.precommit=hg status | grep "M A"' |
|
288 | $ hg rebase --source 2 --dest 5 --tool internal:other --config 'hooks.precommit=hg status | grep "M A"' | |
289 | rebasing 2:965c486023db "C" |
|
289 | rebasing 2:965c486023db "C" | |
290 | M A |
|
290 | M A | |
291 | rebasing 6:a0b2430ebfb8 "F" (tip) |
|
291 | rebasing 6:a0b2430ebfb8 "F" (tip) | |
292 | abort: precommit hook exited with status 1 |
|
292 | abort: precommit hook exited with status 1 | |
293 | [255] |
|
293 | [255] | |
294 | $ hg tglogp |
|
294 | $ hg tglogp | |
295 | @ 7:secret 'C' |
|
295 | @ 7: 401ccec5e39f secret 'C' | |
296 | | |
|
296 | | | |
297 | | @ 6:secret 'F' |
|
297 | | @ 6: a0b2430ebfb8 secret 'F' | |
298 | | | |
|
298 | | | | |
299 | o | 5:public 'B' |
|
299 | o | 5: 45396c49d53b public 'B' | |
300 | | | |
|
300 | | | | |
301 | o | 4:public 'E' |
|
301 | o | 4: ae36e8e3dfd7 public 'E' | |
302 | | | |
|
302 | | | | |
303 | o | 3:public 'D' |
|
303 | o | 3: 46b37eabc604 public 'D' | |
304 | | | |
|
304 | | | | |
305 | | o 2:secret 'C' |
|
305 | | o 2: 965c486023db secret 'C' | |
306 | | | |
|
306 | | | | |
307 | | o 1:public 'B' |
|
307 | | o 1: 27547f69f254 public 'B' | |
308 | |/ |
|
308 | |/ | |
309 | o 0:public 'A' |
|
309 | o 0: 4a2df7238c3b public 'A' | |
310 |
|
310 | |||
311 | $ hg rebase --continue |
|
311 | $ hg rebase --continue | |
312 | already rebased 2:965c486023db "C" as 401ccec5e39f |
|
312 | already rebased 2:965c486023db "C" as 401ccec5e39f | |
313 | rebasing 6:a0b2430ebfb8 "F" |
|
313 | rebasing 6:a0b2430ebfb8 "F" | |
314 | saved backup bundle to $TESTTMP/hook-precommit/.hg/strip-backup/965c486023db-aa6250e7-rebase.hg (glob) |
|
314 | saved backup bundle to $TESTTMP/hook-precommit/.hg/strip-backup/965c486023db-aa6250e7-rebase.hg (glob) | |
315 | $ hg tglogp |
|
315 | $ hg tglogp | |
316 | @ 6:secret 'F' |
|
316 | @ 6: 6e92a149ac6b secret 'F' | |
317 | | |
|
317 | | | |
318 | o 5:secret 'C' |
|
318 | o 5: 401ccec5e39f secret 'C' | |
319 | | |
|
319 | | | |
320 | o 4:public 'B' |
|
320 | o 4: 45396c49d53b public 'B' | |
321 | | |
|
321 | | | |
322 | o 3:public 'E' |
|
322 | o 3: ae36e8e3dfd7 public 'E' | |
323 | | |
|
323 | | | |
324 | o 2:public 'D' |
|
324 | o 2: 46b37eabc604 public 'D' | |
325 | | |
|
325 | | | |
326 | | o 1:public 'B' |
|
326 | | o 1: 27547f69f254 public 'B' | |
327 | |/ |
|
327 | |/ | |
328 | o 0:public 'A' |
|
328 | o 0: 4a2df7238c3b public 'A' | |
329 |
|
329 | |||
330 | $ cd .. |
|
330 | $ cd .. | |
331 |
|
331 | |||
332 | (pretxncommit version) |
|
332 | (pretxncommit version) | |
333 |
|
333 | |||
334 | $ cp -R a3 hook-pretxncommit |
|
334 | $ cp -R a3 hook-pretxncommit | |
335 | $ cd hook-pretxncommit |
|
335 | $ cd hook-pretxncommit | |
336 | #if windows |
|
336 | #if windows | |
337 | $ NODE="%HG_NODE%" |
|
337 | $ NODE="%HG_NODE%" | |
338 | #else |
|
338 | #else | |
339 | $ NODE="\$HG_NODE" |
|
339 | $ NODE="\$HG_NODE" | |
340 | #endif |
|
340 | #endif | |
341 | $ hg rebase --source 2 --dest 5 --tool internal:other --config "hooks.pretxncommit=hg log -r $NODE | grep \"summary: C\"" |
|
341 | $ hg rebase --source 2 --dest 5 --tool internal:other --config "hooks.pretxncommit=hg log -r $NODE | grep \"summary: C\"" | |
342 | rebasing 2:965c486023db "C" |
|
342 | rebasing 2:965c486023db "C" | |
343 | summary: C |
|
343 | summary: C | |
344 | rebasing 6:a0b2430ebfb8 "F" (tip) |
|
344 | rebasing 6:a0b2430ebfb8 "F" (tip) | |
345 | transaction abort! |
|
345 | transaction abort! | |
346 | rollback completed |
|
346 | rollback completed | |
347 | abort: pretxncommit hook exited with status 1 |
|
347 | abort: pretxncommit hook exited with status 1 | |
348 | [255] |
|
348 | [255] | |
349 | $ hg tglogp |
|
349 | $ hg tglogp | |
350 | @ 7:secret 'C' |
|
350 | @ 7: 401ccec5e39f secret 'C' | |
351 | | |
|
351 | | | |
352 | | @ 6:secret 'F' |
|
352 | | @ 6: a0b2430ebfb8 secret 'F' | |
353 | | | |
|
353 | | | | |
354 | o | 5:public 'B' |
|
354 | o | 5: 45396c49d53b public 'B' | |
355 | | | |
|
355 | | | | |
356 | o | 4:public 'E' |
|
356 | o | 4: ae36e8e3dfd7 public 'E' | |
357 | | | |
|
357 | | | | |
358 | o | 3:public 'D' |
|
358 | o | 3: 46b37eabc604 public 'D' | |
359 | | | |
|
359 | | | | |
360 | | o 2:secret 'C' |
|
360 | | o 2: 965c486023db secret 'C' | |
361 | | | |
|
361 | | | | |
362 | | o 1:public 'B' |
|
362 | | o 1: 27547f69f254 public 'B' | |
363 | |/ |
|
363 | |/ | |
364 | o 0:public 'A' |
|
364 | o 0: 4a2df7238c3b public 'A' | |
365 |
|
365 | |||
366 | $ hg rebase --continue |
|
366 | $ hg rebase --continue | |
367 | already rebased 2:965c486023db "C" as 401ccec5e39f |
|
367 | already rebased 2:965c486023db "C" as 401ccec5e39f | |
368 | rebasing 6:a0b2430ebfb8 "F" |
|
368 | rebasing 6:a0b2430ebfb8 "F" | |
369 | saved backup bundle to $TESTTMP/hook-pretxncommit/.hg/strip-backup/965c486023db-aa6250e7-rebase.hg (glob) |
|
369 | saved backup bundle to $TESTTMP/hook-pretxncommit/.hg/strip-backup/965c486023db-aa6250e7-rebase.hg (glob) | |
370 | $ hg tglogp |
|
370 | $ hg tglogp | |
371 | @ 6:secret 'F' |
|
371 | @ 6: 6e92a149ac6b secret 'F' | |
372 | | |
|
372 | | | |
373 | o 5:secret 'C' |
|
373 | o 5: 401ccec5e39f secret 'C' | |
374 | | |
|
374 | | | |
375 | o 4:public 'B' |
|
375 | o 4: 45396c49d53b public 'B' | |
376 | | |
|
376 | | | |
377 | o 3:public 'E' |
|
377 | o 3: ae36e8e3dfd7 public 'E' | |
378 | | |
|
378 | | | |
379 | o 2:public 'D' |
|
379 | o 2: 46b37eabc604 public 'D' | |
380 | | |
|
380 | | | |
381 | | o 1:public 'B' |
|
381 | | o 1: 27547f69f254 public 'B' | |
382 | |/ |
|
382 | |/ | |
383 | o 0:public 'A' |
|
383 | o 0: 4a2df7238c3b public 'A' | |
384 |
|
384 | |||
385 | $ cd .. |
|
385 | $ cd .. | |
386 |
|
386 | |||
387 | (pretxnclose version) |
|
387 | (pretxnclose version) | |
388 |
|
388 | |||
389 | $ cp -R a3 hook-pretxnclose |
|
389 | $ cp -R a3 hook-pretxnclose | |
390 | $ cd hook-pretxnclose |
|
390 | $ cd hook-pretxnclose | |
391 | $ hg rebase --source 2 --dest 5 --tool internal:other --config 'hooks.pretxnclose=hg log -r tip | grep "summary: C"' |
|
391 | $ hg rebase --source 2 --dest 5 --tool internal:other --config 'hooks.pretxnclose=hg log -r tip | grep "summary: C"' | |
392 | rebasing 2:965c486023db "C" |
|
392 | rebasing 2:965c486023db "C" | |
393 | summary: C |
|
393 | summary: C | |
394 | rebasing 6:a0b2430ebfb8 "F" (tip) |
|
394 | rebasing 6:a0b2430ebfb8 "F" (tip) | |
395 | transaction abort! |
|
395 | transaction abort! | |
396 | rollback completed |
|
396 | rollback completed | |
397 | abort: pretxnclose hook exited with status 1 |
|
397 | abort: pretxnclose hook exited with status 1 | |
398 | [255] |
|
398 | [255] | |
399 | $ hg tglogp |
|
399 | $ hg tglogp | |
400 | @ 7:secret 'C' |
|
400 | @ 7: 401ccec5e39f secret 'C' | |
401 | | |
|
401 | | | |
402 | | @ 6:secret 'F' |
|
402 | | @ 6: a0b2430ebfb8 secret 'F' | |
403 | | | |
|
403 | | | | |
404 | o | 5:public 'B' |
|
404 | o | 5: 45396c49d53b public 'B' | |
405 | | | |
|
405 | | | | |
406 | o | 4:public 'E' |
|
406 | o | 4: ae36e8e3dfd7 public 'E' | |
407 | | | |
|
407 | | | | |
408 | o | 3:public 'D' |
|
408 | o | 3: 46b37eabc604 public 'D' | |
409 | | | |
|
409 | | | | |
410 | | o 2:secret 'C' |
|
410 | | o 2: 965c486023db secret 'C' | |
411 | | | |
|
411 | | | | |
412 | | o 1:public 'B' |
|
412 | | o 1: 27547f69f254 public 'B' | |
413 | |/ |
|
413 | |/ | |
414 | o 0:public 'A' |
|
414 | o 0: 4a2df7238c3b public 'A' | |
415 |
|
415 | |||
416 | $ hg rebase --continue |
|
416 | $ hg rebase --continue | |
417 | already rebased 2:965c486023db "C" as 401ccec5e39f |
|
417 | already rebased 2:965c486023db "C" as 401ccec5e39f | |
418 | rebasing 6:a0b2430ebfb8 "F" |
|
418 | rebasing 6:a0b2430ebfb8 "F" | |
419 | saved backup bundle to $TESTTMP/hook-pretxnclose/.hg/strip-backup/965c486023db-aa6250e7-rebase.hg (glob) |
|
419 | saved backup bundle to $TESTTMP/hook-pretxnclose/.hg/strip-backup/965c486023db-aa6250e7-rebase.hg (glob) | |
420 | $ hg tglogp |
|
420 | $ hg tglogp | |
421 | @ 6:secret 'F' |
|
421 | @ 6: 6e92a149ac6b secret 'F' | |
422 | | |
|
422 | | | |
423 | o 5:secret 'C' |
|
423 | o 5: 401ccec5e39f secret 'C' | |
424 | | |
|
424 | | | |
425 | o 4:public 'B' |
|
425 | o 4: 45396c49d53b public 'B' | |
426 | | |
|
426 | | | |
427 | o 3:public 'E' |
|
427 | o 3: ae36e8e3dfd7 public 'E' | |
428 | | |
|
428 | | | |
429 | o 2:public 'D' |
|
429 | o 2: 46b37eabc604 public 'D' | |
430 | | |
|
430 | | | |
431 | | o 1:public 'B' |
|
431 | | o 1: 27547f69f254 public 'B' | |
432 | |/ |
|
432 | |/ | |
433 | o 0:public 'A' |
|
433 | o 0: 4a2df7238c3b public 'A' | |
434 |
|
434 | |||
435 | $ cd .. |
|
435 | $ cd .. | |
436 |
|
436 | |||
437 | Make sure merge state is cleaned up after a no-op rebase merge (issue5494) |
|
437 | Make sure merge state is cleaned up after a no-op rebase merge (issue5494) | |
438 | $ hg init repo |
|
438 | $ hg init repo | |
439 | $ cd repo |
|
439 | $ cd repo | |
440 | $ echo a > a |
|
440 | $ echo a > a | |
441 | $ hg commit -qAm base |
|
441 | $ hg commit -qAm base | |
442 | $ echo b >> a |
|
442 | $ echo b >> a | |
443 | $ hg commit -qm b |
|
443 | $ hg commit -qm b | |
444 | $ hg up '.^' |
|
444 | $ hg up '.^' | |
445 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
445 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
446 | $ echo c >> a |
|
446 | $ echo c >> a | |
447 | $ hg commit -qm c |
|
447 | $ hg commit -qm c | |
448 | $ hg rebase -s 1 -d 2 --noninteractive |
|
448 | $ hg rebase -s 1 -d 2 --noninteractive | |
449 | rebasing 1:fdaca8533b86 "b" |
|
449 | rebasing 1:fdaca8533b86 "b" | |
450 | merging a |
|
450 | merging a | |
451 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
451 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
452 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
452 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
453 | [1] |
|
453 | [1] | |
454 | $ echo a > a |
|
454 | $ echo a > a | |
455 | $ echo c >> a |
|
455 | $ echo c >> a | |
456 | $ hg resolve --mark a |
|
456 | $ hg resolve --mark a | |
457 | (no more unresolved files) |
|
457 | (no more unresolved files) | |
458 | continue: hg rebase --continue |
|
458 | continue: hg rebase --continue | |
459 | $ hg rebase --continue |
|
459 | $ hg rebase --continue | |
460 | rebasing 1:fdaca8533b86 "b" |
|
460 | rebasing 1:fdaca8533b86 "b" | |
461 | note: rebase of 1:fdaca8533b86 created no changes to commit |
|
461 | note: rebase of 1:fdaca8533b86 created no changes to commit | |
462 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/fdaca8533b86-7fd70513-rebase.hg (glob) |
|
462 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/fdaca8533b86-7fd70513-rebase.hg (glob) | |
463 | $ hg resolve --list |
|
463 | $ hg resolve --list | |
464 | $ test -f .hg/merge |
|
464 | $ test -f .hg/merge | |
465 | [1] |
|
465 | [1] |
@@ -1,130 +1,130 b'' | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > rebase= |
|
3 | > rebase= | |
4 | > |
|
4 | > | |
5 | > [phases] |
|
5 | > [phases] | |
6 | > publish=False |
|
6 | > publish=False | |
7 | > |
|
7 | > | |
8 | > [alias] |
|
8 | > [alias] | |
9 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" |
|
9 | > tglog = log -G --template "{rev}: {node|short} '{desc}' {branches}\n" | |
10 | > EOF |
|
10 | > EOF | |
11 |
|
11 | |||
12 |
|
12 | |||
13 | $ hg init a |
|
13 | $ hg init a | |
14 | $ cd a |
|
14 | $ cd a | |
15 |
|
15 | |||
16 | $ echo c1 > c1 |
|
16 | $ echo c1 > c1 | |
17 | $ hg ci -Am c1 |
|
17 | $ hg ci -Am c1 | |
18 | adding c1 |
|
18 | adding c1 | |
19 |
|
19 | |||
20 | $ echo c2 > c2 |
|
20 | $ echo c2 > c2 | |
21 | $ hg ci -Am c2 |
|
21 | $ hg ci -Am c2 | |
22 | adding c2 |
|
22 | adding c2 | |
23 |
|
23 | |||
24 | $ echo l1 > l1 |
|
24 | $ echo l1 > l1 | |
25 | $ hg ci -Am l1 |
|
25 | $ hg ci -Am l1 | |
26 | adding l1 |
|
26 | adding l1 | |
27 |
|
27 | |||
28 | $ hg up -q -C 1 |
|
28 | $ hg up -q -C 1 | |
29 |
|
29 | |||
30 | $ echo r1 > r1 |
|
30 | $ echo r1 > r1 | |
31 | $ hg ci -Am r1 |
|
31 | $ hg ci -Am r1 | |
32 | adding r1 |
|
32 | adding r1 | |
33 | created new head |
|
33 | created new head | |
34 |
|
34 | |||
35 | $ echo r2 > r2 |
|
35 | $ echo r2 > r2 | |
36 | $ hg ci -Am r2 |
|
36 | $ hg ci -Am r2 | |
37 | adding r2 |
|
37 | adding r2 | |
38 |
|
38 | |||
39 | $ hg tglog |
|
39 | $ hg tglog | |
40 | @ 4: 'r2' |
|
40 | @ 4: 225af64d03e6 'r2' | |
41 | | |
|
41 | | | |
42 | o 3: 'r1' |
|
42 | o 3: 8d0a8c99b309 'r1' | |
43 | | |
|
43 | | | |
44 | | o 2: 'l1' |
|
44 | | o 2: 87c180a611f2 'l1' | |
45 | |/ |
|
45 | |/ | |
46 | o 1: 'c2' |
|
46 | o 1: 56daeba07f4b 'c2' | |
47 | | |
|
47 | | | |
48 | o 0: 'c1' |
|
48 | o 0: e8faad3d03ff 'c1' | |
49 |
|
49 | |||
50 | Rebase with no arguments - single revision in source branch: |
|
50 | Rebase with no arguments - single revision in source branch: | |
51 |
|
51 | |||
52 | $ hg up -q -C 2 |
|
52 | $ hg up -q -C 2 | |
53 |
|
53 | |||
54 | $ hg rebase |
|
54 | $ hg rebase | |
55 | rebasing 2:87c180a611f2 "l1" |
|
55 | rebasing 2:87c180a611f2 "l1" | |
56 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/87c180a611f2-a5be192d-rebase.hg (glob) |
|
56 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/87c180a611f2-a5be192d-rebase.hg (glob) | |
57 |
|
57 | |||
58 | $ hg tglog |
|
58 | $ hg tglog | |
59 | @ 4: 'l1' |
|
59 | @ 4: b1152cc99655 'l1' | |
60 | | |
|
60 | | | |
61 | o 3: 'r2' |
|
61 | o 3: 225af64d03e6 'r2' | |
62 | | |
|
62 | | | |
63 | o 2: 'r1' |
|
63 | o 2: 8d0a8c99b309 'r1' | |
64 | | |
|
64 | | | |
65 | o 1: 'c2' |
|
65 | o 1: 56daeba07f4b 'c2' | |
66 | | |
|
66 | | | |
67 | o 0: 'c1' |
|
67 | o 0: e8faad3d03ff 'c1' | |
68 |
|
68 | |||
69 | $ cd .. |
|
69 | $ cd .. | |
70 |
|
70 | |||
71 |
|
71 | |||
72 | $ hg init b |
|
72 | $ hg init b | |
73 | $ cd b |
|
73 | $ cd b | |
74 |
|
74 | |||
75 | $ echo c1 > c1 |
|
75 | $ echo c1 > c1 | |
76 | $ hg ci -Am c1 |
|
76 | $ hg ci -Am c1 | |
77 | adding c1 |
|
77 | adding c1 | |
78 |
|
78 | |||
79 | $ echo c2 > c2 |
|
79 | $ echo c2 > c2 | |
80 | $ hg ci -Am c2 |
|
80 | $ hg ci -Am c2 | |
81 | adding c2 |
|
81 | adding c2 | |
82 |
|
82 | |||
83 | $ echo l1 > l1 |
|
83 | $ echo l1 > l1 | |
84 | $ hg ci -Am l1 |
|
84 | $ hg ci -Am l1 | |
85 | adding l1 |
|
85 | adding l1 | |
86 |
|
86 | |||
87 | $ echo l2 > l2 |
|
87 | $ echo l2 > l2 | |
88 | $ hg ci -Am l2 |
|
88 | $ hg ci -Am l2 | |
89 | adding l2 |
|
89 | adding l2 | |
90 |
|
90 | |||
91 | $ hg up -q -C 1 |
|
91 | $ hg up -q -C 1 | |
92 |
|
92 | |||
93 | $ echo r1 > r1 |
|
93 | $ echo r1 > r1 | |
94 | $ hg ci -Am r1 |
|
94 | $ hg ci -Am r1 | |
95 | adding r1 |
|
95 | adding r1 | |
96 | created new head |
|
96 | created new head | |
97 |
|
97 | |||
98 | $ hg tglog |
|
98 | $ hg tglog | |
99 | @ 4: 'r1' |
|
99 | @ 4: 8d0a8c99b309 'r1' | |
100 | | |
|
100 | | | |
101 | | o 3: 'l2' |
|
101 | | o 3: 1ac923b736ef 'l2' | |
102 | | | |
|
102 | | | | |
103 | | o 2: 'l1' |
|
103 | | o 2: 87c180a611f2 'l1' | |
104 | |/ |
|
104 | |/ | |
105 | o 1: 'c2' |
|
105 | o 1: 56daeba07f4b 'c2' | |
106 | | |
|
106 | | | |
107 | o 0: 'c1' |
|
107 | o 0: e8faad3d03ff 'c1' | |
108 |
|
108 | |||
109 | Rebase with no arguments - single revision in target branch: |
|
109 | Rebase with no arguments - single revision in target branch: | |
110 |
|
110 | |||
111 | $ hg up -q -C 3 |
|
111 | $ hg up -q -C 3 | |
112 |
|
112 | |||
113 | $ hg rebase |
|
113 | $ hg rebase | |
114 | rebasing 2:87c180a611f2 "l1" |
|
114 | rebasing 2:87c180a611f2 "l1" | |
115 | rebasing 3:1ac923b736ef "l2" |
|
115 | rebasing 3:1ac923b736ef "l2" | |
116 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/87c180a611f2-b980535c-rebase.hg (glob) |
|
116 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/87c180a611f2-b980535c-rebase.hg (glob) | |
117 |
|
117 | |||
118 | $ hg tglog |
|
118 | $ hg tglog | |
119 | @ 4: 'l2' |
|
119 | @ 4: 023181307ed0 'l2' | |
120 | | |
|
120 | | | |
121 | o 3: 'l1' |
|
121 | o 3: 913ab52b43b4 'l1' | |
122 | | |
|
122 | | | |
123 | o 2: 'r1' |
|
123 | o 2: 8d0a8c99b309 'r1' | |
124 | | |
|
124 | | | |
125 | o 1: 'c2' |
|
125 | o 1: 56daeba07f4b 'c2' | |
126 | | |
|
126 | | | |
127 | o 0: 'c1' |
|
127 | o 0: e8faad3d03ff 'c1' | |
128 |
|
128 | |||
129 |
|
129 | |||
130 | $ cd .. |
|
130 | $ cd .. |
@@ -1,191 +1,191 b'' | |||||
1 | This emulates the effects of an hg pull --rebase in which the remote repo |
|
1 | This emulates the effects of an hg pull --rebase in which the remote repo | |
2 | already has one local mq patch |
|
2 | already has one local mq patch | |
3 |
|
3 | |||
4 | $ cat >> $HGRCPATH <<EOF |
|
4 | $ cat >> $HGRCPATH <<EOF | |
5 | > [format] |
|
5 | > [format] | |
6 | > usegeneraldelta=yes |
|
6 | > usegeneraldelta=yes | |
7 | > [extensions] |
|
7 | > [extensions] | |
8 | > rebase= |
|
8 | > rebase= | |
9 | > mq= |
|
9 | > mq= | |
10 | > |
|
10 | > | |
11 | > [phases] |
|
11 | > [phases] | |
12 | > publish=False |
|
12 | > publish=False | |
13 | > |
|
13 | > | |
14 | > [alias] |
|
14 | > [alias] | |
15 | > tglog = log -G --template "{rev}: '{desc}' tags: {tags}\n" |
|
15 | > tglog = log -G --template "{rev}: {node|short} '{desc}' tags: {tags}\n" | |
16 | > EOF |
|
16 | > EOF | |
17 |
|
17 | |||
18 |
|
18 | |||
19 | $ hg init a |
|
19 | $ hg init a | |
20 | $ cd a |
|
20 | $ cd a | |
21 | $ hg qinit -c |
|
21 | $ hg qinit -c | |
22 |
|
22 | |||
23 | $ echo c1 > c1 |
|
23 | $ echo c1 > c1 | |
24 | $ hg add c1 |
|
24 | $ hg add c1 | |
25 | $ hg ci -m C1 |
|
25 | $ hg ci -m C1 | |
26 |
|
26 | |||
27 | $ echo r1 > r1 |
|
27 | $ echo r1 > r1 | |
28 | $ hg add r1 |
|
28 | $ hg add r1 | |
29 | $ hg ci -m R1 |
|
29 | $ hg ci -m R1 | |
30 |
|
30 | |||
31 | $ hg up -q 0 |
|
31 | $ hg up -q 0 | |
32 |
|
32 | |||
33 | $ hg qnew p0.patch -d '1 0' |
|
33 | $ hg qnew p0.patch -d '1 0' | |
34 | $ echo p0 > p0 |
|
34 | $ echo p0 > p0 | |
35 | $ hg add p0 |
|
35 | $ hg add p0 | |
36 | $ hg qref -m P0 |
|
36 | $ hg qref -m P0 | |
37 |
|
37 | |||
38 | $ hg qnew p1.patch -d '2 0' |
|
38 | $ hg qnew p1.patch -d '2 0' | |
39 | $ echo p1 > p1 |
|
39 | $ echo p1 > p1 | |
40 | $ hg add p1 |
|
40 | $ hg add p1 | |
41 | $ hg qref -m P1 |
|
41 | $ hg qref -m P1 | |
42 |
|
42 | |||
43 | $ hg export qtip > p1.patch |
|
43 | $ hg export qtip > p1.patch | |
44 |
|
44 | |||
45 | $ hg up -q -C 1 |
|
45 | $ hg up -q -C 1 | |
46 |
|
46 | |||
47 | $ hg import p1.patch |
|
47 | $ hg import p1.patch | |
48 | applying p1.patch |
|
48 | applying p1.patch | |
49 |
|
49 | |||
50 | $ rm p1.patch |
|
50 | $ rm p1.patch | |
51 |
|
51 | |||
52 | $ hg up -q -C qtip |
|
52 | $ hg up -q -C qtip | |
53 |
|
53 | |||
54 | $ hg rebase -v |
|
54 | $ hg rebase -v | |
55 | rebasing 2:13a46ce44f60 "P0" (p0.patch qbase) |
|
55 | rebasing 2:13a46ce44f60 "P0" (p0.patch qbase) | |
56 | resolving manifests |
|
56 | resolving manifests | |
57 | removing p0 |
|
57 | removing p0 | |
58 | getting r1 |
|
58 | getting r1 | |
59 | resolving manifests |
|
59 | resolving manifests | |
60 | getting p0 |
|
60 | getting p0 | |
61 | committing files: |
|
61 | committing files: | |
62 | p0 |
|
62 | p0 | |
63 | committing manifest |
|
63 | committing manifest | |
64 | committing changelog |
|
64 | committing changelog | |
65 | rebasing 3:148775c71080 "P1" (p1.patch qtip) |
|
65 | rebasing 3:148775c71080 "P1" (p1.patch qtip) | |
66 | resolving manifests |
|
66 | resolving manifests | |
67 | note: rebase of 3:148775c71080 created no changes to commit |
|
67 | note: rebase of 3:148775c71080 created no changes to commit | |
68 | rebase merging completed |
|
68 | rebase merging completed | |
69 | updating mq patch p0.patch to 5:9ecc820b1737 |
|
69 | updating mq patch p0.patch to 5:9ecc820b1737 | |
70 | $TESTTMP/a/.hg/patches/p0.patch (glob) |
|
70 | $TESTTMP/a/.hg/patches/p0.patch (glob) | |
71 | 2 changesets found |
|
71 | 2 changesets found | |
72 | uncompressed size of bundle content: |
|
72 | uncompressed size of bundle content: | |
73 | 348 (changelog) |
|
73 | 348 (changelog) | |
74 | 324 (manifests) |
|
74 | 324 (manifests) | |
75 | 129 p0 |
|
75 | 129 p0 | |
76 | 129 p1 |
|
76 | 129 p1 | |
77 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/13a46ce44f60-5da6ecfb-rebase.hg (glob) |
|
77 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/13a46ce44f60-5da6ecfb-rebase.hg (glob) | |
78 | 2 changesets found |
|
78 | 2 changesets found | |
79 | uncompressed size of bundle content: |
|
79 | uncompressed size of bundle content: | |
80 | 403 (changelog) |
|
80 | 403 (changelog) | |
81 | 324 (manifests) |
|
81 | 324 (manifests) | |
82 | 129 p0 |
|
82 | 129 p0 | |
83 | 129 p1 |
|
83 | 129 p1 | |
84 | adding branch |
|
84 | adding branch | |
85 | adding changesets |
|
85 | adding changesets | |
86 | adding manifests |
|
86 | adding manifests | |
87 | adding file changes |
|
87 | adding file changes | |
88 | added 2 changesets with 2 changes to 2 files |
|
88 | added 2 changesets with 2 changes to 2 files | |
89 | rebase completed |
|
89 | rebase completed | |
90 | 1 revisions have been skipped |
|
90 | 1 revisions have been skipped | |
91 |
|
91 | |||
92 | $ hg tglog |
|
92 | $ hg tglog | |
93 | @ 3: 'P0' tags: p0.patch qbase qtip tip |
|
93 | @ 3: 9ecc820b1737 'P0' tags: p0.patch qbase qtip tip | |
94 | | |
|
94 | | | |
95 | o 2: 'P1' tags: qparent |
|
95 | o 2: 869d8b134a27 'P1' tags: qparent | |
96 | | |
|
96 | | | |
97 | o 1: 'R1' tags: |
|
97 | o 1: da108f2755df 'R1' tags: | |
98 | | |
|
98 | | | |
99 | o 0: 'C1' tags: |
|
99 | o 0: cd320d50b341 'C1' tags: | |
100 |
|
100 | |||
101 | $ cd .. |
|
101 | $ cd .. | |
102 |
|
102 | |||
103 |
|
103 | |||
104 | $ hg init b |
|
104 | $ hg init b | |
105 | $ cd b |
|
105 | $ cd b | |
106 | $ hg qinit -c |
|
106 | $ hg qinit -c | |
107 |
|
107 | |||
108 | $ for i in r0 r1 r2 r3 r4 r5 r6; |
|
108 | $ for i in r0 r1 r2 r3 r4 r5 r6; | |
109 | > do |
|
109 | > do | |
110 | > echo $i > $i |
|
110 | > echo $i > $i | |
111 | > hg ci -Am $i |
|
111 | > hg ci -Am $i | |
112 | > done |
|
112 | > done | |
113 | adding r0 |
|
113 | adding r0 | |
114 | adding r1 |
|
114 | adding r1 | |
115 | adding r2 |
|
115 | adding r2 | |
116 | adding r3 |
|
116 | adding r3 | |
117 | adding r4 |
|
117 | adding r4 | |
118 | adding r5 |
|
118 | adding r5 | |
119 | adding r6 |
|
119 | adding r6 | |
120 |
|
120 | |||
121 | $ hg qimport -r 1:tip |
|
121 | $ hg qimport -r 1:tip | |
122 |
|
122 | |||
123 | $ hg up -q 0 |
|
123 | $ hg up -q 0 | |
124 |
|
124 | |||
125 | $ for i in r1 r3 r7 r8; |
|
125 | $ for i in r1 r3 r7 r8; | |
126 | > do |
|
126 | > do | |
127 | > echo $i > $i |
|
127 | > echo $i > $i | |
128 | > hg ci -Am branch2-$i |
|
128 | > hg ci -Am branch2-$i | |
129 | > done |
|
129 | > done | |
130 | adding r1 |
|
130 | adding r1 | |
131 | created new head |
|
131 | created new head | |
132 | adding r3 |
|
132 | adding r3 | |
133 | adding r7 |
|
133 | adding r7 | |
134 | adding r8 |
|
134 | adding r8 | |
135 |
|
135 | |||
136 | $ echo somethingelse > r4 |
|
136 | $ echo somethingelse > r4 | |
137 | $ hg ci -Am branch2-r4 |
|
137 | $ hg ci -Am branch2-r4 | |
138 | adding r4 |
|
138 | adding r4 | |
139 |
|
139 | |||
140 | $ echo r6 > r6 |
|
140 | $ echo r6 > r6 | |
141 | $ hg ci -Am branch2-r6 |
|
141 | $ hg ci -Am branch2-r6 | |
142 | adding r6 |
|
142 | adding r6 | |
143 |
|
143 | |||
144 | $ hg up -q qtip |
|
144 | $ hg up -q qtip | |
145 |
|
145 | |||
146 | $ HGMERGE=internal:fail hg rebase |
|
146 | $ HGMERGE=internal:fail hg rebase | |
147 | rebasing 1:b4bffa6e4776 "r1" (qbase r1) |
|
147 | rebasing 1:b4bffa6e4776 "r1" (qbase r1) | |
148 | note: rebase of 1:b4bffa6e4776 created no changes to commit |
|
148 | note: rebase of 1:b4bffa6e4776 created no changes to commit | |
149 | rebasing 2:c0fd129beb01 "r2" (r2) |
|
149 | rebasing 2:c0fd129beb01 "r2" (r2) | |
150 | rebasing 3:6ff5b8feed8e "r3" (r3) |
|
150 | rebasing 3:6ff5b8feed8e "r3" (r3) | |
151 | note: rebase of 3:6ff5b8feed8e created no changes to commit |
|
151 | note: rebase of 3:6ff5b8feed8e created no changes to commit | |
152 | rebasing 4:094320fec554 "r4" (r4) |
|
152 | rebasing 4:094320fec554 "r4" (r4) | |
153 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
153 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
154 | [1] |
|
154 | [1] | |
155 |
|
155 | |||
156 | $ HGMERGE=internal:local hg resolve --all |
|
156 | $ HGMERGE=internal:local hg resolve --all | |
157 | (no more unresolved files) |
|
157 | (no more unresolved files) | |
158 | continue: hg rebase --continue |
|
158 | continue: hg rebase --continue | |
159 |
|
159 | |||
160 | $ hg rebase --continue |
|
160 | $ hg rebase --continue | |
161 | already rebased 1:b4bffa6e4776 "r1" (qbase r1) as 057f55ff8f44 |
|
161 | already rebased 1:b4bffa6e4776 "r1" (qbase r1) as 057f55ff8f44 | |
162 | already rebased 2:c0fd129beb01 "r2" (r2) as 1660ab13ce9a |
|
162 | already rebased 2:c0fd129beb01 "r2" (r2) as 1660ab13ce9a | |
163 | already rebased 3:6ff5b8feed8e "r3" (r3) as 1660ab13ce9a |
|
163 | already rebased 3:6ff5b8feed8e "r3" (r3) as 1660ab13ce9a | |
164 | rebasing 4:094320fec554 "r4" (r4) |
|
164 | rebasing 4:094320fec554 "r4" (r4) | |
165 | note: rebase of 4:094320fec554 created no changes to commit |
|
165 | note: rebase of 4:094320fec554 created no changes to commit | |
166 | rebasing 5:681a378595ba "r5" (r5) |
|
166 | rebasing 5:681a378595ba "r5" (r5) | |
167 | rebasing 6:512a1f24768b "r6" (qtip r6) |
|
167 | rebasing 6:512a1f24768b "r6" (qtip r6) | |
168 | note: rebase of 6:512a1f24768b created no changes to commit |
|
168 | note: rebase of 6:512a1f24768b created no changes to commit | |
169 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/b4bffa6e4776-b9bfb84d-rebase.hg (glob) |
|
169 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/b4bffa6e4776-b9bfb84d-rebase.hg (glob) | |
170 |
|
170 | |||
171 | $ hg tglog |
|
171 | $ hg tglog | |
172 | @ 8: 'r5' tags: qtip r5 tip |
|
172 | @ 8: 0b9735ce8f0a 'r5' tags: qtip r5 tip | |
173 | | |
|
173 | | | |
174 | o 7: 'r2' tags: qbase r2 |
|
174 | o 7: 1660ab13ce9a 'r2' tags: qbase r2 | |
175 | | |
|
175 | | | |
176 | o 6: 'branch2-r6' tags: qparent |
|
176 | o 6: 057f55ff8f44 'branch2-r6' tags: qparent | |
177 | | |
|
177 | | | |
178 | o 5: 'branch2-r4' tags: |
|
178 | o 5: 1d7287f8deb1 'branch2-r4' tags: | |
179 | | |
|
179 | | | |
180 | o 4: 'branch2-r8' tags: |
|
180 | o 4: 3c10b9db2bd5 'branch2-r8' tags: | |
181 | | |
|
181 | | | |
182 | o 3: 'branch2-r7' tags: |
|
182 | o 3: b684023158dc 'branch2-r7' tags: | |
183 | | |
|
183 | | | |
184 | o 2: 'branch2-r3' tags: |
|
184 | o 2: d817754b1251 'branch2-r3' tags: | |
185 | | |
|
185 | | | |
186 | o 1: 'branch2-r1' tags: |
|
186 | o 1: 0621a206f8a4 'branch2-r1' tags: | |
187 | | |
|
187 | | | |
188 | o 0: 'r0' tags: |
|
188 | o 0: 222799e2f90b 'r0' tags: | |
189 |
|
189 | |||
190 |
|
190 | |||
191 | $ cd .. |
|
191 | $ cd .. |
@@ -1,360 +1,360 b'' | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > rebase= |
|
3 | > rebase= | |
4 | > mq= |
|
4 | > mq= | |
5 | > |
|
5 | > | |
6 | > [mq] |
|
6 | > [mq] | |
7 | > plain=true |
|
7 | > plain=true | |
8 | > |
|
8 | > | |
9 | > [alias] |
|
9 | > [alias] | |
10 | > tglog = log -G --template "{rev}: '{desc}' tags: {tags}\n" |
|
10 | > tglog = log -G --template "{rev}: {node|short} '{desc}' tags: {tags}\n" | |
11 | > EOF |
|
11 | > EOF | |
12 |
|
12 | |||
13 |
|
13 | |||
14 | $ hg init a |
|
14 | $ hg init a | |
15 | $ cd a |
|
15 | $ cd a | |
16 | $ hg qinit -c |
|
16 | $ hg qinit -c | |
17 |
|
17 | |||
18 | $ echo c1 > f |
|
18 | $ echo c1 > f | |
19 | $ hg add f |
|
19 | $ hg add f | |
20 | $ hg ci -m C1 |
|
20 | $ hg ci -m C1 | |
21 |
|
21 | |||
22 | $ echo r1 > f |
|
22 | $ echo r1 > f | |
23 | $ hg ci -m R1 |
|
23 | $ hg ci -m R1 | |
24 |
|
24 | |||
25 | $ hg up -q 0 |
|
25 | $ hg up -q 0 | |
26 |
|
26 | |||
27 | $ hg qnew f.patch -d '1 0' |
|
27 | $ hg qnew f.patch -d '1 0' | |
28 | $ echo mq1 > f |
|
28 | $ echo mq1 > f | |
29 | $ hg qref -m P0 |
|
29 | $ hg qref -m P0 | |
30 |
|
30 | |||
31 | $ hg qnew f2.patch |
|
31 | $ hg qnew f2.patch | |
32 | $ echo mq2 > f |
|
32 | $ echo mq2 > f | |
33 | $ hg qref -m P1 -d '2 0' |
|
33 | $ hg qref -m P1 -d '2 0' | |
34 |
|
34 | |||
35 | $ hg tglog |
|
35 | $ hg tglog | |
36 | @ 3: 'P1' tags: f2.patch qtip tip |
|
36 | @ 3: 929394423cd3 'P1' tags: f2.patch qtip tip | |
37 | | |
|
37 | | | |
38 | o 2: 'P0' tags: f.patch qbase |
|
38 | o 2: 3504f44bffc0 'P0' tags: f.patch qbase | |
39 | | |
|
39 | | | |
40 | | o 1: 'R1' tags: |
|
40 | | o 1: bac9ed9960d8 'R1' tags: | |
41 | |/ |
|
41 | |/ | |
42 | o 0: 'C1' tags: qparent |
|
42 | o 0: 36f36ddbca61 'C1' tags: qparent | |
43 |
|
43 | |||
44 |
|
44 | |||
45 | Rebase - try to rebase on an applied mq patch: |
|
45 | Rebase - try to rebase on an applied mq patch: | |
46 |
|
46 | |||
47 | $ hg rebase -s 1 -d 3 |
|
47 | $ hg rebase -s 1 -d 3 | |
48 | abort: cannot rebase onto an applied mq patch |
|
48 | abort: cannot rebase onto an applied mq patch | |
49 | [255] |
|
49 | [255] | |
50 |
|
50 | |||
51 | Rebase - same thing, but mq patch is default dest: |
|
51 | Rebase - same thing, but mq patch is default dest: | |
52 |
|
52 | |||
53 | $ hg up -q 1 |
|
53 | $ hg up -q 1 | |
54 | $ hg rebase |
|
54 | $ hg rebase | |
55 | abort: cannot rebase onto an applied mq patch |
|
55 | abort: cannot rebase onto an applied mq patch | |
56 | [255] |
|
56 | [255] | |
57 | $ hg up -q qtip |
|
57 | $ hg up -q qtip | |
58 |
|
58 | |||
59 | Rebase - generate a conflict: |
|
59 | Rebase - generate a conflict: | |
60 |
|
60 | |||
61 | $ hg rebase -s 2 -d 1 |
|
61 | $ hg rebase -s 2 -d 1 | |
62 | rebasing 2:3504f44bffc0 "P0" (f.patch qbase) |
|
62 | rebasing 2:3504f44bffc0 "P0" (f.patch qbase) | |
63 | merging f |
|
63 | merging f | |
64 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') |
|
64 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') | |
65 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
65 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
66 | [1] |
|
66 | [1] | |
67 |
|
67 | |||
68 | Fix the 1st conflict: |
|
68 | Fix the 1st conflict: | |
69 |
|
69 | |||
70 | $ echo mq1r1 > f |
|
70 | $ echo mq1r1 > f | |
71 | $ hg resolve -m f |
|
71 | $ hg resolve -m f | |
72 | (no more unresolved files) |
|
72 | (no more unresolved files) | |
73 | continue: hg rebase --continue |
|
73 | continue: hg rebase --continue | |
74 | $ hg rebase -c |
|
74 | $ hg rebase -c | |
75 | rebasing 2:3504f44bffc0 "P0" (f.patch qbase) |
|
75 | rebasing 2:3504f44bffc0 "P0" (f.patch qbase) | |
76 | rebasing 3:929394423cd3 "P1" (f2.patch qtip tip) |
|
76 | rebasing 3:929394423cd3 "P1" (f2.patch qtip tip) | |
77 | merging f |
|
77 | merging f | |
78 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') |
|
78 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') | |
79 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
79 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
80 | [1] |
|
80 | [1] | |
81 |
|
81 | |||
82 | Fix the 2nd conflict: |
|
82 | Fix the 2nd conflict: | |
83 |
|
83 | |||
84 | $ echo mq1r1mq2 > f |
|
84 | $ echo mq1r1mq2 > f | |
85 | $ hg resolve -m f |
|
85 | $ hg resolve -m f | |
86 | (no more unresolved files) |
|
86 | (no more unresolved files) | |
87 | continue: hg rebase --continue |
|
87 | continue: hg rebase --continue | |
88 | $ hg rebase -c |
|
88 | $ hg rebase -c | |
89 | already rebased 2:3504f44bffc0 "P0" (f.patch qbase) as ebe9914c0d1c |
|
89 | already rebased 2:3504f44bffc0 "P0" (f.patch qbase) as ebe9914c0d1c | |
90 | rebasing 3:929394423cd3 "P1" (f2.patch qtip) |
|
90 | rebasing 3:929394423cd3 "P1" (f2.patch qtip) | |
91 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/3504f44bffc0-30595b40-rebase.hg (glob) |
|
91 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/3504f44bffc0-30595b40-rebase.hg (glob) | |
92 |
|
92 | |||
93 | $ hg tglog |
|
93 | $ hg tglog | |
94 | @ 3: 'P1' tags: f2.patch qtip tip |
|
94 | @ 3: 462012cf340c 'P1' tags: f2.patch qtip tip | |
95 | | |
|
95 | | | |
96 | o 2: 'P0' tags: f.patch qbase |
|
96 | o 2: ebe9914c0d1c 'P0' tags: f.patch qbase | |
97 | | |
|
97 | | | |
98 | o 1: 'R1' tags: qparent |
|
98 | o 1: bac9ed9960d8 'R1' tags: qparent | |
99 | | |
|
99 | | | |
100 | o 0: 'C1' tags: |
|
100 | o 0: 36f36ddbca61 'C1' tags: | |
101 |
|
101 | |||
102 | $ hg up -q qbase |
|
102 | $ hg up -q qbase | |
103 |
|
103 | |||
104 | $ cat f |
|
104 | $ cat f | |
105 | mq1r1 |
|
105 | mq1r1 | |
106 |
|
106 | |||
107 | $ cat .hg/patches/f.patch |
|
107 | $ cat .hg/patches/f.patch | |
108 | # HG changeset patch |
|
108 | # HG changeset patch | |
109 | # User test |
|
109 | # User test | |
110 | # Date 1 0 |
|
110 | # Date 1 0 | |
111 | # Thu Jan 01 00:00:01 1970 +0000 |
|
111 | # Thu Jan 01 00:00:01 1970 +0000 | |
112 | # Node ID ebe9914c0d1c3f60096e952fa4dbb3d377dea3ab |
|
112 | # Node ID ebe9914c0d1c3f60096e952fa4dbb3d377dea3ab | |
113 | # Parent bac9ed9960d8992bcad75864a879fa76cadaf1b0 |
|
113 | # Parent bac9ed9960d8992bcad75864a879fa76cadaf1b0 | |
114 | P0 |
|
114 | P0 | |
115 |
|
115 | |||
116 | diff -r bac9ed9960d8 -r ebe9914c0d1c f |
|
116 | diff -r bac9ed9960d8 -r ebe9914c0d1c f | |
117 | --- a/f Thu Jan 01 00:00:00 1970 +0000 |
|
117 | --- a/f Thu Jan 01 00:00:00 1970 +0000 | |
118 | +++ b/f Thu Jan 01 00:00:01 1970 +0000 |
|
118 | +++ b/f Thu Jan 01 00:00:01 1970 +0000 | |
119 | @@ -1,1 +1,1 @@ |
|
119 | @@ -1,1 +1,1 @@ | |
120 | -r1 |
|
120 | -r1 | |
121 | +mq1r1 |
|
121 | +mq1r1 | |
122 |
|
122 | |||
123 | Update to qtip: |
|
123 | Update to qtip: | |
124 |
|
124 | |||
125 | $ hg up -q qtip |
|
125 | $ hg up -q qtip | |
126 |
|
126 | |||
127 | $ cat f |
|
127 | $ cat f | |
128 | mq1r1mq2 |
|
128 | mq1r1mq2 | |
129 |
|
129 | |||
130 | $ cat .hg/patches/f2.patch |
|
130 | $ cat .hg/patches/f2.patch | |
131 | # HG changeset patch |
|
131 | # HG changeset patch | |
132 | # User test |
|
132 | # User test | |
133 | # Date 2 0 |
|
133 | # Date 2 0 | |
134 | # Thu Jan 01 00:00:02 1970 +0000 |
|
134 | # Thu Jan 01 00:00:02 1970 +0000 | |
135 | # Node ID 462012cf340c97d44d62377c985a423f6bb82f07 |
|
135 | # Node ID 462012cf340c97d44d62377c985a423f6bb82f07 | |
136 | # Parent ebe9914c0d1c3f60096e952fa4dbb3d377dea3ab |
|
136 | # Parent ebe9914c0d1c3f60096e952fa4dbb3d377dea3ab | |
137 | P1 |
|
137 | P1 | |
138 |
|
138 | |||
139 | diff -r ebe9914c0d1c -r 462012cf340c f |
|
139 | diff -r ebe9914c0d1c -r 462012cf340c f | |
140 | --- a/f Thu Jan 01 00:00:01 1970 +0000 |
|
140 | --- a/f Thu Jan 01 00:00:01 1970 +0000 | |
141 | +++ b/f Thu Jan 01 00:00:02 1970 +0000 |
|
141 | +++ b/f Thu Jan 01 00:00:02 1970 +0000 | |
142 | @@ -1,1 +1,1 @@ |
|
142 | @@ -1,1 +1,1 @@ | |
143 | -mq1r1 |
|
143 | -mq1r1 | |
144 | +mq1r1mq2 |
|
144 | +mq1r1mq2 | |
145 |
|
145 | |||
146 | Adding one git-style patch and one normal: |
|
146 | Adding one git-style patch and one normal: | |
147 |
|
147 | |||
148 | $ hg qpop -a |
|
148 | $ hg qpop -a | |
149 | popping f2.patch |
|
149 | popping f2.patch | |
150 | popping f.patch |
|
150 | popping f.patch | |
151 | patch queue now empty |
|
151 | patch queue now empty | |
152 |
|
152 | |||
153 | $ rm -fr .hg/patches |
|
153 | $ rm -fr .hg/patches | |
154 | $ hg qinit -c |
|
154 | $ hg qinit -c | |
155 |
|
155 | |||
156 | $ hg up -q 0 |
|
156 | $ hg up -q 0 | |
157 |
|
157 | |||
158 | $ hg qnew --git f_git.patch -d '3 0' |
|
158 | $ hg qnew --git f_git.patch -d '3 0' | |
159 | $ echo mq1 > p |
|
159 | $ echo mq1 > p | |
160 | $ hg add p |
|
160 | $ hg add p | |
161 | $ hg qref --git -m 'P0 (git)' |
|
161 | $ hg qref --git -m 'P0 (git)' | |
162 |
|
162 | |||
163 | $ hg qnew f.patch -d '4 0' |
|
163 | $ hg qnew f.patch -d '4 0' | |
164 | $ echo mq2 > p |
|
164 | $ echo mq2 > p | |
165 | $ hg qref -m P1 |
|
165 | $ hg qref -m P1 | |
166 | $ hg qci -m 'save patch state' |
|
166 | $ hg qci -m 'save patch state' | |
167 |
|
167 | |||
168 | $ hg qseries -s |
|
168 | $ hg qseries -s | |
169 | f_git.patch: P0 (git) |
|
169 | f_git.patch: P0 (git) | |
170 | f.patch: P1 |
|
170 | f.patch: P1 | |
171 |
|
171 | |||
172 | $ hg -R .hg/patches manifest |
|
172 | $ hg -R .hg/patches manifest | |
173 | .hgignore |
|
173 | .hgignore | |
174 | f.patch |
|
174 | f.patch | |
175 | f_git.patch |
|
175 | f_git.patch | |
176 | series |
|
176 | series | |
177 |
|
177 | |||
178 | $ cat .hg/patches/f_git.patch |
|
178 | $ cat .hg/patches/f_git.patch | |
179 | Date: 3 0 |
|
179 | Date: 3 0 | |
180 |
|
180 | |||
181 | P0 (git) |
|
181 | P0 (git) | |
182 |
|
182 | |||
183 | diff --git a/p b/p |
|
183 | diff --git a/p b/p | |
184 | new file mode 100644 |
|
184 | new file mode 100644 | |
185 | --- /dev/null |
|
185 | --- /dev/null | |
186 | +++ b/p |
|
186 | +++ b/p | |
187 | @@ -0,0 +1,1 @@ |
|
187 | @@ -0,0 +1,1 @@ | |
188 | +mq1 |
|
188 | +mq1 | |
189 |
|
189 | |||
190 | $ cat .hg/patches/f.patch |
|
190 | $ cat .hg/patches/f.patch | |
191 | Date: 4 0 |
|
191 | Date: 4 0 | |
192 |
|
192 | |||
193 | P1 |
|
193 | P1 | |
194 |
|
194 | |||
195 | diff -r ???????????? p (glob) |
|
195 | diff -r ???????????? p (glob) | |
196 | --- a/p ??? ??? ?? ??:??:?? ???? ????? (glob) |
|
196 | --- a/p ??? ??? ?? ??:??:?? ???? ????? (glob) | |
197 | +++ b/p ??? ??? ?? ??:??:?? ???? ????? (glob) |
|
197 | +++ b/p ??? ??? ?? ??:??:?? ???? ????? (glob) | |
198 | @@ -1,1 +1,1 @@ |
|
198 | @@ -1,1 +1,1 @@ | |
199 | -mq1 |
|
199 | -mq1 | |
200 | +mq2 |
|
200 | +mq2 | |
201 |
|
201 | |||
202 |
|
202 | |||
203 | Rebase the applied mq patches: |
|
203 | Rebase the applied mq patches: | |
204 |
|
204 | |||
205 | $ hg rebase -s 2 -d 1 |
|
205 | $ hg rebase -s 2 -d 1 | |
206 | rebasing 2:0c587ffcb480 "P0 (git)" (f_git.patch qbase) |
|
206 | rebasing 2:0c587ffcb480 "P0 (git)" (f_git.patch qbase) | |
207 | rebasing 3:c7f18665e4bc "P1" (f.patch qtip tip) |
|
207 | rebasing 3:c7f18665e4bc "P1" (f.patch qtip tip) | |
208 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/0c587ffcb480-0ea5695f-rebase.hg (glob) |
|
208 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/0c587ffcb480-0ea5695f-rebase.hg (glob) | |
209 |
|
209 | |||
210 | $ hg qci -m 'save patch state' |
|
210 | $ hg qci -m 'save patch state' | |
211 |
|
211 | |||
212 | $ hg qseries -s |
|
212 | $ hg qseries -s | |
213 | f_git.patch: P0 (git) |
|
213 | f_git.patch: P0 (git) | |
214 | f.patch: P1 |
|
214 | f.patch: P1 | |
215 |
|
215 | |||
216 | $ hg -R .hg/patches manifest |
|
216 | $ hg -R .hg/patches manifest | |
217 | .hgignore |
|
217 | .hgignore | |
218 | f.patch |
|
218 | f.patch | |
219 | f_git.patch |
|
219 | f_git.patch | |
220 | series |
|
220 | series | |
221 |
|
221 | |||
222 | $ cat .hg/patches/f_git.patch |
|
222 | $ cat .hg/patches/f_git.patch | |
223 | # HG changeset patch |
|
223 | # HG changeset patch | |
224 | # User test |
|
224 | # User test | |
225 | # Date 3 0 |
|
225 | # Date 3 0 | |
226 | # Thu Jan 01 00:00:03 1970 +0000 |
|
226 | # Thu Jan 01 00:00:03 1970 +0000 | |
227 | # Node ID 12d9f6a3bbe560dee50c7c454d434add7fb8e837 |
|
227 | # Node ID 12d9f6a3bbe560dee50c7c454d434add7fb8e837 | |
228 | # Parent bac9ed9960d8992bcad75864a879fa76cadaf1b0 |
|
228 | # Parent bac9ed9960d8992bcad75864a879fa76cadaf1b0 | |
229 | P0 (git) |
|
229 | P0 (git) | |
230 |
|
230 | |||
231 | diff --git a/p b/p |
|
231 | diff --git a/p b/p | |
232 | new file mode 100644 |
|
232 | new file mode 100644 | |
233 | --- /dev/null |
|
233 | --- /dev/null | |
234 | +++ b/p |
|
234 | +++ b/p | |
235 | @@ -0,0 +1,1 @@ |
|
235 | @@ -0,0 +1,1 @@ | |
236 | +mq1 |
|
236 | +mq1 | |
237 |
|
237 | |||
238 | $ cat .hg/patches/f.patch |
|
238 | $ cat .hg/patches/f.patch | |
239 | # HG changeset patch |
|
239 | # HG changeset patch | |
240 | # User test |
|
240 | # User test | |
241 | # Date 4 0 |
|
241 | # Date 4 0 | |
242 | # Thu Jan 01 00:00:04 1970 +0000 |
|
242 | # Thu Jan 01 00:00:04 1970 +0000 | |
243 | # Node ID c77a2661c64c60d82f63c4f7aefd95b3a948a557 |
|
243 | # Node ID c77a2661c64c60d82f63c4f7aefd95b3a948a557 | |
244 | # Parent 12d9f6a3bbe560dee50c7c454d434add7fb8e837 |
|
244 | # Parent 12d9f6a3bbe560dee50c7c454d434add7fb8e837 | |
245 | P1 |
|
245 | P1 | |
246 |
|
246 | |||
247 | diff -r 12d9f6a3bbe5 -r c77a2661c64c p |
|
247 | diff -r 12d9f6a3bbe5 -r c77a2661c64c p | |
248 | --- a/p Thu Jan 01 00:00:03 1970 +0000 |
|
248 | --- a/p Thu Jan 01 00:00:03 1970 +0000 | |
249 | +++ b/p Thu Jan 01 00:00:04 1970 +0000 |
|
249 | +++ b/p Thu Jan 01 00:00:04 1970 +0000 | |
250 | @@ -1,1 +1,1 @@ |
|
250 | @@ -1,1 +1,1 @@ | |
251 | -mq1 |
|
251 | -mq1 | |
252 | +mq2 |
|
252 | +mq2 | |
253 |
|
253 | |||
254 | $ cd .. |
|
254 | $ cd .. | |
255 |
|
255 | |||
256 | Rebase with guards |
|
256 | Rebase with guards | |
257 |
|
257 | |||
258 | $ hg init foo |
|
258 | $ hg init foo | |
259 | $ cd foo |
|
259 | $ cd foo | |
260 | $ echo a > a |
|
260 | $ echo a > a | |
261 | $ hg ci -Am a |
|
261 | $ hg ci -Am a | |
262 | adding a |
|
262 | adding a | |
263 |
|
263 | |||
264 | Create mq repo with guarded patches foo and bar and empty patch: |
|
264 | Create mq repo with guarded patches foo and bar and empty patch: | |
265 |
|
265 | |||
266 | $ hg qinit |
|
266 | $ hg qinit | |
267 | $ echo guarded > guarded |
|
267 | $ echo guarded > guarded | |
268 | $ hg add guarded |
|
268 | $ hg add guarded | |
269 | $ hg qnew guarded |
|
269 | $ hg qnew guarded | |
270 | $ hg qnew empty-important -m 'important commit message' -d '1 0' |
|
270 | $ hg qnew empty-important -m 'important commit message' -d '1 0' | |
271 | $ echo bar > bar |
|
271 | $ echo bar > bar | |
272 | $ hg add bar |
|
272 | $ hg add bar | |
273 | $ hg qnew bar -d '2 0' |
|
273 | $ hg qnew bar -d '2 0' | |
274 | $ echo foo > foo |
|
274 | $ echo foo > foo | |
275 | $ hg add foo |
|
275 | $ hg add foo | |
276 | $ hg qnew foo |
|
276 | $ hg qnew foo | |
277 | $ hg qpop -a |
|
277 | $ hg qpop -a | |
278 | popping foo |
|
278 | popping foo | |
279 | popping bar |
|
279 | popping bar | |
280 | popping empty-important |
|
280 | popping empty-important | |
281 | popping guarded |
|
281 | popping guarded | |
282 | patch queue now empty |
|
282 | patch queue now empty | |
283 | $ hg qguard guarded +guarded |
|
283 | $ hg qguard guarded +guarded | |
284 | $ hg qguard bar +baz |
|
284 | $ hg qguard bar +baz | |
285 | $ hg qguard foo +baz |
|
285 | $ hg qguard foo +baz | |
286 | $ hg qselect baz |
|
286 | $ hg qselect baz | |
287 | number of unguarded, unapplied patches has changed from 1 to 3 |
|
287 | number of unguarded, unapplied patches has changed from 1 to 3 | |
288 | $ hg qpush bar |
|
288 | $ hg qpush bar | |
289 | applying empty-important |
|
289 | applying empty-important | |
290 | patch empty-important is empty |
|
290 | patch empty-important is empty | |
291 | applying bar |
|
291 | applying bar | |
292 | now at: bar |
|
292 | now at: bar | |
293 |
|
293 | |||
294 | $ hg qguard -l |
|
294 | $ hg qguard -l | |
295 | guarded: +guarded |
|
295 | guarded: +guarded | |
296 | empty-important: unguarded |
|
296 | empty-important: unguarded | |
297 | bar: +baz |
|
297 | bar: +baz | |
298 | foo: +baz |
|
298 | foo: +baz | |
299 |
|
299 | |||
300 | $ hg tglog |
|
300 | $ hg tglog | |
301 | @ 2: 'imported patch bar' tags: bar qtip tip |
|
301 | @ 2: 4f44b861d38c 'imported patch bar' tags: bar qtip tip | |
302 | | |
|
302 | | | |
303 | o 1: 'important commit message' tags: empty-important qbase |
|
303 | o 1: 0aaf4c3af7eb 'important commit message' tags: empty-important qbase | |
304 | | |
|
304 | | | |
305 | o 0: 'a' tags: qparent |
|
305 | o 0: cb9a9f314b8b 'a' tags: qparent | |
306 |
|
306 | |||
307 | Create new head to rebase bar onto: |
|
307 | Create new head to rebase bar onto: | |
308 |
|
308 | |||
309 | $ hg up -C 0 |
|
309 | $ hg up -C 0 | |
310 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
310 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
311 | $ echo b > b |
|
311 | $ echo b > b | |
312 | $ hg add b |
|
312 | $ hg add b | |
313 | $ hg ci -m b |
|
313 | $ hg ci -m b | |
314 | created new head |
|
314 | created new head | |
315 | $ hg up -C 2 |
|
315 | $ hg up -C 2 | |
316 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
316 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
317 | $ echo a >> a |
|
317 | $ echo a >> a | |
318 | $ hg qref |
|
318 | $ hg qref | |
319 |
|
319 | |||
320 | $ hg tglog |
|
320 | $ hg tglog | |
321 | @ 3: '[mq]: bar' tags: bar qtip tip |
|
321 | @ 3: d526d4536ed6 '[mq]: bar' tags: bar qtip tip | |
322 | | |
|
322 | | | |
323 | | o 2: 'b' tags: |
|
323 | | o 2: d2ae7f538514 'b' tags: | |
324 | | | |
|
324 | | | | |
325 | o | 1: 'important commit message' tags: empty-important qbase |
|
325 | o | 1: 0aaf4c3af7eb 'important commit message' tags: empty-important qbase | |
326 | |/ |
|
326 | |/ | |
327 | o 0: 'a' tags: qparent |
|
327 | o 0: cb9a9f314b8b 'a' tags: qparent | |
328 |
|
328 | |||
329 |
|
329 | |||
330 | Rebase bar (make sure series order is preserved and empty-important also is |
|
330 | Rebase bar (make sure series order is preserved and empty-important also is | |
331 | removed from the series): |
|
331 | removed from the series): | |
332 |
|
332 | |||
333 | $ hg qseries |
|
333 | $ hg qseries | |
334 | guarded |
|
334 | guarded | |
335 | empty-important |
|
335 | empty-important | |
336 | bar |
|
336 | bar | |
337 | foo |
|
337 | foo | |
338 | $ [ -f .hg/patches/empty-important ] |
|
338 | $ [ -f .hg/patches/empty-important ] | |
339 | $ hg -q rebase -d 2 |
|
339 | $ hg -q rebase -d 2 | |
340 | note: rebase of 1:0aaf4c3af7eb created no changes to commit |
|
340 | note: rebase of 1:0aaf4c3af7eb created no changes to commit | |
341 | $ hg qseries |
|
341 | $ hg qseries | |
342 | guarded |
|
342 | guarded | |
343 | bar |
|
343 | bar | |
344 | foo |
|
344 | foo | |
345 | $ [ -f .hg/patches/empty-important ] |
|
345 | $ [ -f .hg/patches/empty-important ] | |
346 | [1] |
|
346 | [1] | |
347 |
|
347 | |||
348 | $ hg qguard -l |
|
348 | $ hg qguard -l | |
349 | guarded: +guarded |
|
349 | guarded: +guarded | |
350 | bar: +baz |
|
350 | bar: +baz | |
351 | foo: +baz |
|
351 | foo: +baz | |
352 |
|
352 | |||
353 | $ hg tglog |
|
353 | $ hg tglog | |
354 | @ 2: '[mq]: bar' tags: bar qbase qtip tip |
|
354 | @ 2: 477d948bb2af '[mq]: bar' tags: bar qbase qtip tip | |
355 | | |
|
355 | | | |
356 | o 1: 'b' tags: qparent |
|
356 | o 1: d2ae7f538514 'b' tags: qparent | |
357 | | |
|
357 | | | |
358 | o 0: 'a' tags: |
|
358 | o 0: cb9a9f314b8b 'a' tags: | |
359 |
|
359 | |||
360 | $ cd .. |
|
360 | $ cd .. |
@@ -1,410 +1,410 b'' | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > rebase= |
|
3 | > rebase= | |
4 | > |
|
4 | > | |
5 | > [phases] |
|
5 | > [phases] | |
6 | > publish=False |
|
6 | > publish=False | |
7 | > |
|
7 | > | |
8 | > [alias] |
|
8 | > [alias] | |
9 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" |
|
9 | > tglog = log -G --template "{rev}: {node|short} '{desc}' {branches}\n" | |
10 | > EOF |
|
10 | > EOF | |
11 |
|
11 | |||
12 | $ hg init a |
|
12 | $ hg init a | |
13 | $ cd a |
|
13 | $ cd a | |
14 | $ hg unbundle "$TESTDIR/bundles/rebase.hg" |
|
14 | $ hg unbundle "$TESTDIR/bundles/rebase.hg" | |
15 | adding changesets |
|
15 | adding changesets | |
16 | adding manifests |
|
16 | adding manifests | |
17 | adding file changes |
|
17 | adding file changes | |
18 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
18 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
19 | new changesets cd010b8cd998:02de42196ebe |
|
19 | new changesets cd010b8cd998:02de42196ebe | |
20 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
20 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
21 | $ hg up tip |
|
21 | $ hg up tip | |
22 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
22 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
23 | $ cd .. |
|
23 | $ cd .. | |
24 |
|
24 | |||
25 | $ hg clone -q -u . a a1 |
|
25 | $ hg clone -q -u . a a1 | |
26 |
|
26 | |||
27 | $ cd a1 |
|
27 | $ cd a1 | |
28 |
|
28 | |||
29 | $ hg update 3 |
|
29 | $ hg update 3 | |
30 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
30 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
31 | $ hg branch dev-one |
|
31 | $ hg branch dev-one | |
32 | marked working directory as branch dev-one |
|
32 | marked working directory as branch dev-one | |
33 | (branches are permanent and global, did you want a bookmark?) |
|
33 | (branches are permanent and global, did you want a bookmark?) | |
34 | $ hg ci -m 'dev-one named branch' |
|
34 | $ hg ci -m 'dev-one named branch' | |
35 |
|
35 | |||
36 | $ hg update 7 |
|
36 | $ hg update 7 | |
37 | 2 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
37 | 2 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
38 | $ hg branch dev-two |
|
38 | $ hg branch dev-two | |
39 | marked working directory as branch dev-two |
|
39 | marked working directory as branch dev-two | |
40 |
|
40 | |||
41 | $ echo x > x |
|
41 | $ echo x > x | |
42 |
|
42 | |||
43 | $ hg add x |
|
43 | $ hg add x | |
44 |
|
44 | |||
45 | $ hg ci -m 'dev-two named branch' |
|
45 | $ hg ci -m 'dev-two named branch' | |
46 |
|
46 | |||
47 | $ hg tglog |
|
47 | $ hg tglog | |
48 | @ 9: 'dev-two named branch' dev-two |
|
48 | @ 9: cb039b7cae8e 'dev-two named branch' dev-two | |
49 | | |
|
49 | | | |
50 | | o 8: 'dev-one named branch' dev-one |
|
50 | | o 8: 643fc9128048 'dev-one named branch' dev-one | |
51 | | | |
|
51 | | | | |
52 | o | 7: 'H' |
|
52 | o | 7: 02de42196ebe 'H' | |
53 | | | |
|
53 | | | | |
54 | +---o 6: 'G' |
|
54 | +---o 6: eea13746799a 'G' | |
55 | | | | |
|
55 | | | | | |
56 | o | | 5: 'F' |
|
56 | o | | 5: 24b6387c8c8c 'F' | |
57 | | | | |
|
57 | | | | | |
58 | +---o 4: 'E' |
|
58 | +---o 4: 9520eea781bc 'E' | |
59 | | | |
|
59 | | | | |
60 | | o 3: 'D' |
|
60 | | o 3: 32af7686d403 'D' | |
61 | | | |
|
61 | | | | |
62 | | o 2: 'C' |
|
62 | | o 2: 5fddd98957c8 'C' | |
63 | | | |
|
63 | | | | |
64 | | o 1: 'B' |
|
64 | | o 1: 42ccdea3bb16 'B' | |
65 | |/ |
|
65 | |/ | |
66 | o 0: 'A' |
|
66 | o 0: cd010b8cd998 'A' | |
67 |
|
67 | |||
68 |
|
68 | |||
69 | Branch name containing a dash (issue3181) |
|
69 | Branch name containing a dash (issue3181) | |
70 |
|
70 | |||
71 | $ hg rebase -b dev-two -d dev-one --keepbranches |
|
71 | $ hg rebase -b dev-two -d dev-one --keepbranches | |
72 | rebasing 5:24b6387c8c8c "F" |
|
72 | rebasing 5:24b6387c8c8c "F" | |
73 | rebasing 6:eea13746799a "G" |
|
73 | rebasing 6:eea13746799a "G" | |
74 | rebasing 7:02de42196ebe "H" |
|
74 | rebasing 7:02de42196ebe "H" | |
75 | rebasing 9:cb039b7cae8e "dev-two named branch" (tip) |
|
75 | rebasing 9:cb039b7cae8e "dev-two named branch" (tip) | |
76 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/24b6387c8c8c-24cb8001-rebase.hg (glob) |
|
76 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/24b6387c8c8c-24cb8001-rebase.hg (glob) | |
77 |
|
77 | |||
78 | $ hg tglog |
|
78 | $ hg tglog | |
79 | @ 9: 'dev-two named branch' dev-two |
|
79 | @ 9: 9e70cd31750f 'dev-two named branch' dev-two | |
80 | | |
|
80 | | | |
81 | o 8: 'H' |
|
81 | o 8: 31d0e4ba75e6 'H' | |
82 | | |
|
82 | | | |
83 | | o 7: 'G' |
|
83 | | o 7: 4b988a958030 'G' | |
84 | |/| |
|
84 | |/| | |
85 | o | 6: 'F' |
|
85 | o | 6: 24de4aff8e28 'F' | |
86 | | | |
|
86 | | | | |
87 | o | 5: 'dev-one named branch' dev-one |
|
87 | o | 5: 643fc9128048 'dev-one named branch' dev-one | |
88 | | | |
|
88 | | | | |
89 | | o 4: 'E' |
|
89 | | o 4: 9520eea781bc 'E' | |
90 | | | |
|
90 | | | | |
91 | o | 3: 'D' |
|
91 | o | 3: 32af7686d403 'D' | |
92 | | | |
|
92 | | | | |
93 | o | 2: 'C' |
|
93 | o | 2: 5fddd98957c8 'C' | |
94 | | | |
|
94 | | | | |
95 | o | 1: 'B' |
|
95 | o | 1: 42ccdea3bb16 'B' | |
96 | |/ |
|
96 | |/ | |
97 | o 0: 'A' |
|
97 | o 0: cd010b8cd998 'A' | |
98 |
|
98 | |||
99 | $ hg rebase -s dev-one -d 0 --keepbranches |
|
99 | $ hg rebase -s dev-one -d 0 --keepbranches | |
100 | rebasing 5:643fc9128048 "dev-one named branch" |
|
100 | rebasing 5:643fc9128048 "dev-one named branch" | |
101 | rebasing 6:24de4aff8e28 "F" |
|
101 | rebasing 6:24de4aff8e28 "F" | |
102 | rebasing 7:4b988a958030 "G" |
|
102 | rebasing 7:4b988a958030 "G" | |
103 | rebasing 8:31d0e4ba75e6 "H" |
|
103 | rebasing 8:31d0e4ba75e6 "H" | |
104 | rebasing 9:9e70cd31750f "dev-two named branch" (tip) |
|
104 | rebasing 9:9e70cd31750f "dev-two named branch" (tip) | |
105 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/643fc9128048-c4ee9ef5-rebase.hg (glob) |
|
105 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/643fc9128048-c4ee9ef5-rebase.hg (glob) | |
106 |
|
106 | |||
107 | $ hg tglog |
|
107 | $ hg tglog | |
108 | @ 9: 'dev-two named branch' dev-two |
|
108 | @ 9: 59c2e59309fe 'dev-two named branch' dev-two | |
109 | | |
|
109 | | | |
110 | o 8: 'H' |
|
110 | o 8: 904590360559 'H' | |
111 | | |
|
111 | | | |
112 | | o 7: 'G' |
|
112 | | o 7: 1a1e6f72ec38 'G' | |
113 | |/| |
|
113 | |/| | |
114 | o | 6: 'F' |
|
114 | o | 6: 42aa3cf0fa7a 'F' | |
115 | | | |
|
115 | | | | |
116 | o | 5: 'dev-one named branch' dev-one |
|
116 | o | 5: bc8139ee757c 'dev-one named branch' dev-one | |
117 | | | |
|
117 | | | | |
118 | | o 4: 'E' |
|
118 | | o 4: 9520eea781bc 'E' | |
119 | |/ |
|
119 | |/ | |
120 | | o 3: 'D' |
|
120 | | o 3: 32af7686d403 'D' | |
121 | | | |
|
121 | | | | |
122 | | o 2: 'C' |
|
122 | | o 2: 5fddd98957c8 'C' | |
123 | | | |
|
123 | | | | |
124 | | o 1: 'B' |
|
124 | | o 1: 42ccdea3bb16 'B' | |
125 | |/ |
|
125 | |/ | |
126 | o 0: 'A' |
|
126 | o 0: cd010b8cd998 'A' | |
127 |
|
127 | |||
128 | $ hg update 3 |
|
128 | $ hg update 3 | |
129 | 3 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
129 | 3 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
130 | $ hg branch -f dev-one |
|
130 | $ hg branch -f dev-one | |
131 | marked working directory as branch dev-one |
|
131 | marked working directory as branch dev-one | |
132 | $ hg ci -m 'dev-one named branch' |
|
132 | $ hg ci -m 'dev-one named branch' | |
133 | created new head |
|
133 | created new head | |
134 |
|
134 | |||
135 | $ hg tglog |
|
135 | $ hg tglog | |
136 | @ 10: 'dev-one named branch' dev-one |
|
136 | @ 10: 643fc9128048 'dev-one named branch' dev-one | |
137 | | |
|
137 | | | |
138 | | o 9: 'dev-two named branch' dev-two |
|
138 | | o 9: 59c2e59309fe 'dev-two named branch' dev-two | |
139 | | | |
|
139 | | | | |
140 | | o 8: 'H' |
|
140 | | o 8: 904590360559 'H' | |
141 | | | |
|
141 | | | | |
142 | | | o 7: 'G' |
|
142 | | | o 7: 1a1e6f72ec38 'G' | |
143 | | |/| |
|
143 | | |/| | |
144 | | o | 6: 'F' |
|
144 | | o | 6: 42aa3cf0fa7a 'F' | |
145 | | | | |
|
145 | | | | | |
146 | | o | 5: 'dev-one named branch' dev-one |
|
146 | | o | 5: bc8139ee757c 'dev-one named branch' dev-one | |
147 | | | | |
|
147 | | | | | |
148 | | | o 4: 'E' |
|
148 | | | o 4: 9520eea781bc 'E' | |
149 | | |/ |
|
149 | | |/ | |
150 | o | 3: 'D' |
|
150 | o | 3: 32af7686d403 'D' | |
151 | | | |
|
151 | | | | |
152 | o | 2: 'C' |
|
152 | o | 2: 5fddd98957c8 'C' | |
153 | | | |
|
153 | | | | |
154 | o | 1: 'B' |
|
154 | o | 1: 42ccdea3bb16 'B' | |
155 | |/ |
|
155 | |/ | |
156 | o 0: 'A' |
|
156 | o 0: cd010b8cd998 'A' | |
157 |
|
157 | |||
158 | $ hg rebase -b 'max(branch("dev-two"))' -d dev-one --keepbranches |
|
158 | $ hg rebase -b 'max(branch("dev-two"))' -d dev-one --keepbranches | |
159 | rebasing 5:bc8139ee757c "dev-one named branch" |
|
159 | rebasing 5:bc8139ee757c "dev-one named branch" | |
160 | note: rebase of 5:bc8139ee757c created no changes to commit |
|
160 | note: rebase of 5:bc8139ee757c created no changes to commit | |
161 | rebasing 6:42aa3cf0fa7a "F" |
|
161 | rebasing 6:42aa3cf0fa7a "F" | |
162 | rebasing 7:1a1e6f72ec38 "G" |
|
162 | rebasing 7:1a1e6f72ec38 "G" | |
163 | rebasing 8:904590360559 "H" |
|
163 | rebasing 8:904590360559 "H" | |
164 | rebasing 9:59c2e59309fe "dev-two named branch" |
|
164 | rebasing 9:59c2e59309fe "dev-two named branch" | |
165 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/bc8139ee757c-f11c1080-rebase.hg (glob) |
|
165 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/bc8139ee757c-f11c1080-rebase.hg (glob) | |
166 |
|
166 | |||
167 | $ hg tglog |
|
167 | $ hg tglog | |
168 | o 9: 'dev-two named branch' dev-two |
|
168 | o 9: 71325f8bc082 'dev-two named branch' dev-two | |
169 | | |
|
169 | | | |
170 | o 8: 'H' |
|
170 | o 8: 12b2bc666e20 'H' | |
171 | | |
|
171 | | | |
172 | | o 7: 'G' |
|
172 | | o 7: 549f007a9f5f 'G' | |
173 | |/| |
|
173 | |/| | |
174 | o | 6: 'F' |
|
174 | o | 6: 679f28760620 'F' | |
175 | | | |
|
175 | | | | |
176 | @ | 5: 'dev-one named branch' dev-one |
|
176 | @ | 5: 643fc9128048 'dev-one named branch' dev-one | |
177 | | | |
|
177 | | | | |
178 | | o 4: 'E' |
|
178 | | o 4: 9520eea781bc 'E' | |
179 | | | |
|
179 | | | | |
180 | o | 3: 'D' |
|
180 | o | 3: 32af7686d403 'D' | |
181 | | | |
|
181 | | | | |
182 | o | 2: 'C' |
|
182 | o | 2: 5fddd98957c8 'C' | |
183 | | | |
|
183 | | | | |
184 | o | 1: 'B' |
|
184 | o | 1: 42ccdea3bb16 'B' | |
185 | |/ |
|
185 | |/ | |
186 | o 0: 'A' |
|
186 | o 0: cd010b8cd998 'A' | |
187 |
|
187 | |||
188 | $ hg rebase -s 'max(branch("dev-one"))' -d 0 --keepbranches |
|
188 | $ hg rebase -s 'max(branch("dev-one"))' -d 0 --keepbranches | |
189 | rebasing 5:643fc9128048 "dev-one named branch" |
|
189 | rebasing 5:643fc9128048 "dev-one named branch" | |
190 | rebasing 6:679f28760620 "F" |
|
190 | rebasing 6:679f28760620 "F" | |
191 | rebasing 7:549f007a9f5f "G" |
|
191 | rebasing 7:549f007a9f5f "G" | |
192 | rebasing 8:12b2bc666e20 "H" |
|
192 | rebasing 8:12b2bc666e20 "H" | |
193 | rebasing 9:71325f8bc082 "dev-two named branch" (tip) |
|
193 | rebasing 9:71325f8bc082 "dev-two named branch" (tip) | |
194 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/643fc9128048-6cdd1a52-rebase.hg (glob) |
|
194 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/643fc9128048-6cdd1a52-rebase.hg (glob) | |
195 |
|
195 | |||
196 | $ hg tglog |
|
196 | $ hg tglog | |
197 | o 9: 'dev-two named branch' dev-two |
|
197 | o 9: 3944801ae4ea 'dev-two named branch' dev-two | |
198 | | |
|
198 | | | |
199 | o 8: 'H' |
|
199 | o 8: 8e279d293175 'H' | |
200 | | |
|
200 | | | |
201 | | o 7: 'G' |
|
201 | | o 7: aeefee77ab01 'G' | |
202 | |/| |
|
202 | |/| | |
203 | o | 6: 'F' |
|
203 | o | 6: e908b85f3729 'F' | |
204 | | | |
|
204 | | | | |
205 | @ | 5: 'dev-one named branch' dev-one |
|
205 | @ | 5: bc8139ee757c 'dev-one named branch' dev-one | |
206 | | | |
|
206 | | | | |
207 | | o 4: 'E' |
|
207 | | o 4: 9520eea781bc 'E' | |
208 | |/ |
|
208 | |/ | |
209 | | o 3: 'D' |
|
209 | | o 3: 32af7686d403 'D' | |
210 | | | |
|
210 | | | | |
211 | | o 2: 'C' |
|
211 | | o 2: 5fddd98957c8 'C' | |
212 | | | |
|
212 | | | | |
213 | | o 1: 'B' |
|
213 | | o 1: 42ccdea3bb16 'B' | |
214 | |/ |
|
214 | |/ | |
215 | o 0: 'A' |
|
215 | o 0: cd010b8cd998 'A' | |
216 |
|
216 | |||
217 | $ hg up -r 0 > /dev/null |
|
217 | $ hg up -r 0 > /dev/null | |
218 |
|
218 | |||
219 | Rebasing descendant onto ancestor across different named branches |
|
219 | Rebasing descendant onto ancestor across different named branches | |
220 |
|
220 | |||
221 | $ hg rebase -s 1 -d 9 --keepbranches |
|
221 | $ hg rebase -s 1 -d 9 --keepbranches | |
222 | rebasing 1:42ccdea3bb16 "B" |
|
222 | rebasing 1:42ccdea3bb16 "B" | |
223 | rebasing 2:5fddd98957c8 "C" |
|
223 | rebasing 2:5fddd98957c8 "C" | |
224 | rebasing 3:32af7686d403 "D" |
|
224 | rebasing 3:32af7686d403 "D" | |
225 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/42ccdea3bb16-3cb021d3-rebase.hg (glob) |
|
225 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/42ccdea3bb16-3cb021d3-rebase.hg (glob) | |
226 |
|
226 | |||
227 | $ hg tglog |
|
227 | $ hg tglog | |
228 | o 9: 'D' |
|
228 | o 9: e9f862ce8bad 'D' | |
229 | | |
|
229 | | | |
230 | o 8: 'C' |
|
230 | o 8: a0d543090fa4 'C' | |
231 | | |
|
231 | | | |
232 | o 7: 'B' |
|
232 | o 7: 3bdb949809d9 'B' | |
233 | | |
|
233 | | | |
234 | o 6: 'dev-two named branch' dev-two |
|
234 | o 6: 3944801ae4ea 'dev-two named branch' dev-two | |
235 | | |
|
235 | | | |
236 | o 5: 'H' |
|
236 | o 5: 8e279d293175 'H' | |
237 | | |
|
237 | | | |
238 | | o 4: 'G' |
|
238 | | o 4: aeefee77ab01 'G' | |
239 | |/| |
|
239 | |/| | |
240 | o | 3: 'F' |
|
240 | o | 3: e908b85f3729 'F' | |
241 | | | |
|
241 | | | | |
242 | o | 2: 'dev-one named branch' dev-one |
|
242 | o | 2: bc8139ee757c 'dev-one named branch' dev-one | |
243 | | | |
|
243 | | | | |
244 | | o 1: 'E' |
|
244 | | o 1: 9520eea781bc 'E' | |
245 | |/ |
|
245 | |/ | |
246 | @ 0: 'A' |
|
246 | @ 0: cd010b8cd998 'A' | |
247 |
|
247 | |||
248 | $ hg rebase -s 5 -d 6 |
|
248 | $ hg rebase -s 5 -d 6 | |
249 | abort: source and destination form a cycle |
|
249 | abort: source and destination form a cycle | |
250 | [255] |
|
250 | [255] | |
251 |
|
251 | |||
252 | $ hg rebase -s 6 -d 5 |
|
252 | $ hg rebase -s 6 -d 5 | |
253 | rebasing 6:3944801ae4ea "dev-two named branch" |
|
253 | rebasing 6:3944801ae4ea "dev-two named branch" | |
254 | rebasing 7:3bdb949809d9 "B" |
|
254 | rebasing 7:3bdb949809d9 "B" | |
255 | rebasing 8:a0d543090fa4 "C" |
|
255 | rebasing 8:a0d543090fa4 "C" | |
256 | rebasing 9:e9f862ce8bad "D" (tip) |
|
256 | rebasing 9:e9f862ce8bad "D" (tip) | |
257 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/3944801ae4ea-fb46ed74-rebase.hg (glob) |
|
257 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/3944801ae4ea-fb46ed74-rebase.hg (glob) | |
258 |
|
258 | |||
259 | $ hg tglog |
|
259 | $ hg tglog | |
260 | o 9: 'D' |
|
260 | o 9: e522577ccdbd 'D' | |
261 | | |
|
261 | | | |
262 | o 8: 'C' |
|
262 | o 8: 810110211f50 'C' | |
263 | | |
|
263 | | | |
264 | o 7: 'B' |
|
264 | o 7: 160b0930ccc6 'B' | |
265 | | |
|
265 | | | |
266 | o 6: 'dev-two named branch' |
|
266 | o 6: c57724c84928 'dev-two named branch' | |
267 | | |
|
267 | | | |
268 | o 5: 'H' |
|
268 | o 5: 8e279d293175 'H' | |
269 | | |
|
269 | | | |
270 | | o 4: 'G' |
|
270 | | o 4: aeefee77ab01 'G' | |
271 | |/| |
|
271 | |/| | |
272 | o | 3: 'F' |
|
272 | o | 3: e908b85f3729 'F' | |
273 | | | |
|
273 | | | | |
274 | o | 2: 'dev-one named branch' dev-one |
|
274 | o | 2: bc8139ee757c 'dev-one named branch' dev-one | |
275 | | | |
|
275 | | | | |
276 | | o 1: 'E' |
|
276 | | o 1: 9520eea781bc 'E' | |
277 | |/ |
|
277 | |/ | |
278 | @ 0: 'A' |
|
278 | @ 0: cd010b8cd998 'A' | |
279 |
|
279 | |||
280 |
|
280 | |||
281 | Reopen branch by rebase |
|
281 | Reopen branch by rebase | |
282 |
|
282 | |||
283 | $ hg up -qr3 |
|
283 | $ hg up -qr3 | |
284 | $ hg branch -q b |
|
284 | $ hg branch -q b | |
285 | $ hg ci -m 'create b' |
|
285 | $ hg ci -m 'create b' | |
286 | $ hg ci -m 'close b' --close |
|
286 | $ hg ci -m 'close b' --close | |
287 | $ hg rebase -b 8 -d b |
|
287 | $ hg rebase -b 8 -d b | |
288 | reopening closed branch head 2b586e70108d |
|
288 | reopening closed branch head 2b586e70108d | |
289 | rebasing 5:8e279d293175 "H" |
|
289 | rebasing 5:8e279d293175 "H" | |
290 | rebasing 6:c57724c84928 "dev-two named branch" |
|
290 | rebasing 6:c57724c84928 "dev-two named branch" | |
291 | rebasing 7:160b0930ccc6 "B" |
|
291 | rebasing 7:160b0930ccc6 "B" | |
292 | rebasing 8:810110211f50 "C" |
|
292 | rebasing 8:810110211f50 "C" | |
293 | rebasing 9:e522577ccdbd "D" |
|
293 | rebasing 9:e522577ccdbd "D" | |
294 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/8e279d293175-b023e27c-rebase.hg (glob) |
|
294 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/8e279d293175-b023e27c-rebase.hg (glob) | |
295 |
|
295 | |||
296 | $ cd .. |
|
296 | $ cd .. | |
297 |
|
297 | |||
298 | Rebase to other head on branch |
|
298 | Rebase to other head on branch | |
299 |
|
299 | |||
300 | Set up a case: |
|
300 | Set up a case: | |
301 |
|
301 | |||
302 | $ hg init case1 |
|
302 | $ hg init case1 | |
303 | $ cd case1 |
|
303 | $ cd case1 | |
304 | $ touch f |
|
304 | $ touch f | |
305 | $ hg ci -qAm0 |
|
305 | $ hg ci -qAm0 | |
306 | $ hg branch -q b |
|
306 | $ hg branch -q b | |
307 | $ echo >> f |
|
307 | $ echo >> f | |
308 | $ hg ci -qAm 'b1' |
|
308 | $ hg ci -qAm 'b1' | |
309 | $ hg up -qr -2 |
|
309 | $ hg up -qr -2 | |
310 | $ hg branch -qf b |
|
310 | $ hg branch -qf b | |
311 | $ hg ci -qm 'b2' |
|
311 | $ hg ci -qm 'b2' | |
312 | $ hg up -qr -3 |
|
312 | $ hg up -qr -3 | |
313 | $ hg branch -q c |
|
313 | $ hg branch -q c | |
314 | $ hg ci -m 'c1' |
|
314 | $ hg ci -m 'c1' | |
315 |
|
315 | |||
316 | $ hg tglog |
|
316 | $ hg tglog | |
317 | @ 3: 'c1' c |
|
317 | @ 3: c062e3ecd6c6 'c1' c | |
318 | | |
|
318 | | | |
319 | | o 2: 'b2' b |
|
319 | | o 2: 792845bb77ee 'b2' b | |
320 | |/ |
|
320 | |/ | |
321 | | o 1: 'b1' b |
|
321 | | o 1: 40039acb7ca5 'b1' b | |
322 | |/ |
|
322 | |/ | |
323 | o 0: '0' |
|
323 | o 0: d681519c3ea7 '0' | |
324 |
|
324 | |||
325 | $ hg clone -q . ../case2 |
|
325 | $ hg clone -q . ../case2 | |
326 |
|
326 | |||
327 | rebase 'b2' to another lower branch head |
|
327 | rebase 'b2' to another lower branch head | |
328 |
|
328 | |||
329 | $ hg up -qr 2 |
|
329 | $ hg up -qr 2 | |
330 | $ hg rebase |
|
330 | $ hg rebase | |
331 | rebasing 2:792845bb77ee "b2" |
|
331 | rebasing 2:792845bb77ee "b2" | |
332 | note: rebase of 2:792845bb77ee created no changes to commit |
|
332 | note: rebase of 2:792845bb77ee created no changes to commit | |
333 | saved backup bundle to $TESTTMP/case1/.hg/strip-backup/792845bb77ee-627120ee-rebase.hg (glob) |
|
333 | saved backup bundle to $TESTTMP/case1/.hg/strip-backup/792845bb77ee-627120ee-rebase.hg (glob) | |
334 | $ hg tglog |
|
334 | $ hg tglog | |
335 | o 2: 'c1' c |
|
335 | o 2: c062e3ecd6c6 'c1' c | |
336 | | |
|
336 | | | |
337 | | @ 1: 'b1' b |
|
337 | | @ 1: 40039acb7ca5 'b1' b | |
338 | |/ |
|
338 | |/ | |
339 | o 0: '0' |
|
339 | o 0: d681519c3ea7 '0' | |
340 |
|
340 | |||
341 |
|
341 | |||
342 | rebase 'b1' on top of the tip of the branch ('b2') - ignoring the tip branch ('c1') |
|
342 | rebase 'b1' on top of the tip of the branch ('b2') - ignoring the tip branch ('c1') | |
343 |
|
343 | |||
344 | $ cd ../case2 |
|
344 | $ cd ../case2 | |
345 | $ hg up -qr 1 |
|
345 | $ hg up -qr 1 | |
346 | $ hg rebase |
|
346 | $ hg rebase | |
347 | rebasing 1:40039acb7ca5 "b1" |
|
347 | rebasing 1:40039acb7ca5 "b1" | |
348 | saved backup bundle to $TESTTMP/case2/.hg/strip-backup/40039acb7ca5-342b72d1-rebase.hg (glob) |
|
348 | saved backup bundle to $TESTTMP/case2/.hg/strip-backup/40039acb7ca5-342b72d1-rebase.hg (glob) | |
349 | $ hg tglog |
|
349 | $ hg tglog | |
350 | @ 3: 'b1' b |
|
350 | @ 3: 76abc1c6f8c7 'b1' b | |
351 | | |
|
351 | | | |
352 | | o 2: 'c1' c |
|
352 | | o 2: c062e3ecd6c6 'c1' c | |
353 | | | |
|
353 | | | | |
354 | o | 1: 'b2' b |
|
354 | o | 1: 792845bb77ee 'b2' b | |
355 | |/ |
|
355 | |/ | |
356 | o 0: '0' |
|
356 | o 0: d681519c3ea7 '0' | |
357 |
|
357 | |||
358 |
|
358 | |||
359 | rebase 'c1' to the branch head 'c2' that is closed |
|
359 | rebase 'c1' to the branch head 'c2' that is closed | |
360 |
|
360 | |||
361 | $ hg branch -qf c |
|
361 | $ hg branch -qf c | |
362 | $ hg ci -qm 'c2 closed' --close |
|
362 | $ hg ci -qm 'c2 closed' --close | |
363 | $ hg up -qr 2 |
|
363 | $ hg up -qr 2 | |
364 | $ hg tglog |
|
364 | $ hg tglog | |
365 | _ 4: 'c2 closed' c |
|
365 | _ 4: 8427af5d86f2 'c2 closed' c | |
366 | | |
|
366 | | | |
367 | o 3: 'b1' b |
|
367 | o 3: 76abc1c6f8c7 'b1' b | |
368 | | |
|
368 | | | |
369 | | @ 2: 'c1' c |
|
369 | | @ 2: c062e3ecd6c6 'c1' c | |
370 | | | |
|
370 | | | | |
371 | o | 1: 'b2' b |
|
371 | o | 1: 792845bb77ee 'b2' b | |
372 | |/ |
|
372 | |/ | |
373 | o 0: '0' |
|
373 | o 0: d681519c3ea7 '0' | |
374 |
|
374 | |||
375 | $ hg rebase |
|
375 | $ hg rebase | |
376 | abort: branch 'c' has one head - please rebase to an explicit rev |
|
376 | abort: branch 'c' has one head - please rebase to an explicit rev | |
377 | (run 'hg heads' to see all heads) |
|
377 | (run 'hg heads' to see all heads) | |
378 | [255] |
|
378 | [255] | |
379 | $ hg tglog |
|
379 | $ hg tglog | |
380 | _ 4: 'c2 closed' c |
|
380 | _ 4: 8427af5d86f2 'c2 closed' c | |
381 | | |
|
381 | | | |
382 | o 3: 'b1' b |
|
382 | o 3: 76abc1c6f8c7 'b1' b | |
383 | | |
|
383 | | | |
384 | | @ 2: 'c1' c |
|
384 | | @ 2: c062e3ecd6c6 'c1' c | |
385 | | | |
|
385 | | | | |
386 | o | 1: 'b2' b |
|
386 | o | 1: 792845bb77ee 'b2' b | |
387 | |/ |
|
387 | |/ | |
388 | o 0: '0' |
|
388 | o 0: d681519c3ea7 '0' | |
389 |
|
389 | |||
390 |
|
390 | |||
391 | $ hg up -cr 1 |
|
391 | $ hg up -cr 1 | |
392 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
392 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
393 | $ hg branch x |
|
393 | $ hg branch x | |
394 | marked working directory as branch x |
|
394 | marked working directory as branch x | |
395 | $ hg rebase -r 3:: -d . |
|
395 | $ hg rebase -r 3:: -d . | |
396 | rebasing 3:76abc1c6f8c7 "b1" |
|
396 | rebasing 3:76abc1c6f8c7 "b1" | |
397 | rebasing 4:8427af5d86f2 "c2 closed" (tip) |
|
397 | rebasing 4:8427af5d86f2 "c2 closed" (tip) | |
398 | note: rebase of 4:8427af5d86f2 created no changes to commit |
|
398 | note: rebase of 4:8427af5d86f2 created no changes to commit | |
399 | saved backup bundle to $TESTTMP/case2/.hg/strip-backup/76abc1c6f8c7-cd698d13-rebase.hg (glob) |
|
399 | saved backup bundle to $TESTTMP/case2/.hg/strip-backup/76abc1c6f8c7-cd698d13-rebase.hg (glob) | |
400 | $ hg tglog |
|
400 | $ hg tglog | |
401 | o 3: 'b1' x |
|
401 | o 3: 117b0ed08075 'b1' x | |
402 | | |
|
402 | | | |
403 | | o 2: 'c1' c |
|
403 | | o 2: c062e3ecd6c6 'c1' c | |
404 | | | |
|
404 | | | | |
405 | @ | 1: 'b2' b |
|
405 | @ | 1: 792845bb77ee 'b2' b | |
406 | |/ |
|
406 | |/ | |
407 | o 0: '0' |
|
407 | o 0: d681519c3ea7 '0' | |
408 |
|
408 | |||
409 |
|
409 | |||
410 | $ cd .. |
|
410 | $ cd .. |
@@ -1,426 +1,426 b'' | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [format] |
|
2 | > [format] | |
3 | > usegeneraldelta=yes |
|
3 | > usegeneraldelta=yes | |
4 | > [extensions] |
|
4 | > [extensions] | |
5 | > rebase= |
|
5 | > rebase= | |
6 | > drawdag=$TESTDIR/drawdag.py |
|
6 | > drawdag=$TESTDIR/drawdag.py | |
7 | > [alias] |
|
7 | > [alias] | |
8 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" |
|
8 | > tglog = log -G --template "{rev}: {node|short} '{desc}' {branches}\n" | |
9 | > EOF |
|
9 | > EOF | |
10 |
|
10 | |||
11 | $ hg init repo |
|
11 | $ hg init repo | |
12 | $ cd repo |
|
12 | $ cd repo | |
13 |
|
13 | |||
14 | $ echo A > a |
|
14 | $ echo A > a | |
15 | $ echo >> a |
|
15 | $ echo >> a | |
16 | $ hg ci -Am A |
|
16 | $ hg ci -Am A | |
17 | adding a |
|
17 | adding a | |
18 |
|
18 | |||
19 | $ echo B > a |
|
19 | $ echo B > a | |
20 | $ echo >> a |
|
20 | $ echo >> a | |
21 | $ hg ci -m B |
|
21 | $ hg ci -m B | |
22 |
|
22 | |||
23 | $ echo C > a |
|
23 | $ echo C > a | |
24 | $ echo >> a |
|
24 | $ echo >> a | |
25 | $ hg ci -m C |
|
25 | $ hg ci -m C | |
26 |
|
26 | |||
27 | $ hg up -q -C 0 |
|
27 | $ hg up -q -C 0 | |
28 |
|
28 | |||
29 | $ echo D >> a |
|
29 | $ echo D >> a | |
30 | $ hg ci -Am AD |
|
30 | $ hg ci -Am AD | |
31 | created new head |
|
31 | created new head | |
32 |
|
32 | |||
33 | $ hg tglog |
|
33 | $ hg tglog | |
34 | @ 3: 'AD' |
|
34 | @ 3: 3878212183bd 'AD' | |
35 | | |
|
35 | | | |
36 | | o 2: 'C' |
|
36 | | o 2: 30ae917c0e4f 'C' | |
37 | | | |
|
37 | | | | |
38 | | o 1: 'B' |
|
38 | | o 1: 0f4f7cb4f549 'B' | |
39 | |/ |
|
39 | |/ | |
40 | o 0: 'A' |
|
40 | o 0: 1e635d440a73 'A' | |
41 |
|
41 | |||
42 | $ hg rebase -s 1 -d 3 |
|
42 | $ hg rebase -s 1 -d 3 | |
43 | rebasing 1:0f4f7cb4f549 "B" |
|
43 | rebasing 1:0f4f7cb4f549 "B" | |
44 | merging a |
|
44 | merging a | |
45 | rebasing 2:30ae917c0e4f "C" |
|
45 | rebasing 2:30ae917c0e4f "C" | |
46 | merging a |
|
46 | merging a | |
47 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/0f4f7cb4f549-82b3b163-rebase.hg (glob) |
|
47 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/0f4f7cb4f549-82b3b163-rebase.hg (glob) | |
48 |
|
48 | |||
49 | $ hg tglog |
|
49 | $ hg tglog | |
50 | o 3: 'C' |
|
50 | o 3: 25773bc4b4b0 'C' | |
51 | | |
|
51 | | | |
52 | o 2: 'B' |
|
52 | o 2: c09015405f75 'B' | |
53 | | |
|
53 | | | |
54 | @ 1: 'AD' |
|
54 | @ 1: 3878212183bd 'AD' | |
55 | | |
|
55 | | | |
56 | o 0: 'A' |
|
56 | o 0: 1e635d440a73 'A' | |
57 |
|
57 | |||
58 |
|
58 | |||
59 | $ cd .. |
|
59 | $ cd .. | |
60 |
|
60 | |||
61 |
|
61 | |||
62 | Test rebasing of merges with ancestors of the rebase destination - a situation |
|
62 | Test rebasing of merges with ancestors of the rebase destination - a situation | |
63 | that often happens when trying to recover from repeated merging with a mainline |
|
63 | that often happens when trying to recover from repeated merging with a mainline | |
64 | branch. |
|
64 | branch. | |
65 |
|
65 | |||
66 | The test case creates a dev branch that contains a couple of merges from the |
|
66 | The test case creates a dev branch that contains a couple of merges from the | |
67 | default branch. When rebasing to the default branch, these merges would be |
|
67 | default branch. When rebasing to the default branch, these merges would be | |
68 | merges with ancestors on the same branch. The merges _could_ contain some |
|
68 | merges with ancestors on the same branch. The merges _could_ contain some | |
69 | interesting conflict resolutions or additional changes in the merge commit, but |
|
69 | interesting conflict resolutions or additional changes in the merge commit, but | |
70 | that is mixed up with the actual merge stuff and there is in general no way to |
|
70 | that is mixed up with the actual merge stuff and there is in general no way to | |
71 | separate them. |
|
71 | separate them. | |
72 |
|
72 | |||
73 | Note: The dev branch contains _no_ changes to f-default. It might be unclear |
|
73 | Note: The dev branch contains _no_ changes to f-default. It might be unclear | |
74 | how rebasing of ancestor merges should be handled, but the current behavior |
|
74 | how rebasing of ancestor merges should be handled, but the current behavior | |
75 | with spurious prompts for conflicts in files that didn't change seems very |
|
75 | with spurious prompts for conflicts in files that didn't change seems very | |
76 | wrong. |
|
76 | wrong. | |
77 |
|
77 | |||
78 | $ hg init ancestor-merge |
|
78 | $ hg init ancestor-merge | |
79 | $ cd ancestor-merge |
|
79 | $ cd ancestor-merge | |
80 |
|
80 | |||
81 | $ touch f-default |
|
81 | $ touch f-default | |
82 | $ hg ci -Aqm 'default: create f-default' |
|
82 | $ hg ci -Aqm 'default: create f-default' | |
83 |
|
83 | |||
84 | $ hg branch -q dev |
|
84 | $ hg branch -q dev | |
85 | $ hg ci -qm 'dev: create branch' |
|
85 | $ hg ci -qm 'dev: create branch' | |
86 |
|
86 | |||
87 | $ echo stuff > f-dev |
|
87 | $ echo stuff > f-dev | |
88 | $ hg ci -Aqm 'dev: f-dev stuff' |
|
88 | $ hg ci -Aqm 'dev: f-dev stuff' | |
89 |
|
89 | |||
90 | $ hg up -q default |
|
90 | $ hg up -q default | |
91 | $ echo stuff > f-default |
|
91 | $ echo stuff > f-default | |
92 | $ hg ci -m 'default: f-default stuff' |
|
92 | $ hg ci -m 'default: f-default stuff' | |
93 |
|
93 | |||
94 | $ hg up -q dev |
|
94 | $ hg up -q dev | |
95 | $ hg merge -q default |
|
95 | $ hg merge -q default | |
96 | $ hg ci -m 'dev: merge default' |
|
96 | $ hg ci -m 'dev: merge default' | |
97 |
|
97 | |||
98 | $ hg up -q default |
|
98 | $ hg up -q default | |
99 | $ hg rm f-default |
|
99 | $ hg rm f-default | |
100 | $ hg ci -m 'default: remove f-default' |
|
100 | $ hg ci -m 'default: remove f-default' | |
101 |
|
101 | |||
102 | $ hg up -q dev |
|
102 | $ hg up -q dev | |
103 | $ hg merge -q default |
|
103 | $ hg merge -q default | |
104 | $ hg ci -m 'dev: merge default' |
|
104 | $ hg ci -m 'dev: merge default' | |
105 |
|
105 | |||
106 | $ hg up -q default |
|
106 | $ hg up -q default | |
107 | $ echo stuff > f-other |
|
107 | $ echo stuff > f-other | |
108 | $ hg ci -Aqm 'default: f-other stuff' |
|
108 | $ hg ci -Aqm 'default: f-other stuff' | |
109 |
|
109 | |||
110 | $ hg tglog |
|
110 | $ hg tglog | |
111 | @ 7: 'default: f-other stuff' |
|
111 | @ 7: e08089805d82 'default: f-other stuff' | |
112 | | |
|
112 | | | |
113 | | o 6: 'dev: merge default' dev |
|
113 | | o 6: 9455ee510502 'dev: merge default' dev | |
114 | |/| |
|
114 | |/| | |
115 | o | 5: 'default: remove f-default' |
|
115 | o | 5: 462860db70a1 'default: remove f-default' | |
116 | | | |
|
116 | | | | |
117 | | o 4: 'dev: merge default' dev |
|
117 | | o 4: 4b019212aaf6 'dev: merge default' dev | |
118 | |/| |
|
118 | |/| | |
119 | o | 3: 'default: f-default stuff' |
|
119 | o | 3: f157ecfd2b6b 'default: f-default stuff' | |
120 | | | |
|
120 | | | | |
121 | | o 2: 'dev: f-dev stuff' dev |
|
121 | | o 2: ec2c14fb2984 'dev: f-dev stuff' dev | |
122 | | | |
|
122 | | | | |
123 | | o 1: 'dev: create branch' dev |
|
123 | | o 1: 1d1a643d390e 'dev: create branch' dev | |
124 | |/ |
|
124 | |/ | |
125 | o 0: 'default: create f-default' |
|
125 | o 0: e90e8eb90b6f 'default: create f-default' | |
126 |
|
126 | |||
127 | $ hg clone -qU . ../ancestor-merge-2 |
|
127 | $ hg clone -qU . ../ancestor-merge-2 | |
128 |
|
128 | |||
129 | Full rebase all the way back from branching point: |
|
129 | Full rebase all the way back from branching point: | |
130 |
|
130 | |||
131 | $ hg rebase -r 'only(dev,default)' -d default --config ui.interactive=True << EOF |
|
131 | $ hg rebase -r 'only(dev,default)' -d default --config ui.interactive=True << EOF | |
132 | > c |
|
132 | > c | |
133 | > EOF |
|
133 | > EOF | |
134 | rebasing 1:1d1a643d390e "dev: create branch" |
|
134 | rebasing 1:1d1a643d390e "dev: create branch" | |
135 | note: rebase of 1:1d1a643d390e created no changes to commit |
|
135 | note: rebase of 1:1d1a643d390e created no changes to commit | |
136 | rebasing 2:ec2c14fb2984 "dev: f-dev stuff" |
|
136 | rebasing 2:ec2c14fb2984 "dev: f-dev stuff" | |
137 | rebasing 4:4b019212aaf6 "dev: merge default" |
|
137 | rebasing 4:4b019212aaf6 "dev: merge default" | |
138 | other [source] changed f-default which local [dest] deleted |
|
138 | other [source] changed f-default which local [dest] deleted | |
139 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c |
|
139 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c | |
140 | rebasing 6:9455ee510502 "dev: merge default" |
|
140 | rebasing 6:9455ee510502 "dev: merge default" | |
141 | saved backup bundle to $TESTTMP/ancestor-merge/.hg/strip-backup/1d1a643d390e-43e9e04b-rebase.hg (glob) |
|
141 | saved backup bundle to $TESTTMP/ancestor-merge/.hg/strip-backup/1d1a643d390e-43e9e04b-rebase.hg (glob) | |
142 | $ hg tglog |
|
142 | $ hg tglog | |
143 | o 6: 'dev: merge default' |
|
143 | o 6: fbc098e72227 'dev: merge default' | |
144 | | |
|
144 | | | |
145 | o 5: 'dev: merge default' |
|
145 | o 5: eda7b7f46f5d 'dev: merge default' | |
146 | | |
|
146 | | | |
147 | o 4: 'dev: f-dev stuff' |
|
147 | o 4: 3e075b1c0a40 'dev: f-dev stuff' | |
148 | | |
|
148 | | | |
149 | @ 3: 'default: f-other stuff' |
|
149 | @ 3: e08089805d82 'default: f-other stuff' | |
150 | | |
|
150 | | | |
151 | o 2: 'default: remove f-default' |
|
151 | o 2: 462860db70a1 'default: remove f-default' | |
152 | | |
|
152 | | | |
153 | o 1: 'default: f-default stuff' |
|
153 | o 1: f157ecfd2b6b 'default: f-default stuff' | |
154 | | |
|
154 | | | |
155 | o 0: 'default: create f-default' |
|
155 | o 0: e90e8eb90b6f 'default: create f-default' | |
156 |
|
156 | |||
157 | Grafty cherry picking rebasing: |
|
157 | Grafty cherry picking rebasing: | |
158 |
|
158 | |||
159 | $ cd ../ancestor-merge-2 |
|
159 | $ cd ../ancestor-merge-2 | |
160 |
|
160 | |||
161 | $ hg phase -fdr0: |
|
161 | $ hg phase -fdr0: | |
162 | $ hg rebase -r 'children(only(dev,default))' -d default --config ui.interactive=True << EOF |
|
162 | $ hg rebase -r 'children(only(dev,default))' -d default --config ui.interactive=True << EOF | |
163 | > c |
|
163 | > c | |
164 | > EOF |
|
164 | > EOF | |
165 | rebasing 2:ec2c14fb2984 "dev: f-dev stuff" |
|
165 | rebasing 2:ec2c14fb2984 "dev: f-dev stuff" | |
166 | rebasing 4:4b019212aaf6 "dev: merge default" |
|
166 | rebasing 4:4b019212aaf6 "dev: merge default" | |
167 | other [source] changed f-default which local [dest] deleted |
|
167 | other [source] changed f-default which local [dest] deleted | |
168 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c |
|
168 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c | |
169 | rebasing 6:9455ee510502 "dev: merge default" |
|
169 | rebasing 6:9455ee510502 "dev: merge default" | |
170 | saved backup bundle to $TESTTMP/ancestor-merge-2/.hg/strip-backup/ec2c14fb2984-62d0b222-rebase.hg (glob) |
|
170 | saved backup bundle to $TESTTMP/ancestor-merge-2/.hg/strip-backup/ec2c14fb2984-62d0b222-rebase.hg (glob) | |
171 | $ hg tglog |
|
171 | $ hg tglog | |
172 | o 7: 'dev: merge default' |
|
172 | o 7: fbc098e72227 'dev: merge default' | |
173 | | |
|
173 | | | |
174 | o 6: 'dev: merge default' |
|
174 | o 6: eda7b7f46f5d 'dev: merge default' | |
175 | | |
|
175 | | | |
176 | o 5: 'dev: f-dev stuff' |
|
176 | o 5: 3e075b1c0a40 'dev: f-dev stuff' | |
177 | | |
|
177 | | | |
178 | o 4: 'default: f-other stuff' |
|
178 | o 4: e08089805d82 'default: f-other stuff' | |
179 | | |
|
179 | | | |
180 | o 3: 'default: remove f-default' |
|
180 | o 3: 462860db70a1 'default: remove f-default' | |
181 | | |
|
181 | | | |
182 | o 2: 'default: f-default stuff' |
|
182 | o 2: f157ecfd2b6b 'default: f-default stuff' | |
183 | | |
|
183 | | | |
184 | | o 1: 'dev: create branch' dev |
|
184 | | o 1: 1d1a643d390e 'dev: create branch' dev | |
185 | |/ |
|
185 | |/ | |
186 | o 0: 'default: create f-default' |
|
186 | o 0: e90e8eb90b6f 'default: create f-default' | |
187 |
|
187 | |||
188 | $ cd .. |
|
188 | $ cd .. | |
189 |
|
189 | |||
190 |
|
190 | |||
191 | Test order of parents of rebased merged with un-rebased changes as p1. |
|
191 | Test order of parents of rebased merged with un-rebased changes as p1. | |
192 |
|
192 | |||
193 | $ hg init parentorder |
|
193 | $ hg init parentorder | |
194 | $ cd parentorder |
|
194 | $ cd parentorder | |
195 | $ touch f |
|
195 | $ touch f | |
196 | $ hg ci -Aqm common |
|
196 | $ hg ci -Aqm common | |
197 | $ touch change |
|
197 | $ touch change | |
198 | $ hg ci -Aqm change |
|
198 | $ hg ci -Aqm change | |
199 | $ touch target |
|
199 | $ touch target | |
200 | $ hg ci -Aqm target |
|
200 | $ hg ci -Aqm target | |
201 | $ hg up -qr 0 |
|
201 | $ hg up -qr 0 | |
202 | $ touch outside |
|
202 | $ touch outside | |
203 | $ hg ci -Aqm outside |
|
203 | $ hg ci -Aqm outside | |
204 | $ hg merge -qr 1 |
|
204 | $ hg merge -qr 1 | |
205 | $ hg ci -m 'merge p1 3=outside p2 1=ancestor' |
|
205 | $ hg ci -m 'merge p1 3=outside p2 1=ancestor' | |
206 | $ hg par |
|
206 | $ hg par | |
207 | changeset: 4:6990226659be |
|
207 | changeset: 4:6990226659be | |
208 | tag: tip |
|
208 | tag: tip | |
209 | parent: 3:f59da8fc0fcf |
|
209 | parent: 3:f59da8fc0fcf | |
210 | parent: 1:dd40c13f7a6f |
|
210 | parent: 1:dd40c13f7a6f | |
211 | user: test |
|
211 | user: test | |
212 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
212 | date: Thu Jan 01 00:00:00 1970 +0000 | |
213 | summary: merge p1 3=outside p2 1=ancestor |
|
213 | summary: merge p1 3=outside p2 1=ancestor | |
214 |
|
214 | |||
215 | $ hg up -qr 1 |
|
215 | $ hg up -qr 1 | |
216 | $ hg merge -qr 3 |
|
216 | $ hg merge -qr 3 | |
217 | $ hg ci -qm 'merge p1 1=ancestor p2 3=outside' |
|
217 | $ hg ci -qm 'merge p1 1=ancestor p2 3=outside' | |
218 | $ hg par |
|
218 | $ hg par | |
219 | changeset: 5:a57575f79074 |
|
219 | changeset: 5:a57575f79074 | |
220 | tag: tip |
|
220 | tag: tip | |
221 | parent: 1:dd40c13f7a6f |
|
221 | parent: 1:dd40c13f7a6f | |
222 | parent: 3:f59da8fc0fcf |
|
222 | parent: 3:f59da8fc0fcf | |
223 | user: test |
|
223 | user: test | |
224 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
224 | date: Thu Jan 01 00:00:00 1970 +0000 | |
225 | summary: merge p1 1=ancestor p2 3=outside |
|
225 | summary: merge p1 1=ancestor p2 3=outside | |
226 |
|
226 | |||
227 | $ hg tglog |
|
227 | $ hg tglog | |
228 | @ 5: 'merge p1 1=ancestor p2 3=outside' |
|
228 | @ 5: a57575f79074 'merge p1 1=ancestor p2 3=outside' | |
229 | |\ |
|
229 | |\ | |
230 | +---o 4: 'merge p1 3=outside p2 1=ancestor' |
|
230 | +---o 4: 6990226659be 'merge p1 3=outside p2 1=ancestor' | |
231 | | |/ |
|
231 | | |/ | |
232 | | o 3: 'outside' |
|
232 | | o 3: f59da8fc0fcf 'outside' | |
233 | | | |
|
233 | | | | |
234 | +---o 2: 'target' |
|
234 | +---o 2: a60552eb93fb 'target' | |
235 | | | |
|
235 | | | | |
236 | o | 1: 'change' |
|
236 | o | 1: dd40c13f7a6f 'change' | |
237 | |/ |
|
237 | |/ | |
238 | o 0: 'common' |
|
238 | o 0: 02f0f58d5300 'common' | |
239 |
|
239 | |||
240 | $ hg rebase -r 4 -d 2 |
|
240 | $ hg rebase -r 4 -d 2 | |
241 | rebasing 4:6990226659be "merge p1 3=outside p2 1=ancestor" |
|
241 | rebasing 4:6990226659be "merge p1 3=outside p2 1=ancestor" | |
242 | saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/6990226659be-4d67a0d3-rebase.hg (glob) |
|
242 | saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/6990226659be-4d67a0d3-rebase.hg (glob) | |
243 | $ hg tip |
|
243 | $ hg tip | |
244 | changeset: 5:cca50676b1c5 |
|
244 | changeset: 5:cca50676b1c5 | |
245 | tag: tip |
|
245 | tag: tip | |
246 | parent: 2:a60552eb93fb |
|
246 | parent: 2:a60552eb93fb | |
247 | parent: 3:f59da8fc0fcf |
|
247 | parent: 3:f59da8fc0fcf | |
248 | user: test |
|
248 | user: test | |
249 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
249 | date: Thu Jan 01 00:00:00 1970 +0000 | |
250 | summary: merge p1 3=outside p2 1=ancestor |
|
250 | summary: merge p1 3=outside p2 1=ancestor | |
251 |
|
251 | |||
252 | $ hg rebase -r 4 -d 2 |
|
252 | $ hg rebase -r 4 -d 2 | |
253 | rebasing 4:a57575f79074 "merge p1 1=ancestor p2 3=outside" |
|
253 | rebasing 4:a57575f79074 "merge p1 1=ancestor p2 3=outside" | |
254 | saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/a57575f79074-385426e5-rebase.hg (glob) |
|
254 | saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/a57575f79074-385426e5-rebase.hg (glob) | |
255 | $ hg tip |
|
255 | $ hg tip | |
256 | changeset: 5:f9daf77ffe76 |
|
256 | changeset: 5:f9daf77ffe76 | |
257 | tag: tip |
|
257 | tag: tip | |
258 | parent: 2:a60552eb93fb |
|
258 | parent: 2:a60552eb93fb | |
259 | parent: 3:f59da8fc0fcf |
|
259 | parent: 3:f59da8fc0fcf | |
260 | user: test |
|
260 | user: test | |
261 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
261 | date: Thu Jan 01 00:00:00 1970 +0000 | |
262 | summary: merge p1 1=ancestor p2 3=outside |
|
262 | summary: merge p1 1=ancestor p2 3=outside | |
263 |
|
263 | |||
264 | $ hg tglog |
|
264 | $ hg tglog | |
265 | @ 5: 'merge p1 1=ancestor p2 3=outside' |
|
265 | @ 5: f9daf77ffe76 'merge p1 1=ancestor p2 3=outside' | |
266 | |\ |
|
266 | |\ | |
267 | +---o 4: 'merge p1 3=outside p2 1=ancestor' |
|
267 | +---o 4: cca50676b1c5 'merge p1 3=outside p2 1=ancestor' | |
268 | | |/ |
|
268 | | |/ | |
269 | | o 3: 'outside' |
|
269 | | o 3: f59da8fc0fcf 'outside' | |
270 | | | |
|
270 | | | | |
271 | o | 2: 'target' |
|
271 | o | 2: a60552eb93fb 'target' | |
272 | | | |
|
272 | | | | |
273 | o | 1: 'change' |
|
273 | o | 1: dd40c13f7a6f 'change' | |
274 | |/ |
|
274 | |/ | |
275 | o 0: 'common' |
|
275 | o 0: 02f0f58d5300 'common' | |
276 |
|
276 | |||
277 | rebase of merge of ancestors |
|
277 | rebase of merge of ancestors | |
278 |
|
278 | |||
279 | $ hg up -qr 2 |
|
279 | $ hg up -qr 2 | |
280 | $ hg merge -qr 3 |
|
280 | $ hg merge -qr 3 | |
281 | $ echo 'other change while merging future "rebase ancestors"' > other |
|
281 | $ echo 'other change while merging future "rebase ancestors"' > other | |
282 | $ hg ci -Aqm 'merge rebase ancestors' |
|
282 | $ hg ci -Aqm 'merge rebase ancestors' | |
283 | $ hg rebase -d 5 -v |
|
283 | $ hg rebase -d 5 -v | |
284 | rebasing 6:4c5f12f25ebe "merge rebase ancestors" (tip) |
|
284 | rebasing 6:4c5f12f25ebe "merge rebase ancestors" (tip) | |
285 | resolving manifests |
|
285 | resolving manifests | |
286 | removing other |
|
286 | removing other | |
287 | note: merging f9daf77ffe76+ and 4c5f12f25ebe using bids from ancestors a60552eb93fb and f59da8fc0fcf |
|
287 | note: merging f9daf77ffe76+ and 4c5f12f25ebe using bids from ancestors a60552eb93fb and f59da8fc0fcf | |
288 |
|
288 | |||
289 | calculating bids for ancestor a60552eb93fb |
|
289 | calculating bids for ancestor a60552eb93fb | |
290 | resolving manifests |
|
290 | resolving manifests | |
291 |
|
291 | |||
292 | calculating bids for ancestor f59da8fc0fcf |
|
292 | calculating bids for ancestor f59da8fc0fcf | |
293 | resolving manifests |
|
293 | resolving manifests | |
294 |
|
294 | |||
295 | auction for merging merge bids |
|
295 | auction for merging merge bids | |
296 | other: consensus for g |
|
296 | other: consensus for g | |
297 | end of auction |
|
297 | end of auction | |
298 |
|
298 | |||
299 | getting other |
|
299 | getting other | |
300 | committing files: |
|
300 | committing files: | |
301 | other |
|
301 | other | |
302 | committing manifest |
|
302 | committing manifest | |
303 | committing changelog |
|
303 | committing changelog | |
304 | rebase merging completed |
|
304 | rebase merging completed | |
305 | 1 changesets found |
|
305 | 1 changesets found | |
306 | uncompressed size of bundle content: |
|
306 | uncompressed size of bundle content: | |
307 | 199 (changelog) |
|
307 | 199 (changelog) | |
308 | 216 (manifests) |
|
308 | 216 (manifests) | |
309 | 182 other |
|
309 | 182 other | |
310 | saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/4c5f12f25ebe-f46990e5-rebase.hg (glob) |
|
310 | saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/4c5f12f25ebe-f46990e5-rebase.hg (glob) | |
311 | 1 changesets found |
|
311 | 1 changesets found | |
312 | uncompressed size of bundle content: |
|
312 | uncompressed size of bundle content: | |
313 | 254 (changelog) |
|
313 | 254 (changelog) | |
314 | 167 (manifests) |
|
314 | 167 (manifests) | |
315 | 182 other |
|
315 | 182 other | |
316 | adding branch |
|
316 | adding branch | |
317 | adding changesets |
|
317 | adding changesets | |
318 | adding manifests |
|
318 | adding manifests | |
319 | adding file changes |
|
319 | adding file changes | |
320 | added 1 changesets with 1 changes to 1 files |
|
320 | added 1 changesets with 1 changes to 1 files | |
321 | rebase completed |
|
321 | rebase completed | |
322 | $ hg tglog |
|
322 | $ hg tglog | |
323 | @ 6: 'merge rebase ancestors' |
|
323 | @ 6: 113755df812b 'merge rebase ancestors' | |
324 | | |
|
324 | | | |
325 | o 5: 'merge p1 1=ancestor p2 3=outside' |
|
325 | o 5: f9daf77ffe76 'merge p1 1=ancestor p2 3=outside' | |
326 | |\ |
|
326 | |\ | |
327 | +---o 4: 'merge p1 3=outside p2 1=ancestor' |
|
327 | +---o 4: cca50676b1c5 'merge p1 3=outside p2 1=ancestor' | |
328 | | |/ |
|
328 | | |/ | |
329 | | o 3: 'outside' |
|
329 | | o 3: f59da8fc0fcf 'outside' | |
330 | | | |
|
330 | | | | |
331 | o | 2: 'target' |
|
331 | o | 2: a60552eb93fb 'target' | |
332 | | | |
|
332 | | | | |
333 | o | 1: 'change' |
|
333 | o | 1: dd40c13f7a6f 'change' | |
334 | |/ |
|
334 | |/ | |
335 | o 0: 'common' |
|
335 | o 0: 02f0f58d5300 'common' | |
336 |
|
336 | |||
337 | Due to the limitation of 3-way merge algorithm (1 merge base), rebasing a merge |
|
337 | Due to the limitation of 3-way merge algorithm (1 merge base), rebasing a merge | |
338 | may include unwanted content: |
|
338 | may include unwanted content: | |
339 |
|
339 | |||
340 | $ hg init $TESTTMP/dual-merge-base1 |
|
340 | $ hg init $TESTTMP/dual-merge-base1 | |
341 | $ cd $TESTTMP/dual-merge-base1 |
|
341 | $ cd $TESTTMP/dual-merge-base1 | |
342 | $ hg debugdrawdag <<'EOS' |
|
342 | $ hg debugdrawdag <<'EOS' | |
343 | > F |
|
343 | > F | |
344 | > /| |
|
344 | > /| | |
345 | > D E |
|
345 | > D E | |
346 | > | | |
|
346 | > | | | |
347 | > B C |
|
347 | > B C | |
348 | > |/ |
|
348 | > |/ | |
349 | > A Z |
|
349 | > A Z | |
350 | > |/ |
|
350 | > |/ | |
351 | > R |
|
351 | > R | |
352 | > EOS |
|
352 | > EOS | |
353 | $ hg rebase -r D+E+F -d Z |
|
353 | $ hg rebase -r D+E+F -d Z | |
354 | rebasing 5:5f2c926dfecf "D" (D) |
|
354 | rebasing 5:5f2c926dfecf "D" (D) | |
355 | rebasing 6:b296604d9846 "E" (E) |
|
355 | rebasing 6:b296604d9846 "E" (E) | |
356 | rebasing 7:caa9781e507d "F" (F tip) |
|
356 | rebasing 7:caa9781e507d "F" (F tip) | |
357 | abort: rebasing 7:caa9781e507d will include unwanted changes from 4:d6003a550c2c or 3:c1e6b162678d |
|
357 | abort: rebasing 7:caa9781e507d will include unwanted changes from 4:d6003a550c2c or 3:c1e6b162678d | |
358 | [255] |
|
358 | [255] | |
359 |
|
359 | |||
360 | The warning does not get printed if there is no unwanted change detected: |
|
360 | The warning does not get printed if there is no unwanted change detected: | |
361 |
|
361 | |||
362 | $ hg init $TESTTMP/dual-merge-base2 |
|
362 | $ hg init $TESTTMP/dual-merge-base2 | |
363 | $ cd $TESTTMP/dual-merge-base2 |
|
363 | $ cd $TESTTMP/dual-merge-base2 | |
364 | $ hg debugdrawdag <<'EOS' |
|
364 | $ hg debugdrawdag <<'EOS' | |
365 | > D |
|
365 | > D | |
366 | > /| |
|
366 | > /| | |
367 | > B C |
|
367 | > B C | |
368 | > |/ |
|
368 | > |/ | |
369 | > A Z |
|
369 | > A Z | |
370 | > |/ |
|
370 | > |/ | |
371 | > R |
|
371 | > R | |
372 | > EOS |
|
372 | > EOS | |
373 | $ hg rebase -r B+C+D -d Z |
|
373 | $ hg rebase -r B+C+D -d Z | |
374 | rebasing 3:c1e6b162678d "B" (B) |
|
374 | rebasing 3:c1e6b162678d "B" (B) | |
375 | rebasing 4:d6003a550c2c "C" (C) |
|
375 | rebasing 4:d6003a550c2c "C" (C) | |
376 | rebasing 5:c8f78076273e "D" (D tip) |
|
376 | rebasing 5:c8f78076273e "D" (D tip) | |
377 | saved backup bundle to $TESTTMP/dual-merge-base2/.hg/strip-backup/d6003a550c2c-6f1424b6-rebase.hg (glob) |
|
377 | saved backup bundle to $TESTTMP/dual-merge-base2/.hg/strip-backup/d6003a550c2c-6f1424b6-rebase.hg (glob) | |
378 | $ hg manifest -r 'desc(D)' |
|
378 | $ hg manifest -r 'desc(D)' | |
379 | B |
|
379 | B | |
380 | C |
|
380 | C | |
381 | R |
|
381 | R | |
382 | Z |
|
382 | Z | |
383 |
|
383 | |||
384 | The merge base could be different from old p1 (changed parent becomes new p1): |
|
384 | The merge base could be different from old p1 (changed parent becomes new p1): | |
385 |
|
385 | |||
386 | $ hg init $TESTTMP/chosen-merge-base1 |
|
386 | $ hg init $TESTTMP/chosen-merge-base1 | |
387 | $ cd $TESTTMP/chosen-merge-base1 |
|
387 | $ cd $TESTTMP/chosen-merge-base1 | |
388 | $ hg debugdrawdag <<'EOS' |
|
388 | $ hg debugdrawdag <<'EOS' | |
389 | > F |
|
389 | > F | |
390 | > /| |
|
390 | > /| | |
391 | > D E |
|
391 | > D E | |
392 | > | | |
|
392 | > | | | |
393 | > B C Z |
|
393 | > B C Z | |
394 | > EOS |
|
394 | > EOS | |
395 | $ hg rebase -r D+F -d Z |
|
395 | $ hg rebase -r D+F -d Z | |
396 | rebasing 3:004dc1679908 "D" (D) |
|
396 | rebasing 3:004dc1679908 "D" (D) | |
397 | rebasing 5:4be4cbf6f206 "F" (F tip) |
|
397 | rebasing 5:4be4cbf6f206 "F" (F tip) | |
398 | saved backup bundle to $TESTTMP/chosen-merge-base1/.hg/strip-backup/004dc1679908-06a66a3c-rebase.hg (glob) |
|
398 | saved backup bundle to $TESTTMP/chosen-merge-base1/.hg/strip-backup/004dc1679908-06a66a3c-rebase.hg (glob) | |
399 | $ hg manifest -r 'desc(F)' |
|
399 | $ hg manifest -r 'desc(F)' | |
400 | C |
|
400 | C | |
401 | D |
|
401 | D | |
402 | E |
|
402 | E | |
403 | Z |
|
403 | Z | |
404 | $ hg log -r `hg log -r 'desc(F)' -T '{p1node}'` -T '{desc}\n' |
|
404 | $ hg log -r `hg log -r 'desc(F)' -T '{p1node}'` -T '{desc}\n' | |
405 | D |
|
405 | D | |
406 |
|
406 | |||
407 | $ hg init $TESTTMP/chosen-merge-base2 |
|
407 | $ hg init $TESTTMP/chosen-merge-base2 | |
408 | $ cd $TESTTMP/chosen-merge-base2 |
|
408 | $ cd $TESTTMP/chosen-merge-base2 | |
409 | $ hg debugdrawdag <<'EOS' |
|
409 | $ hg debugdrawdag <<'EOS' | |
410 | > F |
|
410 | > F | |
411 | > /| |
|
411 | > /| | |
412 | > D E |
|
412 | > D E | |
413 | > | | |
|
413 | > | | | |
414 | > B C Z |
|
414 | > B C Z | |
415 | > EOS |
|
415 | > EOS | |
416 | $ hg rebase -r E+F -d Z |
|
416 | $ hg rebase -r E+F -d Z | |
417 | rebasing 4:974e4943c210 "E" (E) |
|
417 | rebasing 4:974e4943c210 "E" (E) | |
418 | rebasing 5:4be4cbf6f206 "F" (F tip) |
|
418 | rebasing 5:4be4cbf6f206 "F" (F tip) | |
419 | saved backup bundle to $TESTTMP/chosen-merge-base2/.hg/strip-backup/974e4943c210-b2874da5-rebase.hg (glob) |
|
419 | saved backup bundle to $TESTTMP/chosen-merge-base2/.hg/strip-backup/974e4943c210-b2874da5-rebase.hg (glob) | |
420 | $ hg manifest -r 'desc(F)' |
|
420 | $ hg manifest -r 'desc(F)' | |
421 | B |
|
421 | B | |
422 | D |
|
422 | D | |
423 | E |
|
423 | E | |
424 | Z |
|
424 | Z | |
425 | $ hg log -r `hg log -r 'desc(F)' -T '{p1node}'` -T '{desc}\n' |
|
425 | $ hg log -r `hg log -r 'desc(F)' -T '{p1node}'` -T '{desc}\n' | |
426 | E |
|
426 | E |
@@ -1,521 +1,521 b'' | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > rebase= |
|
3 | > rebase= | |
4 | > |
|
4 | > | |
5 | > [phases] |
|
5 | > [phases] | |
6 | > publish=False |
|
6 | > publish=False | |
7 | > |
|
7 | > | |
8 | > [alias] |
|
8 | > [alias] | |
9 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" |
|
9 | > tglog = log -G --template "{rev}: {node|short} '{desc}' {branches}\n" | |
10 | > EOF |
|
10 | > EOF | |
11 |
|
11 | |||
12 |
|
12 | |||
13 | $ hg init a |
|
13 | $ hg init a | |
14 | $ cd a |
|
14 | $ cd a | |
15 | $ hg unbundle "$TESTDIR/bundles/rebase.hg" |
|
15 | $ hg unbundle "$TESTDIR/bundles/rebase.hg" | |
16 | adding changesets |
|
16 | adding changesets | |
17 | adding manifests |
|
17 | adding manifests | |
18 | adding file changes |
|
18 | adding file changes | |
19 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
19 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
20 | new changesets cd010b8cd998:02de42196ebe |
|
20 | new changesets cd010b8cd998:02de42196ebe | |
21 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
21 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
22 | $ hg up tip |
|
22 | $ hg up tip | |
23 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
23 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
24 |
|
24 | |||
25 | $ echo I > I |
|
25 | $ echo I > I | |
26 | $ hg ci -AmI |
|
26 | $ hg ci -AmI | |
27 | adding I |
|
27 | adding I | |
28 |
|
28 | |||
29 | $ hg tglog |
|
29 | $ hg tglog | |
30 | @ 8: 'I' |
|
30 | @ 8: e7ec4e813ba6 'I' | |
31 | | |
|
31 | | | |
32 | o 7: 'H' |
|
32 | o 7: 02de42196ebe 'H' | |
33 | | |
|
33 | | | |
34 | | o 6: 'G' |
|
34 | | o 6: eea13746799a 'G' | |
35 | |/| |
|
35 | |/| | |
36 | o | 5: 'F' |
|
36 | o | 5: 24b6387c8c8c 'F' | |
37 | | | |
|
37 | | | | |
38 | | o 4: 'E' |
|
38 | | o 4: 9520eea781bc 'E' | |
39 | |/ |
|
39 | |/ | |
40 | | o 3: 'D' |
|
40 | | o 3: 32af7686d403 'D' | |
41 | | | |
|
41 | | | | |
42 | | o 2: 'C' |
|
42 | | o 2: 5fddd98957c8 'C' | |
43 | | | |
|
43 | | | | |
44 | | o 1: 'B' |
|
44 | | o 1: 42ccdea3bb16 'B' | |
45 | |/ |
|
45 | |/ | |
46 | o 0: 'A' |
|
46 | o 0: cd010b8cd998 'A' | |
47 |
|
47 | |||
48 | $ cd .. |
|
48 | $ cd .. | |
49 |
|
49 | |||
50 | Version with only two heads (to allow default destination to work) |
|
50 | Version with only two heads (to allow default destination to work) | |
51 |
|
51 | |||
52 | $ hg clone -q -u . a a2heads -r 3 -r 8 |
|
52 | $ hg clone -q -u . a a2heads -r 3 -r 8 | |
53 |
|
53 | |||
54 | These fail: |
|
54 | These fail: | |
55 |
|
55 | |||
56 | $ hg clone -q -u . a a0 |
|
56 | $ hg clone -q -u . a a0 | |
57 | $ cd a0 |
|
57 | $ cd a0 | |
58 |
|
58 | |||
59 | $ hg rebase -s 8 -d 7 |
|
59 | $ hg rebase -s 8 -d 7 | |
60 | nothing to rebase |
|
60 | nothing to rebase | |
61 | [1] |
|
61 | [1] | |
62 |
|
62 | |||
63 | $ hg rebase --continue --abort |
|
63 | $ hg rebase --continue --abort | |
64 | abort: cannot use both abort and continue |
|
64 | abort: cannot use both abort and continue | |
65 | [255] |
|
65 | [255] | |
66 |
|
66 | |||
67 | $ hg rebase --continue --collapse |
|
67 | $ hg rebase --continue --collapse | |
68 | abort: cannot use collapse with continue or abort |
|
68 | abort: cannot use collapse with continue or abort | |
69 | [255] |
|
69 | [255] | |
70 |
|
70 | |||
71 | $ hg rebase --continue --dest 4 |
|
71 | $ hg rebase --continue --dest 4 | |
72 | abort: abort and continue do not allow specifying revisions |
|
72 | abort: abort and continue do not allow specifying revisions | |
73 | [255] |
|
73 | [255] | |
74 |
|
74 | |||
75 | $ hg rebase --base 5 --source 4 |
|
75 | $ hg rebase --base 5 --source 4 | |
76 | abort: cannot specify both a source and a base |
|
76 | abort: cannot specify both a source and a base | |
77 | [255] |
|
77 | [255] | |
78 |
|
78 | |||
79 | $ hg rebase --rev 5 --source 4 |
|
79 | $ hg rebase --rev 5 --source 4 | |
80 | abort: cannot specify both a revision and a source |
|
80 | abort: cannot specify both a revision and a source | |
81 | [255] |
|
81 | [255] | |
82 | $ hg rebase --base 5 --rev 4 |
|
82 | $ hg rebase --base 5 --rev 4 | |
83 | abort: cannot specify both a revision and a base |
|
83 | abort: cannot specify both a revision and a base | |
84 | [255] |
|
84 | [255] | |
85 |
|
85 | |||
86 | $ hg rebase --base 6 |
|
86 | $ hg rebase --base 6 | |
87 | abort: branch 'default' has 3 heads - please rebase to an explicit rev |
|
87 | abort: branch 'default' has 3 heads - please rebase to an explicit rev | |
88 | (run 'hg heads .' to see heads) |
|
88 | (run 'hg heads .' to see heads) | |
89 | [255] |
|
89 | [255] | |
90 |
|
90 | |||
91 | $ hg rebase --rev '1 & !1' --dest 8 |
|
91 | $ hg rebase --rev '1 & !1' --dest 8 | |
92 | empty "rev" revision set - nothing to rebase |
|
92 | empty "rev" revision set - nothing to rebase | |
93 | [1] |
|
93 | [1] | |
94 |
|
94 | |||
95 | $ hg rebase --source '1 & !1' --dest 8 |
|
95 | $ hg rebase --source '1 & !1' --dest 8 | |
96 | empty "source" revision set - nothing to rebase |
|
96 | empty "source" revision set - nothing to rebase | |
97 | [1] |
|
97 | [1] | |
98 |
|
98 | |||
99 | $ hg rebase --base '1 & !1' --dest 8 |
|
99 | $ hg rebase --base '1 & !1' --dest 8 | |
100 | empty "base" revision set - can't compute rebase set |
|
100 | empty "base" revision set - can't compute rebase set | |
101 | [1] |
|
101 | [1] | |
102 |
|
102 | |||
103 | $ hg rebase --dest 8 |
|
103 | $ hg rebase --dest 8 | |
104 | nothing to rebase - working directory parent is also destination |
|
104 | nothing to rebase - working directory parent is also destination | |
105 | [1] |
|
105 | [1] | |
106 |
|
106 | |||
107 | $ hg rebase -b . --dest 8 |
|
107 | $ hg rebase -b . --dest 8 | |
108 | nothing to rebase - e7ec4e813ba6 is both "base" and destination |
|
108 | nothing to rebase - e7ec4e813ba6 is both "base" and destination | |
109 | [1] |
|
109 | [1] | |
110 |
|
110 | |||
111 | $ hg up -q 7 |
|
111 | $ hg up -q 7 | |
112 |
|
112 | |||
113 | $ hg rebase --dest 8 --traceback |
|
113 | $ hg rebase --dest 8 --traceback | |
114 | nothing to rebase - working directory parent is already an ancestor of destination e7ec4e813ba6 |
|
114 | nothing to rebase - working directory parent is already an ancestor of destination e7ec4e813ba6 | |
115 | [1] |
|
115 | [1] | |
116 |
|
116 | |||
117 | $ hg rebase --dest 8 -b. |
|
117 | $ hg rebase --dest 8 -b. | |
118 | nothing to rebase - "base" 02de42196ebe is already an ancestor of destination e7ec4e813ba6 |
|
118 | nothing to rebase - "base" 02de42196ebe is already an ancestor of destination e7ec4e813ba6 | |
119 | [1] |
|
119 | [1] | |
120 |
|
120 | |||
121 | $ hg rebase --dest '1 & !1' |
|
121 | $ hg rebase --dest '1 & !1' | |
122 | abort: empty revision set |
|
122 | abort: empty revision set | |
123 | [255] |
|
123 | [255] | |
124 |
|
124 | |||
125 | These work: |
|
125 | These work: | |
126 |
|
126 | |||
127 | Rebase with no arguments (from 3 onto 8): |
|
127 | Rebase with no arguments (from 3 onto 8): | |
128 |
|
128 | |||
129 | $ cd .. |
|
129 | $ cd .. | |
130 | $ hg clone -q -u . a2heads a1 |
|
130 | $ hg clone -q -u . a2heads a1 | |
131 | $ cd a1 |
|
131 | $ cd a1 | |
132 | $ hg up -q -C 3 |
|
132 | $ hg up -q -C 3 | |
133 |
|
133 | |||
134 | $ hg rebase |
|
134 | $ hg rebase | |
135 | rebasing 1:42ccdea3bb16 "B" |
|
135 | rebasing 1:42ccdea3bb16 "B" | |
136 | rebasing 2:5fddd98957c8 "C" |
|
136 | rebasing 2:5fddd98957c8 "C" | |
137 | rebasing 3:32af7686d403 "D" |
|
137 | rebasing 3:32af7686d403 "D" | |
138 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/42ccdea3bb16-3cb021d3-rebase.hg (glob) |
|
138 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/42ccdea3bb16-3cb021d3-rebase.hg (glob) | |
139 |
|
139 | |||
140 | $ hg tglog |
|
140 | $ hg tglog | |
141 | @ 6: 'D' |
|
141 | @ 6: ed65089c18f8 'D' | |
142 | | |
|
142 | | | |
143 | o 5: 'C' |
|
143 | o 5: 7621bf1a2f17 'C' | |
144 | | |
|
144 | | | |
145 | o 4: 'B' |
|
145 | o 4: 9430a62369c6 'B' | |
146 | | |
|
146 | | | |
147 | o 3: 'I' |
|
147 | o 3: e7ec4e813ba6 'I' | |
148 | | |
|
148 | | | |
149 | o 2: 'H' |
|
149 | o 2: 02de42196ebe 'H' | |
150 | | |
|
150 | | | |
151 | o 1: 'F' |
|
151 | o 1: 24b6387c8c8c 'F' | |
152 | | |
|
152 | | | |
153 | o 0: 'A' |
|
153 | o 0: cd010b8cd998 'A' | |
154 |
|
154 | |||
155 | Try to rollback after a rebase (fail): |
|
155 | Try to rollback after a rebase (fail): | |
156 |
|
156 | |||
157 | $ hg rollback |
|
157 | $ hg rollback | |
158 | no rollback information available |
|
158 | no rollback information available | |
159 | [1] |
|
159 | [1] | |
160 |
|
160 | |||
161 | $ cd .. |
|
161 | $ cd .. | |
162 |
|
162 | |||
163 | Rebase with base == '.' => same as no arguments (from 3 onto 8): |
|
163 | Rebase with base == '.' => same as no arguments (from 3 onto 8): | |
164 |
|
164 | |||
165 | $ hg clone -q -u 3 a2heads a2 |
|
165 | $ hg clone -q -u 3 a2heads a2 | |
166 | $ cd a2 |
|
166 | $ cd a2 | |
167 |
|
167 | |||
168 | $ hg rebase --base . |
|
168 | $ hg rebase --base . | |
169 | rebasing 1:42ccdea3bb16 "B" |
|
169 | rebasing 1:42ccdea3bb16 "B" | |
170 | rebasing 2:5fddd98957c8 "C" |
|
170 | rebasing 2:5fddd98957c8 "C" | |
171 | rebasing 3:32af7686d403 "D" |
|
171 | rebasing 3:32af7686d403 "D" | |
172 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/42ccdea3bb16-3cb021d3-rebase.hg (glob) |
|
172 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/42ccdea3bb16-3cb021d3-rebase.hg (glob) | |
173 |
|
173 | |||
174 | $ hg tglog |
|
174 | $ hg tglog | |
175 | @ 6: 'D' |
|
175 | @ 6: ed65089c18f8 'D' | |
176 | | |
|
176 | | | |
177 | o 5: 'C' |
|
177 | o 5: 7621bf1a2f17 'C' | |
178 | | |
|
178 | | | |
179 | o 4: 'B' |
|
179 | o 4: 9430a62369c6 'B' | |
180 | | |
|
180 | | | |
181 | o 3: 'I' |
|
181 | o 3: e7ec4e813ba6 'I' | |
182 | | |
|
182 | | | |
183 | o 2: 'H' |
|
183 | o 2: 02de42196ebe 'H' | |
184 | | |
|
184 | | | |
185 | o 1: 'F' |
|
185 | o 1: 24b6387c8c8c 'F' | |
186 | | |
|
186 | | | |
187 | o 0: 'A' |
|
187 | o 0: cd010b8cd998 'A' | |
188 |
|
188 | |||
189 | $ cd .. |
|
189 | $ cd .. | |
190 |
|
190 | |||
191 |
|
191 | |||
192 | Rebase with dest == branch(.) => same as no arguments (from 3 onto 8): |
|
192 | Rebase with dest == branch(.) => same as no arguments (from 3 onto 8): | |
193 |
|
193 | |||
194 | $ hg clone -q -u 3 a a3 |
|
194 | $ hg clone -q -u 3 a a3 | |
195 | $ cd a3 |
|
195 | $ cd a3 | |
196 |
|
196 | |||
197 | $ hg rebase --dest 'branch(.)' |
|
197 | $ hg rebase --dest 'branch(.)' | |
198 | rebasing 1:42ccdea3bb16 "B" |
|
198 | rebasing 1:42ccdea3bb16 "B" | |
199 | rebasing 2:5fddd98957c8 "C" |
|
199 | rebasing 2:5fddd98957c8 "C" | |
200 | rebasing 3:32af7686d403 "D" |
|
200 | rebasing 3:32af7686d403 "D" | |
201 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/42ccdea3bb16-3cb021d3-rebase.hg (glob) |
|
201 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/42ccdea3bb16-3cb021d3-rebase.hg (glob) | |
202 |
|
202 | |||
203 | $ hg tglog |
|
203 | $ hg tglog | |
204 | @ 8: 'D' |
|
204 | @ 8: ed65089c18f8 'D' | |
205 | | |
|
205 | | | |
206 | o 7: 'C' |
|
206 | o 7: 7621bf1a2f17 'C' | |
207 | | |
|
207 | | | |
208 | o 6: 'B' |
|
208 | o 6: 9430a62369c6 'B' | |
209 | | |
|
209 | | | |
210 | o 5: 'I' |
|
210 | o 5: e7ec4e813ba6 'I' | |
211 | | |
|
211 | | | |
212 | o 4: 'H' |
|
212 | o 4: 02de42196ebe 'H' | |
213 | | |
|
213 | | | |
214 | | o 3: 'G' |
|
214 | | o 3: eea13746799a 'G' | |
215 | |/| |
|
215 | |/| | |
216 | o | 2: 'F' |
|
216 | o | 2: 24b6387c8c8c 'F' | |
217 | | | |
|
217 | | | | |
218 | | o 1: 'E' |
|
218 | | o 1: 9520eea781bc 'E' | |
219 | |/ |
|
219 | |/ | |
220 | o 0: 'A' |
|
220 | o 0: cd010b8cd998 'A' | |
221 |
|
221 | |||
222 | $ cd .. |
|
222 | $ cd .. | |
223 |
|
223 | |||
224 |
|
224 | |||
225 | Specify only source (from 2 onto 8): |
|
225 | Specify only source (from 2 onto 8): | |
226 |
|
226 | |||
227 | $ hg clone -q -u . a2heads a4 |
|
227 | $ hg clone -q -u . a2heads a4 | |
228 | $ cd a4 |
|
228 | $ cd a4 | |
229 |
|
229 | |||
230 | $ hg rebase --source 'desc("C")' |
|
230 | $ hg rebase --source 'desc("C")' | |
231 | rebasing 2:5fddd98957c8 "C" |
|
231 | rebasing 2:5fddd98957c8 "C" | |
232 | rebasing 3:32af7686d403 "D" |
|
232 | rebasing 3:32af7686d403 "D" | |
233 | saved backup bundle to $TESTTMP/a4/.hg/strip-backup/5fddd98957c8-f9244fa1-rebase.hg (glob) |
|
233 | saved backup bundle to $TESTTMP/a4/.hg/strip-backup/5fddd98957c8-f9244fa1-rebase.hg (glob) | |
234 |
|
234 | |||
235 | $ hg tglog |
|
235 | $ hg tglog | |
236 | o 6: 'D' |
|
236 | o 6: 7726e9fd58f7 'D' | |
237 | | |
|
237 | | | |
238 | o 5: 'C' |
|
238 | o 5: 72c8333623d0 'C' | |
239 | | |
|
239 | | | |
240 | @ 4: 'I' |
|
240 | @ 4: e7ec4e813ba6 'I' | |
241 | | |
|
241 | | | |
242 | o 3: 'H' |
|
242 | o 3: 02de42196ebe 'H' | |
243 | | |
|
243 | | | |
244 | o 2: 'F' |
|
244 | o 2: 24b6387c8c8c 'F' | |
245 | | |
|
245 | | | |
246 | | o 1: 'B' |
|
246 | | o 1: 42ccdea3bb16 'B' | |
247 | |/ |
|
247 | |/ | |
248 | o 0: 'A' |
|
248 | o 0: cd010b8cd998 'A' | |
249 |
|
249 | |||
250 | $ cd .. |
|
250 | $ cd .. | |
251 |
|
251 | |||
252 |
|
252 | |||
253 | Specify only dest (from 3 onto 6): |
|
253 | Specify only dest (from 3 onto 6): | |
254 |
|
254 | |||
255 | $ hg clone -q -u 3 a a5 |
|
255 | $ hg clone -q -u 3 a a5 | |
256 | $ cd a5 |
|
256 | $ cd a5 | |
257 |
|
257 | |||
258 | $ hg rebase --dest 6 |
|
258 | $ hg rebase --dest 6 | |
259 | rebasing 1:42ccdea3bb16 "B" |
|
259 | rebasing 1:42ccdea3bb16 "B" | |
260 | rebasing 2:5fddd98957c8 "C" |
|
260 | rebasing 2:5fddd98957c8 "C" | |
261 | rebasing 3:32af7686d403 "D" |
|
261 | rebasing 3:32af7686d403 "D" | |
262 | saved backup bundle to $TESTTMP/a5/.hg/strip-backup/42ccdea3bb16-3cb021d3-rebase.hg (glob) |
|
262 | saved backup bundle to $TESTTMP/a5/.hg/strip-backup/42ccdea3bb16-3cb021d3-rebase.hg (glob) | |
263 |
|
263 | |||
264 | $ hg tglog |
|
264 | $ hg tglog | |
265 | @ 8: 'D' |
|
265 | @ 8: 8eeb3c33ad33 'D' | |
266 | | |
|
266 | | | |
267 | o 7: 'C' |
|
267 | o 7: 2327fea05063 'C' | |
268 | | |
|
268 | | | |
269 | o 6: 'B' |
|
269 | o 6: e4e5be0395b2 'B' | |
270 | | |
|
270 | | | |
271 | | o 5: 'I' |
|
271 | | o 5: e7ec4e813ba6 'I' | |
272 | | | |
|
272 | | | | |
273 | | o 4: 'H' |
|
273 | | o 4: 02de42196ebe 'H' | |
274 | | | |
|
274 | | | | |
275 | o | 3: 'G' |
|
275 | o | 3: eea13746799a 'G' | |
276 | |\| |
|
276 | |\| | |
277 | | o 2: 'F' |
|
277 | | o 2: 24b6387c8c8c 'F' | |
278 | | | |
|
278 | | | | |
279 | o | 1: 'E' |
|
279 | o | 1: 9520eea781bc 'E' | |
280 | |/ |
|
280 | |/ | |
281 | o 0: 'A' |
|
281 | o 0: cd010b8cd998 'A' | |
282 |
|
282 | |||
283 | $ cd .. |
|
283 | $ cd .. | |
284 |
|
284 | |||
285 |
|
285 | |||
286 | Specify only base (from 1 onto 8): |
|
286 | Specify only base (from 1 onto 8): | |
287 |
|
287 | |||
288 | $ hg clone -q -u . a2heads a6 |
|
288 | $ hg clone -q -u . a2heads a6 | |
289 | $ cd a6 |
|
289 | $ cd a6 | |
290 |
|
290 | |||
291 | $ hg rebase --base 'desc("D")' |
|
291 | $ hg rebase --base 'desc("D")' | |
292 | rebasing 1:42ccdea3bb16 "B" |
|
292 | rebasing 1:42ccdea3bb16 "B" | |
293 | rebasing 2:5fddd98957c8 "C" |
|
293 | rebasing 2:5fddd98957c8 "C" | |
294 | rebasing 3:32af7686d403 "D" |
|
294 | rebasing 3:32af7686d403 "D" | |
295 | saved backup bundle to $TESTTMP/a6/.hg/strip-backup/42ccdea3bb16-3cb021d3-rebase.hg (glob) |
|
295 | saved backup bundle to $TESTTMP/a6/.hg/strip-backup/42ccdea3bb16-3cb021d3-rebase.hg (glob) | |
296 |
|
296 | |||
297 | $ hg tglog |
|
297 | $ hg tglog | |
298 | o 6: 'D' |
|
298 | o 6: ed65089c18f8 'D' | |
299 | | |
|
299 | | | |
300 | o 5: 'C' |
|
300 | o 5: 7621bf1a2f17 'C' | |
301 | | |
|
301 | | | |
302 | o 4: 'B' |
|
302 | o 4: 9430a62369c6 'B' | |
303 | | |
|
303 | | | |
304 | @ 3: 'I' |
|
304 | @ 3: e7ec4e813ba6 'I' | |
305 | | |
|
305 | | | |
306 | o 2: 'H' |
|
306 | o 2: 02de42196ebe 'H' | |
307 | | |
|
307 | | | |
308 | o 1: 'F' |
|
308 | o 1: 24b6387c8c8c 'F' | |
309 | | |
|
309 | | | |
310 | o 0: 'A' |
|
310 | o 0: cd010b8cd998 'A' | |
311 |
|
311 | |||
312 | $ cd .. |
|
312 | $ cd .. | |
313 |
|
313 | |||
314 |
|
314 | |||
315 | Specify source and dest (from 2 onto 7): |
|
315 | Specify source and dest (from 2 onto 7): | |
316 |
|
316 | |||
317 | $ hg clone -q -u . a a7 |
|
317 | $ hg clone -q -u . a a7 | |
318 | $ cd a7 |
|
318 | $ cd a7 | |
319 |
|
319 | |||
320 | $ hg rebase --source 2 --dest 7 |
|
320 | $ hg rebase --source 2 --dest 7 | |
321 | rebasing 2:5fddd98957c8 "C" |
|
321 | rebasing 2:5fddd98957c8 "C" | |
322 | rebasing 3:32af7686d403 "D" |
|
322 | rebasing 3:32af7686d403 "D" | |
323 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/5fddd98957c8-f9244fa1-rebase.hg (glob) |
|
323 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/5fddd98957c8-f9244fa1-rebase.hg (glob) | |
324 |
|
324 | |||
325 | $ hg tglog |
|
325 | $ hg tglog | |
326 | o 8: 'D' |
|
326 | o 8: 668acadedd30 'D' | |
327 | | |
|
327 | | | |
328 | o 7: 'C' |
|
328 | o 7: 09eb682ba906 'C' | |
329 | | |
|
329 | | | |
330 | | @ 6: 'I' |
|
330 | | @ 6: e7ec4e813ba6 'I' | |
331 | |/ |
|
331 | |/ | |
332 | o 5: 'H' |
|
332 | o 5: 02de42196ebe 'H' | |
333 | | |
|
333 | | | |
334 | | o 4: 'G' |
|
334 | | o 4: eea13746799a 'G' | |
335 | |/| |
|
335 | |/| | |
336 | o | 3: 'F' |
|
336 | o | 3: 24b6387c8c8c 'F' | |
337 | | | |
|
337 | | | | |
338 | | o 2: 'E' |
|
338 | | o 2: 9520eea781bc 'E' | |
339 | |/ |
|
339 | |/ | |
340 | | o 1: 'B' |
|
340 | | o 1: 42ccdea3bb16 'B' | |
341 | |/ |
|
341 | |/ | |
342 | o 0: 'A' |
|
342 | o 0: cd010b8cd998 'A' | |
343 |
|
343 | |||
344 | $ cd .. |
|
344 | $ cd .. | |
345 |
|
345 | |||
346 |
|
346 | |||
347 | Specify base and dest (from 1 onto 7): |
|
347 | Specify base and dest (from 1 onto 7): | |
348 |
|
348 | |||
349 | $ hg clone -q -u . a a8 |
|
349 | $ hg clone -q -u . a a8 | |
350 | $ cd a8 |
|
350 | $ cd a8 | |
351 |
|
351 | |||
352 | $ hg rebase --base 3 --dest 7 |
|
352 | $ hg rebase --base 3 --dest 7 | |
353 | rebasing 1:42ccdea3bb16 "B" |
|
353 | rebasing 1:42ccdea3bb16 "B" | |
354 | rebasing 2:5fddd98957c8 "C" |
|
354 | rebasing 2:5fddd98957c8 "C" | |
355 | rebasing 3:32af7686d403 "D" |
|
355 | rebasing 3:32af7686d403 "D" | |
356 | saved backup bundle to $TESTTMP/a8/.hg/strip-backup/42ccdea3bb16-3cb021d3-rebase.hg (glob) |
|
356 | saved backup bundle to $TESTTMP/a8/.hg/strip-backup/42ccdea3bb16-3cb021d3-rebase.hg (glob) | |
357 |
|
357 | |||
358 | $ hg tglog |
|
358 | $ hg tglog | |
359 | o 8: 'D' |
|
359 | o 8: 287cc92ba5a4 'D' | |
360 | | |
|
360 | | | |
361 | o 7: 'C' |
|
361 | o 7: 6824f610a250 'C' | |
362 | | |
|
362 | | | |
363 | o 6: 'B' |
|
363 | o 6: 7c6027df6a99 'B' | |
364 | | |
|
364 | | | |
365 | | @ 5: 'I' |
|
365 | | @ 5: e7ec4e813ba6 'I' | |
366 | |/ |
|
366 | |/ | |
367 | o 4: 'H' |
|
367 | o 4: 02de42196ebe 'H' | |
368 | | |
|
368 | | | |
369 | | o 3: 'G' |
|
369 | | o 3: eea13746799a 'G' | |
370 | |/| |
|
370 | |/| | |
371 | o | 2: 'F' |
|
371 | o | 2: 24b6387c8c8c 'F' | |
372 | | | |
|
372 | | | | |
373 | | o 1: 'E' |
|
373 | | o 1: 9520eea781bc 'E' | |
374 | |/ |
|
374 | |/ | |
375 | o 0: 'A' |
|
375 | o 0: cd010b8cd998 'A' | |
376 |
|
376 | |||
377 | $ cd .. |
|
377 | $ cd .. | |
378 |
|
378 | |||
379 |
|
379 | |||
380 | Specify only revs (from 2 onto 8) |
|
380 | Specify only revs (from 2 onto 8) | |
381 |
|
381 | |||
382 | $ hg clone -q -u . a2heads a9 |
|
382 | $ hg clone -q -u . a2heads a9 | |
383 | $ cd a9 |
|
383 | $ cd a9 | |
384 |
|
384 | |||
385 | $ hg rebase --rev 'desc("C")::' |
|
385 | $ hg rebase --rev 'desc("C")::' | |
386 | rebasing 2:5fddd98957c8 "C" |
|
386 | rebasing 2:5fddd98957c8 "C" | |
387 | rebasing 3:32af7686d403 "D" |
|
387 | rebasing 3:32af7686d403 "D" | |
388 | saved backup bundle to $TESTTMP/a9/.hg/strip-backup/5fddd98957c8-f9244fa1-rebase.hg (glob) |
|
388 | saved backup bundle to $TESTTMP/a9/.hg/strip-backup/5fddd98957c8-f9244fa1-rebase.hg (glob) | |
389 |
|
389 | |||
390 | $ hg tglog |
|
390 | $ hg tglog | |
391 | o 6: 'D' |
|
391 | o 6: 7726e9fd58f7 'D' | |
392 | | |
|
392 | | | |
393 | o 5: 'C' |
|
393 | o 5: 72c8333623d0 'C' | |
394 | | |
|
394 | | | |
395 | @ 4: 'I' |
|
395 | @ 4: e7ec4e813ba6 'I' | |
396 | | |
|
396 | | | |
397 | o 3: 'H' |
|
397 | o 3: 02de42196ebe 'H' | |
398 | | |
|
398 | | | |
399 | o 2: 'F' |
|
399 | o 2: 24b6387c8c8c 'F' | |
400 | | |
|
400 | | | |
401 | | o 1: 'B' |
|
401 | | o 1: 42ccdea3bb16 'B' | |
402 | |/ |
|
402 | |/ | |
403 | o 0: 'A' |
|
403 | o 0: cd010b8cd998 'A' | |
404 |
|
404 | |||
405 | $ cd .. |
|
405 | $ cd .. | |
406 |
|
406 | |||
407 | Rebasing both a single revision and a merge in one command |
|
407 | Rebasing both a single revision and a merge in one command | |
408 |
|
408 | |||
409 | $ hg clone -q -u . a aX |
|
409 | $ hg clone -q -u . a aX | |
410 | $ cd aX |
|
410 | $ cd aX | |
411 | $ hg rebase -r 3 -r 6 --dest 8 |
|
411 | $ hg rebase -r 3 -r 6 --dest 8 | |
412 | rebasing 3:32af7686d403 "D" |
|
412 | rebasing 3:32af7686d403 "D" | |
413 | rebasing 6:eea13746799a "G" |
|
413 | rebasing 6:eea13746799a "G" | |
414 | saved backup bundle to $TESTTMP/aX/.hg/strip-backup/eea13746799a-ad273fd6-rebase.hg (glob) |
|
414 | saved backup bundle to $TESTTMP/aX/.hg/strip-backup/eea13746799a-ad273fd6-rebase.hg (glob) | |
415 | $ cd .. |
|
415 | $ cd .. | |
416 |
|
416 | |||
417 | Test --tool parameter: |
|
417 | Test --tool parameter: | |
418 |
|
418 | |||
419 | $ hg init b |
|
419 | $ hg init b | |
420 | $ cd b |
|
420 | $ cd b | |
421 |
|
421 | |||
422 | $ echo c1 > c1 |
|
422 | $ echo c1 > c1 | |
423 | $ hg ci -Am c1 |
|
423 | $ hg ci -Am c1 | |
424 | adding c1 |
|
424 | adding c1 | |
425 |
|
425 | |||
426 | $ echo c2 > c2 |
|
426 | $ echo c2 > c2 | |
427 | $ hg ci -Am c2 |
|
427 | $ hg ci -Am c2 | |
428 | adding c2 |
|
428 | adding c2 | |
429 |
|
429 | |||
430 | $ hg up -q 0 |
|
430 | $ hg up -q 0 | |
431 | $ echo c2b > c2 |
|
431 | $ echo c2b > c2 | |
432 | $ hg ci -Am c2b |
|
432 | $ hg ci -Am c2b | |
433 | adding c2 |
|
433 | adding c2 | |
434 | created new head |
|
434 | created new head | |
435 |
|
435 | |||
436 | $ cd .. |
|
436 | $ cd .. | |
437 |
|
437 | |||
438 | $ hg clone -q -u . b b1 |
|
438 | $ hg clone -q -u . b b1 | |
439 | $ cd b1 |
|
439 | $ cd b1 | |
440 |
|
440 | |||
441 | $ hg rebase -s 2 -d 1 --tool internal:local |
|
441 | $ hg rebase -s 2 -d 1 --tool internal:local | |
442 | rebasing 2:e4e3f3546619 "c2b" (tip) |
|
442 | rebasing 2:e4e3f3546619 "c2b" (tip) | |
443 | note: rebase of 2:e4e3f3546619 created no changes to commit |
|
443 | note: rebase of 2:e4e3f3546619 created no changes to commit | |
444 | saved backup bundle to $TESTTMP/b1/.hg/strip-backup/e4e3f3546619-b0841178-rebase.hg (glob) |
|
444 | saved backup bundle to $TESTTMP/b1/.hg/strip-backup/e4e3f3546619-b0841178-rebase.hg (glob) | |
445 |
|
445 | |||
446 | $ hg cat c2 |
|
446 | $ hg cat c2 | |
447 | c2 |
|
447 | c2 | |
448 |
|
448 | |||
449 | $ cd .. |
|
449 | $ cd .. | |
450 |
|
450 | |||
451 |
|
451 | |||
452 | $ hg clone -q -u . b b2 |
|
452 | $ hg clone -q -u . b b2 | |
453 | $ cd b2 |
|
453 | $ cd b2 | |
454 |
|
454 | |||
455 | $ hg rebase -s 2 -d 1 --tool internal:other |
|
455 | $ hg rebase -s 2 -d 1 --tool internal:other | |
456 | rebasing 2:e4e3f3546619 "c2b" (tip) |
|
456 | rebasing 2:e4e3f3546619 "c2b" (tip) | |
457 | saved backup bundle to $TESTTMP/b2/.hg/strip-backup/e4e3f3546619-b0841178-rebase.hg (glob) |
|
457 | saved backup bundle to $TESTTMP/b2/.hg/strip-backup/e4e3f3546619-b0841178-rebase.hg (glob) | |
458 |
|
458 | |||
459 | $ hg cat c2 |
|
459 | $ hg cat c2 | |
460 | c2b |
|
460 | c2b | |
461 |
|
461 | |||
462 | $ cd .. |
|
462 | $ cd .. | |
463 |
|
463 | |||
464 |
|
464 | |||
465 | $ hg clone -q -u . b b3 |
|
465 | $ hg clone -q -u . b b3 | |
466 | $ cd b3 |
|
466 | $ cd b3 | |
467 |
|
467 | |||
468 | $ hg rebase -s 2 -d 1 --tool internal:fail |
|
468 | $ hg rebase -s 2 -d 1 --tool internal:fail | |
469 | rebasing 2:e4e3f3546619 "c2b" (tip) |
|
469 | rebasing 2:e4e3f3546619 "c2b" (tip) | |
470 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
470 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
471 | [1] |
|
471 | [1] | |
472 |
|
472 | |||
473 | $ hg summary |
|
473 | $ hg summary | |
474 | parent: 1:56daeba07f4b |
|
474 | parent: 1:56daeba07f4b | |
475 | c2 |
|
475 | c2 | |
476 | parent: 2:e4e3f3546619 tip |
|
476 | parent: 2:e4e3f3546619 tip | |
477 | c2b |
|
477 | c2b | |
478 | branch: default |
|
478 | branch: default | |
479 | commit: 1 modified, 1 unresolved (merge) |
|
479 | commit: 1 modified, 1 unresolved (merge) | |
480 | update: (current) |
|
480 | update: (current) | |
481 | phases: 3 draft |
|
481 | phases: 3 draft | |
482 | rebase: 0 rebased, 1 remaining (rebase --continue) |
|
482 | rebase: 0 rebased, 1 remaining (rebase --continue) | |
483 |
|
483 | |||
484 | $ hg resolve -l |
|
484 | $ hg resolve -l | |
485 | U c2 |
|
485 | U c2 | |
486 |
|
486 | |||
487 | $ hg resolve -m c2 |
|
487 | $ hg resolve -m c2 | |
488 | (no more unresolved files) |
|
488 | (no more unresolved files) | |
489 | continue: hg rebase --continue |
|
489 | continue: hg rebase --continue | |
490 | $ hg graft --continue |
|
490 | $ hg graft --continue | |
491 | abort: no graft in progress |
|
491 | abort: no graft in progress | |
492 | (continue: hg rebase --continue) |
|
492 | (continue: hg rebase --continue) | |
493 | [255] |
|
493 | [255] | |
494 | $ hg rebase -c --tool internal:fail |
|
494 | $ hg rebase -c --tool internal:fail | |
495 | rebasing 2:e4e3f3546619 "c2b" (tip) |
|
495 | rebasing 2:e4e3f3546619 "c2b" (tip) | |
496 | note: rebase of 2:e4e3f3546619 created no changes to commit |
|
496 | note: rebase of 2:e4e3f3546619 created no changes to commit | |
497 | saved backup bundle to $TESTTMP/b3/.hg/strip-backup/e4e3f3546619-b0841178-rebase.hg (glob) |
|
497 | saved backup bundle to $TESTTMP/b3/.hg/strip-backup/e4e3f3546619-b0841178-rebase.hg (glob) | |
498 |
|
498 | |||
499 | $ hg rebase -i |
|
499 | $ hg rebase -i | |
500 | abort: interactive history editing is supported by the 'histedit' extension (see "hg --config extensions.histedit= help -e histedit") |
|
500 | abort: interactive history editing is supported by the 'histedit' extension (see "hg --config extensions.histedit= help -e histedit") | |
501 | [255] |
|
501 | [255] | |
502 |
|
502 | |||
503 | $ hg rebase --interactive |
|
503 | $ hg rebase --interactive | |
504 | abort: interactive history editing is supported by the 'histedit' extension (see "hg --config extensions.histedit= help -e histedit") |
|
504 | abort: interactive history editing is supported by the 'histedit' extension (see "hg --config extensions.histedit= help -e histedit") | |
505 | [255] |
|
505 | [255] | |
506 |
|
506 | |||
507 | $ cd .. |
|
507 | $ cd .. | |
508 |
|
508 | |||
509 | No common ancestor |
|
509 | No common ancestor | |
510 |
|
510 | |||
511 | $ hg init separaterepo |
|
511 | $ hg init separaterepo | |
512 | $ cd separaterepo |
|
512 | $ cd separaterepo | |
513 | $ touch a |
|
513 | $ touch a | |
514 | $ hg commit -Aqm a |
|
514 | $ hg commit -Aqm a | |
515 | $ hg up -q null |
|
515 | $ hg up -q null | |
516 | $ touch b |
|
516 | $ touch b | |
517 | $ hg commit -Aqm b |
|
517 | $ hg commit -Aqm b | |
518 | $ hg rebase -d 0 |
|
518 | $ hg rebase -d 0 | |
519 | nothing to rebase from d7486e00c6f1 to 3903775176ed |
|
519 | nothing to rebase from d7486e00c6f1 to 3903775176ed | |
520 | [1] |
|
520 | [1] | |
521 | $ cd .. |
|
521 | $ cd .. |
@@ -1,95 +1,95 b'' | |||||
1 | Tests rebasing with part of the rebase set already in the |
|
1 | Tests rebasing with part of the rebase set already in the | |
2 | destination (issue5422) |
|
2 | destination (issue5422) | |
3 |
|
3 | |||
4 | $ cat >> $HGRCPATH <<EOF |
|
4 | $ cat >> $HGRCPATH <<EOF | |
5 | > [extensions] |
|
5 | > [extensions] | |
6 | > rebase= |
|
6 | > rebase= | |
7 | > drawdag=$TESTDIR/drawdag.py |
|
7 | > drawdag=$TESTDIR/drawdag.py | |
8 | > |
|
8 | > | |
9 | > [experimental] |
|
9 | > [experimental] | |
10 | > evolution.createmarkers=True |
|
10 | > evolution.createmarkers=True | |
11 | > evolution.allowunstable=True |
|
11 | > evolution.allowunstable=True | |
12 | > |
|
12 | > | |
13 | > [alias] |
|
13 | > [alias] | |
14 | > tglog = log -G --template "{rev}: {desc}" |
|
14 | > tglog = log -G --template "{rev}: {node|short} {desc}" | |
15 | > EOF |
|
15 | > EOF | |
16 |
|
16 | |||
17 | $ rebasewithdag() { |
|
17 | $ rebasewithdag() { | |
18 | > N=`$PYTHON -c "print($N+1)"` |
|
18 | > N=`$PYTHON -c "print($N+1)"` | |
19 | > hg init repo$N && cd repo$N |
|
19 | > hg init repo$N && cd repo$N | |
20 | > hg debugdrawdag |
|
20 | > hg debugdrawdag | |
21 | > hg rebase "$@" > _rebasetmp |
|
21 | > hg rebase "$@" > _rebasetmp | |
22 | > r=$? |
|
22 | > r=$? | |
23 | > grep -v 'saved backup bundle' _rebasetmp |
|
23 | > grep -v 'saved backup bundle' _rebasetmp | |
24 | > [ $r -eq 0 ] && hg tglog |
|
24 | > [ $r -eq 0 ] && hg tglog | |
25 | > cd .. |
|
25 | > cd .. | |
26 | > return $r |
|
26 | > return $r | |
27 | > } |
|
27 | > } | |
28 |
|
28 | |||
29 | Rebase two commits, of which one is already in the right place |
|
29 | Rebase two commits, of which one is already in the right place | |
30 |
|
30 | |||
31 | $ rebasewithdag -r C+D -d B <<EOF |
|
31 | $ rebasewithdag -r C+D -d B <<EOF | |
32 | > C |
|
32 | > C | |
33 | > | |
|
33 | > | | |
34 | > B D |
|
34 | > B D | |
35 | > |/ |
|
35 | > |/ | |
36 | > A |
|
36 | > A | |
37 | > EOF |
|
37 | > EOF | |
38 | rebasing 2:b18e25de2cf5 "D" (D) |
|
38 | rebasing 2:b18e25de2cf5 "D" (D) | |
39 | already rebased 3:26805aba1e60 "C" (C tip) |
|
39 | already rebased 3:26805aba1e60 "C" (C tip) | |
40 | o 4: D |
|
40 | o 4: fe3b4c6498fa D | |
41 | | |
|
41 | | | |
42 | | o 3: C |
|
42 | | o 3: 26805aba1e60 C | |
43 | |/ |
|
43 | |/ | |
44 | | x 2: D |
|
44 | | x 2: b18e25de2cf5 D | |
45 | | | |
|
45 | | | | |
46 | o | 1: B |
|
46 | o | 1: 112478962961 B | |
47 | |/ |
|
47 | |/ | |
48 | o 0: A |
|
48 | o 0: 426bada5c675 A | |
49 |
|
49 | |||
50 | Can collapse commits even if one is already in the right place |
|
50 | Can collapse commits even if one is already in the right place | |
51 |
|
51 | |||
52 | $ rebasewithdag --collapse -r C+D -d B <<EOF |
|
52 | $ rebasewithdag --collapse -r C+D -d B <<EOF | |
53 | > C |
|
53 | > C | |
54 | > | |
|
54 | > | | |
55 | > B D |
|
55 | > B D | |
56 | > |/ |
|
56 | > |/ | |
57 | > A |
|
57 | > A | |
58 | > EOF |
|
58 | > EOF | |
59 | rebasing 2:b18e25de2cf5 "D" (D) |
|
59 | rebasing 2:b18e25de2cf5 "D" (D) | |
60 | rebasing 3:26805aba1e60 "C" (C tip) |
|
60 | rebasing 3:26805aba1e60 "C" (C tip) | |
61 | o 4: Collapsed revision |
|
61 | o 4: a2493f4ace65 Collapsed revision | |
62 | | * D |
|
62 | | * D | |
63 | | * C |
|
63 | | * C | |
64 | | x 3: C |
|
64 | | x 3: 26805aba1e60 C | |
65 | |/ |
|
65 | |/ | |
66 | | x 2: D |
|
66 | | x 2: b18e25de2cf5 D | |
67 | | | |
|
67 | | | | |
68 | o | 1: B |
|
68 | o | 1: 112478962961 B | |
69 | |/ |
|
69 | |/ | |
70 | o 0: A |
|
70 | o 0: 426bada5c675 A | |
71 |
|
71 | |||
72 | Rebase with "holes". The commits after the hole should end up on the parent of |
|
72 | Rebase with "holes". The commits after the hole should end up on the parent of | |
73 | the hole (B below), not on top of the destination (A). |
|
73 | the hole (B below), not on top of the destination (A). | |
74 |
|
74 | |||
75 | $ rebasewithdag -r B+D -d A <<EOF |
|
75 | $ rebasewithdag -r B+D -d A <<EOF | |
76 | > D |
|
76 | > D | |
77 | > | |
|
77 | > | | |
78 | > C |
|
78 | > C | |
79 | > | |
|
79 | > | | |
80 | > B |
|
80 | > B | |
81 | > | |
|
81 | > | | |
82 | > A |
|
82 | > A | |
83 | > EOF |
|
83 | > EOF | |
84 | already rebased 1:112478962961 "B" (B) |
|
84 | already rebased 1:112478962961 "B" (B) | |
85 | rebasing 3:f585351a92f8 "D" (D tip) |
|
85 | rebasing 3:f585351a92f8 "D" (D tip) | |
86 | o 4: D |
|
86 | o 4: 1e6da8103bc7 D | |
87 | | |
|
87 | | | |
88 | | x 3: D |
|
88 | | x 3: f585351a92f8 D | |
89 | | | |
|
89 | | | | |
90 | | o 2: C |
|
90 | | o 2: 26805aba1e60 C | |
91 | |/ |
|
91 | |/ | |
92 | o 1: B |
|
92 | o 1: 112478962961 B | |
93 | | |
|
93 | | | |
94 | o 0: A |
|
94 | o 0: 426bada5c675 A | |
95 |
|
95 |
@@ -1,460 +1,460 b'' | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > rebase= |
|
3 | > rebase= | |
4 | > histedit= |
|
4 | > histedit= | |
5 | > |
|
5 | > | |
6 | > [alias] |
|
6 | > [alias] | |
7 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" |
|
7 | > tglog = log -G --template "{rev}: {node|short} '{desc}' {branches}\n" | |
8 | > EOF |
|
8 | > EOF | |
9 |
|
9 | |||
10 |
|
10 | |||
11 | $ hg init a |
|
11 | $ hg init a | |
12 | $ cd a |
|
12 | $ cd a | |
13 |
|
13 | |||
14 | $ echo C1 > C1 |
|
14 | $ echo C1 > C1 | |
15 | $ hg ci -Am C1 |
|
15 | $ hg ci -Am C1 | |
16 | adding C1 |
|
16 | adding C1 | |
17 |
|
17 | |||
18 | $ echo C2 > C2 |
|
18 | $ echo C2 > C2 | |
19 | $ hg ci -Am C2 |
|
19 | $ hg ci -Am C2 | |
20 | adding C2 |
|
20 | adding C2 | |
21 |
|
21 | |||
22 | $ cd .. |
|
22 | $ cd .. | |
23 |
|
23 | |||
24 | $ hg clone a b |
|
24 | $ hg clone a b | |
25 | updating to branch default |
|
25 | updating to branch default | |
26 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
26 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
27 |
|
27 | |||
28 | $ hg clone a c |
|
28 | $ hg clone a c | |
29 | updating to branch default |
|
29 | updating to branch default | |
30 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
30 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
31 |
|
31 | |||
32 | $ cd b |
|
32 | $ cd b | |
33 |
|
33 | |||
34 | $ echo L1 > L1 |
|
34 | $ echo L1 > L1 | |
35 | $ hg ci -Am L1 |
|
35 | $ hg ci -Am L1 | |
36 | adding L1 |
|
36 | adding L1 | |
37 |
|
37 | |||
38 |
|
38 | |||
39 | $ cd ../a |
|
39 | $ cd ../a | |
40 |
|
40 | |||
41 | $ echo R1 > R1 |
|
41 | $ echo R1 > R1 | |
42 | $ hg ci -Am R1 |
|
42 | $ hg ci -Am R1 | |
43 | adding R1 |
|
43 | adding R1 | |
44 |
|
44 | |||
45 |
|
45 | |||
46 | $ cd ../b |
|
46 | $ cd ../b | |
47 |
|
47 | |||
48 | Now b has one revision to be pulled from a: |
|
48 | Now b has one revision to be pulled from a: | |
49 |
|
49 | |||
50 | $ hg pull --rebase |
|
50 | $ hg pull --rebase | |
51 | pulling from $TESTTMP/a (glob) |
|
51 | pulling from $TESTTMP/a (glob) | |
52 | searching for changes |
|
52 | searching for changes | |
53 | adding changesets |
|
53 | adding changesets | |
54 | adding manifests |
|
54 | adding manifests | |
55 | adding file changes |
|
55 | adding file changes | |
56 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
56 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
57 | new changesets 77ae9631bcca |
|
57 | new changesets 77ae9631bcca | |
58 | rebasing 2:ff8d69a621f9 "L1" |
|
58 | rebasing 2:ff8d69a621f9 "L1" | |
59 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/ff8d69a621f9-160fa373-rebase.hg (glob) |
|
59 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/ff8d69a621f9-160fa373-rebase.hg (glob) | |
60 |
|
60 | |||
61 | $ hg tglog |
|
61 | $ hg tglog | |
62 | @ 3: 'L1' |
|
62 | @ 3: d80cc2da061e 'L1' | |
63 | | |
|
63 | | | |
64 | o 2: 'R1' |
|
64 | o 2: 77ae9631bcca 'R1' | |
65 | | |
|
65 | | | |
66 | o 1: 'C2' |
|
66 | o 1: 783333faa078 'C2' | |
67 | | |
|
67 | | | |
68 | o 0: 'C1' |
|
68 | o 0: 05d58a0c15dd 'C1' | |
69 |
|
69 | |||
70 | Re-run: |
|
70 | Re-run: | |
71 |
|
71 | |||
72 | $ hg pull --rebase |
|
72 | $ hg pull --rebase | |
73 | pulling from $TESTTMP/a (glob) |
|
73 | pulling from $TESTTMP/a (glob) | |
74 | searching for changes |
|
74 | searching for changes | |
75 | no changes found |
|
75 | no changes found | |
76 |
|
76 | |||
77 | Abort pull early if working dir is not clean: |
|
77 | Abort pull early if working dir is not clean: | |
78 |
|
78 | |||
79 | $ echo L1-mod > L1 |
|
79 | $ echo L1-mod > L1 | |
80 | $ hg pull --rebase |
|
80 | $ hg pull --rebase | |
81 | abort: uncommitted changes |
|
81 | abort: uncommitted changes | |
82 | (cannot pull with rebase: please commit or shelve your changes first) |
|
82 | (cannot pull with rebase: please commit or shelve your changes first) | |
83 | [255] |
|
83 | [255] | |
84 | $ hg update --clean --quiet |
|
84 | $ hg update --clean --quiet | |
85 |
|
85 | |||
86 | Abort pull early if another operation (histedit) is in progress: |
|
86 | Abort pull early if another operation (histedit) is in progress: | |
87 |
|
87 | |||
88 | $ hg histedit . -q --commands - << EOF |
|
88 | $ hg histedit . -q --commands - << EOF | |
89 | > edit d80cc2da061e histedit: generate unfinished state |
|
89 | > edit d80cc2da061e histedit: generate unfinished state | |
90 | > EOF |
|
90 | > EOF | |
91 | Editing (d80cc2da061e), you may commit or record as needed now. |
|
91 | Editing (d80cc2da061e), you may commit or record as needed now. | |
92 | (hg histedit --continue to resume) |
|
92 | (hg histedit --continue to resume) | |
93 | [1] |
|
93 | [1] | |
94 | $ hg pull --rebase |
|
94 | $ hg pull --rebase | |
95 | abort: histedit in progress |
|
95 | abort: histedit in progress | |
96 | (use 'hg histedit --continue' or 'hg histedit --abort') |
|
96 | (use 'hg histedit --continue' or 'hg histedit --abort') | |
97 | [255] |
|
97 | [255] | |
98 | $ hg histedit --abort --quiet |
|
98 | $ hg histedit --abort --quiet | |
99 |
|
99 | |||
100 | Abort pull early with pending uncommitted merge: |
|
100 | Abort pull early with pending uncommitted merge: | |
101 |
|
101 | |||
102 | $ cd .. |
|
102 | $ cd .. | |
103 | $ hg clone --noupdate c d |
|
103 | $ hg clone --noupdate c d | |
104 | $ cd d |
|
104 | $ cd d | |
105 | $ hg tglog |
|
105 | $ hg tglog | |
106 | o 1: 'C2' |
|
106 | o 1: 783333faa078 'C2' | |
107 | | |
|
107 | | | |
108 | o 0: 'C1' |
|
108 | o 0: 05d58a0c15dd 'C1' | |
109 |
|
109 | |||
110 | $ hg update --quiet 0 |
|
110 | $ hg update --quiet 0 | |
111 | $ echo M1 > M1 |
|
111 | $ echo M1 > M1 | |
112 | $ hg commit --quiet -Am M1 |
|
112 | $ hg commit --quiet -Am M1 | |
113 | $ hg update --quiet 1 |
|
113 | $ hg update --quiet 1 | |
114 | $ hg merge 2 |
|
114 | $ hg merge 2 | |
115 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
115 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
116 | (branch merge, don't forget to commit) |
|
116 | (branch merge, don't forget to commit) | |
117 | $ hg pull --rebase |
|
117 | $ hg pull --rebase | |
118 | abort: outstanding uncommitted merge |
|
118 | abort: outstanding uncommitted merge | |
119 | (cannot pull with rebase: please commit or shelve your changes first) |
|
119 | (cannot pull with rebase: please commit or shelve your changes first) | |
120 | [255] |
|
120 | [255] | |
121 | $ hg update --clean --quiet |
|
121 | $ hg update --clean --quiet | |
122 |
|
122 | |||
123 | Abort pull early with unclean subrepo: |
|
123 | Abort pull early with unclean subrepo: | |
124 | $ echo s = s > .hgsub |
|
124 | $ echo s = s > .hgsub | |
125 | $ hg add .hgsub |
|
125 | $ hg add .hgsub | |
126 | $ hg init s |
|
126 | $ hg init s | |
127 | $ hg commit -m "generated a subrepo" |
|
127 | $ hg commit -m "generated a subrepo" | |
128 | $ echo a > s/a |
|
128 | $ echo a > s/a | |
129 | $ hg -R s add s/a |
|
129 | $ hg -R s add s/a | |
130 | $ hg pull --rebase |
|
130 | $ hg pull --rebase | |
131 | abort: uncommitted changes in subrepository "s" |
|
131 | abort: uncommitted changes in subrepository "s" | |
132 | (cannot pull with rebase: please commit or shelve your changes first) |
|
132 | (cannot pull with rebase: please commit or shelve your changes first) | |
133 | [255] |
|
133 | [255] | |
134 |
|
134 | |||
135 | Invoke pull --rebase and nothing to rebase: |
|
135 | Invoke pull --rebase and nothing to rebase: | |
136 |
|
136 | |||
137 | $ cd ../c |
|
137 | $ cd ../c | |
138 |
|
138 | |||
139 | $ hg book norebase |
|
139 | $ hg book norebase | |
140 | $ hg pull --rebase |
|
140 | $ hg pull --rebase | |
141 | pulling from $TESTTMP/a (glob) |
|
141 | pulling from $TESTTMP/a (glob) | |
142 | searching for changes |
|
142 | searching for changes | |
143 | adding changesets |
|
143 | adding changesets | |
144 | adding manifests |
|
144 | adding manifests | |
145 | adding file changes |
|
145 | adding file changes | |
146 | added 1 changesets with 1 changes to 1 files |
|
146 | added 1 changesets with 1 changes to 1 files | |
147 | new changesets 77ae9631bcca |
|
147 | new changesets 77ae9631bcca | |
148 | nothing to rebase - updating instead |
|
148 | nothing to rebase - updating instead | |
149 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
149 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
150 | updating bookmark norebase |
|
150 | updating bookmark norebase | |
151 |
|
151 | |||
152 | $ hg tglog -l 1 |
|
152 | $ hg tglog -l 1 | |
153 | @ 2: 'R1' |
|
153 | @ 2: 77ae9631bcca 'R1' | |
154 | | |
|
154 | | | |
155 | ~ |
|
155 | ~ | |
156 |
|
156 | |||
157 | pull --rebase --update should ignore --update: |
|
157 | pull --rebase --update should ignore --update: | |
158 |
|
158 | |||
159 | $ hg pull --rebase --update |
|
159 | $ hg pull --rebase --update | |
160 | pulling from $TESTTMP/a (glob) |
|
160 | pulling from $TESTTMP/a (glob) | |
161 | searching for changes |
|
161 | searching for changes | |
162 | no changes found |
|
162 | no changes found | |
163 |
|
163 | |||
164 | pull --rebase doesn't update if nothing has been pulled: |
|
164 | pull --rebase doesn't update if nothing has been pulled: | |
165 |
|
165 | |||
166 | $ hg up -q 1 |
|
166 | $ hg up -q 1 | |
167 |
|
167 | |||
168 | $ hg pull --rebase |
|
168 | $ hg pull --rebase | |
169 | pulling from $TESTTMP/a (glob) |
|
169 | pulling from $TESTTMP/a (glob) | |
170 | searching for changes |
|
170 | searching for changes | |
171 | no changes found |
|
171 | no changes found | |
172 |
|
172 | |||
173 | $ hg tglog -l 1 |
|
173 | $ hg tglog -l 1 | |
174 | o 2: 'R1' |
|
174 | o 2: 77ae9631bcca 'R1' | |
175 | | |
|
175 | | | |
176 | ~ |
|
176 | ~ | |
177 |
|
177 | |||
178 | $ cd .. |
|
178 | $ cd .. | |
179 |
|
179 | |||
180 | pull --rebase works when a specific revision is pulled (issue3619) |
|
180 | pull --rebase works when a specific revision is pulled (issue3619) | |
181 |
|
181 | |||
182 | $ cd a |
|
182 | $ cd a | |
183 | $ hg tglog |
|
183 | $ hg tglog | |
184 | @ 2: 'R1' |
|
184 | @ 2: 77ae9631bcca 'R1' | |
185 | | |
|
185 | | | |
186 | o 1: 'C2' |
|
186 | o 1: 783333faa078 'C2' | |
187 | | |
|
187 | | | |
188 | o 0: 'C1' |
|
188 | o 0: 05d58a0c15dd 'C1' | |
189 |
|
189 | |||
190 | $ echo R2 > R2 |
|
190 | $ echo R2 > R2 | |
191 | $ hg ci -Am R2 |
|
191 | $ hg ci -Am R2 | |
192 | adding R2 |
|
192 | adding R2 | |
193 | $ echo R3 > R3 |
|
193 | $ echo R3 > R3 | |
194 | $ hg ci -Am R3 |
|
194 | $ hg ci -Am R3 | |
195 | adding R3 |
|
195 | adding R3 | |
196 | $ cd ../c |
|
196 | $ cd ../c | |
197 | $ hg tglog |
|
197 | $ hg tglog | |
198 | o 2: 'R1' |
|
198 | o 2: 77ae9631bcca 'R1' | |
199 | | |
|
199 | | | |
200 | @ 1: 'C2' |
|
200 | @ 1: 783333faa078 'C2' | |
201 | | |
|
201 | | | |
202 | o 0: 'C1' |
|
202 | o 0: 05d58a0c15dd 'C1' | |
203 |
|
203 | |||
204 | $ echo L1 > L1 |
|
204 | $ echo L1 > L1 | |
205 | $ hg ci -Am L1 |
|
205 | $ hg ci -Am L1 | |
206 | adding L1 |
|
206 | adding L1 | |
207 | created new head |
|
207 | created new head | |
208 | $ hg pull --rev tip --rebase |
|
208 | $ hg pull --rev tip --rebase | |
209 | pulling from $TESTTMP/a (glob) |
|
209 | pulling from $TESTTMP/a (glob) | |
210 | searching for changes |
|
210 | searching for changes | |
211 | adding changesets |
|
211 | adding changesets | |
212 | adding manifests |
|
212 | adding manifests | |
213 | adding file changes |
|
213 | adding file changes | |
214 | added 2 changesets with 2 changes to 2 files |
|
214 | added 2 changesets with 2 changes to 2 files | |
215 | new changesets 31cd3a05214e:770a61882ace |
|
215 | new changesets 31cd3a05214e:770a61882ace | |
216 | rebasing 3:ff8d69a621f9 "L1" |
|
216 | rebasing 3:ff8d69a621f9 "L1" | |
217 | saved backup bundle to $TESTTMP/c/.hg/strip-backup/ff8d69a621f9-160fa373-rebase.hg (glob) |
|
217 | saved backup bundle to $TESTTMP/c/.hg/strip-backup/ff8d69a621f9-160fa373-rebase.hg (glob) | |
218 | $ hg tglog |
|
218 | $ hg tglog | |
219 | @ 5: 'L1' |
|
219 | @ 5: 518d153c0ba3 'L1' | |
220 | | |
|
220 | | | |
221 | o 4: 'R3' |
|
221 | o 4: 770a61882ace 'R3' | |
222 | | |
|
222 | | | |
223 | o 3: 'R2' |
|
223 | o 3: 31cd3a05214e 'R2' | |
224 | | |
|
224 | | | |
225 | o 2: 'R1' |
|
225 | o 2: 77ae9631bcca 'R1' | |
226 | | |
|
226 | | | |
227 | o 1: 'C2' |
|
227 | o 1: 783333faa078 'C2' | |
228 | | |
|
228 | | | |
229 | o 0: 'C1' |
|
229 | o 0: 05d58a0c15dd 'C1' | |
230 |
|
230 | |||
231 | pull --rebase works with bundle2 turned on |
|
231 | pull --rebase works with bundle2 turned on | |
232 |
|
232 | |||
233 | $ cd ../a |
|
233 | $ cd ../a | |
234 | $ echo R4 > R4 |
|
234 | $ echo R4 > R4 | |
235 | $ hg ci -Am R4 |
|
235 | $ hg ci -Am R4 | |
236 | adding R4 |
|
236 | adding R4 | |
237 | $ hg tglog |
|
237 | $ hg tglog | |
238 | @ 5: 'R4' |
|
238 | @ 5: 00e3b7781125 'R4' | |
239 | | |
|
239 | | | |
240 | o 4: 'R3' |
|
240 | o 4: 770a61882ace 'R3' | |
241 | | |
|
241 | | | |
242 | o 3: 'R2' |
|
242 | o 3: 31cd3a05214e 'R2' | |
243 | | |
|
243 | | | |
244 | o 2: 'R1' |
|
244 | o 2: 77ae9631bcca 'R1' | |
245 | | |
|
245 | | | |
246 | o 1: 'C2' |
|
246 | o 1: 783333faa078 'C2' | |
247 | | |
|
247 | | | |
248 | o 0: 'C1' |
|
248 | o 0: 05d58a0c15dd 'C1' | |
249 |
|
249 | |||
250 | $ cd ../c |
|
250 | $ cd ../c | |
251 | $ hg pull --rebase |
|
251 | $ hg pull --rebase | |
252 | pulling from $TESTTMP/a (glob) |
|
252 | pulling from $TESTTMP/a (glob) | |
253 | searching for changes |
|
253 | searching for changes | |
254 | adding changesets |
|
254 | adding changesets | |
255 | adding manifests |
|
255 | adding manifests | |
256 | adding file changes |
|
256 | adding file changes | |
257 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
257 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
258 | new changesets 00e3b7781125 |
|
258 | new changesets 00e3b7781125 | |
259 | rebasing 5:518d153c0ba3 "L1" |
|
259 | rebasing 5:518d153c0ba3 "L1" | |
260 | saved backup bundle to $TESTTMP/c/.hg/strip-backup/518d153c0ba3-73407f14-rebase.hg (glob) |
|
260 | saved backup bundle to $TESTTMP/c/.hg/strip-backup/518d153c0ba3-73407f14-rebase.hg (glob) | |
261 | $ hg tglog |
|
261 | $ hg tglog | |
262 | @ 6: 'L1' |
|
262 | @ 6: 0d0727eb7ce0 'L1' | |
263 | | |
|
263 | | | |
264 | o 5: 'R4' |
|
264 | o 5: 00e3b7781125 'R4' | |
265 | | |
|
265 | | | |
266 | o 4: 'R3' |
|
266 | o 4: 770a61882ace 'R3' | |
267 | | |
|
267 | | | |
268 | o 3: 'R2' |
|
268 | o 3: 31cd3a05214e 'R2' | |
269 | | |
|
269 | | | |
270 | o 2: 'R1' |
|
270 | o 2: 77ae9631bcca 'R1' | |
271 | | |
|
271 | | | |
272 | o 1: 'C2' |
|
272 | o 1: 783333faa078 'C2' | |
273 | | |
|
273 | | | |
274 | o 0: 'C1' |
|
274 | o 0: 05d58a0c15dd 'C1' | |
275 |
|
275 | |||
276 |
|
276 | |||
277 | pull --rebase only update if there is nothing to rebase |
|
277 | pull --rebase only update if there is nothing to rebase | |
278 |
|
278 | |||
279 | $ cd ../a |
|
279 | $ cd ../a | |
280 | $ echo R5 > R5 |
|
280 | $ echo R5 > R5 | |
281 | $ hg ci -Am R5 |
|
281 | $ hg ci -Am R5 | |
282 | adding R5 |
|
282 | adding R5 | |
283 | $ hg tglog |
|
283 | $ hg tglog | |
284 | @ 6: 'R5' |
|
284 | @ 6: 88dd24261747 'R5' | |
285 | | |
|
285 | | | |
286 | o 5: 'R4' |
|
286 | o 5: 00e3b7781125 'R4' | |
287 | | |
|
287 | | | |
288 | o 4: 'R3' |
|
288 | o 4: 770a61882ace 'R3' | |
289 | | |
|
289 | | | |
290 | o 3: 'R2' |
|
290 | o 3: 31cd3a05214e 'R2' | |
291 | | |
|
291 | | | |
292 | o 2: 'R1' |
|
292 | o 2: 77ae9631bcca 'R1' | |
293 | | |
|
293 | | | |
294 | o 1: 'C2' |
|
294 | o 1: 783333faa078 'C2' | |
295 | | |
|
295 | | | |
296 | o 0: 'C1' |
|
296 | o 0: 05d58a0c15dd 'C1' | |
297 |
|
297 | |||
298 | $ cd ../c |
|
298 | $ cd ../c | |
299 | $ echo L2 > L2 |
|
299 | $ echo L2 > L2 | |
300 | $ hg ci -Am L2 |
|
300 | $ hg ci -Am L2 | |
301 | adding L2 |
|
301 | adding L2 | |
302 | $ hg up 'desc(L1)' |
|
302 | $ hg up 'desc(L1)' | |
303 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
303 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
304 | $ hg pull --rebase |
|
304 | $ hg pull --rebase | |
305 | pulling from $TESTTMP/a (glob) |
|
305 | pulling from $TESTTMP/a (glob) | |
306 | searching for changes |
|
306 | searching for changes | |
307 | adding changesets |
|
307 | adding changesets | |
308 | adding manifests |
|
308 | adding manifests | |
309 | adding file changes |
|
309 | adding file changes | |
310 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
310 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
311 | new changesets 88dd24261747 |
|
311 | new changesets 88dd24261747 | |
312 | rebasing 6:0d0727eb7ce0 "L1" |
|
312 | rebasing 6:0d0727eb7ce0 "L1" | |
313 | rebasing 7:c1f58876e3bf "L2" |
|
313 | rebasing 7:c1f58876e3bf "L2" | |
314 | saved backup bundle to $TESTTMP/c/.hg/strip-backup/0d0727eb7ce0-ef61ccb2-rebase.hg (glob) |
|
314 | saved backup bundle to $TESTTMP/c/.hg/strip-backup/0d0727eb7ce0-ef61ccb2-rebase.hg (glob) | |
315 | $ hg tglog |
|
315 | $ hg tglog | |
316 | o 8: 'L2' |
|
316 | o 8: 6dc0ea5dcf55 'L2' | |
317 | | |
|
317 | | | |
318 | @ 7: 'L1' |
|
318 | @ 7: 864e0a2d2614 'L1' | |
319 | | |
|
319 | | | |
320 | o 6: 'R5' |
|
320 | o 6: 88dd24261747 'R5' | |
321 | | |
|
321 | | | |
322 | o 5: 'R4' |
|
322 | o 5: 00e3b7781125 'R4' | |
323 | | |
|
323 | | | |
324 | o 4: 'R3' |
|
324 | o 4: 770a61882ace 'R3' | |
325 | | |
|
325 | | | |
326 | o 3: 'R2' |
|
326 | o 3: 31cd3a05214e 'R2' | |
327 | | |
|
327 | | | |
328 | o 2: 'R1' |
|
328 | o 2: 77ae9631bcca 'R1' | |
329 | | |
|
329 | | | |
330 | o 1: 'C2' |
|
330 | o 1: 783333faa078 'C2' | |
331 | | |
|
331 | | | |
332 | o 0: 'C1' |
|
332 | o 0: 05d58a0c15dd 'C1' | |
333 |
|
333 | |||
334 |
|
334 | |||
335 | pull --rebase update (no rebase) use proper update: |
|
335 | pull --rebase update (no rebase) use proper update: | |
336 |
|
336 | |||
337 | - warn about other head. |
|
337 | - warn about other head. | |
338 |
|
338 | |||
339 | $ cd ../a |
|
339 | $ cd ../a | |
340 | $ echo R6 > R6 |
|
340 | $ echo R6 > R6 | |
341 | $ hg ci -Am R6 |
|
341 | $ hg ci -Am R6 | |
342 | adding R6 |
|
342 | adding R6 | |
343 | $ cd ../c |
|
343 | $ cd ../c | |
344 | $ hg up 'desc(R5)' |
|
344 | $ hg up 'desc(R5)' | |
345 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
345 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
346 | $ hg pull --rebase |
|
346 | $ hg pull --rebase | |
347 | pulling from $TESTTMP/a (glob) |
|
347 | pulling from $TESTTMP/a (glob) | |
348 | searching for changes |
|
348 | searching for changes | |
349 | adding changesets |
|
349 | adding changesets | |
350 | adding manifests |
|
350 | adding manifests | |
351 | adding file changes |
|
351 | adding file changes | |
352 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
352 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
353 | new changesets 65bc164c1d9b |
|
353 | new changesets 65bc164c1d9b | |
354 | nothing to rebase - updating instead |
|
354 | nothing to rebase - updating instead | |
355 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
355 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
356 | updated to "65bc164c1d9b: R6" |
|
356 | updated to "65bc164c1d9b: R6" | |
357 | 1 other heads for branch "default" |
|
357 | 1 other heads for branch "default" | |
358 | $ hg tglog |
|
358 | $ hg tglog | |
359 | @ 9: 'R6' |
|
359 | @ 9: 65bc164c1d9b 'R6' | |
360 | | |
|
360 | | | |
361 | | o 8: 'L2' |
|
361 | | o 8: 6dc0ea5dcf55 'L2' | |
362 | | | |
|
362 | | | | |
363 | | o 7: 'L1' |
|
363 | | o 7: 864e0a2d2614 'L1' | |
364 | |/ |
|
364 | |/ | |
365 | o 6: 'R5' |
|
365 | o 6: 88dd24261747 'R5' | |
366 | | |
|
366 | | | |
367 | o 5: 'R4' |
|
367 | o 5: 00e3b7781125 'R4' | |
368 | | |
|
368 | | | |
369 | o 4: 'R3' |
|
369 | o 4: 770a61882ace 'R3' | |
370 | | |
|
370 | | | |
371 | o 3: 'R2' |
|
371 | o 3: 31cd3a05214e 'R2' | |
372 | | |
|
372 | | | |
373 | o 2: 'R1' |
|
373 | o 2: 77ae9631bcca 'R1' | |
374 | | |
|
374 | | | |
375 | o 1: 'C2' |
|
375 | o 1: 783333faa078 'C2' | |
376 | | |
|
376 | | | |
377 | o 0: 'C1' |
|
377 | o 0: 05d58a0c15dd 'C1' | |
378 |
|
378 | |||
379 |
|
379 | |||
380 | Multiple pre-existing heads on the branch |
|
380 | Multiple pre-existing heads on the branch | |
381 | ----------------------------------------- |
|
381 | ----------------------------------------- | |
382 |
|
382 | |||
383 | Pull bring content, but nothing on the current branch, we should not consider |
|
383 | Pull bring content, but nothing on the current branch, we should not consider | |
384 | pre-existing heads. |
|
384 | pre-existing heads. | |
385 |
|
385 | |||
386 | $ cd ../a |
|
386 | $ cd ../a | |
387 | $ hg branch unrelatedbranch |
|
387 | $ hg branch unrelatedbranch | |
388 | marked working directory as branch unrelatedbranch |
|
388 | marked working directory as branch unrelatedbranch | |
389 | (branches are permanent and global, did you want a bookmark?) |
|
389 | (branches are permanent and global, did you want a bookmark?) | |
390 | $ echo B1 > B1 |
|
390 | $ echo B1 > B1 | |
391 | $ hg commit -Am B1 |
|
391 | $ hg commit -Am B1 | |
392 | adding B1 |
|
392 | adding B1 | |
393 | $ cd ../c |
|
393 | $ cd ../c | |
394 | $ hg up 'desc(L2)' |
|
394 | $ hg up 'desc(L2)' | |
395 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
395 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
396 | $ hg pull --rebase |
|
396 | $ hg pull --rebase | |
397 | pulling from $TESTTMP/a (glob) |
|
397 | pulling from $TESTTMP/a (glob) | |
398 | searching for changes |
|
398 | searching for changes | |
399 | adding changesets |
|
399 | adding changesets | |
400 | adding manifests |
|
400 | adding manifests | |
401 | adding file changes |
|
401 | adding file changes | |
402 | added 1 changesets with 1 changes to 1 files |
|
402 | added 1 changesets with 1 changes to 1 files | |
403 | new changesets 39c381359968 |
|
403 | new changesets 39c381359968 | |
404 | nothing to rebase |
|
404 | nothing to rebase | |
405 |
|
405 | |||
406 | There is two local heads and we pull a third one. |
|
406 | There is two local heads and we pull a third one. | |
407 | The second local head should not confuse the `hg pull rebase`. |
|
407 | The second local head should not confuse the `hg pull rebase`. | |
408 |
|
408 | |||
409 | $ hg up 'desc(R6)' |
|
409 | $ hg up 'desc(R6)' | |
410 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
410 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
411 | $ echo M1 > M1 |
|
411 | $ echo M1 > M1 | |
412 | $ hg commit -Am M1 |
|
412 | $ hg commit -Am M1 | |
413 | adding M1 |
|
413 | adding M1 | |
414 | $ cd ../a |
|
414 | $ cd ../a | |
415 | $ hg up 'desc(R6)' |
|
415 | $ hg up 'desc(R6)' | |
416 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
416 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
417 | $ echo R7 > R7 |
|
417 | $ echo R7 > R7 | |
418 | $ hg commit -Am R7 |
|
418 | $ hg commit -Am R7 | |
419 | adding R7 |
|
419 | adding R7 | |
420 | $ cd ../c |
|
420 | $ cd ../c | |
421 | $ hg up 'desc(L2)' |
|
421 | $ hg up 'desc(L2)' | |
422 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
422 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
423 | $ hg pull --rebase |
|
423 | $ hg pull --rebase | |
424 | pulling from $TESTTMP/a (glob) |
|
424 | pulling from $TESTTMP/a (glob) | |
425 | searching for changes |
|
425 | searching for changes | |
426 | adding changesets |
|
426 | adding changesets | |
427 | adding manifests |
|
427 | adding manifests | |
428 | adding file changes |
|
428 | adding file changes | |
429 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
429 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
430 | new changesets f7d3e42052f9 |
|
430 | new changesets f7d3e42052f9 | |
431 | rebasing 7:864e0a2d2614 "L1" |
|
431 | rebasing 7:864e0a2d2614 "L1" | |
432 | rebasing 8:6dc0ea5dcf55 "L2" |
|
432 | rebasing 8:6dc0ea5dcf55 "L2" | |
433 | saved backup bundle to $TESTTMP/c/.hg/strip-backup/864e0a2d2614-2f72c89c-rebase.hg (glob) |
|
433 | saved backup bundle to $TESTTMP/c/.hg/strip-backup/864e0a2d2614-2f72c89c-rebase.hg (glob) | |
434 | $ hg tglog |
|
434 | $ hg tglog | |
435 | @ 12: 'L2' |
|
435 | @ 12: 3603a865eea0 'L2' | |
436 | | |
|
436 | | | |
437 | o 11: 'L1' |
|
437 | o 11: bcc8a9cd04bf 'L1' | |
438 | | |
|
438 | | | |
439 | o 10: 'R7' |
|
439 | o 10: f7d3e42052f9 'R7' | |
440 | | |
|
440 | | | |
441 | | o 9: 'M1' |
|
441 | | o 9: 41fab4eef82f 'M1' | |
442 | |/ |
|
442 | |/ | |
443 | | o 8: 'B1' unrelatedbranch |
|
443 | | o 8: 39c381359968 'B1' unrelatedbranch | |
444 | |/ |
|
444 | |/ | |
445 | o 7: 'R6' |
|
445 | o 7: 65bc164c1d9b 'R6' | |
446 | | |
|
446 | | | |
447 | o 6: 'R5' |
|
447 | o 6: 88dd24261747 'R5' | |
448 | | |
|
448 | | | |
449 | o 5: 'R4' |
|
449 | o 5: 00e3b7781125 'R4' | |
450 | | |
|
450 | | | |
451 | o 4: 'R3' |
|
451 | o 4: 770a61882ace 'R3' | |
452 | | |
|
452 | | | |
453 | o 3: 'R2' |
|
453 | o 3: 31cd3a05214e 'R2' | |
454 | | |
|
454 | | | |
455 | o 2: 'R1' |
|
455 | o 2: 77ae9631bcca 'R1' | |
456 | | |
|
456 | | | |
457 | o 1: 'C2' |
|
457 | o 1: 783333faa078 'C2' | |
458 | | |
|
458 | | | |
459 | o 0: 'C1' |
|
459 | o 0: 05d58a0c15dd 'C1' | |
460 |
|
460 |
@@ -1,332 +1,332 b'' | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > rebase= |
|
3 | > rebase= | |
4 | > |
|
4 | > | |
5 | > [alias] |
|
5 | > [alias] | |
6 |
> tlog = log |
|
6 | > tlog = log --template "{rev}: {node|short} '{desc}' {branches}\n" | |
7 | > tglog = tlog --graph |
|
7 | > tglog = tlog --graph | |
8 | > EOF |
|
8 | > EOF | |
9 |
|
9 | |||
10 |
|
10 | |||
11 | $ hg init a |
|
11 | $ hg init a | |
12 | $ cd a |
|
12 | $ cd a | |
13 |
|
13 | |||
14 | $ mkdir d |
|
14 | $ mkdir d | |
15 | $ echo a > a |
|
15 | $ echo a > a | |
16 | $ hg ci -Am A |
|
16 | $ hg ci -Am A | |
17 | adding a |
|
17 | adding a | |
18 |
|
18 | |||
19 | $ echo b > d/b |
|
19 | $ echo b > d/b | |
20 | $ hg ci -Am B |
|
20 | $ hg ci -Am B | |
21 | adding d/b |
|
21 | adding d/b | |
22 |
|
22 | |||
23 | $ hg mv d d-renamed |
|
23 | $ hg mv d d-renamed | |
24 | moving d/b to d-renamed/b (glob) |
|
24 | moving d/b to d-renamed/b (glob) | |
25 | $ hg ci -m 'rename B' |
|
25 | $ hg ci -m 'rename B' | |
26 |
|
26 | |||
27 | $ hg up -q -C 1 |
|
27 | $ hg up -q -C 1 | |
28 |
|
28 | |||
29 | $ hg mv a a-renamed |
|
29 | $ hg mv a a-renamed | |
30 | $ echo x > d/x |
|
30 | $ echo x > d/x | |
31 | $ hg add d/x |
|
31 | $ hg add d/x | |
32 |
|
32 | |||
33 | $ hg ci -m 'rename A' |
|
33 | $ hg ci -m 'rename A' | |
34 | created new head |
|
34 | created new head | |
35 |
|
35 | |||
36 | $ hg tglog |
|
36 | $ hg tglog | |
37 | @ 3: 'rename A' |
|
37 | @ 3: 73a3ee40125d 'rename A' | |
38 | | |
|
38 | | | |
39 | | o 2: 'rename B' |
|
39 | | o 2: 220d0626d185 'rename B' | |
40 | |/ |
|
40 | |/ | |
41 | o 1: 'B' |
|
41 | o 1: 3ab5da9a5c01 'B' | |
42 | | |
|
42 | | | |
43 | o 0: 'A' |
|
43 | o 0: 1994f17a630e 'A' | |
44 |
|
44 | |||
45 |
|
45 | |||
46 | Rename is tracked: |
|
46 | Rename is tracked: | |
47 |
|
47 | |||
48 | $ hg tlog -p --git -r tip |
|
48 | $ hg tlog -p --git -r tip | |
49 | 3: 'rename A' |
|
49 | 3: 73a3ee40125d 'rename A' | |
50 | diff --git a/a b/a-renamed |
|
50 | diff --git a/a b/a-renamed | |
51 | rename from a |
|
51 | rename from a | |
52 | rename to a-renamed |
|
52 | rename to a-renamed | |
53 | diff --git a/d/x b/d/x |
|
53 | diff --git a/d/x b/d/x | |
54 | new file mode 100644 |
|
54 | new file mode 100644 | |
55 | --- /dev/null |
|
55 | --- /dev/null | |
56 | +++ b/d/x |
|
56 | +++ b/d/x | |
57 | @@ -0,0 +1,1 @@ |
|
57 | @@ -0,0 +1,1 @@ | |
58 | +x |
|
58 | +x | |
59 |
|
59 | |||
60 | Rebase the revision containing the rename: |
|
60 | Rebase the revision containing the rename: | |
61 |
|
61 | |||
62 | $ hg rebase -s 3 -d 2 |
|
62 | $ hg rebase -s 3 -d 2 | |
63 | rebasing 3:73a3ee40125d "rename A" (tip) |
|
63 | rebasing 3:73a3ee40125d "rename A" (tip) | |
64 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/73a3ee40125d-1d78ebcf-rebase.hg (glob) |
|
64 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/73a3ee40125d-1d78ebcf-rebase.hg (glob) | |
65 |
|
65 | |||
66 | $ hg tglog |
|
66 | $ hg tglog | |
67 | @ 3: 'rename A' |
|
67 | @ 3: 032a9b75e83b 'rename A' | |
68 | | |
|
68 | | | |
69 | o 2: 'rename B' |
|
69 | o 2: 220d0626d185 'rename B' | |
70 | | |
|
70 | | | |
71 | o 1: 'B' |
|
71 | o 1: 3ab5da9a5c01 'B' | |
72 | | |
|
72 | | | |
73 | o 0: 'A' |
|
73 | o 0: 1994f17a630e 'A' | |
74 |
|
74 | |||
75 |
|
75 | |||
76 | Rename is not lost: |
|
76 | Rename is not lost: | |
77 |
|
77 | |||
78 | $ hg tlog -p --git -r tip |
|
78 | $ hg tlog -p --git -r tip | |
79 | 3: 'rename A' |
|
79 | 3: 032a9b75e83b 'rename A' | |
80 | diff --git a/a b/a-renamed |
|
80 | diff --git a/a b/a-renamed | |
81 | rename from a |
|
81 | rename from a | |
82 | rename to a-renamed |
|
82 | rename to a-renamed | |
83 | diff --git a/d-renamed/x b/d-renamed/x |
|
83 | diff --git a/d-renamed/x b/d-renamed/x | |
84 | new file mode 100644 |
|
84 | new file mode 100644 | |
85 | --- /dev/null |
|
85 | --- /dev/null | |
86 | +++ b/d-renamed/x |
|
86 | +++ b/d-renamed/x | |
87 | @@ -0,0 +1,1 @@ |
|
87 | @@ -0,0 +1,1 @@ | |
88 | +x |
|
88 | +x | |
89 |
|
89 | |||
90 |
|
90 | |||
91 | Rebased revision does not contain information about b (issue3739) |
|
91 | Rebased revision does not contain information about b (issue3739) | |
92 |
|
92 | |||
93 | $ hg log -r 3 --debug |
|
93 | $ hg log -r 3 --debug | |
94 | changeset: 3:032a9b75e83bff1dcfb6cbfa4ef50a704bf1b569 |
|
94 | changeset: 3:032a9b75e83bff1dcfb6cbfa4ef50a704bf1b569 | |
95 | tag: tip |
|
95 | tag: tip | |
96 | phase: draft |
|
96 | phase: draft | |
97 | parent: 2:220d0626d185f372d9d8f69d9c73b0811d7725f7 |
|
97 | parent: 2:220d0626d185f372d9d8f69d9c73b0811d7725f7 | |
98 | parent: -1:0000000000000000000000000000000000000000 |
|
98 | parent: -1:0000000000000000000000000000000000000000 | |
99 | manifest: 3:035d66b27a1b06b2d12b46d41a39adb7a200c370 |
|
99 | manifest: 3:035d66b27a1b06b2d12b46d41a39adb7a200c370 | |
100 | user: test |
|
100 | user: test | |
101 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
101 | date: Thu Jan 01 00:00:00 1970 +0000 | |
102 | files+: a-renamed d-renamed/x |
|
102 | files+: a-renamed d-renamed/x | |
103 | files-: a |
|
103 | files-: a | |
104 | extra: branch=default |
|
104 | extra: branch=default | |
105 | extra: rebase_source=73a3ee40125d6f0f347082e5831ceccb3f005f8a |
|
105 | extra: rebase_source=73a3ee40125d6f0f347082e5831ceccb3f005f8a | |
106 | description: |
|
106 | description: | |
107 | rename A |
|
107 | rename A | |
108 |
|
108 | |||
109 |
|
109 | |||
110 |
|
110 | |||
111 | $ cd .. |
|
111 | $ cd .. | |
112 |
|
112 | |||
113 |
|
113 | |||
114 | $ hg init b |
|
114 | $ hg init b | |
115 | $ cd b |
|
115 | $ cd b | |
116 |
|
116 | |||
117 | $ echo a > a |
|
117 | $ echo a > a | |
118 | $ hg ci -Am A |
|
118 | $ hg ci -Am A | |
119 | adding a |
|
119 | adding a | |
120 |
|
120 | |||
121 | $ echo b > b |
|
121 | $ echo b > b | |
122 | $ hg ci -Am B |
|
122 | $ hg ci -Am B | |
123 | adding b |
|
123 | adding b | |
124 |
|
124 | |||
125 | $ hg cp b b-copied |
|
125 | $ hg cp b b-copied | |
126 | $ hg ci -Am 'copy B' |
|
126 | $ hg ci -Am 'copy B' | |
127 |
|
127 | |||
128 | $ hg up -q -C 1 |
|
128 | $ hg up -q -C 1 | |
129 |
|
129 | |||
130 | $ hg cp a a-copied |
|
130 | $ hg cp a a-copied | |
131 | $ hg ci -m 'copy A' |
|
131 | $ hg ci -m 'copy A' | |
132 | created new head |
|
132 | created new head | |
133 |
|
133 | |||
134 | $ hg tglog |
|
134 | $ hg tglog | |
135 | @ 3: 'copy A' |
|
135 | @ 3: 0a8162ff18a8 'copy A' | |
136 | | |
|
136 | | | |
137 | | o 2: 'copy B' |
|
137 | | o 2: 39e588434882 'copy B' | |
138 | |/ |
|
138 | |/ | |
139 | o 1: 'B' |
|
139 | o 1: 6c81ed0049f8 'B' | |
140 | | |
|
140 | | | |
141 | o 0: 'A' |
|
141 | o 0: 1994f17a630e 'A' | |
142 |
|
142 | |||
143 | Copy is tracked: |
|
143 | Copy is tracked: | |
144 |
|
144 | |||
145 | $ hg tlog -p --git -r tip |
|
145 | $ hg tlog -p --git -r tip | |
146 | 3: 'copy A' |
|
146 | 3: 0a8162ff18a8 'copy A' | |
147 | diff --git a/a b/a-copied |
|
147 | diff --git a/a b/a-copied | |
148 | copy from a |
|
148 | copy from a | |
149 | copy to a-copied |
|
149 | copy to a-copied | |
150 |
|
150 | |||
151 | Rebase the revision containing the copy: |
|
151 | Rebase the revision containing the copy: | |
152 |
|
152 | |||
153 | $ hg rebase -s 3 -d 2 |
|
153 | $ hg rebase -s 3 -d 2 | |
154 | rebasing 3:0a8162ff18a8 "copy A" (tip) |
|
154 | rebasing 3:0a8162ff18a8 "copy A" (tip) | |
155 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/0a8162ff18a8-dd06302a-rebase.hg (glob) |
|
155 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/0a8162ff18a8-dd06302a-rebase.hg (glob) | |
156 |
|
156 | |||
157 | $ hg tglog |
|
157 | $ hg tglog | |
158 | @ 3: 'copy A' |
|
158 | @ 3: 98f6e6dbf45a 'copy A' | |
159 | | |
|
159 | | | |
160 | o 2: 'copy B' |
|
160 | o 2: 39e588434882 'copy B' | |
161 | | |
|
161 | | | |
162 | o 1: 'B' |
|
162 | o 1: 6c81ed0049f8 'B' | |
163 | | |
|
163 | | | |
164 | o 0: 'A' |
|
164 | o 0: 1994f17a630e 'A' | |
165 |
|
165 | |||
166 |
|
166 | |||
167 | Copy is not lost: |
|
167 | Copy is not lost: | |
168 |
|
168 | |||
169 | $ hg tlog -p --git -r tip |
|
169 | $ hg tlog -p --git -r tip | |
170 | 3: 'copy A' |
|
170 | 3: 98f6e6dbf45a 'copy A' | |
171 | diff --git a/a b/a-copied |
|
171 | diff --git a/a b/a-copied | |
172 | copy from a |
|
172 | copy from a | |
173 | copy to a-copied |
|
173 | copy to a-copied | |
174 |
|
174 | |||
175 |
|
175 | |||
176 | Rebased revision does not contain information about b (issue3739) |
|
176 | Rebased revision does not contain information about b (issue3739) | |
177 |
|
177 | |||
178 | $ hg log -r 3 --debug |
|
178 | $ hg log -r 3 --debug | |
179 | changeset: 3:98f6e6dbf45ab54079c2237fbd11066a5c41a11d |
|
179 | changeset: 3:98f6e6dbf45ab54079c2237fbd11066a5c41a11d | |
180 | tag: tip |
|
180 | tag: tip | |
181 | phase: draft |
|
181 | phase: draft | |
182 | parent: 2:39e588434882ff77d01229d169cdc77f29e8855e |
|
182 | parent: 2:39e588434882ff77d01229d169cdc77f29e8855e | |
183 | parent: -1:0000000000000000000000000000000000000000 |
|
183 | parent: -1:0000000000000000000000000000000000000000 | |
184 | manifest: 3:2232f329d66fffe3930d43479ae624f66322b04d |
|
184 | manifest: 3:2232f329d66fffe3930d43479ae624f66322b04d | |
185 | user: test |
|
185 | user: test | |
186 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
186 | date: Thu Jan 01 00:00:00 1970 +0000 | |
187 | files+: a-copied |
|
187 | files+: a-copied | |
188 | extra: branch=default |
|
188 | extra: branch=default | |
189 | extra: rebase_source=0a8162ff18a8900df8df8ef7ac0046955205613e |
|
189 | extra: rebase_source=0a8162ff18a8900df8df8ef7ac0046955205613e | |
190 | description: |
|
190 | description: | |
191 | copy A |
|
191 | copy A | |
192 |
|
192 | |||
193 |
|
193 | |||
194 |
|
194 | |||
195 | $ cd .. |
|
195 | $ cd .. | |
196 |
|
196 | |||
197 |
|
197 | |||
198 | Test rebase across repeating renames: |
|
198 | Test rebase across repeating renames: | |
199 |
|
199 | |||
200 | $ hg init repo |
|
200 | $ hg init repo | |
201 |
|
201 | |||
202 | $ cd repo |
|
202 | $ cd repo | |
203 |
|
203 | |||
204 | $ echo testing > file1.txt |
|
204 | $ echo testing > file1.txt | |
205 | $ hg add file1.txt |
|
205 | $ hg add file1.txt | |
206 | $ hg ci -m "Adding file1" |
|
206 | $ hg ci -m "Adding file1" | |
207 |
|
207 | |||
208 | $ hg rename file1.txt file2.txt |
|
208 | $ hg rename file1.txt file2.txt | |
209 | $ hg ci -m "Rename file1 to file2" |
|
209 | $ hg ci -m "Rename file1 to file2" | |
210 |
|
210 | |||
211 | $ echo Unrelated change > unrelated.txt |
|
211 | $ echo Unrelated change > unrelated.txt | |
212 | $ hg add unrelated.txt |
|
212 | $ hg add unrelated.txt | |
213 | $ hg ci -m "Unrelated change" |
|
213 | $ hg ci -m "Unrelated change" | |
214 |
|
214 | |||
215 | $ hg rename file2.txt file1.txt |
|
215 | $ hg rename file2.txt file1.txt | |
216 | $ hg ci -m "Rename file2 back to file1" |
|
216 | $ hg ci -m "Rename file2 back to file1" | |
217 |
|
217 | |||
218 | $ hg update -r -2 |
|
218 | $ hg update -r -2 | |
219 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
219 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
220 |
|
220 | |||
221 | $ echo Another unrelated change >> unrelated.txt |
|
221 | $ echo Another unrelated change >> unrelated.txt | |
222 | $ hg ci -m "Another unrelated change" |
|
222 | $ hg ci -m "Another unrelated change" | |
223 | created new head |
|
223 | created new head | |
224 |
|
224 | |||
225 | $ hg tglog |
|
225 | $ hg tglog | |
226 | @ 4: 'Another unrelated change' |
|
226 | @ 4: b918d683b091 'Another unrelated change' | |
227 | | |
|
227 | | | |
228 | | o 3: 'Rename file2 back to file1' |
|
228 | | o 3: 1ac17e43d8aa 'Rename file2 back to file1' | |
229 | |/ |
|
229 | |/ | |
230 | o 2: 'Unrelated change' |
|
230 | o 2: 480101d66d8d 'Unrelated change' | |
231 | | |
|
231 | | | |
232 | o 1: 'Rename file1 to file2' |
|
232 | o 1: be44c61debd2 'Rename file1 to file2' | |
233 | | |
|
233 | | | |
234 | o 0: 'Adding file1' |
|
234 | o 0: 8ce9a346991d 'Adding file1' | |
235 |
|
235 | |||
236 |
|
236 | |||
237 | $ hg rebase -s 4 -d 3 |
|
237 | $ hg rebase -s 4 -d 3 | |
238 | rebasing 4:b918d683b091 "Another unrelated change" (tip) |
|
238 | rebasing 4:b918d683b091 "Another unrelated change" (tip) | |
239 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/b918d683b091-3024bc57-rebase.hg (glob) |
|
239 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/b918d683b091-3024bc57-rebase.hg (glob) | |
240 |
|
240 | |||
241 | $ hg diff --stat -c . |
|
241 | $ hg diff --stat -c . | |
242 | unrelated.txt | 1 + |
|
242 | unrelated.txt | 1 + | |
243 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
243 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
244 |
|
244 | |||
245 | $ cd .. |
|
245 | $ cd .. | |
246 |
|
246 | |||
247 | Verify that copies get preserved (issue4192). |
|
247 | Verify that copies get preserved (issue4192). | |
248 | $ hg init copy-gets-preserved |
|
248 | $ hg init copy-gets-preserved | |
249 | $ cd copy-gets-preserved |
|
249 | $ cd copy-gets-preserved | |
250 |
|
250 | |||
251 | $ echo a > a |
|
251 | $ echo a > a | |
252 | $ hg add a |
|
252 | $ hg add a | |
253 | $ hg commit --message "File a created" |
|
253 | $ hg commit --message "File a created" | |
254 | $ hg copy a b |
|
254 | $ hg copy a b | |
255 | $ echo b > b |
|
255 | $ echo b > b | |
256 | $ hg commit --message "File b created as copy of a and modified" |
|
256 | $ hg commit --message "File b created as copy of a and modified" | |
257 | $ hg copy b c |
|
257 | $ hg copy b c | |
258 | $ echo c > c |
|
258 | $ echo c > c | |
259 | $ hg commit --message "File c created as copy of b and modified" |
|
259 | $ hg commit --message "File c created as copy of b and modified" | |
260 | $ hg copy c d |
|
260 | $ hg copy c d | |
261 | $ echo d > d |
|
261 | $ echo d > d | |
262 | $ hg commit --message "File d created as copy of c and modified" |
|
262 | $ hg commit --message "File d created as copy of c and modified" | |
263 |
|
263 | |||
264 | Note that there are four entries in the log for d |
|
264 | Note that there are four entries in the log for d | |
265 | $ hg tglog --follow d |
|
265 | $ hg tglog --follow d | |
266 | @ 3: 'File d created as copy of c and modified' |
|
266 | @ 3: 421b7e82bb85 'File d created as copy of c and modified' | |
267 | | |
|
267 | | | |
268 | o 2: 'File c created as copy of b and modified' |
|
268 | o 2: 327f772bc074 'File c created as copy of b and modified' | |
269 | | |
|
269 | | | |
270 | o 1: 'File b created as copy of a and modified' |
|
270 | o 1: 79d255d24ad2 'File b created as copy of a and modified' | |
271 | | |
|
271 | | | |
272 | o 0: 'File a created' |
|
272 | o 0: b220cd6d2326 'File a created' | |
273 |
|
273 | |||
274 | Update back to before we performed copies, and inject an unrelated change. |
|
274 | Update back to before we performed copies, and inject an unrelated change. | |
275 | $ hg update 0 |
|
275 | $ hg update 0 | |
276 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
276 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
277 |
|
277 | |||
278 | $ echo unrelated > unrelated |
|
278 | $ echo unrelated > unrelated | |
279 | $ hg add unrelated |
|
279 | $ hg add unrelated | |
280 | $ hg commit --message "Unrelated file created" |
|
280 | $ hg commit --message "Unrelated file created" | |
281 | created new head |
|
281 | created new head | |
282 | $ hg update 4 |
|
282 | $ hg update 4 | |
283 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
283 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
284 |
|
284 | |||
285 | Rebase the copies on top of the unrelated change. |
|
285 | Rebase the copies on top of the unrelated change. | |
286 | $ hg rebase --source 1 --dest 4 |
|
286 | $ hg rebase --source 1 --dest 4 | |
287 | rebasing 1:79d255d24ad2 "File b created as copy of a and modified" |
|
287 | rebasing 1:79d255d24ad2 "File b created as copy of a and modified" | |
288 | rebasing 2:327f772bc074 "File c created as copy of b and modified" |
|
288 | rebasing 2:327f772bc074 "File c created as copy of b and modified" | |
289 | rebasing 3:421b7e82bb85 "File d created as copy of c and modified" |
|
289 | rebasing 3:421b7e82bb85 "File d created as copy of c and modified" | |
290 | saved backup bundle to $TESTTMP/copy-gets-preserved/.hg/strip-backup/79d255d24ad2-a2265555-rebase.hg (glob) |
|
290 | saved backup bundle to $TESTTMP/copy-gets-preserved/.hg/strip-backup/79d255d24ad2-a2265555-rebase.hg (glob) | |
291 | $ hg update 4 |
|
291 | $ hg update 4 | |
292 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
292 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
293 |
|
293 | |||
294 | There should still be four entries in the log for d |
|
294 | There should still be four entries in the log for d | |
295 | $ hg tglog --follow d |
|
295 | $ hg tglog --follow d | |
296 | @ 4: 'File d created as copy of c and modified' |
|
296 | @ 4: dbb9ba033561 'File d created as copy of c and modified' | |
297 | | |
|
297 | | | |
298 | o 3: 'File c created as copy of b and modified' |
|
298 | o 3: af74b229bc02 'File c created as copy of b and modified' | |
299 | | |
|
299 | | | |
300 | o 2: 'File b created as copy of a and modified' |
|
300 | o 2: 68bf06433839 'File b created as copy of a and modified' | |
301 | : |
|
301 | : | |
302 | o 0: 'File a created' |
|
302 | o 0: b220cd6d2326 'File a created' | |
303 |
|
303 | |||
304 | Same steps as above, but with --collapse on rebase to make sure the |
|
304 | Same steps as above, but with --collapse on rebase to make sure the | |
305 | copy records collapse correctly. |
|
305 | copy records collapse correctly. | |
306 | $ hg co 1 |
|
306 | $ hg co 1 | |
307 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
307 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
308 | $ echo more >> unrelated |
|
308 | $ echo more >> unrelated | |
309 | $ hg ci -m 'unrelated commit is unrelated' |
|
309 | $ hg ci -m 'unrelated commit is unrelated' | |
310 | created new head |
|
310 | created new head | |
311 | $ hg rebase -s 2 --dest 5 --collapse |
|
311 | $ hg rebase -s 2 --dest 5 --collapse | |
312 | rebasing 2:68bf06433839 "File b created as copy of a and modified" |
|
312 | rebasing 2:68bf06433839 "File b created as copy of a and modified" | |
313 | rebasing 3:af74b229bc02 "File c created as copy of b and modified" |
|
313 | rebasing 3:af74b229bc02 "File c created as copy of b and modified" | |
314 | merging b and c to c |
|
314 | merging b and c to c | |
315 | rebasing 4:dbb9ba033561 "File d created as copy of c and modified" |
|
315 | rebasing 4:dbb9ba033561 "File d created as copy of c and modified" | |
316 | merging c and d to d |
|
316 | merging c and d to d | |
317 | saved backup bundle to $TESTTMP/copy-gets-preserved/.hg/strip-backup/68bf06433839-dde37595-rebase.hg (glob) |
|
317 | saved backup bundle to $TESTTMP/copy-gets-preserved/.hg/strip-backup/68bf06433839-dde37595-rebase.hg (glob) | |
318 | $ hg co tip |
|
318 | $ hg co tip | |
319 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
319 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
320 |
|
320 | |||
321 | This should show both revision 3 and 0 since 'd' was transitively a |
|
321 | This should show both revision 3 and 0 since 'd' was transitively a | |
322 | copy of 'a'. |
|
322 | copy of 'a'. | |
323 |
|
323 | |||
324 | $ hg tglog --follow d |
|
324 | $ hg tglog --follow d | |
325 | @ 3: 'Collapsed revision |
|
325 | @ 3: 5a46b94210e5 'Collapsed revision | |
326 | : * File b created as copy of a and modified |
|
326 | : * File b created as copy of a and modified | |
327 | : * File c created as copy of b and modified |
|
327 | : * File c created as copy of b and modified | |
328 | : * File d created as copy of c and modified' |
|
328 | : * File d created as copy of c and modified' | |
329 | o 0: 'File a created' |
|
329 | o 0: b220cd6d2326 'File a created' | |
330 |
|
330 | |||
331 |
|
331 | |||
332 | $ cd .. |
|
332 | $ cd .. |
@@ -1,984 +1,984 b'' | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > rebase= |
|
3 | > rebase= | |
4 | > drawdag=$TESTDIR/drawdag.py |
|
4 | > drawdag=$TESTDIR/drawdag.py | |
5 | > |
|
5 | > | |
6 | > [phases] |
|
6 | > [phases] | |
7 | > publish=False |
|
7 | > publish=False | |
8 | > |
|
8 | > | |
9 | > [alias] |
|
9 | > [alias] | |
10 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" |
|
10 | > tglog = log -G --template "{rev}: {node|short} '{desc}' {branches}\n" | |
11 | > EOF |
|
11 | > EOF | |
12 |
|
12 | |||
13 |
|
13 | |||
14 | $ hg init a |
|
14 | $ hg init a | |
15 | $ cd a |
|
15 | $ cd a | |
16 | $ hg unbundle "$TESTDIR/bundles/rebase.hg" |
|
16 | $ hg unbundle "$TESTDIR/bundles/rebase.hg" | |
17 | adding changesets |
|
17 | adding changesets | |
18 | adding manifests |
|
18 | adding manifests | |
19 | adding file changes |
|
19 | adding file changes | |
20 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
20 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
21 | new changesets cd010b8cd998:02de42196ebe |
|
21 | new changesets cd010b8cd998:02de42196ebe | |
22 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
22 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
23 | $ hg up tip |
|
23 | $ hg up tip | |
24 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
24 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
25 | $ cd .. |
|
25 | $ cd .. | |
26 |
|
26 | |||
27 |
|
27 | |||
28 | Rebasing |
|
28 | Rebasing | |
29 | D onto H - simple rebase: |
|
29 | D onto H - simple rebase: | |
30 | (this also tests that editor is invoked if '--edit' is specified, and that we |
|
30 | (this also tests that editor is invoked if '--edit' is specified, and that we | |
31 | can abort or warn for colliding untracked files) |
|
31 | can abort or warn for colliding untracked files) | |
32 |
|
32 | |||
33 | $ hg clone -q -u . a a1 |
|
33 | $ hg clone -q -u . a a1 | |
34 | $ cd a1 |
|
34 | $ cd a1 | |
35 |
|
35 | |||
36 | $ hg tglog |
|
36 | $ hg tglog | |
37 | @ 7: 'H' |
|
37 | @ 7: 02de42196ebe 'H' | |
38 | | |
|
38 | | | |
39 | | o 6: 'G' |
|
39 | | o 6: eea13746799a 'G' | |
40 | |/| |
|
40 | |/| | |
41 | o | 5: 'F' |
|
41 | o | 5: 24b6387c8c8c 'F' | |
42 | | | |
|
42 | | | | |
43 | | o 4: 'E' |
|
43 | | o 4: 9520eea781bc 'E' | |
44 | |/ |
|
44 | |/ | |
45 | | o 3: 'D' |
|
45 | | o 3: 32af7686d403 'D' | |
46 | | | |
|
46 | | | | |
47 | | o 2: 'C' |
|
47 | | o 2: 5fddd98957c8 'C' | |
48 | | | |
|
48 | | | | |
49 | | o 1: 'B' |
|
49 | | o 1: 42ccdea3bb16 'B' | |
50 | |/ |
|
50 | |/ | |
51 | o 0: 'A' |
|
51 | o 0: cd010b8cd998 'A' | |
52 |
|
52 | |||
53 |
|
53 | |||
54 | $ hg status --rev "3^1" --rev 3 |
|
54 | $ hg status --rev "3^1" --rev 3 | |
55 | A D |
|
55 | A D | |
56 | $ echo collide > D |
|
56 | $ echo collide > D | |
57 | $ HGEDITOR=cat hg rebase -s 3 -d 7 --edit --config merge.checkunknown=warn |
|
57 | $ HGEDITOR=cat hg rebase -s 3 -d 7 --edit --config merge.checkunknown=warn | |
58 | rebasing 3:32af7686d403 "D" |
|
58 | rebasing 3:32af7686d403 "D" | |
59 | D: replacing untracked file |
|
59 | D: replacing untracked file | |
60 | D |
|
60 | D | |
61 |
|
61 | |||
62 |
|
62 | |||
63 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
63 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
64 | HG: Leave message empty to abort commit. |
|
64 | HG: Leave message empty to abort commit. | |
65 | HG: -- |
|
65 | HG: -- | |
66 | HG: user: Nicolas Dumazet <nicdumz.commits@gmail.com> |
|
66 | HG: user: Nicolas Dumazet <nicdumz.commits@gmail.com> | |
67 | HG: branch 'default' |
|
67 | HG: branch 'default' | |
68 | HG: added D |
|
68 | HG: added D | |
69 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/32af7686d403-6f7dface-rebase.hg (glob) |
|
69 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/32af7686d403-6f7dface-rebase.hg (glob) | |
70 | $ cat D.orig |
|
70 | $ cat D.orig | |
71 | collide |
|
71 | collide | |
72 | $ rm D.orig |
|
72 | $ rm D.orig | |
73 |
|
73 | |||
74 | $ hg tglog |
|
74 | $ hg tglog | |
75 | o 7: 'D' |
|
75 | o 7: 1619f02ff7dd 'D' | |
76 | | |
|
76 | | | |
77 | @ 6: 'H' |
|
77 | @ 6: 02de42196ebe 'H' | |
78 | | |
|
78 | | | |
79 | | o 5: 'G' |
|
79 | | o 5: eea13746799a 'G' | |
80 | |/| |
|
80 | |/| | |
81 | o | 4: 'F' |
|
81 | o | 4: 24b6387c8c8c 'F' | |
82 | | | |
|
82 | | | | |
83 | | o 3: 'E' |
|
83 | | o 3: 9520eea781bc 'E' | |
84 | |/ |
|
84 | |/ | |
85 | | o 2: 'C' |
|
85 | | o 2: 5fddd98957c8 'C' | |
86 | | | |
|
86 | | | | |
87 | | o 1: 'B' |
|
87 | | o 1: 42ccdea3bb16 'B' | |
88 | |/ |
|
88 | |/ | |
89 | o 0: 'A' |
|
89 | o 0: cd010b8cd998 'A' | |
90 |
|
90 | |||
91 | $ cd .. |
|
91 | $ cd .. | |
92 |
|
92 | |||
93 |
|
93 | |||
94 | D onto F - intermediate point: |
|
94 | D onto F - intermediate point: | |
95 | (this also tests that editor is not invoked if '--edit' is not specified, and |
|
95 | (this also tests that editor is not invoked if '--edit' is not specified, and | |
96 | that we can ignore for colliding untracked files) |
|
96 | that we can ignore for colliding untracked files) | |
97 |
|
97 | |||
98 | $ hg clone -q -u . a a2 |
|
98 | $ hg clone -q -u . a a2 | |
99 | $ cd a2 |
|
99 | $ cd a2 | |
100 | $ echo collide > D |
|
100 | $ echo collide > D | |
101 |
|
101 | |||
102 | $ HGEDITOR=cat hg rebase -s 3 -d 5 --config merge.checkunknown=ignore |
|
102 | $ HGEDITOR=cat hg rebase -s 3 -d 5 --config merge.checkunknown=ignore | |
103 | rebasing 3:32af7686d403 "D" |
|
103 | rebasing 3:32af7686d403 "D" | |
104 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/32af7686d403-6f7dface-rebase.hg (glob) |
|
104 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/32af7686d403-6f7dface-rebase.hg (glob) | |
105 | $ cat D.orig |
|
105 | $ cat D.orig | |
106 | collide |
|
106 | collide | |
107 | $ rm D.orig |
|
107 | $ rm D.orig | |
108 |
|
108 | |||
109 | $ hg tglog |
|
109 | $ hg tglog | |
110 | o 7: 'D' |
|
110 | o 7: 2107530e74ab 'D' | |
111 | | |
|
111 | | | |
112 | | @ 6: 'H' |
|
112 | | @ 6: 02de42196ebe 'H' | |
113 | |/ |
|
113 | |/ | |
114 | | o 5: 'G' |
|
114 | | o 5: eea13746799a 'G' | |
115 | |/| |
|
115 | |/| | |
116 | o | 4: 'F' |
|
116 | o | 4: 24b6387c8c8c 'F' | |
117 | | | |
|
117 | | | | |
118 | | o 3: 'E' |
|
118 | | o 3: 9520eea781bc 'E' | |
119 | |/ |
|
119 | |/ | |
120 | | o 2: 'C' |
|
120 | | o 2: 5fddd98957c8 'C' | |
121 | | | |
|
121 | | | | |
122 | | o 1: 'B' |
|
122 | | o 1: 42ccdea3bb16 'B' | |
123 | |/ |
|
123 | |/ | |
124 | o 0: 'A' |
|
124 | o 0: cd010b8cd998 'A' | |
125 |
|
125 | |||
126 | $ cd .. |
|
126 | $ cd .. | |
127 |
|
127 | |||
128 |
|
128 | |||
129 | E onto H - skip of G: |
|
129 | E onto H - skip of G: | |
130 | (this also tests that we can overwrite untracked files and don't create backups |
|
130 | (this also tests that we can overwrite untracked files and don't create backups | |
131 | if they have the same contents) |
|
131 | if they have the same contents) | |
132 |
|
132 | |||
133 | $ hg clone -q -u . a a3 |
|
133 | $ hg clone -q -u . a a3 | |
134 | $ cd a3 |
|
134 | $ cd a3 | |
135 | $ hg cat -r 4 E | tee E |
|
135 | $ hg cat -r 4 E | tee E | |
136 | E |
|
136 | E | |
137 |
|
137 | |||
138 | $ hg rebase -s 4 -d 7 |
|
138 | $ hg rebase -s 4 -d 7 | |
139 | rebasing 4:9520eea781bc "E" |
|
139 | rebasing 4:9520eea781bc "E" | |
140 | rebasing 6:eea13746799a "G" |
|
140 | rebasing 6:eea13746799a "G" | |
141 | note: rebase of 6:eea13746799a created no changes to commit |
|
141 | note: rebase of 6:eea13746799a created no changes to commit | |
142 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/9520eea781bc-fcd8edd4-rebase.hg (glob) |
|
142 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/9520eea781bc-fcd8edd4-rebase.hg (glob) | |
143 | $ f E.orig |
|
143 | $ f E.orig | |
144 | E.orig: file not found |
|
144 | E.orig: file not found | |
145 |
|
145 | |||
146 | $ hg tglog |
|
146 | $ hg tglog | |
147 | o 6: 'E' |
|
147 | o 6: 9f8b8ec77260 'E' | |
148 | | |
|
148 | | | |
149 | @ 5: 'H' |
|
149 | @ 5: 02de42196ebe 'H' | |
150 | | |
|
150 | | | |
151 | o 4: 'F' |
|
151 | o 4: 24b6387c8c8c 'F' | |
152 | | |
|
152 | | | |
153 | | o 3: 'D' |
|
153 | | o 3: 32af7686d403 'D' | |
154 | | | |
|
154 | | | | |
155 | | o 2: 'C' |
|
155 | | o 2: 5fddd98957c8 'C' | |
156 | | | |
|
156 | | | | |
157 | | o 1: 'B' |
|
157 | | o 1: 42ccdea3bb16 'B' | |
158 | |/ |
|
158 | |/ | |
159 | o 0: 'A' |
|
159 | o 0: cd010b8cd998 'A' | |
160 |
|
160 | |||
161 | $ cd .. |
|
161 | $ cd .. | |
162 |
|
162 | |||
163 |
|
163 | |||
164 | F onto E - rebase of a branching point (skip G): |
|
164 | F onto E - rebase of a branching point (skip G): | |
165 |
|
165 | |||
166 | $ hg clone -q -u . a a4 |
|
166 | $ hg clone -q -u . a a4 | |
167 | $ cd a4 |
|
167 | $ cd a4 | |
168 |
|
168 | |||
169 | $ hg rebase -s 5 -d 4 |
|
169 | $ hg rebase -s 5 -d 4 | |
170 | rebasing 5:24b6387c8c8c "F" |
|
170 | rebasing 5:24b6387c8c8c "F" | |
171 | rebasing 6:eea13746799a "G" |
|
171 | rebasing 6:eea13746799a "G" | |
172 | note: rebase of 6:eea13746799a created no changes to commit |
|
172 | note: rebase of 6:eea13746799a created no changes to commit | |
173 | rebasing 7:02de42196ebe "H" (tip) |
|
173 | rebasing 7:02de42196ebe "H" (tip) | |
174 | saved backup bundle to $TESTTMP/a4/.hg/strip-backup/24b6387c8c8c-c3fe765d-rebase.hg (glob) |
|
174 | saved backup bundle to $TESTTMP/a4/.hg/strip-backup/24b6387c8c8c-c3fe765d-rebase.hg (glob) | |
175 |
|
175 | |||
176 | $ hg tglog |
|
176 | $ hg tglog | |
177 | @ 6: 'H' |
|
177 | @ 6: e9240aeaa6ad 'H' | |
178 | | |
|
178 | | | |
179 | o 5: 'F' |
|
179 | o 5: 5d0ccadb6e3e 'F' | |
180 | | |
|
180 | | | |
181 | o 4: 'E' |
|
181 | o 4: 9520eea781bc 'E' | |
182 | | |
|
182 | | | |
183 | | o 3: 'D' |
|
183 | | o 3: 32af7686d403 'D' | |
184 | | | |
|
184 | | | | |
185 | | o 2: 'C' |
|
185 | | o 2: 5fddd98957c8 'C' | |
186 | | | |
|
186 | | | | |
187 | | o 1: 'B' |
|
187 | | o 1: 42ccdea3bb16 'B' | |
188 | |/ |
|
188 | |/ | |
189 | o 0: 'A' |
|
189 | o 0: cd010b8cd998 'A' | |
190 |
|
190 | |||
191 | $ cd .. |
|
191 | $ cd .. | |
192 |
|
192 | |||
193 |
|
193 | |||
194 | G onto H - merged revision having a parent in ancestors of target: |
|
194 | G onto H - merged revision having a parent in ancestors of target: | |
195 |
|
195 | |||
196 | $ hg clone -q -u . a a5 |
|
196 | $ hg clone -q -u . a a5 | |
197 | $ cd a5 |
|
197 | $ cd a5 | |
198 |
|
198 | |||
199 | $ hg rebase -s 6 -d 7 |
|
199 | $ hg rebase -s 6 -d 7 | |
200 | rebasing 6:eea13746799a "G" |
|
200 | rebasing 6:eea13746799a "G" | |
201 | saved backup bundle to $TESTTMP/a5/.hg/strip-backup/eea13746799a-883828ed-rebase.hg (glob) |
|
201 | saved backup bundle to $TESTTMP/a5/.hg/strip-backup/eea13746799a-883828ed-rebase.hg (glob) | |
202 |
|
202 | |||
203 | $ hg tglog |
|
203 | $ hg tglog | |
204 | o 7: 'G' |
|
204 | o 7: 397834907a90 'G' | |
205 | |\ |
|
205 | |\ | |
206 | | @ 6: 'H' |
|
206 | | @ 6: 02de42196ebe 'H' | |
207 | | | |
|
207 | | | | |
208 | | o 5: 'F' |
|
208 | | o 5: 24b6387c8c8c 'F' | |
209 | | | |
|
209 | | | | |
210 | o | 4: 'E' |
|
210 | o | 4: 9520eea781bc 'E' | |
211 | |/ |
|
211 | |/ | |
212 | | o 3: 'D' |
|
212 | | o 3: 32af7686d403 'D' | |
213 | | | |
|
213 | | | | |
214 | | o 2: 'C' |
|
214 | | o 2: 5fddd98957c8 'C' | |
215 | | | |
|
215 | | | | |
216 | | o 1: 'B' |
|
216 | | o 1: 42ccdea3bb16 'B' | |
217 | |/ |
|
217 | |/ | |
218 | o 0: 'A' |
|
218 | o 0: cd010b8cd998 'A' | |
219 |
|
219 | |||
220 | $ cd .. |
|
220 | $ cd .. | |
221 |
|
221 | |||
222 |
|
222 | |||
223 | F onto B - G maintains E as parent: |
|
223 | F onto B - G maintains E as parent: | |
224 |
|
224 | |||
225 | $ hg clone -q -u . a a6 |
|
225 | $ hg clone -q -u . a a6 | |
226 | $ cd a6 |
|
226 | $ cd a6 | |
227 |
|
227 | |||
228 | $ hg rebase -s 5 -d 1 |
|
228 | $ hg rebase -s 5 -d 1 | |
229 | rebasing 5:24b6387c8c8c "F" |
|
229 | rebasing 5:24b6387c8c8c "F" | |
230 | rebasing 6:eea13746799a "G" |
|
230 | rebasing 6:eea13746799a "G" | |
231 | rebasing 7:02de42196ebe "H" (tip) |
|
231 | rebasing 7:02de42196ebe "H" (tip) | |
232 | saved backup bundle to $TESTTMP/a6/.hg/strip-backup/24b6387c8c8c-c3fe765d-rebase.hg (glob) |
|
232 | saved backup bundle to $TESTTMP/a6/.hg/strip-backup/24b6387c8c8c-c3fe765d-rebase.hg (glob) | |
233 |
|
233 | |||
234 | $ hg tglog |
|
234 | $ hg tglog | |
235 | @ 7: 'H' |
|
235 | @ 7: c87be72f9641 'H' | |
236 | | |
|
236 | | | |
237 | | o 6: 'G' |
|
237 | | o 6: 17badd73d4f1 'G' | |
238 | |/| |
|
238 | |/| | |
239 | o | 5: 'F' |
|
239 | o | 5: 74fb9ed646c4 'F' | |
240 | | | |
|
240 | | | | |
241 | | o 4: 'E' |
|
241 | | o 4: 9520eea781bc 'E' | |
242 | | | |
|
242 | | | | |
243 | | | o 3: 'D' |
|
243 | | | o 3: 32af7686d403 'D' | |
244 | | | | |
|
244 | | | | | |
245 | +---o 2: 'C' |
|
245 | +---o 2: 5fddd98957c8 'C' | |
246 | | | |
|
246 | | | | |
247 | o | 1: 'B' |
|
247 | o | 1: 42ccdea3bb16 'B' | |
248 | |/ |
|
248 | |/ | |
249 | o 0: 'A' |
|
249 | o 0: cd010b8cd998 'A' | |
250 |
|
250 | |||
251 | $ cd .. |
|
251 | $ cd .. | |
252 |
|
252 | |||
253 |
|
253 | |||
254 | These will fail (using --source): |
|
254 | These will fail (using --source): | |
255 |
|
255 | |||
256 | G onto F - rebase onto an ancestor: |
|
256 | G onto F - rebase onto an ancestor: | |
257 |
|
257 | |||
258 | $ hg clone -q -u . a a7 |
|
258 | $ hg clone -q -u . a a7 | |
259 | $ cd a7 |
|
259 | $ cd a7 | |
260 |
|
260 | |||
261 | $ hg rebase -s 6 -d 5 |
|
261 | $ hg rebase -s 6 -d 5 | |
262 | nothing to rebase |
|
262 | nothing to rebase | |
263 | [1] |
|
263 | [1] | |
264 |
|
264 | |||
265 | F onto G - rebase onto a descendant: |
|
265 | F onto G - rebase onto a descendant: | |
266 |
|
266 | |||
267 | $ hg rebase -s 5 -d 6 |
|
267 | $ hg rebase -s 5 -d 6 | |
268 | abort: source and destination form a cycle |
|
268 | abort: source and destination form a cycle | |
269 | [255] |
|
269 | [255] | |
270 |
|
270 | |||
271 | G onto B - merge revision with both parents not in ancestors of target: |
|
271 | G onto B - merge revision with both parents not in ancestors of target: | |
272 |
|
272 | |||
273 | $ hg rebase -s 6 -d 1 |
|
273 | $ hg rebase -s 6 -d 1 | |
274 | rebasing 6:eea13746799a "G" |
|
274 | rebasing 6:eea13746799a "G" | |
275 | abort: cannot rebase 6:eea13746799a without moving at least one of its parents |
|
275 | abort: cannot rebase 6:eea13746799a without moving at least one of its parents | |
276 | [255] |
|
276 | [255] | |
277 | $ hg rebase --abort |
|
277 | $ hg rebase --abort | |
278 | rebase aborted |
|
278 | rebase aborted | |
279 |
|
279 | |||
280 | These will abort gracefully (using --base): |
|
280 | These will abort gracefully (using --base): | |
281 |
|
281 | |||
282 | G onto G - rebase onto same changeset: |
|
282 | G onto G - rebase onto same changeset: | |
283 |
|
283 | |||
284 | $ hg rebase -b 6 -d 6 |
|
284 | $ hg rebase -b 6 -d 6 | |
285 | nothing to rebase - eea13746799a is both "base" and destination |
|
285 | nothing to rebase - eea13746799a is both "base" and destination | |
286 | [1] |
|
286 | [1] | |
287 |
|
287 | |||
288 | G onto F - rebase onto an ancestor: |
|
288 | G onto F - rebase onto an ancestor: | |
289 |
|
289 | |||
290 | $ hg rebase -b 6 -d 5 |
|
290 | $ hg rebase -b 6 -d 5 | |
291 | nothing to rebase |
|
291 | nothing to rebase | |
292 | [1] |
|
292 | [1] | |
293 |
|
293 | |||
294 | F onto G - rebase onto a descendant: |
|
294 | F onto G - rebase onto a descendant: | |
295 |
|
295 | |||
296 | $ hg rebase -b 5 -d 6 |
|
296 | $ hg rebase -b 5 -d 6 | |
297 | nothing to rebase - "base" 24b6387c8c8c is already an ancestor of destination eea13746799a |
|
297 | nothing to rebase - "base" 24b6387c8c8c is already an ancestor of destination eea13746799a | |
298 | [1] |
|
298 | [1] | |
299 |
|
299 | |||
300 | C onto A - rebase onto an ancestor: |
|
300 | C onto A - rebase onto an ancestor: | |
301 |
|
301 | |||
302 | $ hg rebase -d 0 -s 2 |
|
302 | $ hg rebase -d 0 -s 2 | |
303 | rebasing 2:5fddd98957c8 "C" |
|
303 | rebasing 2:5fddd98957c8 "C" | |
304 | rebasing 3:32af7686d403 "D" |
|
304 | rebasing 3:32af7686d403 "D" | |
305 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/5fddd98957c8-f9244fa1-rebase.hg (glob) |
|
305 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/5fddd98957c8-f9244fa1-rebase.hg (glob) | |
306 | $ hg tglog |
|
306 | $ hg tglog | |
307 | o 7: 'D' |
|
307 | o 7: c9659aac0000 'D' | |
308 | | |
|
308 | | | |
309 | o 6: 'C' |
|
309 | o 6: e1c4361dd923 'C' | |
310 | | |
|
310 | | | |
311 | | @ 5: 'H' |
|
311 | | @ 5: 02de42196ebe 'H' | |
312 | | | |
|
312 | | | | |
313 | | | o 4: 'G' |
|
313 | | | o 4: eea13746799a 'G' | |
314 | | |/| |
|
314 | | |/| | |
315 | | o | 3: 'F' |
|
315 | | o | 3: 24b6387c8c8c 'F' | |
316 | |/ / |
|
316 | |/ / | |
317 | | o 2: 'E' |
|
317 | | o 2: 9520eea781bc 'E' | |
318 | |/ |
|
318 | |/ | |
319 | | o 1: 'B' |
|
319 | | o 1: 42ccdea3bb16 'B' | |
320 | |/ |
|
320 | |/ | |
321 | o 0: 'A' |
|
321 | o 0: cd010b8cd998 'A' | |
322 |
|
322 | |||
323 |
|
323 | |||
324 | Check rebasing public changeset |
|
324 | Check rebasing public changeset | |
325 |
|
325 | |||
326 | $ hg pull --config phases.publish=True -q -r 6 . # update phase of 6 |
|
326 | $ hg pull --config phases.publish=True -q -r 6 . # update phase of 6 | |
327 | $ hg rebase -d 0 -b 6 |
|
327 | $ hg rebase -d 0 -b 6 | |
328 | nothing to rebase |
|
328 | nothing to rebase | |
329 | [1] |
|
329 | [1] | |
330 | $ hg rebase -d 5 -b 6 |
|
330 | $ hg rebase -d 5 -b 6 | |
331 | abort: can't rebase public changeset e1c4361dd923 |
|
331 | abort: can't rebase public changeset e1c4361dd923 | |
332 | (see 'hg help phases' for details) |
|
332 | (see 'hg help phases' for details) | |
333 | [255] |
|
333 | [255] | |
334 | $ hg rebase -d 5 -r '1 + (6::)' |
|
334 | $ hg rebase -d 5 -r '1 + (6::)' | |
335 | abort: can't rebase public changeset e1c4361dd923 |
|
335 | abort: can't rebase public changeset e1c4361dd923 | |
336 | (see 'hg help phases' for details) |
|
336 | (see 'hg help phases' for details) | |
337 | [255] |
|
337 | [255] | |
338 |
|
338 | |||
339 | $ hg rebase -d 5 -b 6 --keep |
|
339 | $ hg rebase -d 5 -b 6 --keep | |
340 | rebasing 6:e1c4361dd923 "C" |
|
340 | rebasing 6:e1c4361dd923 "C" | |
341 | rebasing 7:c9659aac0000 "D" (tip) |
|
341 | rebasing 7:c9659aac0000 "D" (tip) | |
342 |
|
342 | |||
343 | Check rebasing mutable changeset |
|
343 | Check rebasing mutable changeset | |
344 | Source phase greater or equal to destination phase: new changeset get the phase of source: |
|
344 | Source phase greater or equal to destination phase: new changeset get the phase of source: | |
345 | $ hg id -n |
|
345 | $ hg id -n | |
346 | 5 |
|
346 | 5 | |
347 | $ hg rebase -s9 -d0 |
|
347 | $ hg rebase -s9 -d0 | |
348 | rebasing 9:2b23e52411f4 "D" (tip) |
|
348 | rebasing 9:2b23e52411f4 "D" (tip) | |
349 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2b23e52411f4-f942decf-rebase.hg (glob) |
|
349 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2b23e52411f4-f942decf-rebase.hg (glob) | |
350 | $ hg id -n # check we updated back to parent |
|
350 | $ hg id -n # check we updated back to parent | |
351 | 5 |
|
351 | 5 | |
352 | $ hg log --template "{phase}\n" -r 9 |
|
352 | $ hg log --template "{phase}\n" -r 9 | |
353 | draft |
|
353 | draft | |
354 | $ hg rebase -s9 -d1 |
|
354 | $ hg rebase -s9 -d1 | |
355 | rebasing 9:2cb10d0cfc6c "D" (tip) |
|
355 | rebasing 9:2cb10d0cfc6c "D" (tip) | |
356 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2cb10d0cfc6c-ddb0f256-rebase.hg (glob) |
|
356 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2cb10d0cfc6c-ddb0f256-rebase.hg (glob) | |
357 | $ hg log --template "{phase}\n" -r 9 |
|
357 | $ hg log --template "{phase}\n" -r 9 | |
358 | draft |
|
358 | draft | |
359 | $ hg phase --force --secret 9 |
|
359 | $ hg phase --force --secret 9 | |
360 | $ hg rebase -s9 -d0 |
|
360 | $ hg rebase -s9 -d0 | |
361 | rebasing 9:c5b12b67163a "D" (tip) |
|
361 | rebasing 9:c5b12b67163a "D" (tip) | |
362 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/c5b12b67163a-4e372053-rebase.hg (glob) |
|
362 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/c5b12b67163a-4e372053-rebase.hg (glob) | |
363 | $ hg log --template "{phase}\n" -r 9 |
|
363 | $ hg log --template "{phase}\n" -r 9 | |
364 | secret |
|
364 | secret | |
365 | $ hg rebase -s9 -d1 |
|
365 | $ hg rebase -s9 -d1 | |
366 | rebasing 9:2a0524f868ac "D" (tip) |
|
366 | rebasing 9:2a0524f868ac "D" (tip) | |
367 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2a0524f868ac-cefd8574-rebase.hg (glob) |
|
367 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2a0524f868ac-cefd8574-rebase.hg (glob) | |
368 | $ hg log --template "{phase}\n" -r 9 |
|
368 | $ hg log --template "{phase}\n" -r 9 | |
369 | secret |
|
369 | secret | |
370 | Source phase lower than destination phase: new changeset get the phase of destination: |
|
370 | Source phase lower than destination phase: new changeset get the phase of destination: | |
371 | $ hg rebase -s8 -d9 |
|
371 | $ hg rebase -s8 -d9 | |
372 | rebasing 8:6d4f22462821 "C" |
|
372 | rebasing 8:6d4f22462821 "C" | |
373 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/6d4f22462821-3441f70b-rebase.hg (glob) |
|
373 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/6d4f22462821-3441f70b-rebase.hg (glob) | |
374 | $ hg log --template "{phase}\n" -r 'rev(9)' |
|
374 | $ hg log --template "{phase}\n" -r 'rev(9)' | |
375 | secret |
|
375 | secret | |
376 |
|
376 | |||
377 | $ cd .. |
|
377 | $ cd .. | |
378 |
|
378 | |||
379 | Check that temporary bundle doesn't lose phase when not using generaldelta |
|
379 | Check that temporary bundle doesn't lose phase when not using generaldelta | |
380 |
|
380 | |||
381 | $ hg --config format.usegeneraldelta=no init issue5678 |
|
381 | $ hg --config format.usegeneraldelta=no init issue5678 | |
382 | $ cd issue5678 |
|
382 | $ cd issue5678 | |
383 | $ grep generaldelta .hg/requires |
|
383 | $ grep generaldelta .hg/requires | |
384 | [1] |
|
384 | [1] | |
385 | $ echo a > a |
|
385 | $ echo a > a | |
386 | $ hg ci -Aqm a |
|
386 | $ hg ci -Aqm a | |
387 | $ echo b > b |
|
387 | $ echo b > b | |
388 | $ hg ci -Aqm b |
|
388 | $ hg ci -Aqm b | |
389 | $ hg co -q '.^' |
|
389 | $ hg co -q '.^' | |
390 | $ echo c > c |
|
390 | $ echo c > c | |
391 | $ hg ci -Aqm c |
|
391 | $ hg ci -Aqm c | |
392 | $ hg phase --public |
|
392 | $ hg phase --public | |
393 | $ hg log -G -T '{rev}:{node|shortest} {phase} {desc}\n' |
|
393 | $ hg log -G -T '{rev}:{node|shortest} {phase} {desc}\n' | |
394 | @ 2:d36c public c |
|
394 | @ 2:d36c public c | |
395 | | |
|
395 | | | |
396 | | o 1:d2ae draft b |
|
396 | | o 1:d2ae draft b | |
397 | |/ |
|
397 | |/ | |
398 | o 0:cb9a public a |
|
398 | o 0:cb9a public a | |
399 |
|
399 | |||
400 | $ hg rebase -s 1 -d 2 |
|
400 | $ hg rebase -s 1 -d 2 | |
401 | rebasing 1:d2ae7f538514 "b" |
|
401 | rebasing 1:d2ae7f538514 "b" | |
402 | saved backup bundle to $TESTTMP/issue5678/.hg/strip-backup/d2ae7f538514-2953539b-rebase.hg (glob) |
|
402 | saved backup bundle to $TESTTMP/issue5678/.hg/strip-backup/d2ae7f538514-2953539b-rebase.hg (glob) | |
403 | $ hg log -G -T '{rev}:{node|shortest} {phase} {desc}\n' |
|
403 | $ hg log -G -T '{rev}:{node|shortest} {phase} {desc}\n' | |
404 | o 2:c882 draft b |
|
404 | o 2:c882 draft b | |
405 | | |
|
405 | | | |
406 | @ 1:d36c public c |
|
406 | @ 1:d36c public c | |
407 | | |
|
407 | | | |
408 | o 0:cb9a public a |
|
408 | o 0:cb9a public a | |
409 |
|
409 | |||
410 | $ cd .. |
|
410 | $ cd .. | |
411 |
|
411 | |||
412 | Test for revset |
|
412 | Test for revset | |
413 |
|
413 | |||
414 | We need a bit different graph |
|
414 | We need a bit different graph | |
415 | All destination are B |
|
415 | All destination are B | |
416 |
|
416 | |||
417 | $ hg init ah |
|
417 | $ hg init ah | |
418 | $ cd ah |
|
418 | $ cd ah | |
419 | $ hg unbundle "$TESTDIR/bundles/rebase-revset.hg" |
|
419 | $ hg unbundle "$TESTDIR/bundles/rebase-revset.hg" | |
420 | adding changesets |
|
420 | adding changesets | |
421 | adding manifests |
|
421 | adding manifests | |
422 | adding file changes |
|
422 | adding file changes | |
423 | added 9 changesets with 9 changes to 9 files (+2 heads) |
|
423 | added 9 changesets with 9 changes to 9 files (+2 heads) | |
424 | new changesets 9ae2ed22e576:479ddb54a924 |
|
424 | new changesets 9ae2ed22e576:479ddb54a924 | |
425 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
425 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
426 | $ hg tglog |
|
426 | $ hg tglog | |
427 | o 8: 'I' |
|
427 | o 8: 479ddb54a924 'I' | |
428 | | |
|
428 | | | |
429 | o 7: 'H' |
|
429 | o 7: 72434a4e60b0 'H' | |
430 | | |
|
430 | | | |
431 | o 6: 'G' |
|
431 | o 6: 3d8a618087a7 'G' | |
432 | | |
|
432 | | | |
433 | | o 5: 'F' |
|
433 | | o 5: 41bfcc75ed73 'F' | |
434 | | | |
|
434 | | | | |
435 | | o 4: 'E' |
|
435 | | o 4: c01897464e7f 'E' | |
436 | |/ |
|
436 | |/ | |
437 | o 3: 'D' |
|
437 | o 3: ffd453c31098 'D' | |
438 | | |
|
438 | | | |
439 | o 2: 'C' |
|
439 | o 2: c9e50f6cdc55 'C' | |
440 | | |
|
440 | | | |
441 | | o 1: 'B' |
|
441 | | o 1: 8fd0f7e49f53 'B' | |
442 | |/ |
|
442 | |/ | |
443 | o 0: 'A' |
|
443 | o 0: 9ae2ed22e576 'A' | |
444 |
|
444 | |||
445 | $ cd .. |
|
445 | $ cd .. | |
446 |
|
446 | |||
447 |
|
447 | |||
448 | Simple case with keep: |
|
448 | Simple case with keep: | |
449 |
|
449 | |||
450 | Source on have two descendant heads but ask for one |
|
450 | Source on have two descendant heads but ask for one | |
451 |
|
451 | |||
452 | $ hg clone -q -u . ah ah1 |
|
452 | $ hg clone -q -u . ah ah1 | |
453 | $ cd ah1 |
|
453 | $ cd ah1 | |
454 | $ hg rebase -r '2::8' -d 1 |
|
454 | $ hg rebase -r '2::8' -d 1 | |
455 | abort: can't remove original changesets with unrebased descendants |
|
455 | abort: can't remove original changesets with unrebased descendants | |
456 | (use --keep to keep original changesets) |
|
456 | (use --keep to keep original changesets) | |
457 | [255] |
|
457 | [255] | |
458 | $ hg rebase -r '2::8' -d 1 -k |
|
458 | $ hg rebase -r '2::8' -d 1 -k | |
459 | rebasing 2:c9e50f6cdc55 "C" |
|
459 | rebasing 2:c9e50f6cdc55 "C" | |
460 | rebasing 3:ffd453c31098 "D" |
|
460 | rebasing 3:ffd453c31098 "D" | |
461 | rebasing 6:3d8a618087a7 "G" |
|
461 | rebasing 6:3d8a618087a7 "G" | |
462 | rebasing 7:72434a4e60b0 "H" |
|
462 | rebasing 7:72434a4e60b0 "H" | |
463 | rebasing 8:479ddb54a924 "I" (tip) |
|
463 | rebasing 8:479ddb54a924 "I" (tip) | |
464 | $ hg tglog |
|
464 | $ hg tglog | |
465 | o 13: 'I' |
|
465 | o 13: 9bf1d9358a90 'I' | |
466 | | |
|
466 | | | |
467 | o 12: 'H' |
|
467 | o 12: 274623a778d4 'H' | |
468 | | |
|
468 | | | |
469 | o 11: 'G' |
|
469 | o 11: ab8c8617c8e8 'G' | |
470 | | |
|
470 | | | |
471 | o 10: 'D' |
|
471 | o 10: c8cbf59f70da 'D' | |
472 | | |
|
472 | | | |
473 | o 9: 'C' |
|
473 | o 9: 563e4faab485 'C' | |
474 | | |
|
474 | | | |
475 | | o 8: 'I' |
|
475 | | o 8: 479ddb54a924 'I' | |
476 | | | |
|
476 | | | | |
477 | | o 7: 'H' |
|
477 | | o 7: 72434a4e60b0 'H' | |
478 | | | |
|
478 | | | | |
479 | | o 6: 'G' |
|
479 | | o 6: 3d8a618087a7 'G' | |
480 | | | |
|
480 | | | | |
481 | | | o 5: 'F' |
|
481 | | | o 5: 41bfcc75ed73 'F' | |
482 | | | | |
|
482 | | | | | |
483 | | | o 4: 'E' |
|
483 | | | o 4: c01897464e7f 'E' | |
484 | | |/ |
|
484 | | |/ | |
485 | | o 3: 'D' |
|
485 | | o 3: ffd453c31098 'D' | |
486 | | | |
|
486 | | | | |
487 | | o 2: 'C' |
|
487 | | o 2: c9e50f6cdc55 'C' | |
488 | | | |
|
488 | | | | |
489 | o | 1: 'B' |
|
489 | o | 1: 8fd0f7e49f53 'B' | |
490 | |/ |
|
490 | |/ | |
491 | o 0: 'A' |
|
491 | o 0: 9ae2ed22e576 'A' | |
492 |
|
492 | |||
493 |
|
493 | |||
494 | $ cd .. |
|
494 | $ cd .. | |
495 |
|
495 | |||
496 | Base on have one descendant heads we ask for but common ancestor have two |
|
496 | Base on have one descendant heads we ask for but common ancestor have two | |
497 |
|
497 | |||
498 | $ hg clone -q -u . ah ah2 |
|
498 | $ hg clone -q -u . ah ah2 | |
499 | $ cd ah2 |
|
499 | $ cd ah2 | |
500 | $ hg rebase -r '3::8' -d 1 |
|
500 | $ hg rebase -r '3::8' -d 1 | |
501 | abort: can't remove original changesets with unrebased descendants |
|
501 | abort: can't remove original changesets with unrebased descendants | |
502 | (use --keep to keep original changesets) |
|
502 | (use --keep to keep original changesets) | |
503 | [255] |
|
503 | [255] | |
504 | $ hg rebase -r '3::8' -d 1 --keep |
|
504 | $ hg rebase -r '3::8' -d 1 --keep | |
505 | rebasing 3:ffd453c31098 "D" |
|
505 | rebasing 3:ffd453c31098 "D" | |
506 | rebasing 6:3d8a618087a7 "G" |
|
506 | rebasing 6:3d8a618087a7 "G" | |
507 | rebasing 7:72434a4e60b0 "H" |
|
507 | rebasing 7:72434a4e60b0 "H" | |
508 | rebasing 8:479ddb54a924 "I" (tip) |
|
508 | rebasing 8:479ddb54a924 "I" (tip) | |
509 | $ hg tglog |
|
509 | $ hg tglog | |
510 | o 12: 'I' |
|
510 | o 12: 9d7da0053b1c 'I' | |
511 | | |
|
511 | | | |
512 | o 11: 'H' |
|
512 | o 11: 8fbd00952cbc 'H' | |
513 | | |
|
513 | | | |
514 | o 10: 'G' |
|
514 | o 10: 51d434a615ee 'G' | |
515 | | |
|
515 | | | |
516 | o 9: 'D' |
|
516 | o 9: a9c125634b0b 'D' | |
517 | | |
|
517 | | | |
518 | | o 8: 'I' |
|
518 | | o 8: 479ddb54a924 'I' | |
519 | | | |
|
519 | | | | |
520 | | o 7: 'H' |
|
520 | | o 7: 72434a4e60b0 'H' | |
521 | | | |
|
521 | | | | |
522 | | o 6: 'G' |
|
522 | | o 6: 3d8a618087a7 'G' | |
523 | | | |
|
523 | | | | |
524 | | | o 5: 'F' |
|
524 | | | o 5: 41bfcc75ed73 'F' | |
525 | | | | |
|
525 | | | | | |
526 | | | o 4: 'E' |
|
526 | | | o 4: c01897464e7f 'E' | |
527 | | |/ |
|
527 | | |/ | |
528 | | o 3: 'D' |
|
528 | | o 3: ffd453c31098 'D' | |
529 | | | |
|
529 | | | | |
530 | | o 2: 'C' |
|
530 | | o 2: c9e50f6cdc55 'C' | |
531 | | | |
|
531 | | | | |
532 | o | 1: 'B' |
|
532 | o | 1: 8fd0f7e49f53 'B' | |
533 | |/ |
|
533 | |/ | |
534 | o 0: 'A' |
|
534 | o 0: 9ae2ed22e576 'A' | |
535 |
|
535 | |||
536 |
|
536 | |||
537 | $ cd .. |
|
537 | $ cd .. | |
538 |
|
538 | |||
539 | rebase subset |
|
539 | rebase subset | |
540 |
|
540 | |||
541 | $ hg clone -q -u . ah ah3 |
|
541 | $ hg clone -q -u . ah ah3 | |
542 | $ cd ah3 |
|
542 | $ cd ah3 | |
543 | $ hg rebase -r '3::7' -d 1 |
|
543 | $ hg rebase -r '3::7' -d 1 | |
544 | abort: can't remove original changesets with unrebased descendants |
|
544 | abort: can't remove original changesets with unrebased descendants | |
545 | (use --keep to keep original changesets) |
|
545 | (use --keep to keep original changesets) | |
546 | [255] |
|
546 | [255] | |
547 | $ hg rebase -r '3::7' -d 1 --keep |
|
547 | $ hg rebase -r '3::7' -d 1 --keep | |
548 | rebasing 3:ffd453c31098 "D" |
|
548 | rebasing 3:ffd453c31098 "D" | |
549 | rebasing 6:3d8a618087a7 "G" |
|
549 | rebasing 6:3d8a618087a7 "G" | |
550 | rebasing 7:72434a4e60b0 "H" |
|
550 | rebasing 7:72434a4e60b0 "H" | |
551 | $ hg tglog |
|
551 | $ hg tglog | |
552 | o 11: 'H' |
|
552 | o 11: 8fbd00952cbc 'H' | |
553 | | |
|
553 | | | |
554 | o 10: 'G' |
|
554 | o 10: 51d434a615ee 'G' | |
555 | | |
|
555 | | | |
556 | o 9: 'D' |
|
556 | o 9: a9c125634b0b 'D' | |
557 | | |
|
557 | | | |
558 | | o 8: 'I' |
|
558 | | o 8: 479ddb54a924 'I' | |
559 | | | |
|
559 | | | | |
560 | | o 7: 'H' |
|
560 | | o 7: 72434a4e60b0 'H' | |
561 | | | |
|
561 | | | | |
562 | | o 6: 'G' |
|
562 | | o 6: 3d8a618087a7 'G' | |
563 | | | |
|
563 | | | | |
564 | | | o 5: 'F' |
|
564 | | | o 5: 41bfcc75ed73 'F' | |
565 | | | | |
|
565 | | | | | |
566 | | | o 4: 'E' |
|
566 | | | o 4: c01897464e7f 'E' | |
567 | | |/ |
|
567 | | |/ | |
568 | | o 3: 'D' |
|
568 | | o 3: ffd453c31098 'D' | |
569 | | | |
|
569 | | | | |
570 | | o 2: 'C' |
|
570 | | o 2: c9e50f6cdc55 'C' | |
571 | | | |
|
571 | | | | |
572 | o | 1: 'B' |
|
572 | o | 1: 8fd0f7e49f53 'B' | |
573 | |/ |
|
573 | |/ | |
574 | o 0: 'A' |
|
574 | o 0: 9ae2ed22e576 'A' | |
575 |
|
575 | |||
576 |
|
576 | |||
577 | $ cd .. |
|
577 | $ cd .. | |
578 |
|
578 | |||
579 | rebase subset with multiple head |
|
579 | rebase subset with multiple head | |
580 |
|
580 | |||
581 | $ hg clone -q -u . ah ah4 |
|
581 | $ hg clone -q -u . ah ah4 | |
582 | $ cd ah4 |
|
582 | $ cd ah4 | |
583 | $ hg rebase -r '3::(7+5)' -d 1 |
|
583 | $ hg rebase -r '3::(7+5)' -d 1 | |
584 | abort: can't remove original changesets with unrebased descendants |
|
584 | abort: can't remove original changesets with unrebased descendants | |
585 | (use --keep to keep original changesets) |
|
585 | (use --keep to keep original changesets) | |
586 | [255] |
|
586 | [255] | |
587 | $ hg rebase -r '3::(7+5)' -d 1 --keep |
|
587 | $ hg rebase -r '3::(7+5)' -d 1 --keep | |
588 | rebasing 3:ffd453c31098 "D" |
|
588 | rebasing 3:ffd453c31098 "D" | |
589 | rebasing 4:c01897464e7f "E" |
|
589 | rebasing 4:c01897464e7f "E" | |
590 | rebasing 5:41bfcc75ed73 "F" |
|
590 | rebasing 5:41bfcc75ed73 "F" | |
591 | rebasing 6:3d8a618087a7 "G" |
|
591 | rebasing 6:3d8a618087a7 "G" | |
592 | rebasing 7:72434a4e60b0 "H" |
|
592 | rebasing 7:72434a4e60b0 "H" | |
593 | $ hg tglog |
|
593 | $ hg tglog | |
594 | o 13: 'H' |
|
594 | o 13: 8fbd00952cbc 'H' | |
595 | | |
|
595 | | | |
596 | o 12: 'G' |
|
596 | o 12: 51d434a615ee 'G' | |
597 | | |
|
597 | | | |
598 | | o 11: 'F' |
|
598 | | o 11: df23d8bda0b7 'F' | |
599 | | | |
|
599 | | | | |
600 | | o 10: 'E' |
|
600 | | o 10: 47b7889448ff 'E' | |
601 | |/ |
|
601 | |/ | |
602 | o 9: 'D' |
|
602 | o 9: a9c125634b0b 'D' | |
603 | | |
|
603 | | | |
604 | | o 8: 'I' |
|
604 | | o 8: 479ddb54a924 'I' | |
605 | | | |
|
605 | | | | |
606 | | o 7: 'H' |
|
606 | | o 7: 72434a4e60b0 'H' | |
607 | | | |
|
607 | | | | |
608 | | o 6: 'G' |
|
608 | | o 6: 3d8a618087a7 'G' | |
609 | | | |
|
609 | | | | |
610 | | | o 5: 'F' |
|
610 | | | o 5: 41bfcc75ed73 'F' | |
611 | | | | |
|
611 | | | | | |
612 | | | o 4: 'E' |
|
612 | | | o 4: c01897464e7f 'E' | |
613 | | |/ |
|
613 | | |/ | |
614 | | o 3: 'D' |
|
614 | | o 3: ffd453c31098 'D' | |
615 | | | |
|
615 | | | | |
616 | | o 2: 'C' |
|
616 | | o 2: c9e50f6cdc55 'C' | |
617 | | | |
|
617 | | | | |
618 | o | 1: 'B' |
|
618 | o | 1: 8fd0f7e49f53 'B' | |
619 | |/ |
|
619 | |/ | |
620 | o 0: 'A' |
|
620 | o 0: 9ae2ed22e576 'A' | |
621 |
|
621 | |||
622 |
|
622 | |||
623 | $ cd .. |
|
623 | $ cd .. | |
624 |
|
624 | |||
625 | More advanced tests |
|
625 | More advanced tests | |
626 |
|
626 | |||
627 | rebase on ancestor with revset |
|
627 | rebase on ancestor with revset | |
628 |
|
628 | |||
629 | $ hg clone -q -u . ah ah5 |
|
629 | $ hg clone -q -u . ah ah5 | |
630 | $ cd ah5 |
|
630 | $ cd ah5 | |
631 | $ hg rebase -r '6::' -d 2 |
|
631 | $ hg rebase -r '6::' -d 2 | |
632 | rebasing 6:3d8a618087a7 "G" |
|
632 | rebasing 6:3d8a618087a7 "G" | |
633 | rebasing 7:72434a4e60b0 "H" |
|
633 | rebasing 7:72434a4e60b0 "H" | |
634 | rebasing 8:479ddb54a924 "I" (tip) |
|
634 | rebasing 8:479ddb54a924 "I" (tip) | |
635 | saved backup bundle to $TESTTMP/ah5/.hg/strip-backup/3d8a618087a7-b4f73f31-rebase.hg (glob) |
|
635 | saved backup bundle to $TESTTMP/ah5/.hg/strip-backup/3d8a618087a7-b4f73f31-rebase.hg (glob) | |
636 | $ hg tglog |
|
636 | $ hg tglog | |
637 | o 8: 'I' |
|
637 | o 8: fcb52e68a694 'I' | |
638 | | |
|
638 | | | |
639 | o 7: 'H' |
|
639 | o 7: 77bd65cd7600 'H' | |
640 | | |
|
640 | | | |
641 | o 6: 'G' |
|
641 | o 6: 12d0e738fb18 'G' | |
642 | | |
|
642 | | | |
643 | | o 5: 'F' |
|
643 | | o 5: 41bfcc75ed73 'F' | |
644 | | | |
|
644 | | | | |
645 | | o 4: 'E' |
|
645 | | o 4: c01897464e7f 'E' | |
646 | | | |
|
646 | | | | |
647 | | o 3: 'D' |
|
647 | | o 3: ffd453c31098 'D' | |
648 | |/ |
|
648 | |/ | |
649 | o 2: 'C' |
|
649 | o 2: c9e50f6cdc55 'C' | |
650 | | |
|
650 | | | |
651 | | o 1: 'B' |
|
651 | | o 1: 8fd0f7e49f53 'B' | |
652 | |/ |
|
652 | |/ | |
653 | o 0: 'A' |
|
653 | o 0: 9ae2ed22e576 'A' | |
654 |
|
654 | |||
655 | $ cd .. |
|
655 | $ cd .. | |
656 |
|
656 | |||
657 |
|
657 | |||
658 | rebase with multiple root. |
|
658 | rebase with multiple root. | |
659 | We rebase E and G on B |
|
659 | We rebase E and G on B | |
660 | We would expect heads are I, F if it was supported |
|
660 | We would expect heads are I, F if it was supported | |
661 |
|
661 | |||
662 | $ hg clone -q -u . ah ah6 |
|
662 | $ hg clone -q -u . ah ah6 | |
663 | $ cd ah6 |
|
663 | $ cd ah6 | |
664 | $ hg rebase -r '(4+6)::' -d 1 |
|
664 | $ hg rebase -r '(4+6)::' -d 1 | |
665 | rebasing 4:c01897464e7f "E" |
|
665 | rebasing 4:c01897464e7f "E" | |
666 | rebasing 5:41bfcc75ed73 "F" |
|
666 | rebasing 5:41bfcc75ed73 "F" | |
667 | rebasing 6:3d8a618087a7 "G" |
|
667 | rebasing 6:3d8a618087a7 "G" | |
668 | rebasing 7:72434a4e60b0 "H" |
|
668 | rebasing 7:72434a4e60b0 "H" | |
669 | rebasing 8:479ddb54a924 "I" (tip) |
|
669 | rebasing 8:479ddb54a924 "I" (tip) | |
670 | saved backup bundle to $TESTTMP/ah6/.hg/strip-backup/3d8a618087a7-aae93a24-rebase.hg (glob) |
|
670 | saved backup bundle to $TESTTMP/ah6/.hg/strip-backup/3d8a618087a7-aae93a24-rebase.hg (glob) | |
671 | $ hg tglog |
|
671 | $ hg tglog | |
672 | o 8: 'I' |
|
672 | o 8: 9136df9a87cf 'I' | |
673 | | |
|
673 | | | |
674 | o 7: 'H' |
|
674 | o 7: 23e8f30da832 'H' | |
675 | | |
|
675 | | | |
676 | o 6: 'G' |
|
676 | o 6: b0efe8534e8b 'G' | |
677 | | |
|
677 | | | |
678 | | o 5: 'F' |
|
678 | | o 5: 6eb5b496ab79 'F' | |
679 | | | |
|
679 | | | | |
680 | | o 4: 'E' |
|
680 | | o 4: d15eade9b0b1 'E' | |
681 | |/ |
|
681 | |/ | |
682 | | o 3: 'D' |
|
682 | | o 3: ffd453c31098 'D' | |
683 | | | |
|
683 | | | | |
684 | | o 2: 'C' |
|
684 | | o 2: c9e50f6cdc55 'C' | |
685 | | | |
|
685 | | | | |
686 | o | 1: 'B' |
|
686 | o | 1: 8fd0f7e49f53 'B' | |
687 | |/ |
|
687 | |/ | |
688 | o 0: 'A' |
|
688 | o 0: 9ae2ed22e576 'A' | |
689 |
|
689 | |||
690 | $ cd .. |
|
690 | $ cd .. | |
691 |
|
691 | |||
692 | More complex rebase with multiple roots |
|
692 | More complex rebase with multiple roots | |
693 | each root have a different common ancestor with the destination and this is a detach |
|
693 | each root have a different common ancestor with the destination and this is a detach | |
694 |
|
694 | |||
695 | (setup) |
|
695 | (setup) | |
696 |
|
696 | |||
697 | $ hg clone -q -u . a a8 |
|
697 | $ hg clone -q -u . a a8 | |
698 | $ cd a8 |
|
698 | $ cd a8 | |
699 | $ echo I > I |
|
699 | $ echo I > I | |
700 | $ hg add I |
|
700 | $ hg add I | |
701 | $ hg commit -m I |
|
701 | $ hg commit -m I | |
702 | $ hg up 4 |
|
702 | $ hg up 4 | |
703 | 1 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
703 | 1 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
704 | $ echo I > J |
|
704 | $ echo I > J | |
705 | $ hg add J |
|
705 | $ hg add J | |
706 | $ hg commit -m J |
|
706 | $ hg commit -m J | |
707 | created new head |
|
707 | created new head | |
708 | $ echo I > K |
|
708 | $ echo I > K | |
709 | $ hg add K |
|
709 | $ hg add K | |
710 | $ hg commit -m K |
|
710 | $ hg commit -m K | |
711 | $ hg tglog |
|
711 | $ hg tglog | |
712 | @ 10: 'K' |
|
712 | @ 10: 23a4ace37988 'K' | |
713 | | |
|
713 | | | |
714 | o 9: 'J' |
|
714 | o 9: 1301922eeb0c 'J' | |
715 | | |
|
715 | | | |
716 | | o 8: 'I' |
|
716 | | o 8: e7ec4e813ba6 'I' | |
717 | | | |
|
717 | | | | |
718 | | o 7: 'H' |
|
718 | | o 7: 02de42196ebe 'H' | |
719 | | | |
|
719 | | | | |
720 | +---o 6: 'G' |
|
720 | +---o 6: eea13746799a 'G' | |
721 | | |/ |
|
721 | | |/ | |
722 | | o 5: 'F' |
|
722 | | o 5: 24b6387c8c8c 'F' | |
723 | | | |
|
723 | | | | |
724 | o | 4: 'E' |
|
724 | o | 4: 9520eea781bc 'E' | |
725 | |/ |
|
725 | |/ | |
726 | | o 3: 'D' |
|
726 | | o 3: 32af7686d403 'D' | |
727 | | | |
|
727 | | | | |
728 | | o 2: 'C' |
|
728 | | o 2: 5fddd98957c8 'C' | |
729 | | | |
|
729 | | | | |
730 | | o 1: 'B' |
|
730 | | o 1: 42ccdea3bb16 'B' | |
731 | |/ |
|
731 | |/ | |
732 | o 0: 'A' |
|
732 | o 0: cd010b8cd998 'A' | |
733 |
|
733 | |||
734 | (actual test) |
|
734 | (actual test) | |
735 |
|
735 | |||
736 | $ hg rebase --dest 'desc(G)' --rev 'desc(K) + desc(I)' |
|
736 | $ hg rebase --dest 'desc(G)' --rev 'desc(K) + desc(I)' | |
737 | rebasing 8:e7ec4e813ba6 "I" |
|
737 | rebasing 8:e7ec4e813ba6 "I" | |
738 | rebasing 10:23a4ace37988 "K" (tip) |
|
738 | rebasing 10:23a4ace37988 "K" (tip) | |
739 | saved backup bundle to $TESTTMP/a8/.hg/strip-backup/23a4ace37988-b06984b3-rebase.hg (glob) |
|
739 | saved backup bundle to $TESTTMP/a8/.hg/strip-backup/23a4ace37988-b06984b3-rebase.hg (glob) | |
740 | $ hg log --rev 'children(desc(G))' |
|
740 | $ hg log --rev 'children(desc(G))' | |
741 | changeset: 9:adb617877056 |
|
741 | changeset: 9:adb617877056 | |
742 | parent: 6:eea13746799a |
|
742 | parent: 6:eea13746799a | |
743 | user: test |
|
743 | user: test | |
744 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
744 | date: Thu Jan 01 00:00:00 1970 +0000 | |
745 | summary: I |
|
745 | summary: I | |
746 |
|
746 | |||
747 | changeset: 10:882431a34a0e |
|
747 | changeset: 10:882431a34a0e | |
748 | tag: tip |
|
748 | tag: tip | |
749 | parent: 6:eea13746799a |
|
749 | parent: 6:eea13746799a | |
750 | user: test |
|
750 | user: test | |
751 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
751 | date: Thu Jan 01 00:00:00 1970 +0000 | |
752 | summary: K |
|
752 | summary: K | |
753 |
|
753 | |||
754 | $ hg tglog |
|
754 | $ hg tglog | |
755 | @ 10: 'K' |
|
755 | @ 10: 882431a34a0e 'K' | |
756 | | |
|
756 | | | |
757 | | o 9: 'I' |
|
757 | | o 9: adb617877056 'I' | |
758 | |/ |
|
758 | |/ | |
759 | | o 8: 'J' |
|
759 | | o 8: 1301922eeb0c 'J' | |
760 | | | |
|
760 | | | | |
761 | | | o 7: 'H' |
|
761 | | | o 7: 02de42196ebe 'H' | |
762 | | | | |
|
762 | | | | | |
763 | o---+ 6: 'G' |
|
763 | o---+ 6: eea13746799a 'G' | |
764 | |/ / |
|
764 | |/ / | |
765 | | o 5: 'F' |
|
765 | | o 5: 24b6387c8c8c 'F' | |
766 | | | |
|
766 | | | | |
767 | o | 4: 'E' |
|
767 | o | 4: 9520eea781bc 'E' | |
768 | |/ |
|
768 | |/ | |
769 | | o 3: 'D' |
|
769 | | o 3: 32af7686d403 'D' | |
770 | | | |
|
770 | | | | |
771 | | o 2: 'C' |
|
771 | | o 2: 5fddd98957c8 'C' | |
772 | | | |
|
772 | | | | |
773 | | o 1: 'B' |
|
773 | | o 1: 42ccdea3bb16 'B' | |
774 | |/ |
|
774 | |/ | |
775 | o 0: 'A' |
|
775 | o 0: cd010b8cd998 'A' | |
776 |
|
776 | |||
777 |
|
777 | |||
778 | Test that rebase is not confused by $CWD disappearing during rebase (issue4121) |
|
778 | Test that rebase is not confused by $CWD disappearing during rebase (issue4121) | |
779 |
|
779 | |||
780 | $ cd .. |
|
780 | $ cd .. | |
781 | $ hg init cwd-vanish |
|
781 | $ hg init cwd-vanish | |
782 | $ cd cwd-vanish |
|
782 | $ cd cwd-vanish | |
783 | $ touch initial-file |
|
783 | $ touch initial-file | |
784 | $ hg add initial-file |
|
784 | $ hg add initial-file | |
785 | $ hg commit -m 'initial commit' |
|
785 | $ hg commit -m 'initial commit' | |
786 | $ touch dest-file |
|
786 | $ touch dest-file | |
787 | $ hg add dest-file |
|
787 | $ hg add dest-file | |
788 | $ hg commit -m 'dest commit' |
|
788 | $ hg commit -m 'dest commit' | |
789 | $ hg up 0 |
|
789 | $ hg up 0 | |
790 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
790 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
791 | $ touch other-file |
|
791 | $ touch other-file | |
792 | $ hg add other-file |
|
792 | $ hg add other-file | |
793 | $ hg commit -m 'first source commit' |
|
793 | $ hg commit -m 'first source commit' | |
794 | created new head |
|
794 | created new head | |
795 | $ mkdir subdir |
|
795 | $ mkdir subdir | |
796 | $ cd subdir |
|
796 | $ cd subdir | |
797 | $ touch subfile |
|
797 | $ touch subfile | |
798 | $ hg add subfile |
|
798 | $ hg add subfile | |
799 | $ hg commit -m 'second source with subdir' |
|
799 | $ hg commit -m 'second source with subdir' | |
800 |
|
800 | |||
801 | $ hg rebase -b . -d 1 --traceback |
|
801 | $ hg rebase -b . -d 1 --traceback | |
802 | rebasing 2:779a07b1b7a0 "first source commit" |
|
802 | rebasing 2:779a07b1b7a0 "first source commit" | |
803 | current directory was removed (rmcwd !) |
|
803 | current directory was removed (rmcwd !) | |
804 | (consider changing to repo root: $TESTTMP/cwd-vanish) (rmcwd !) |
|
804 | (consider changing to repo root: $TESTTMP/cwd-vanish) (rmcwd !) | |
805 | rebasing 3:a7d6f3a00bf3 "second source with subdir" (tip) |
|
805 | rebasing 3:a7d6f3a00bf3 "second source with subdir" (tip) | |
806 | saved backup bundle to $TESTTMP/cwd-vanish/.hg/strip-backup/779a07b1b7a0-853e0073-rebase.hg (glob) |
|
806 | saved backup bundle to $TESTTMP/cwd-vanish/.hg/strip-backup/779a07b1b7a0-853e0073-rebase.hg (glob) | |
807 |
|
807 | |||
808 | Get back to the root of cwd-vanish. Note that even though `cd ..` |
|
808 | Get back to the root of cwd-vanish. Note that even though `cd ..` | |
809 | works on most systems, it does not work on FreeBSD 10, so we use an |
|
809 | works on most systems, it does not work on FreeBSD 10, so we use an | |
810 | absolute path to get back to the repository. |
|
810 | absolute path to get back to the repository. | |
811 | $ cd $TESTTMP |
|
811 | $ cd $TESTTMP | |
812 |
|
812 | |||
813 | Test that rebase is done in topo order (issue5370) |
|
813 | Test that rebase is done in topo order (issue5370) | |
814 |
|
814 | |||
815 | $ hg init order |
|
815 | $ hg init order | |
816 | $ cd order |
|
816 | $ cd order | |
817 | $ touch a && hg add a && hg ci -m A |
|
817 | $ touch a && hg add a && hg ci -m A | |
818 | $ touch b && hg add b && hg ci -m B |
|
818 | $ touch b && hg add b && hg ci -m B | |
819 | $ touch c && hg add c && hg ci -m C |
|
819 | $ touch c && hg add c && hg ci -m C | |
820 | $ hg up 1 |
|
820 | $ hg up 1 | |
821 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
821 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
822 | $ touch d && hg add d && hg ci -m D |
|
822 | $ touch d && hg add d && hg ci -m D | |
823 | created new head |
|
823 | created new head | |
824 | $ hg up 2 |
|
824 | $ hg up 2 | |
825 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
825 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
826 | $ touch e && hg add e && hg ci -m E |
|
826 | $ touch e && hg add e && hg ci -m E | |
827 | $ hg up 3 |
|
827 | $ hg up 3 | |
828 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
828 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
829 | $ touch f && hg add f && hg ci -m F |
|
829 | $ touch f && hg add f && hg ci -m F | |
830 | $ hg up 0 |
|
830 | $ hg up 0 | |
831 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
831 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
832 | $ touch g && hg add g && hg ci -m G |
|
832 | $ touch g && hg add g && hg ci -m G | |
833 | created new head |
|
833 | created new head | |
834 |
|
834 | |||
835 | $ hg tglog |
|
835 | $ hg tglog | |
836 | @ 6: 'G' |
|
836 | @ 6: 124bb27b6f28 'G' | |
837 | | |
|
837 | | | |
838 | | o 5: 'F' |
|
838 | | o 5: 412b391de760 'F' | |
839 | | | |
|
839 | | | | |
840 | | | o 4: 'E' |
|
840 | | | o 4: 82ae8dc7a9b7 'E' | |
841 | | | | |
|
841 | | | | | |
842 | | o | 3: 'D' |
|
842 | | o | 3: ab709c9f7171 'D' | |
843 | | | | |
|
843 | | | | | |
844 | | | o 2: 'C' |
|
844 | | | o 2: d84f5cfaaf14 'C' | |
845 | | |/ |
|
845 | | |/ | |
846 | | o 1: 'B' |
|
846 | | o 1: 76035bbd54bd 'B' | |
847 | |/ |
|
847 | |/ | |
848 | o 0: 'A' |
|
848 | o 0: 216878401574 'A' | |
849 |
|
849 | |||
850 |
|
850 | |||
851 | $ hg rebase -s 1 -d 6 |
|
851 | $ hg rebase -s 1 -d 6 | |
852 | rebasing 1:76035bbd54bd "B" |
|
852 | rebasing 1:76035bbd54bd "B" | |
853 | rebasing 2:d84f5cfaaf14 "C" |
|
853 | rebasing 2:d84f5cfaaf14 "C" | |
854 | rebasing 4:82ae8dc7a9b7 "E" |
|
854 | rebasing 4:82ae8dc7a9b7 "E" | |
855 | rebasing 3:ab709c9f7171 "D" |
|
855 | rebasing 3:ab709c9f7171 "D" | |
856 | rebasing 5:412b391de760 "F" |
|
856 | rebasing 5:412b391de760 "F" | |
857 | saved backup bundle to $TESTTMP/order/.hg/strip-backup/76035bbd54bd-e341bc99-rebase.hg (glob) |
|
857 | saved backup bundle to $TESTTMP/order/.hg/strip-backup/76035bbd54bd-e341bc99-rebase.hg (glob) | |
858 |
|
858 | |||
859 | $ hg tglog |
|
859 | $ hg tglog | |
860 | o 6: 'F' |
|
860 | o 6: 31884cfb735e 'F' | |
861 | | |
|
861 | | | |
862 | o 5: 'D' |
|
862 | o 5: 6d89fa5b0909 'D' | |
863 | | |
|
863 | | | |
864 | | o 4: 'E' |
|
864 | | o 4: de64d97c697b 'E' | |
865 | | | |
|
865 | | | | |
866 | | o 3: 'C' |
|
866 | | o 3: b18e4d2d0aa1 'C' | |
867 | |/ |
|
867 | |/ | |
868 | o 2: 'B' |
|
868 | o 2: 0983daf9ff6a 'B' | |
869 | | |
|
869 | | | |
870 | @ 1: 'G' |
|
870 | @ 1: 124bb27b6f28 'G' | |
871 | | |
|
871 | | | |
872 | o 0: 'A' |
|
872 | o 0: 216878401574 'A' | |
873 |
|
873 | |||
874 |
|
874 | |||
875 | Test experimental revset |
|
875 | Test experimental revset | |
876 | ======================== |
|
876 | ======================== | |
877 |
|
877 | |||
878 | $ cd ../cwd-vanish |
|
878 | $ cd ../cwd-vanish | |
879 |
|
879 | |||
880 | Make the repo a bit more interesting |
|
880 | Make the repo a bit more interesting | |
881 |
|
881 | |||
882 | $ hg up 1 |
|
882 | $ hg up 1 | |
883 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
883 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
884 | $ echo aaa > aaa |
|
884 | $ echo aaa > aaa | |
885 | $ hg add aaa |
|
885 | $ hg add aaa | |
886 | $ hg commit -m aaa |
|
886 | $ hg commit -m aaa | |
887 | created new head |
|
887 | created new head | |
888 | $ hg log -G |
|
888 | $ hg log -G | |
889 | @ changeset: 4:5f7bc9025ed2 |
|
889 | @ changeset: 4:5f7bc9025ed2 | |
890 | | tag: tip |
|
890 | | tag: tip | |
891 | | parent: 1:58d79cc1cf43 |
|
891 | | parent: 1:58d79cc1cf43 | |
892 | | user: test |
|
892 | | user: test | |
893 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
893 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
894 | | summary: aaa |
|
894 | | summary: aaa | |
895 | | |
|
895 | | | |
896 | | o changeset: 3:1910d5ff34ea |
|
896 | | o changeset: 3:1910d5ff34ea | |
897 | | | user: test |
|
897 | | | user: test | |
898 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
898 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
899 | | | summary: second source with subdir |
|
899 | | | summary: second source with subdir | |
900 | | | |
|
900 | | | | |
901 | | o changeset: 2:82901330b6ef |
|
901 | | o changeset: 2:82901330b6ef | |
902 | |/ user: test |
|
902 | |/ user: test | |
903 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
903 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
904 | | summary: first source commit |
|
904 | | summary: first source commit | |
905 | | |
|
905 | | | |
906 | o changeset: 1:58d79cc1cf43 |
|
906 | o changeset: 1:58d79cc1cf43 | |
907 | | user: test |
|
907 | | user: test | |
908 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
908 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
909 | | summary: dest commit |
|
909 | | summary: dest commit | |
910 | | |
|
910 | | | |
911 | o changeset: 0:e94b687f7da3 |
|
911 | o changeset: 0:e94b687f7da3 | |
912 | user: test |
|
912 | user: test | |
913 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
913 | date: Thu Jan 01 00:00:00 1970 +0000 | |
914 | summary: initial commit |
|
914 | summary: initial commit | |
915 |
|
915 | |||
916 |
|
916 | |||
917 | Testing from lower head |
|
917 | Testing from lower head | |
918 |
|
918 | |||
919 | $ hg up 3 |
|
919 | $ hg up 3 | |
920 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
920 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
921 | $ hg log -r '_destrebase()' |
|
921 | $ hg log -r '_destrebase()' | |
922 | changeset: 4:5f7bc9025ed2 |
|
922 | changeset: 4:5f7bc9025ed2 | |
923 | tag: tip |
|
923 | tag: tip | |
924 | parent: 1:58d79cc1cf43 |
|
924 | parent: 1:58d79cc1cf43 | |
925 | user: test |
|
925 | user: test | |
926 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
926 | date: Thu Jan 01 00:00:00 1970 +0000 | |
927 | summary: aaa |
|
927 | summary: aaa | |
928 |
|
928 | |||
929 |
|
929 | |||
930 | Testing from upper head |
|
930 | Testing from upper head | |
931 |
|
931 | |||
932 | $ hg log -r '_destrebase(4)' |
|
932 | $ hg log -r '_destrebase(4)' | |
933 | changeset: 3:1910d5ff34ea |
|
933 | changeset: 3:1910d5ff34ea | |
934 | user: test |
|
934 | user: test | |
935 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
935 | date: Thu Jan 01 00:00:00 1970 +0000 | |
936 | summary: second source with subdir |
|
936 | summary: second source with subdir | |
937 |
|
937 | |||
938 | $ hg up 4 |
|
938 | $ hg up 4 | |
939 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
939 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
940 | $ hg log -r '_destrebase()' |
|
940 | $ hg log -r '_destrebase()' | |
941 | changeset: 3:1910d5ff34ea |
|
941 | changeset: 3:1910d5ff34ea | |
942 | user: test |
|
942 | user: test | |
943 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
943 | date: Thu Jan 01 00:00:00 1970 +0000 | |
944 | summary: second source with subdir |
|
944 | summary: second source with subdir | |
945 |
|
945 | |||
946 | Testing rebase being called inside another transaction |
|
946 | Testing rebase being called inside another transaction | |
947 |
|
947 | |||
948 | $ cd $TESTTMP |
|
948 | $ cd $TESTTMP | |
949 | $ hg init tr-state |
|
949 | $ hg init tr-state | |
950 | $ cd tr-state |
|
950 | $ cd tr-state | |
951 | $ cat > $TESTTMP/wraprebase.py <<EOF |
|
951 | $ cat > $TESTTMP/wraprebase.py <<EOF | |
952 | > from __future__ import absolute_import |
|
952 | > from __future__ import absolute_import | |
953 | > from mercurial import extensions |
|
953 | > from mercurial import extensions | |
954 | > def _rebase(orig, ui, repo, *args, **kwargs): |
|
954 | > def _rebase(orig, ui, repo, *args, **kwargs): | |
955 | > with repo.wlock(): |
|
955 | > with repo.wlock(): | |
956 | > with repo.lock(): |
|
956 | > with repo.lock(): | |
957 | > with repo.transaction('wrappedrebase'): |
|
957 | > with repo.transaction('wrappedrebase'): | |
958 | > return orig(ui, repo, *args, **kwargs) |
|
958 | > return orig(ui, repo, *args, **kwargs) | |
959 | > def wraprebase(loaded): |
|
959 | > def wraprebase(loaded): | |
960 | > assert loaded |
|
960 | > assert loaded | |
961 | > rebasemod = extensions.find('rebase') |
|
961 | > rebasemod = extensions.find('rebase') | |
962 | > extensions.wrapcommand(rebasemod.cmdtable, 'rebase', _rebase) |
|
962 | > extensions.wrapcommand(rebasemod.cmdtable, 'rebase', _rebase) | |
963 | > def extsetup(ui): |
|
963 | > def extsetup(ui): | |
964 | > extensions.afterloaded('rebase', wraprebase) |
|
964 | > extensions.afterloaded('rebase', wraprebase) | |
965 | > EOF |
|
965 | > EOF | |
966 |
|
966 | |||
967 | $ cat >> .hg/hgrc <<EOF |
|
967 | $ cat >> .hg/hgrc <<EOF | |
968 | > [extensions] |
|
968 | > [extensions] | |
969 | > wraprebase=$TESTTMP/wraprebase.py |
|
969 | > wraprebase=$TESTTMP/wraprebase.py | |
970 | > [experimental] |
|
970 | > [experimental] | |
971 | > evolution=true |
|
971 | > evolution=true | |
972 | > EOF |
|
972 | > EOF | |
973 |
|
973 | |||
974 | $ hg debugdrawdag <<'EOS' |
|
974 | $ hg debugdrawdag <<'EOS' | |
975 | > B C |
|
975 | > B C | |
976 | > |/ |
|
976 | > |/ | |
977 | > A |
|
977 | > A | |
978 | > EOS |
|
978 | > EOS | |
979 |
|
979 | |||
980 | $ hg rebase -s C -d B |
|
980 | $ hg rebase -s C -d B | |
981 | rebasing 2:dc0947a82db8 "C" (C tip) |
|
981 | rebasing 2:dc0947a82db8 "C" (C tip) | |
982 |
|
982 | |||
983 | $ [ -f .hg/rebasestate ] && echo 'WRONG: rebasestate should not exist' |
|
983 | $ [ -f .hg/rebasestate ] && echo 'WRONG: rebasestate should not exist' | |
984 | [1] |
|
984 | [1] |
General Comments 0
You need to be logged in to leave comments.
Login now