Show More
@@ -10,60 +10,37 | |||||
10 |
|
10 | |||
11 | $ hg init a |
|
11 | $ hg init a | |
12 | $ cd a |
|
12 | $ cd a | |
13 |
|
13 | $ hg unbundle $TESTDIR/bundles/rebase.hg | ||
14 | $ echo c1 > c1 |
|
14 | adding changesets | |
15 | $ hg ci -Am c1 |
|
15 | adding manifests | |
16 |
adding |
|
16 | adding file changes | |
17 |
|
17 | added 8 changesets with 7 changes to 7 files (+2 heads) | ||
18 | $ echo c2 > c2 |
|
18 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
19 | $ hg ci -Am c2 |
|
19 | $ hg up tip | |
20 | adding c2 |
|
20 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
21 |
|
||||
22 | $ echo c3 > c3 |
|
|||
23 | $ hg ci -Am c3 |
|
|||
24 | adding c3 |
|
|||
25 |
|
||||
26 | $ hg up -q -C 1 |
|
|||
27 |
|
21 | |||
28 |
$ echo |
|
22 | $ echo I > I | |
29 |
$ hg ci -Am |
|
23 | $ hg ci -AmI | |
30 |
adding |
|
24 | adding I | |
31 | created new head |
|
|||
32 |
|
||||
33 | $ echo l2 > l2 |
|
|||
34 | $ hg ci -Am l2 |
|
|||
35 | adding l2 |
|
|||
36 |
|
||||
37 | $ echo l3 > l3 |
|
|||
38 | $ hg ci -Am l3 |
|
|||
39 | adding l3 |
|
|||
40 |
|
||||
41 | $ hg up -q -C 2 |
|
|||
42 |
|
||||
43 | $ echo r1 > r1 |
|
|||
44 | $ hg ci -Am r1 |
|
|||
45 | adding r1 |
|
|||
46 |
|
||||
47 | $ echo r2 > r2 |
|
|||
48 | $ hg ci -Am r2 |
|
|||
49 | adding r2 |
|
|||
50 |
|
25 | |||
51 | $ hg tglog |
|
26 | $ hg tglog | |
52 |
@ |
|
27 | @ 8: 'I' | |
53 | | |
|
28 | | | |
54 |
o |
|
29 | o 7: 'H' | |
55 | | |
|
30 | | | |
56 |
| o |
|
31 | | o 6: 'G' | |
57 |
| |
|
32 | |/| | |
58 |
| |
|
33 | o | 5: 'F' | |
59 | | | |
|
34 | | | | |
60 |
| o |
|
35 | | o 4: 'E' | |
61 | | | |
|
|||
62 | o | 2: 'c3' |
|
|||
63 | |/ |
|
36 | |/ | |
64 |
o |
|
37 | | o 3: 'D' | |
65 | | |
|
38 | | | | |
66 |
o |
|
39 | | o 2: 'C' | |
|
40 | | | | |||
|
41 | | o 1: 'B' | |||
|
42 | |/ | |||
|
43 | o 0: 'A' | |||
67 |
|
44 | |||
68 | $ cd .. |
|
45 | $ cd .. | |
69 |
|
46 | |||
@@ -93,7 +70,7 These fail: | |||||
93 | nothing to rebase |
|
70 | nothing to rebase | |
94 | [1] |
|
71 | [1] | |
95 |
|
72 | |||
96 |
$ hg up -q |
|
73 | $ hg up -q 7 | |
97 |
|
74 | |||
98 | $ hg rebase |
|
75 | $ hg rebase | |
99 | nothing to rebase |
|
76 | nothing to rebase | |
@@ -102,29 +79,31 These fail: | |||||
102 |
|
79 | |||
103 | These work: |
|
80 | These work: | |
104 |
|
81 | |||
105 |
Rebase with no arguments (from 3 onto |
|
82 | Rebase with no arguments (from 3 onto 8): | |
106 |
|
83 | |||
107 |
$ hg up -q -C |
|
84 | $ hg up -q -C 3 | |
108 |
|
85 | |||
109 | $ hg rebase |
|
86 | $ hg rebase | |
110 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob) |
|
87 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob) | |
111 |
|
88 | |||
112 | $ hg tglog |
|
89 | $ hg tglog | |
113 |
@ |
|
90 | @ 8: 'D' | |
114 | | |
|
91 | | | |
115 |
o |
|
92 | o 7: 'C' | |
116 | | |
|
93 | | | |
117 |
o |
|
94 | o 6: 'B' | |
118 | | |
|
95 | | | |
119 |
o |
|
96 | o 5: 'I' | |
120 | | |
|
97 | | | |
121 |
o |
|
98 | o 4: 'H' | |
122 | | |
|
|||
123 | o 2: 'c3' |
|
|||
124 | | |
|
99 | | | |
125 |
o |
|
100 | | o 3: 'G' | |
126 | | |
|
101 | |/| | |
127 |
o |
|
102 | o | 2: 'F' | |
|
103 | | | | |||
|
104 | | o 1: 'E' | |||
|
105 | |/ | |||
|
106 | o 0: 'A' | |||
128 |
|
107 | |||
129 | Try to rollback after a rebase (fail): |
|
108 | Try to rollback after a rebase (fail): | |
130 |
|
109 | |||
@@ -135,198 +114,212 Try to rollback after a rebase (fail): | |||||
135 | $ cd .. |
|
114 | $ cd .. | |
136 |
|
115 | |||
137 |
|
116 | |||
138 |
Rebase with base == '.' => same as no arguments (from 3 onto |
|
117 | Rebase with base == '.' => same as no arguments (from 3 onto 8): | |
139 |
|
118 | |||
140 |
$ hg clone -q -u |
|
119 | $ hg clone -q -u 3 a a2 | |
141 | $ cd a2 |
|
120 | $ cd a2 | |
142 |
|
121 | |||
143 | $ hg rebase --base . |
|
122 | $ hg rebase --base . | |
144 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/*-backup.hg (glob) |
|
123 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/*-backup.hg (glob) | |
145 |
|
124 | |||
146 | $ hg tglog |
|
125 | $ hg tglog | |
147 |
@ |
|
126 | @ 8: 'D' | |
148 | | |
|
127 | | | |
149 |
o |
|
128 | o 7: 'C' | |
150 | | |
|
129 | | | |
151 |
o |
|
130 | o 6: 'B' | |
152 | | |
|
131 | | | |
153 |
o |
|
132 | o 5: 'I' | |
154 | | |
|
133 | | | |
155 |
o |
|
134 | o 4: 'H' | |
156 | | |
|
|||
157 | o 2: 'c3' |
|
|||
158 | | |
|
135 | | | |
159 |
o |
|
136 | | o 3: 'G' | |
160 | | |
|
137 | |/| | |
161 |
o |
|
138 | o | 2: 'F' | |
|
139 | | | | |||
|
140 | | o 1: 'E' | |||
|
141 | |/ | |||
|
142 | o 0: 'A' | |||
162 |
|
143 | |||
163 | $ cd .. |
|
144 | $ cd .. | |
164 |
|
145 | |||
165 |
|
146 | |||
166 |
Rebase with dest == `hg branch` => same as no arguments (from 3 onto |
|
147 | Rebase with dest == `hg branch` => same as no arguments (from 3 onto 8): | |
167 |
|
148 | |||
168 |
$ hg clone -q -u |
|
149 | $ hg clone -q -u 3 a a3 | |
169 | $ cd a3 |
|
150 | $ cd a3 | |
170 |
|
151 | |||
171 | $ hg rebase --dest `hg branch` |
|
152 | $ hg rebase --dest `hg branch` | |
172 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob) |
|
153 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob) | |
173 |
|
154 | |||
174 | $ hg tglog |
|
155 | $ hg tglog | |
175 |
@ |
|
156 | @ 8: 'D' | |
176 | | |
|
157 | | | |
177 |
o |
|
158 | o 7: 'C' | |
178 | | |
|
159 | | | |
179 |
o |
|
160 | o 6: 'B' | |
180 | | |
|
161 | | | |
181 |
o |
|
162 | o 5: 'I' | |
182 | | |
|
163 | | | |
183 |
o |
|
164 | o 4: 'H' | |
184 | | |
|
|||
185 | o 2: 'c3' |
|
|||
186 | | |
|
165 | | | |
187 |
o |
|
166 | | o 3: 'G' | |
188 | | |
|
167 | |/| | |
189 |
o |
|
168 | o | 2: 'F' | |
|
169 | | | | |||
|
170 | | o 1: 'E' | |||
|
171 | |/ | |||
|
172 | o 0: 'A' | |||
190 |
|
173 | |||
191 | $ cd .. |
|
174 | $ cd .. | |
192 |
|
175 | |||
193 |
|
176 | |||
194 |
Specify only source (from |
|
177 | Specify only source (from 2 onto 8): | |
195 |
|
178 | |||
196 | $ hg clone -q -u . a a4 |
|
179 | $ hg clone -q -u . a a4 | |
197 | $ cd a4 |
|
180 | $ cd a4 | |
198 |
|
181 | |||
199 |
$ hg rebase --source |
|
182 | $ hg rebase --source 2 | |
200 | saved backup bundle to $TESTTMP/a4/.hg/strip-backup/*-backup.hg (glob) |
|
183 | saved backup bundle to $TESTTMP/a4/.hg/strip-backup/*-backup.hg (glob) | |
201 |
|
184 | |||
202 | $ hg tglog |
|
185 | $ hg tglog | |
203 |
@ |
|
186 | @ 8: 'D' | |
204 | | |
|
187 | | | |
205 |
o |
|
188 | o 7: 'C' | |
206 | |\ |
|
189 | |\ | |
207 |
| o |
|
190 | | o 6: 'I' | |
208 | | | |
|
191 | | | | |
209 |
| o |
|
192 | | o 5: 'H' | |
210 | | | |
|
193 | | | | |
211 |
|
|
194 | | | o 4: 'G' | |
212 | | | |
|
195 | | |/| | |
213 |
| o |
|
196 | | o | 3: 'F' | |
|
197 | | | | | |||
|
198 | | | o 2: 'E' | |||
|
199 | | |/ | |||
|
200 | o | 1: 'B' | |||
214 | |/ |
|
201 | |/ | |
215 |
o |
|
202 | o 0: 'A' | |
216 | | |
|
|||
217 | o 0: 'c1' |
|
|||
218 |
|
203 | |||
219 | $ cd .. |
|
204 | $ cd .. | |
220 |
|
205 | |||
221 |
|
206 | |||
222 | Specify only dest (from 3 onto 6): |
|
207 | Specify only dest (from 3 onto 6): | |
223 |
|
208 | |||
224 |
$ hg clone -q -u |
|
209 | $ hg clone -q -u 3 a a5 | |
225 | $ cd a5 |
|
210 | $ cd a5 | |
226 |
|
211 | |||
227 | $ hg rebase --dest 6 |
|
212 | $ hg rebase --dest 6 | |
228 | saved backup bundle to $TESTTMP/a5/.hg/strip-backup/*-backup.hg (glob) |
|
213 | saved backup bundle to $TESTTMP/a5/.hg/strip-backup/*-backup.hg (glob) | |
229 |
|
214 | |||
230 | $ hg tglog |
|
215 | $ hg tglog | |
231 |
@ |
|
216 | @ 8: 'D' | |
232 | | |
|
217 | | | |
233 |
o |
|
218 | o 7: 'C' | |
|
219 | | | |||
|
220 | o 6: 'B' | |||
234 | | |
|
221 | | | |
235 |
o 5: ' |
|
222 | | o 5: 'I' | |
236 | | |
|
223 | | | | |
237 |
| o 4: ' |
|
224 | | o 4: 'H' | |
|
225 | | | | |||
|
226 | o | 3: 'G' | |||
|
227 | |\| | |||
|
228 | | o 2: 'F' | |||
|
229 | | | | |||
|
230 | o | 1: 'E' | |||
238 | |/ |
|
231 | |/ | |
239 |
o |
|
232 | o 0: 'A' | |
240 | | |
|
|||
241 | o 2: 'c3' |
|
|||
242 | | |
|
|||
243 | o 1: 'c2' |
|
|||
244 | | |
|
|||
245 | o 0: 'c1' |
|
|||
246 |
|
233 | |||
247 | $ cd .. |
|
234 | $ cd .. | |
248 |
|
235 | |||
249 |
|
236 | |||
250 |
Specify only base (from |
|
237 | Specify only base (from 1 onto 8): | |
251 |
|
238 | |||
252 | $ hg clone -q -u . a a6 |
|
239 | $ hg clone -q -u . a a6 | |
253 | $ cd a6 |
|
240 | $ cd a6 | |
254 |
|
241 | |||
255 |
$ hg rebase --base |
|
242 | $ hg rebase --base 3 | |
256 | saved backup bundle to $TESTTMP/a6/.hg/strip-backup/*-backup.hg (glob) |
|
243 | saved backup bundle to $TESTTMP/a6/.hg/strip-backup/*-backup.hg (glob) | |
257 |
|
244 | |||
258 | $ hg tglog |
|
245 | $ hg tglog | |
259 |
@ |
|
246 | @ 8: 'D' | |
260 | | |
|
247 | | | |
261 |
o |
|
248 | o 7: 'C' | |
262 | | |
|
249 | | | |
263 |
o |
|
250 | o 6: 'B' | |
264 | | |
|
251 | | | |
265 |
o |
|
252 | o 5: 'I' | |
266 | | |
|
253 | | | |
267 |
o |
|
254 | o 4: 'H' | |
268 | | |
|
|||
269 | o 2: 'c3' |
|
|||
270 | | |
|
255 | | | |
271 |
o |
|
256 | | o 3: 'G' | |
272 | | |
|
257 | |/| | |
273 |
o |
|
258 | o | 2: 'F' | |
|
259 | | | | |||
|
260 | | o 1: 'E' | |||
|
261 | |/ | |||
|
262 | o 0: 'A' | |||
274 |
|
263 | |||
275 | $ cd .. |
|
264 | $ cd .. | |
276 |
|
265 | |||
277 |
|
266 | |||
278 |
Specify source and dest (from |
|
267 | Specify source and dest (from 2 onto 7): | |
279 |
|
268 | |||
280 | $ hg clone -q -u . a a7 |
|
269 | $ hg clone -q -u . a a7 | |
281 | $ cd a7 |
|
270 | $ cd a7 | |
282 |
|
271 | |||
283 |
$ hg rebase --source |
|
272 | $ hg rebase --detach --source 2 --dest 7 | |
284 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/*-backup.hg (glob) |
|
273 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/*-backup.hg (glob) | |
285 |
|
274 | |||
286 | $ hg tglog |
|
275 | $ hg tglog | |
287 |
@ |
|
276 | @ 8: 'D' | |
|
277 | | | |||
|
278 | o 7: 'C' | |||
288 | | |
|
279 | | | |
289 |
o |
|
280 | | o 6: 'I' | |
290 |
| |
|
281 | |/ | |
291 |
|
|
282 | o 5: 'H' | |
292 |
| |
|
283 | | | |
293 |
| o 4: ' |
|
284 | | o 4: 'G' | |
|
285 | |/| | |||
|
286 | o | 3: 'F' | |||
294 | | | |
|
287 | | | | |
295 |
o |
|
288 | | o 2: 'E' | |
296 | | | |
|
|||
297 | | o 2: 'c3' |
|
|||
298 | |/ |
|
289 | |/ | |
299 |
o 1: ' |
|
290 | | o 1: 'B' | |
300 | | |
|
291 | |/ | |
301 |
o 0: ' |
|
292 | o 0: 'A' | |
302 |
|
293 | |||
303 | $ cd .. |
|
294 | $ cd .. | |
304 |
|
295 | |||
305 |
|
296 | |||
306 |
Specify base and dest (from |
|
297 | Specify base and dest (from 1 onto 7): | |
307 |
|
298 | |||
308 | $ hg clone -q -u . a a8 |
|
299 | $ hg clone -q -u . a a8 | |
309 | $ cd a8 |
|
300 | $ cd a8 | |
310 |
|
301 | |||
311 |
$ hg rebase --base |
|
302 | $ hg rebase --base 3 --dest 7 | |
312 | saved backup bundle to $TESTTMP/a8/.hg/strip-backup/*-backup.hg (glob) |
|
303 | saved backup bundle to $TESTTMP/a8/.hg/strip-backup/*-backup.hg (glob) | |
313 |
|
304 | |||
314 | $ hg tglog |
|
305 | $ hg tglog | |
315 |
@ |
|
306 | @ 8: 'D' | |
316 | | |
|
307 | | | |
317 |
o |
|
308 | o 7: 'C' | |
318 | | |
|
309 | | | |
319 |
o |
|
310 | o 6: 'B' | |
320 | | |
|
311 | | | |
321 |
| o |
|
312 | | o 5: 'I' | |
322 | |/ |
|
313 | |/ | |
323 |
o |
|
314 | o 4: 'H' | |
324 | | |
|
|||
325 | o 2: 'c3' |
|
|||
326 | | |
|
315 | | | |
327 |
o |
|
316 | | o 3: 'G' | |
328 | | |
|
317 | |/| | |
329 |
o |
|
318 | o | 2: 'F' | |
|
319 | | | | |||
|
320 | | o 1: 'E' | |||
|
321 | |/ | |||
|
322 | o 0: 'A' | |||
330 |
|
323 | |||
331 | $ cd .. |
|
324 | $ cd .. | |
332 |
|
325 |
General Comments 0
You need to be logged in to leave comments.
Login now