Show More
@@ -1,492 +1,543 | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > graphlog= |
|
3 | > graphlog= | |
4 | > rebase= |
|
4 | > rebase= | |
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}: '{desc}' {branches}\n" | |
11 | > tglogp = log -G --template "{rev}:{phase} '{desc}' {branches}\n" |
|
11 | > tglogp = log -G --template "{rev}:{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 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
23 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
24 | $ hg up tip |
|
24 | $ hg up tip | |
25 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
25 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
26 |
|
26 | |||
27 | $ hg tglog |
|
27 | $ hg tglog | |
28 | @ 7: 'H' |
|
28 | @ 7: 'H' | |
29 | | |
|
29 | | | |
30 | | o 6: 'G' |
|
30 | | o 6: 'G' | |
31 | |/| |
|
31 | |/| | |
32 | o | 5: 'F' |
|
32 | o | 5: 'F' | |
33 | | | |
|
33 | | | | |
34 | | o 4: 'E' |
|
34 | | o 4: 'E' | |
35 | |/ |
|
35 | |/ | |
36 | | o 3: 'D' |
|
36 | | o 3: 'D' | |
37 | | | |
|
37 | | | | |
38 | | o 2: 'C' |
|
38 | | o 2: 'C' | |
39 | | | |
|
39 | | | | |
40 | | o 1: 'B' |
|
40 | | o 1: 'B' | |
41 | |/ |
|
41 | |/ | |
42 | o 0: 'A' |
|
42 | o 0: 'A' | |
43 |
|
43 | |||
44 | $ cd .. |
|
44 | $ cd .. | |
45 |
|
45 | |||
46 |
|
46 | |||
47 | Rebasing B onto H and collapsing changesets with different phases: |
|
47 | Rebasing B onto H and collapsing changesets with different phases: | |
48 |
|
48 | |||
49 |
|
49 | |||
50 | $ hg clone -q -u 3 a a1 |
|
50 | $ hg clone -q -u 3 a a1 | |
51 | $ cd a1 |
|
51 | $ cd a1 | |
52 |
|
52 | |||
53 | $ hg phase --force --secret 3 |
|
53 | $ hg phase --force --secret 3 | |
54 |
|
54 | |||
55 | $ hg rebase --collapse --keepbranches |
|
55 | $ hg rebase --collapse --keepbranches | |
56 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob) |
|
56 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob) | |
57 |
|
57 | |||
58 | $ hg tglogp |
|
58 | $ hg tglogp | |
59 | @ 5:secret 'Collapsed revision |
|
59 | @ 5:secret 'Collapsed revision | |
60 | | * B |
|
60 | | * B | |
61 | | * C |
|
61 | | * C | |
62 | | * D' |
|
62 | | * D' | |
63 | o 4:draft 'H' |
|
63 | o 4:draft 'H' | |
64 | | |
|
64 | | | |
65 | | o 3:draft 'G' |
|
65 | | o 3:draft 'G' | |
66 | |/| |
|
66 | |/| | |
67 | o | 2:draft 'F' |
|
67 | o | 2:draft 'F' | |
68 | | | |
|
68 | | | | |
69 | | o 1:draft 'E' |
|
69 | | o 1:draft 'E' | |
70 | |/ |
|
70 | |/ | |
71 | o 0:draft 'A' |
|
71 | o 0:draft 'A' | |
72 |
|
72 | |||
73 | $ hg manifest |
|
73 | $ hg manifest | |
74 | A |
|
74 | A | |
75 | B |
|
75 | B | |
76 | C |
|
76 | C | |
77 | D |
|
77 | D | |
78 | F |
|
78 | F | |
79 | H |
|
79 | H | |
80 |
|
80 | |||
81 | $ cd .. |
|
81 | $ cd .. | |
82 |
|
82 | |||
83 |
|
83 | |||
84 | Rebasing E onto H: |
|
84 | Rebasing E onto H: | |
85 |
|
85 | |||
86 | $ hg clone -q -u . a a2 |
|
86 | $ hg clone -q -u . a a2 | |
87 | $ cd a2 |
|
87 | $ cd a2 | |
88 |
|
88 | |||
89 | $ hg phase --force --secret 6 |
|
89 | $ hg phase --force --secret 6 | |
90 | $ hg rebase --source 4 --collapse |
|
90 | $ hg rebase --source 4 --collapse | |
91 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/*-backup.hg (glob) |
|
91 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/*-backup.hg (glob) | |
92 |
|
92 | |||
93 | $ hg tglog |
|
93 | $ hg tglog | |
94 | @ 6: 'Collapsed revision |
|
94 | @ 6: 'Collapsed revision | |
95 | | * E |
|
95 | | * E | |
96 | | * G' |
|
96 | | * G' | |
97 | o 5: 'H' |
|
97 | o 5: 'H' | |
98 | | |
|
98 | | | |
99 | o 4: 'F' |
|
99 | o 4: 'F' | |
100 | | |
|
100 | | | |
101 | | o 3: 'D' |
|
101 | | o 3: 'D' | |
102 | | | |
|
102 | | | | |
103 | | o 2: 'C' |
|
103 | | o 2: 'C' | |
104 | | | |
|
104 | | | | |
105 | | o 1: 'B' |
|
105 | | o 1: 'B' | |
106 | |/ |
|
106 | |/ | |
107 | o 0: 'A' |
|
107 | o 0: 'A' | |
108 |
|
108 | |||
109 | $ hg manifest |
|
109 | $ hg manifest | |
110 | A |
|
110 | A | |
111 | E |
|
111 | E | |
112 | F |
|
112 | F | |
113 | H |
|
113 | H | |
114 |
|
114 | |||
115 | $ cd .. |
|
115 | $ cd .. | |
116 |
|
116 | |||
117 | Rebasing G onto H with custom message: |
|
117 | Rebasing G onto H with custom message: | |
118 |
|
118 | |||
119 | $ hg clone -q -u . a a3 |
|
119 | $ hg clone -q -u . a a3 | |
120 | $ cd a3 |
|
120 | $ cd a3 | |
121 |
|
121 | |||
122 | $ hg rebase --base 6 -m 'custom message' |
|
122 | $ hg rebase --base 6 -m 'custom message' | |
123 | abort: message can only be specified with collapse |
|
123 | abort: message can only be specified with collapse | |
124 | [255] |
|
124 | [255] | |
125 |
|
125 | |||
126 | $ hg rebase --source 4 --collapse -m 'custom message' |
|
126 | $ hg rebase --source 4 --collapse -m 'custom message' | |
127 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob) |
|
127 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob) | |
128 |
|
128 | |||
129 | $ hg tglog |
|
129 | $ hg tglog | |
130 | @ 6: 'custom message' |
|
130 | @ 6: 'custom message' | |
131 | | |
|
131 | | | |
132 | o 5: 'H' |
|
132 | o 5: 'H' | |
133 | | |
|
133 | | | |
134 | o 4: 'F' |
|
134 | o 4: 'F' | |
135 | | |
|
135 | | | |
136 | | o 3: 'D' |
|
136 | | o 3: 'D' | |
137 | | | |
|
137 | | | | |
138 | | o 2: 'C' |
|
138 | | o 2: 'C' | |
139 | | | |
|
139 | | | | |
140 | | o 1: 'B' |
|
140 | | o 1: 'B' | |
141 | |/ |
|
141 | |/ | |
142 | o 0: 'A' |
|
142 | o 0: 'A' | |
143 |
|
143 | |||
144 | $ hg manifest |
|
144 | $ hg manifest | |
145 | A |
|
145 | A | |
146 | E |
|
146 | E | |
147 | F |
|
147 | F | |
148 | H |
|
148 | H | |
149 |
|
149 | |||
150 | $ cd .. |
|
150 | $ cd .. | |
151 |
|
151 | |||
152 | Create repo b: |
|
152 | Create repo b: | |
153 |
|
153 | |||
154 | $ hg init b |
|
154 | $ hg init b | |
155 | $ cd b |
|
155 | $ cd b | |
156 |
|
156 | |||
157 | $ echo A > A |
|
157 | $ echo A > A | |
158 | $ hg ci -Am A |
|
158 | $ hg ci -Am A | |
159 | adding A |
|
159 | adding A | |
160 | $ echo B > B |
|
160 | $ echo B > B | |
161 | $ hg ci -Am B |
|
161 | $ hg ci -Am B | |
162 | adding B |
|
162 | adding B | |
163 |
|
163 | |||
164 | $ hg up -q 0 |
|
164 | $ hg up -q 0 | |
165 |
|
165 | |||
166 | $ echo C > C |
|
166 | $ echo C > C | |
167 | $ hg ci -Am C |
|
167 | $ hg ci -Am C | |
168 | adding C |
|
168 | adding C | |
169 | created new head |
|
169 | created new head | |
170 |
|
170 | |||
171 | $ hg merge |
|
171 | $ hg merge | |
172 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
172 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
173 | (branch merge, don't forget to commit) |
|
173 | (branch merge, don't forget to commit) | |
174 |
|
174 | |||
175 | $ echo D > D |
|
175 | $ echo D > D | |
176 | $ hg ci -Am D |
|
176 | $ hg ci -Am D | |
177 | adding D |
|
177 | adding D | |
178 |
|
178 | |||
179 | $ hg up -q 1 |
|
179 | $ hg up -q 1 | |
180 |
|
180 | |||
181 | $ echo E > E |
|
181 | $ echo E > E | |
182 | $ hg ci -Am E |
|
182 | $ hg ci -Am E | |
183 | adding E |
|
183 | adding E | |
184 | created new head |
|
184 | created new head | |
185 |
|
185 | |||
186 | $ echo F > F |
|
186 | $ echo F > F | |
187 | $ hg ci -Am F |
|
187 | $ hg ci -Am F | |
188 | adding F |
|
188 | adding F | |
189 |
|
189 | |||
190 | $ hg merge |
|
190 | $ hg merge | |
191 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
191 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
192 | (branch merge, don't forget to commit) |
|
192 | (branch merge, don't forget to commit) | |
193 | $ hg ci -m G |
|
193 | $ hg ci -m G | |
194 |
|
194 | |||
195 | $ hg up -q 0 |
|
195 | $ hg up -q 0 | |
196 |
|
196 | |||
197 | $ echo H > H |
|
197 | $ echo H > H | |
198 | $ hg ci -Am H |
|
198 | $ hg ci -Am H | |
199 | adding H |
|
199 | adding H | |
200 | created new head |
|
200 | created new head | |
201 |
|
201 | |||
202 | $ hg tglog |
|
202 | $ hg tglog | |
203 | @ 7: 'H' |
|
203 | @ 7: 'H' | |
204 | | |
|
204 | | | |
205 | | o 6: 'G' |
|
205 | | o 6: 'G' | |
206 | | |\ |
|
206 | | |\ | |
207 | | | o 5: 'F' |
|
207 | | | o 5: 'F' | |
208 | | | | |
|
208 | | | | | |
209 | | | o 4: 'E' |
|
209 | | | o 4: 'E' | |
210 | | | | |
|
210 | | | | | |
211 | | o | 3: 'D' |
|
211 | | o | 3: 'D' | |
212 | | |\| |
|
212 | | |\| | |
213 | | o | 2: 'C' |
|
213 | | o | 2: 'C' | |
214 | |/ / |
|
214 | |/ / | |
215 | | o 1: 'B' |
|
215 | | o 1: 'B' | |
216 | |/ |
|
216 | |/ | |
217 | o 0: 'A' |
|
217 | o 0: 'A' | |
218 |
|
218 | |||
219 | $ cd .. |
|
219 | $ cd .. | |
220 |
|
220 | |||
221 |
|
221 | |||
222 | Rebase and collapse - more than one external (fail): |
|
222 | Rebase and collapse - more than one external (fail): | |
223 |
|
223 | |||
224 | $ hg clone -q -u . b b1 |
|
224 | $ hg clone -q -u . b b1 | |
225 | $ cd b1 |
|
225 | $ cd b1 | |
226 |
|
226 | |||
227 | $ hg rebase -s 2 --collapse |
|
227 | $ hg rebase -s 2 --collapse | |
228 | abort: unable to collapse, there is more than one external parent |
|
228 | abort: unable to collapse, there is more than one external parent | |
229 | [255] |
|
229 | [255] | |
230 |
|
230 | |||
231 | Rebase and collapse - E onto H: |
|
231 | Rebase and collapse - E onto H: | |
232 |
|
232 | |||
233 | $ hg rebase -s 4 --collapse |
|
233 | $ hg rebase -s 4 --collapse | |
234 | saved backup bundle to $TESTTMP/b1/.hg/strip-backup/*-backup.hg (glob) |
|
234 | saved backup bundle to $TESTTMP/b1/.hg/strip-backup/*-backup.hg (glob) | |
235 |
|
235 | |||
236 | $ hg tglog |
|
236 | $ hg tglog | |
237 | @ 5: 'Collapsed revision |
|
237 | @ 5: 'Collapsed revision | |
238 | |\ * E |
|
238 | |\ * E | |
239 | | | * F |
|
239 | | | * F | |
240 | | | * G' |
|
240 | | | * G' | |
241 | | o 4: 'H' |
|
241 | | o 4: 'H' | |
242 | | | |
|
242 | | | | |
243 | o | 3: 'D' |
|
243 | o | 3: 'D' | |
244 | |\ \ |
|
244 | |\ \ | |
245 | | o | 2: 'C' |
|
245 | | o | 2: 'C' | |
246 | | |/ |
|
246 | | |/ | |
247 | o / 1: 'B' |
|
247 | o / 1: 'B' | |
248 | |/ |
|
248 | |/ | |
249 | o 0: 'A' |
|
249 | o 0: 'A' | |
250 |
|
250 | |||
251 | $ hg manifest |
|
251 | $ hg manifest | |
252 | A |
|
252 | A | |
253 | B |
|
253 | B | |
254 | C |
|
254 | C | |
255 | D |
|
255 | D | |
256 | E |
|
256 | E | |
257 | F |
|
257 | F | |
258 | H |
|
258 | H | |
259 |
|
259 | |||
260 | $ cd .. |
|
260 | $ cd .. | |
261 |
|
261 | |||
262 |
|
262 | |||
263 | Create repo c: |
|
263 | Create repo c: | |
264 |
|
264 | |||
265 | $ hg init c |
|
265 | $ hg init c | |
266 | $ cd c |
|
266 | $ cd c | |
267 |
|
267 | |||
268 | $ echo A > A |
|
268 | $ echo A > A | |
269 | $ hg ci -Am A |
|
269 | $ hg ci -Am A | |
270 | adding A |
|
270 | adding A | |
271 | $ echo B > B |
|
271 | $ echo B > B | |
272 | $ hg ci -Am B |
|
272 | $ hg ci -Am B | |
273 | adding B |
|
273 | adding B | |
274 |
|
274 | |||
275 | $ hg up -q 0 |
|
275 | $ hg up -q 0 | |
276 |
|
276 | |||
277 | $ echo C > C |
|
277 | $ echo C > C | |
278 | $ hg ci -Am C |
|
278 | $ hg ci -Am C | |
279 | adding C |
|
279 | adding C | |
280 | created new head |
|
280 | created new head | |
281 |
|
281 | |||
282 | $ hg merge |
|
282 | $ hg merge | |
283 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
283 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
284 | (branch merge, don't forget to commit) |
|
284 | (branch merge, don't forget to commit) | |
285 |
|
285 | |||
286 | $ echo D > D |
|
286 | $ echo D > D | |
287 | $ hg ci -Am D |
|
287 | $ hg ci -Am D | |
288 | adding D |
|
288 | adding D | |
289 |
|
289 | |||
290 | $ hg up -q 1 |
|
290 | $ hg up -q 1 | |
291 |
|
291 | |||
292 | $ echo E > E |
|
292 | $ echo E > E | |
293 | $ hg ci -Am E |
|
293 | $ hg ci -Am E | |
294 | adding E |
|
294 | adding E | |
295 | created new head |
|
295 | created new head | |
296 | $ echo F > E |
|
296 | $ echo F > E | |
297 | $ hg ci -m 'F' |
|
297 | $ hg ci -m 'F' | |
298 |
|
298 | |||
299 | $ echo G > G |
|
299 | $ echo G > G | |
300 | $ hg ci -Am G |
|
300 | $ hg ci -Am G | |
301 | adding G |
|
301 | adding G | |
302 |
|
302 | |||
303 | $ hg merge |
|
303 | $ hg merge | |
304 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
304 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
305 | (branch merge, don't forget to commit) |
|
305 | (branch merge, don't forget to commit) | |
306 |
|
306 | |||
307 | $ hg ci -m H |
|
307 | $ hg ci -m H | |
308 |
|
308 | |||
309 | $ hg up -q 0 |
|
309 | $ hg up -q 0 | |
310 |
|
310 | |||
311 | $ echo I > I |
|
311 | $ echo I > I | |
312 | $ hg ci -Am I |
|
312 | $ hg ci -Am I | |
313 | adding I |
|
313 | adding I | |
314 | created new head |
|
314 | created new head | |
315 |
|
315 | |||
316 | $ hg tglog |
|
316 | $ hg tglog | |
317 | @ 8: 'I' |
|
317 | @ 8: 'I' | |
318 | | |
|
318 | | | |
319 | | o 7: 'H' |
|
319 | | o 7: 'H' | |
320 | | |\ |
|
320 | | |\ | |
321 | | | o 6: 'G' |
|
321 | | | o 6: 'G' | |
322 | | | | |
|
322 | | | | | |
323 | | | o 5: 'F' |
|
323 | | | o 5: 'F' | |
324 | | | | |
|
324 | | | | | |
325 | | | o 4: 'E' |
|
325 | | | o 4: 'E' | |
326 | | | | |
|
326 | | | | | |
327 | | o | 3: 'D' |
|
327 | | o | 3: 'D' | |
328 | | |\| |
|
328 | | |\| | |
329 | | o | 2: 'C' |
|
329 | | o | 2: 'C' | |
330 | |/ / |
|
330 | |/ / | |
331 | | o 1: 'B' |
|
331 | | o 1: 'B' | |
332 | |/ |
|
332 | |/ | |
333 | o 0: 'A' |
|
333 | o 0: 'A' | |
334 |
|
334 | |||
335 | $ cd .. |
|
335 | $ cd .. | |
336 |
|
336 | |||
337 |
|
337 | |||
338 | Rebase and collapse - E onto I: |
|
338 | Rebase and collapse - E onto I: | |
339 |
|
339 | |||
340 | $ hg clone -q -u . c c1 |
|
340 | $ hg clone -q -u . c c1 | |
341 | $ cd c1 |
|
341 | $ cd c1 | |
342 |
|
342 | |||
343 | $ hg rebase -s 4 --collapse |
|
343 | $ hg rebase -s 4 --collapse | |
344 | merging E |
|
344 | merging E | |
345 | saved backup bundle to $TESTTMP/c1/.hg/strip-backup/*-backup.hg (glob) |
|
345 | saved backup bundle to $TESTTMP/c1/.hg/strip-backup/*-backup.hg (glob) | |
346 |
|
346 | |||
347 | $ hg tglog |
|
347 | $ hg tglog | |
348 | @ 5: 'Collapsed revision |
|
348 | @ 5: 'Collapsed revision | |
349 | |\ * E |
|
349 | |\ * E | |
350 | | | * F |
|
350 | | | * F | |
351 | | | * G |
|
351 | | | * G | |
352 | | | * H' |
|
352 | | | * H' | |
353 | | o 4: 'I' |
|
353 | | o 4: 'I' | |
354 | | | |
|
354 | | | | |
355 | o | 3: 'D' |
|
355 | o | 3: 'D' | |
356 | |\ \ |
|
356 | |\ \ | |
357 | | o | 2: 'C' |
|
357 | | o | 2: 'C' | |
358 | | |/ |
|
358 | | |/ | |
359 | o / 1: 'B' |
|
359 | o / 1: 'B' | |
360 | |/ |
|
360 | |/ | |
361 | o 0: 'A' |
|
361 | o 0: 'A' | |
362 |
|
362 | |||
363 | $ hg manifest |
|
363 | $ hg manifest | |
364 | A |
|
364 | A | |
365 | B |
|
365 | B | |
366 | C |
|
366 | C | |
367 | D |
|
367 | D | |
368 | E |
|
368 | E | |
369 | G |
|
369 | G | |
370 | I |
|
370 | I | |
371 |
|
371 | |||
372 | $ cat E |
|
372 | $ cat E | |
373 | F |
|
373 | F | |
374 |
|
374 | |||
375 | $ cd .. |
|
375 | $ cd .. | |
376 |
|
376 | |||
377 |
|
377 | |||
378 | Create repo d: |
|
378 | Create repo d: | |
379 |
|
379 | |||
380 | $ hg init d |
|
380 | $ hg init d | |
381 | $ cd d |
|
381 | $ cd d | |
382 |
|
382 | |||
383 | $ echo A > A |
|
383 | $ echo A > A | |
384 | $ hg ci -Am A |
|
384 | $ hg ci -Am A | |
385 | adding A |
|
385 | adding A | |
386 | $ echo B > B |
|
386 | $ echo B > B | |
387 | $ hg ci -Am B |
|
387 | $ hg ci -Am B | |
388 | adding B |
|
388 | adding B | |
389 | $ echo C > C |
|
389 | $ echo C > C | |
390 | $ hg ci -Am C |
|
390 | $ hg ci -Am C | |
391 | adding C |
|
391 | adding C | |
392 |
|
392 | |||
393 | $ hg up -q 1 |
|
393 | $ hg up -q 1 | |
394 |
|
394 | |||
395 | $ echo D > D |
|
395 | $ echo D > D | |
396 | $ hg ci -Am D |
|
396 | $ hg ci -Am D | |
397 | adding D |
|
397 | adding D | |
398 | created new head |
|
398 | created new head | |
399 | $ hg merge |
|
399 | $ hg merge | |
400 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
400 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
401 | (branch merge, don't forget to commit) |
|
401 | (branch merge, don't forget to commit) | |
402 |
|
402 | |||
403 | $ hg ci -m E |
|
403 | $ hg ci -m E | |
404 |
|
404 | |||
405 | $ hg up -q 0 |
|
405 | $ hg up -q 0 | |
406 |
|
406 | |||
407 | $ echo F > F |
|
407 | $ echo F > F | |
408 | $ hg ci -Am F |
|
408 | $ hg ci -Am F | |
409 | adding F |
|
409 | adding F | |
410 | created new head |
|
410 | created new head | |
411 |
|
411 | |||
412 | $ hg tglog |
|
412 | $ hg tglog | |
413 | @ 5: 'F' |
|
413 | @ 5: 'F' | |
414 | | |
|
414 | | | |
415 | | o 4: 'E' |
|
415 | | o 4: 'E' | |
416 | | |\ |
|
416 | | |\ | |
417 | | | o 3: 'D' |
|
417 | | | o 3: 'D' | |
418 | | | | |
|
418 | | | | | |
419 | | o | 2: 'C' |
|
419 | | o | 2: 'C' | |
420 | | |/ |
|
420 | | |/ | |
421 | | o 1: 'B' |
|
421 | | o 1: 'B' | |
422 | |/ |
|
422 | |/ | |
423 | o 0: 'A' |
|
423 | o 0: 'A' | |
424 |
|
424 | |||
425 | $ cd .. |
|
425 | $ cd .. | |
426 |
|
426 | |||
427 |
|
427 | |||
428 | Rebase and collapse - B onto F: |
|
428 | Rebase and collapse - B onto F: | |
429 |
|
429 | |||
430 | $ hg clone -q -u . d d1 |
|
430 | $ hg clone -q -u . d d1 | |
431 | $ cd d1 |
|
431 | $ cd d1 | |
432 |
|
432 | |||
433 | $ hg rebase -s 1 --collapse |
|
433 | $ hg rebase -s 1 --collapse | |
434 | saved backup bundle to $TESTTMP/d1/.hg/strip-backup/*-backup.hg (glob) |
|
434 | saved backup bundle to $TESTTMP/d1/.hg/strip-backup/*-backup.hg (glob) | |
435 |
|
435 | |||
436 | $ hg tglog |
|
436 | $ hg tglog | |
437 | @ 2: 'Collapsed revision |
|
437 | @ 2: 'Collapsed revision | |
438 | | * B |
|
438 | | * B | |
439 | | * C |
|
439 | | * C | |
440 | | * D |
|
440 | | * D | |
441 | | * E' |
|
441 | | * E' | |
442 | o 1: 'F' |
|
442 | o 1: 'F' | |
443 | | |
|
443 | | | |
444 | o 0: 'A' |
|
444 | o 0: 'A' | |
445 |
|
445 | |||
446 | $ hg manifest |
|
446 | $ hg manifest | |
447 | A |
|
447 | A | |
448 | B |
|
448 | B | |
449 | C |
|
449 | C | |
450 | D |
|
450 | D | |
451 | F |
|
451 | F | |
452 |
|
452 | |||
453 | Interactions between collapse and keepbranches |
|
453 | Interactions between collapse and keepbranches | |
454 | $ cd .. |
|
454 | $ cd .. | |
455 | $ hg init e |
|
455 | $ hg init e | |
456 | $ cd e |
|
456 | $ cd e | |
457 | $ echo 'a' > a |
|
457 | $ echo 'a' > a | |
458 | $ hg ci -Am 'A' |
|
458 | $ hg ci -Am 'A' | |
459 | adding a |
|
459 | adding a | |
460 |
|
460 | |||
461 | $ hg branch '1' |
|
461 | $ hg branch '1' | |
462 | marked working directory as branch 1 |
|
462 | marked working directory as branch 1 | |
463 | (branches are permanent and global, did you want a bookmark?) |
|
463 | (branches are permanent and global, did you want a bookmark?) | |
464 | $ echo 'b' > b |
|
464 | $ echo 'b' > b | |
465 | $ hg ci -Am 'B' |
|
465 | $ hg ci -Am 'B' | |
466 | adding b |
|
466 | adding b | |
467 |
|
467 | |||
468 | $ hg branch '2' |
|
468 | $ hg branch '2' | |
469 | marked working directory as branch 2 |
|
469 | marked working directory as branch 2 | |
470 | (branches are permanent and global, did you want a bookmark?) |
|
470 | (branches are permanent and global, did you want a bookmark?) | |
471 | $ echo 'c' > c |
|
471 | $ echo 'c' > c | |
472 | $ hg ci -Am 'C' |
|
472 | $ hg ci -Am 'C' | |
473 | adding c |
|
473 | adding c | |
474 |
|
474 | |||
475 | $ hg up -q 0 |
|
475 | $ hg up -q 0 | |
476 | $ echo 'd' > d |
|
476 | $ echo 'd' > d | |
477 | $ hg ci -Am 'D' |
|
477 | $ hg ci -Am 'D' | |
478 | adding d |
|
478 | adding d | |
479 |
|
479 | |||
480 | $ hg tglog |
|
480 | $ hg tglog | |
481 | @ 3: 'D' |
|
481 | @ 3: 'D' | |
482 | | |
|
482 | | | |
483 | | o 2: 'C' 2 |
|
483 | | o 2: 'C' 2 | |
484 | | | |
|
484 | | | | |
485 | | o 1: 'B' 1 |
|
485 | | o 1: 'B' 1 | |
486 | |/ |
|
486 | |/ | |
487 | o 0: 'A' |
|
487 | o 0: 'A' | |
488 |
|
488 | |||
489 | $ hg rebase --keepbranches --collapse -s 1 -d 3 |
|
489 | $ hg rebase --keepbranches --collapse -s 1 -d 3 | |
490 | abort: cannot collapse multiple named branches |
|
490 | abort: cannot collapse multiple named branches | |
491 | [255] |
|
491 | [255] | |
492 |
|
492 | |||
|
493 | $ repeatchange() { | |||
|
494 | > hg checkout $1 | |||
|
495 | > hg cp d z | |||
|
496 | > echo blah >> z | |||
|
497 | > hg commit -Am "$2" --user "$3" | |||
|
498 | > } | |||
|
499 | $ repeatchange 3 "E" "user1" | |||
|
500 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
501 | $ repeatchange 3 "E" "user2" | |||
|
502 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
503 | created new head | |||
|
504 | $ hg tglog | |||
|
505 | @ 5: 'E' | |||
|
506 | | | |||
|
507 | | o 4: 'E' | |||
|
508 | |/ | |||
|
509 | o 3: 'D' | |||
|
510 | | | |||
|
511 | | o 2: 'C' 2 | |||
|
512 | | | | |||
|
513 | | o 1: 'B' 1 | |||
|
514 | |/ | |||
|
515 | o 0: 'A' | |||
|
516 | ||||
|
517 | $ hg rebase -s 5 -d 4 | |||
|
518 | saved backup bundle to $TESTTMP/e/.hg/strip-backup/*-backup.hg (glob) | |||
|
519 | $ hg tglog | |||
|
520 | @ 4: 'E' | |||
|
521 | | | |||
|
522 | o 3: 'D' | |||
|
523 | | | |||
|
524 | | o 2: 'C' 2 | |||
|
525 | | | | |||
|
526 | | o 1: 'B' 1 | |||
|
527 | |/ | |||
|
528 | o 0: 'A' | |||
|
529 | ||||
|
530 | $ hg export tip | |||
|
531 | # HG changeset patch | |||
|
532 | # User user1 | |||
|
533 | # Date 0 0 | |||
|
534 | # Node ID f338eb3c2c7cc5b5915676a2376ba7ac558c5213 | |||
|
535 | # Parent 41acb9dca9eb976e84cd21fcb756b4afa5a35c09 | |||
|
536 | E | |||
|
537 | ||||
|
538 | diff -r 41acb9dca9eb -r f338eb3c2c7c z | |||
|
539 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |||
|
540 | +++ b/z Thu Jan 01 00:00:00 1970 +0000 | |||
|
541 | @@ -0,0 +1,2 @@ | |||
|
542 | +d | |||
|
543 | +blah |
General Comments 0
You need to be logged in to leave comments.
Login now