Show More
@@ -1,525 +1,511 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}: '{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 | (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 |
|
23 | |||
24 | $ echo I > I |
|
24 | $ echo I > I | |
25 | $ hg ci -AmI |
|
25 | $ hg ci -AmI | |
26 | adding I |
|
26 | adding I | |
27 |
|
27 | |||
28 | $ hg tglog |
|
28 | $ hg tglog | |
29 | @ 8: 'I' |
|
29 | @ 8: 'I' | |
30 | | |
|
30 | | | |
31 | o 7: 'H' |
|
31 | o 7: 'H' | |
32 | | |
|
32 | | | |
33 | | o 6: 'G' |
|
33 | | o 6: 'G' | |
34 | |/| |
|
34 | |/| | |
35 | o | 5: 'F' |
|
35 | o | 5: 'F' | |
36 | | | |
|
36 | | | | |
37 | | o 4: 'E' |
|
37 | | o 4: 'E' | |
38 | |/ |
|
38 | |/ | |
39 | | o 3: 'D' |
|
39 | | o 3: 'D' | |
40 | | | |
|
40 | | | | |
41 | | o 2: 'C' |
|
41 | | o 2: 'C' | |
42 | | | |
|
42 | | | | |
43 | | o 1: 'B' |
|
43 | | o 1: 'B' | |
44 | |/ |
|
44 | |/ | |
45 | o 0: 'A' |
|
45 | o 0: 'A' | |
46 |
|
46 | |||
47 | $ cd .. |
|
47 | $ cd .. | |
48 |
|
48 | |||
|
49 | Version with only two heads (to allow default destination to work) | |||
|
50 | ||||
|
51 | $ hg clone -q -u . a a2heads -r 3 -r 8 | |||
49 |
|
52 | |||
50 | These fail: |
|
53 | These fail: | |
51 |
|
54 | |||
52 |
$ hg clone -q -u . a a |
|
55 | $ hg clone -q -u . a a0 | |
53 |
$ cd a |
|
56 | $ cd a0 | |
54 |
|
57 | |||
55 | $ hg rebase -s 8 -d 7 |
|
58 | $ hg rebase -s 8 -d 7 | |
56 | nothing to rebase |
|
59 | nothing to rebase | |
57 | [1] |
|
60 | [1] | |
58 |
|
61 | |||
59 | $ hg rebase --continue --abort |
|
62 | $ hg rebase --continue --abort | |
60 | abort: cannot use both abort and continue |
|
63 | abort: cannot use both abort and continue | |
61 | [255] |
|
64 | [255] | |
62 |
|
65 | |||
63 | $ hg rebase --continue --collapse |
|
66 | $ hg rebase --continue --collapse | |
64 | abort: cannot use collapse with continue or abort |
|
67 | abort: cannot use collapse with continue or abort | |
65 | [255] |
|
68 | [255] | |
66 |
|
69 | |||
67 | $ hg rebase --continue --dest 4 |
|
70 | $ hg rebase --continue --dest 4 | |
68 | abort: abort and continue do not allow specifying revisions |
|
71 | abort: abort and continue do not allow specifying revisions | |
69 | [255] |
|
72 | [255] | |
70 |
|
73 | |||
71 | $ hg rebase --base 5 --source 4 |
|
74 | $ hg rebase --base 5 --source 4 | |
72 | abort: cannot specify both a source and a base |
|
75 | abort: cannot specify both a source and a base | |
73 | [255] |
|
76 | [255] | |
74 |
|
77 | |||
75 | $ hg rebase --rev 5 --source 4 |
|
78 | $ hg rebase --rev 5 --source 4 | |
76 | abort: cannot specify both a revision and a source |
|
79 | abort: cannot specify both a revision and a source | |
77 | [255] |
|
80 | [255] | |
78 | $ hg rebase --base 5 --rev 4 |
|
81 | $ hg rebase --base 5 --rev 4 | |
79 | abort: cannot specify both a revision and a base |
|
82 | abort: cannot specify both a revision and a base | |
80 | [255] |
|
83 | [255] | |
81 |
|
84 | |||
82 | $ hg rebase --rev '1 & !1' |
|
85 | $ hg rebase --rev '1 & !1' | |
83 | empty "rev" revision set - nothing to rebase |
|
86 | empty "rev" revision set - nothing to rebase | |
84 | [1] |
|
87 | [1] | |
85 |
|
88 | |||
86 | $ hg rebase --source '1 & !1' |
|
89 | $ hg rebase --source '1 & !1' | |
87 | empty "source" revision set - nothing to rebase |
|
90 | empty "source" revision set - nothing to rebase | |
88 | [1] |
|
91 | [1] | |
89 |
|
92 | |||
90 | $ hg rebase --base '1 & !1' |
|
93 | $ hg rebase --base '1 & !1' | |
91 | empty "base" revision set - can't compute rebase set |
|
94 | empty "base" revision set - can't compute rebase set | |
92 | [1] |
|
95 | [1] | |
93 |
|
96 | |||
94 | $ hg rebase |
|
97 | $ hg rebase | |
95 | nothing to rebase - working directory parent is also destination |
|
98 | nothing to rebase - working directory parent is also destination | |
96 | [1] |
|
99 | [1] | |
97 |
|
100 | |||
98 | $ hg rebase -b. |
|
101 | $ hg rebase -b. | |
99 | nothing to rebase - e7ec4e813ba6 is both "base" and destination |
|
102 | nothing to rebase - e7ec4e813ba6 is both "base" and destination | |
100 | [1] |
|
103 | [1] | |
101 |
|
104 | |||
102 | $ hg up -q 7 |
|
105 | $ hg up -q 7 | |
103 |
|
106 | |||
104 | $ hg rebase --traceback |
|
107 | $ hg rebase --traceback | |
105 | nothing to rebase - working directory parent is already an ancestor of destination e7ec4e813ba6 |
|
108 | nothing to rebase - working directory parent is already an ancestor of destination e7ec4e813ba6 | |
106 | [1] |
|
109 | [1] | |
107 |
|
110 | |||
108 | $ hg rebase -b. |
|
111 | $ hg rebase -b. | |
109 | nothing to rebase - "base" 02de42196ebe is already an ancestor of destination e7ec4e813ba6 |
|
112 | nothing to rebase - "base" 02de42196ebe is already an ancestor of destination e7ec4e813ba6 | |
110 | [1] |
|
113 | [1] | |
111 |
|
114 | |||
112 | $ hg rebase --dest '1 & !1' |
|
115 | $ hg rebase --dest '1 & !1' | |
113 | abort: empty revision set |
|
116 | abort: empty revision set | |
114 | [255] |
|
117 | [255] | |
115 |
|
118 | |||
116 | These work: |
|
119 | These work: | |
117 |
|
120 | |||
118 | Rebase with no arguments (from 3 onto 8): |
|
121 | Rebase with no arguments (from 3 onto 8): | |
119 |
|
122 | |||
|
123 | $ cd .. | |||
|
124 | $ hg clone -q -u . a2heads a1 | |||
|
125 | $ cd a1 | |||
120 | $ hg up -q -C 3 |
|
126 | $ hg up -q -C 3 | |
121 |
|
127 | |||
122 | $ hg rebase |
|
128 | $ hg rebase | |
123 | rebasing 1:42ccdea3bb16 "B" |
|
129 | rebasing 1:42ccdea3bb16 "B" | |
124 | rebasing 2:5fddd98957c8 "C" |
|
130 | rebasing 2:5fddd98957c8 "C" | |
125 | rebasing 3:32af7686d403 "D" |
|
131 | rebasing 3:32af7686d403 "D" | |
126 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/42ccdea3bb16-3cb021d3-backup.hg (glob) |
|
132 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/42ccdea3bb16-3cb021d3-backup.hg (glob) | |
127 |
|
133 | |||
128 | $ hg tglog |
|
134 | $ hg tglog | |
129 |
@ |
|
135 | @ 6: 'D' | |
130 | | |
|
|||
131 | o 7: 'C' |
|
|||
132 | | |
|
136 | | | |
133 |
o |
|
137 | o 5: 'C' | |
134 | | |
|
138 | | | |
135 |
o |
|
139 | o 4: 'B' | |
136 | | |
|
140 | | | |
137 |
o |
|
141 | o 3: 'I' | |
138 | | |
|
142 | | | |
139 |
|
|
143 | o 2: 'H' | |
140 |
| |
|
144 | | | |
141 |
o |
|
145 | o 1: 'F' | |
142 |
| |
|
146 | | | |
143 | | o 1: 'E' |
|
|||
144 | |/ |
|
|||
145 | o 0: 'A' |
|
147 | o 0: 'A' | |
146 |
|
148 | |||
147 | Try to rollback after a rebase (fail): |
|
149 | Try to rollback after a rebase (fail): | |
148 |
|
150 | |||
149 | $ hg rollback |
|
151 | $ hg rollback | |
150 | no rollback information available |
|
152 | no rollback information available | |
151 | [1] |
|
153 | [1] | |
152 |
|
154 | |||
153 | $ cd .. |
|
155 | $ cd .. | |
154 |
|
156 | |||
155 | Rebase with base == '.' => same as no arguments (from 3 onto 8): |
|
157 | Rebase with base == '.' => same as no arguments (from 3 onto 8): | |
156 |
|
158 | |||
157 | $ hg clone -q -u 3 a a2 |
|
159 | $ hg clone -q -u 3 a2heads a2 | |
158 | $ cd a2 |
|
160 | $ cd a2 | |
159 |
|
161 | |||
160 | $ hg rebase --base . |
|
162 | $ hg rebase --base . | |
161 | rebasing 1:42ccdea3bb16 "B" |
|
163 | rebasing 1:42ccdea3bb16 "B" | |
162 | rebasing 2:5fddd98957c8 "C" |
|
164 | rebasing 2:5fddd98957c8 "C" | |
163 | rebasing 3:32af7686d403 "D" |
|
165 | rebasing 3:32af7686d403 "D" | |
164 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/42ccdea3bb16-3cb021d3-backup.hg (glob) |
|
166 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/42ccdea3bb16-3cb021d3-backup.hg (glob) | |
165 |
|
167 | |||
166 | $ hg tglog |
|
168 | $ hg tglog | |
167 |
@ |
|
169 | @ 6: 'D' | |
168 | | |
|
|||
169 | o 7: 'C' |
|
|||
170 | | |
|
170 | | | |
171 |
o |
|
171 | o 5: 'C' | |
172 | | |
|
172 | | | |
173 |
o |
|
173 | o 4: 'B' | |
174 | | |
|
174 | | | |
175 |
o |
|
175 | o 3: 'I' | |
176 | | |
|
176 | | | |
177 |
|
|
177 | o 2: 'H' | |
178 |
| |
|
178 | | | |
179 |
o |
|
179 | o 1: 'F' | |
180 |
| |
|
180 | | | |
181 | | o 1: 'E' |
|
|||
182 | |/ |
|
|||
183 | o 0: 'A' |
|
181 | o 0: 'A' | |
184 |
|
182 | |||
185 | $ cd .. |
|
183 | $ cd .. | |
186 |
|
184 | |||
187 |
|
185 | |||
188 | Rebase with dest == branch(.) => same as no arguments (from 3 onto 8): |
|
186 | Rebase with dest == branch(.) => same as no arguments (from 3 onto 8): | |
189 |
|
187 | |||
190 | $ hg clone -q -u 3 a a3 |
|
188 | $ hg clone -q -u 3 a a3 | |
191 | $ cd a3 |
|
189 | $ cd a3 | |
192 |
|
190 | |||
193 | $ hg rebase --dest 'branch(.)' |
|
191 | $ hg rebase --dest 'branch(.)' | |
194 | rebasing 1:42ccdea3bb16 "B" |
|
192 | rebasing 1:42ccdea3bb16 "B" | |
195 | rebasing 2:5fddd98957c8 "C" |
|
193 | rebasing 2:5fddd98957c8 "C" | |
196 | rebasing 3:32af7686d403 "D" |
|
194 | rebasing 3:32af7686d403 "D" | |
197 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/42ccdea3bb16-3cb021d3-backup.hg (glob) |
|
195 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/42ccdea3bb16-3cb021d3-backup.hg (glob) | |
198 |
|
196 | |||
199 | $ hg tglog |
|
197 | $ hg tglog | |
200 | @ 8: 'D' |
|
198 | @ 8: 'D' | |
201 | | |
|
199 | | | |
202 | o 7: 'C' |
|
200 | o 7: 'C' | |
203 | | |
|
201 | | | |
204 | o 6: 'B' |
|
202 | o 6: 'B' | |
205 | | |
|
203 | | | |
206 | o 5: 'I' |
|
204 | o 5: 'I' | |
207 | | |
|
205 | | | |
208 | o 4: 'H' |
|
206 | o 4: 'H' | |
209 | | |
|
207 | | | |
210 | | o 3: 'G' |
|
208 | | o 3: 'G' | |
211 | |/| |
|
209 | |/| | |
212 | o | 2: 'F' |
|
210 | o | 2: 'F' | |
213 | | | |
|
211 | | | | |
214 | | o 1: 'E' |
|
212 | | o 1: 'E' | |
215 | |/ |
|
213 | |/ | |
216 | o 0: 'A' |
|
214 | o 0: 'A' | |
217 |
|
215 | |||
218 | $ cd .. |
|
216 | $ cd .. | |
219 |
|
217 | |||
220 |
|
218 | |||
221 | Specify only source (from 2 onto 8): |
|
219 | Specify only source (from 2 onto 8): | |
222 |
|
220 | |||
223 | $ hg clone -q -u . a a4 |
|
221 | $ hg clone -q -u . a2heads a4 | |
224 | $ cd a4 |
|
222 | $ cd a4 | |
225 |
|
223 | |||
226 | $ hg rebase --source 'desc("C")' |
|
224 | $ hg rebase --source 'desc("C")' | |
227 | rebasing 2:5fddd98957c8 "C" |
|
225 | rebasing 2:5fddd98957c8 "C" | |
228 | rebasing 3:32af7686d403 "D" |
|
226 | rebasing 3:32af7686d403 "D" | |
229 | saved backup bundle to $TESTTMP/a4/.hg/strip-backup/5fddd98957c8-f9244fa1-backup.hg (glob) |
|
227 | saved backup bundle to $TESTTMP/a4/.hg/strip-backup/5fddd98957c8-f9244fa1-backup.hg (glob) | |
230 |
|
228 | |||
231 | $ hg tglog |
|
229 | $ hg tglog | |
232 |
o |
|
230 | o 6: 'D' | |
233 | | |
|
231 | | | |
234 |
o |
|
232 | o 5: 'C' | |
235 | | |
|
|||
236 | @ 6: 'I' |
|
|||
237 | | |
|
233 | | | |
238 |
|
|
234 | @ 4: 'I' | |
239 | | |
|
235 | | | |
240 |
|
|
236 | o 3: 'H' | |
241 |
| |
|
237 | | | |
242 |
o |
|
238 | o 2: 'F' | |
243 |
| |
|
239 | | | |
244 | | o 2: 'E' |
|
|||
245 | |/ |
|
|||
246 | | o 1: 'B' |
|
240 | | o 1: 'B' | |
247 | |/ |
|
241 | |/ | |
248 | o 0: 'A' |
|
242 | o 0: 'A' | |
249 |
|
243 | |||
250 | $ cd .. |
|
244 | $ cd .. | |
251 |
|
245 | |||
252 |
|
246 | |||
253 | Specify only dest (from 3 onto 6): |
|
247 | Specify only dest (from 3 onto 6): | |
254 |
|
248 | |||
255 | $ hg clone -q -u 3 a a5 |
|
249 | $ hg clone -q -u 3 a a5 | |
256 | $ cd a5 |
|
250 | $ cd a5 | |
257 |
|
251 | |||
258 | $ hg rebase --dest 6 |
|
252 | $ hg rebase --dest 6 | |
259 | rebasing 1:42ccdea3bb16 "B" |
|
253 | rebasing 1:42ccdea3bb16 "B" | |
260 | rebasing 2:5fddd98957c8 "C" |
|
254 | rebasing 2:5fddd98957c8 "C" | |
261 | rebasing 3:32af7686d403 "D" |
|
255 | rebasing 3:32af7686d403 "D" | |
262 | saved backup bundle to $TESTTMP/a5/.hg/strip-backup/42ccdea3bb16-3cb021d3-backup.hg (glob) |
|
256 | saved backup bundle to $TESTTMP/a5/.hg/strip-backup/42ccdea3bb16-3cb021d3-backup.hg (glob) | |
263 |
|
257 | |||
264 | $ hg tglog |
|
258 | $ hg tglog | |
265 | @ 8: 'D' |
|
259 | @ 8: 'D' | |
266 | | |
|
260 | | | |
267 | o 7: 'C' |
|
261 | o 7: 'C' | |
268 | | |
|
262 | | | |
269 | o 6: 'B' |
|
263 | o 6: 'B' | |
270 | | |
|
264 | | | |
271 | | o 5: 'I' |
|
265 | | o 5: 'I' | |
272 | | | |
|
266 | | | | |
273 | | o 4: 'H' |
|
267 | | o 4: 'H' | |
274 | | | |
|
268 | | | | |
275 | o | 3: 'G' |
|
269 | o | 3: 'G' | |
276 | |\| |
|
270 | |\| | |
277 | | o 2: 'F' |
|
271 | | o 2: 'F' | |
278 | | | |
|
272 | | | | |
279 | o | 1: 'E' |
|
273 | o | 1: 'E' | |
280 | |/ |
|
274 | |/ | |
281 | o 0: 'A' |
|
275 | o 0: 'A' | |
282 |
|
276 | |||
283 | $ cd .. |
|
277 | $ cd .. | |
284 |
|
278 | |||
285 |
|
279 | |||
286 | Specify only base (from 1 onto 8): |
|
280 | Specify only base (from 1 onto 8): | |
287 |
|
281 | |||
288 | $ hg clone -q -u . a a6 |
|
282 | $ hg clone -q -u . a2heads a6 | |
289 | $ cd a6 |
|
283 | $ cd a6 | |
290 |
|
284 | |||
291 | $ hg rebase --base 'desc("D")' |
|
285 | $ hg rebase --base 'desc("D")' | |
292 | rebasing 1:42ccdea3bb16 "B" |
|
286 | rebasing 1:42ccdea3bb16 "B" | |
293 | rebasing 2:5fddd98957c8 "C" |
|
287 | rebasing 2:5fddd98957c8 "C" | |
294 | rebasing 3:32af7686d403 "D" |
|
288 | rebasing 3:32af7686d403 "D" | |
295 | saved backup bundle to $TESTTMP/a6/.hg/strip-backup/42ccdea3bb16-3cb021d3-backup.hg (glob) |
|
289 | saved backup bundle to $TESTTMP/a6/.hg/strip-backup/42ccdea3bb16-3cb021d3-backup.hg (glob) | |
296 |
|
290 | |||
297 | $ hg tglog |
|
291 | $ hg tglog | |
298 |
o |
|
292 | o 6: 'D' | |
299 | | |
|
|||
300 | o 7: 'C' |
|
|||
301 | | |
|
293 | | | |
302 |
o |
|
294 | o 5: 'C' | |
303 | | |
|
295 | | | |
304 |
|
|
296 | o 4: 'B' | |
305 | | |
|
297 | | | |
306 |
|
|
298 | @ 3: 'I' | |
307 | | |
|
299 | | | |
308 |
|
|
300 | o 2: 'H' | |
309 |
| |
|
301 | | | |
310 |
o |
|
302 | o 1: 'F' | |
311 |
| |
|
303 | | | |
312 | | o 1: 'E' |
|
|||
313 | |/ |
|
|||
314 | o 0: 'A' |
|
304 | o 0: 'A' | |
315 |
|
305 | |||
316 | $ cd .. |
|
306 | $ cd .. | |
317 |
|
307 | |||
318 |
|
308 | |||
319 | Specify source and dest (from 2 onto 7): |
|
309 | Specify source and dest (from 2 onto 7): | |
320 |
|
310 | |||
321 | $ hg clone -q -u . a a7 |
|
311 | $ hg clone -q -u . a a7 | |
322 | $ cd a7 |
|
312 | $ cd a7 | |
323 |
|
313 | |||
324 | $ hg rebase --source 2 --dest 7 |
|
314 | $ hg rebase --source 2 --dest 7 | |
325 | rebasing 2:5fddd98957c8 "C" |
|
315 | rebasing 2:5fddd98957c8 "C" | |
326 | rebasing 3:32af7686d403 "D" |
|
316 | rebasing 3:32af7686d403 "D" | |
327 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/5fddd98957c8-f9244fa1-backup.hg (glob) |
|
317 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/5fddd98957c8-f9244fa1-backup.hg (glob) | |
328 |
|
318 | |||
329 | $ hg tglog |
|
319 | $ hg tglog | |
330 | o 8: 'D' |
|
320 | o 8: 'D' | |
331 | | |
|
321 | | | |
332 | o 7: 'C' |
|
322 | o 7: 'C' | |
333 | | |
|
323 | | | |
334 | | @ 6: 'I' |
|
324 | | @ 6: 'I' | |
335 | |/ |
|
325 | |/ | |
336 | o 5: 'H' |
|
326 | o 5: 'H' | |
337 | | |
|
327 | | | |
338 | | o 4: 'G' |
|
328 | | o 4: 'G' | |
339 | |/| |
|
329 | |/| | |
340 | o | 3: 'F' |
|
330 | o | 3: 'F' | |
341 | | | |
|
331 | | | | |
342 | | o 2: 'E' |
|
332 | | o 2: 'E' | |
343 | |/ |
|
333 | |/ | |
344 | | o 1: 'B' |
|
334 | | o 1: 'B' | |
345 | |/ |
|
335 | |/ | |
346 | o 0: 'A' |
|
336 | o 0: 'A' | |
347 |
|
337 | |||
348 | $ cd .. |
|
338 | $ cd .. | |
349 |
|
339 | |||
350 |
|
340 | |||
351 | Specify base and dest (from 1 onto 7): |
|
341 | Specify base and dest (from 1 onto 7): | |
352 |
|
342 | |||
353 | $ hg clone -q -u . a a8 |
|
343 | $ hg clone -q -u . a a8 | |
354 | $ cd a8 |
|
344 | $ cd a8 | |
355 |
|
345 | |||
356 | $ hg rebase --base 3 --dest 7 |
|
346 | $ hg rebase --base 3 --dest 7 | |
357 | rebasing 1:42ccdea3bb16 "B" |
|
347 | rebasing 1:42ccdea3bb16 "B" | |
358 | rebasing 2:5fddd98957c8 "C" |
|
348 | rebasing 2:5fddd98957c8 "C" | |
359 | rebasing 3:32af7686d403 "D" |
|
349 | rebasing 3:32af7686d403 "D" | |
360 | saved backup bundle to $TESTTMP/a8/.hg/strip-backup/42ccdea3bb16-3cb021d3-backup.hg (glob) |
|
350 | saved backup bundle to $TESTTMP/a8/.hg/strip-backup/42ccdea3bb16-3cb021d3-backup.hg (glob) | |
361 |
|
351 | |||
362 | $ hg tglog |
|
352 | $ hg tglog | |
363 | o 8: 'D' |
|
353 | o 8: 'D' | |
364 | | |
|
354 | | | |
365 | o 7: 'C' |
|
355 | o 7: 'C' | |
366 | | |
|
356 | | | |
367 | o 6: 'B' |
|
357 | o 6: 'B' | |
368 | | |
|
358 | | | |
369 | | @ 5: 'I' |
|
359 | | @ 5: 'I' | |
370 | |/ |
|
360 | |/ | |
371 | o 4: 'H' |
|
361 | o 4: 'H' | |
372 | | |
|
362 | | | |
373 | | o 3: 'G' |
|
363 | | o 3: 'G' | |
374 | |/| |
|
364 | |/| | |
375 | o | 2: 'F' |
|
365 | o | 2: 'F' | |
376 | | | |
|
366 | | | | |
377 | | o 1: 'E' |
|
367 | | o 1: 'E' | |
378 | |/ |
|
368 | |/ | |
379 | o 0: 'A' |
|
369 | o 0: 'A' | |
380 |
|
370 | |||
381 | $ cd .. |
|
371 | $ cd .. | |
382 |
|
372 | |||
383 |
|
373 | |||
384 | Specify only revs (from 2 onto 8) |
|
374 | Specify only revs (from 2 onto 8) | |
385 |
|
375 | |||
386 | $ hg clone -q -u . a a9 |
|
376 | $ hg clone -q -u . a2heads a9 | |
387 | $ cd a9 |
|
377 | $ cd a9 | |
388 |
|
378 | |||
389 | $ hg rebase --rev 'desc("C")::' |
|
379 | $ hg rebase --rev 'desc("C")::' | |
390 | rebasing 2:5fddd98957c8 "C" |
|
380 | rebasing 2:5fddd98957c8 "C" | |
391 | rebasing 3:32af7686d403 "D" |
|
381 | rebasing 3:32af7686d403 "D" | |
392 | saved backup bundle to $TESTTMP/a9/.hg/strip-backup/5fddd98957c8-f9244fa1-backup.hg (glob) |
|
382 | saved backup bundle to $TESTTMP/a9/.hg/strip-backup/5fddd98957c8-f9244fa1-backup.hg (glob) | |
393 |
|
383 | |||
394 | $ hg tglog |
|
384 | $ hg tglog | |
395 |
o |
|
385 | o 6: 'D' | |
396 | | |
|
386 | | | |
397 |
o |
|
387 | o 5: 'C' | |
398 | | |
|
|||
399 | @ 6: 'I' |
|
|||
400 | | |
|
388 | | | |
401 |
|
|
389 | @ 4: 'I' | |
402 | | |
|
390 | | | |
403 |
|
|
391 | o 3: 'H' | |
404 |
| |
|
392 | | | |
405 |
o |
|
393 | o 2: 'F' | |
406 |
| |
|
394 | | | |
407 | | o 2: 'E' |
|
|||
408 | |/ |
|
|||
409 | | o 1: 'B' |
|
395 | | o 1: 'B' | |
410 | |/ |
|
396 | |/ | |
411 | o 0: 'A' |
|
397 | o 0: 'A' | |
412 |
|
398 | |||
413 | $ cd .. |
|
399 | $ cd .. | |
414 |
|
400 | |||
415 | Rebasing both a single revision and a merge in one command |
|
401 | Rebasing both a single revision and a merge in one command | |
416 |
|
402 | |||
417 | $ hg clone -q -u . a aX |
|
403 | $ hg clone -q -u . a aX | |
418 | $ cd aX |
|
404 | $ cd aX | |
419 | $ hg rebase -r 3 -r 6 |
|
405 | $ hg rebase -r 3 -r 6 | |
420 | rebasing 3:32af7686d403 "D" |
|
406 | rebasing 3:32af7686d403 "D" | |
421 | rebasing 6:eea13746799a "G" |
|
407 | rebasing 6:eea13746799a "G" | |
422 | saved backup bundle to $TESTTMP/aX/.hg/strip-backup/eea13746799a-ad273fd6-backup.hg (glob) |
|
408 | saved backup bundle to $TESTTMP/aX/.hg/strip-backup/eea13746799a-ad273fd6-backup.hg (glob) | |
423 | $ cd .. |
|
409 | $ cd .. | |
424 |
|
410 | |||
425 | Test --tool parameter: |
|
411 | Test --tool parameter: | |
426 |
|
412 | |||
427 | $ hg init b |
|
413 | $ hg init b | |
428 | $ cd b |
|
414 | $ cd b | |
429 |
|
415 | |||
430 | $ echo c1 > c1 |
|
416 | $ echo c1 > c1 | |
431 | $ hg ci -Am c1 |
|
417 | $ hg ci -Am c1 | |
432 | adding c1 |
|
418 | adding c1 | |
433 |
|
419 | |||
434 | $ echo c2 > c2 |
|
420 | $ echo c2 > c2 | |
435 | $ hg ci -Am c2 |
|
421 | $ hg ci -Am c2 | |
436 | adding c2 |
|
422 | adding c2 | |
437 |
|
423 | |||
438 | $ hg up -q 0 |
|
424 | $ hg up -q 0 | |
439 | $ echo c2b > c2 |
|
425 | $ echo c2b > c2 | |
440 | $ hg ci -Am c2b |
|
426 | $ hg ci -Am c2b | |
441 | adding c2 |
|
427 | adding c2 | |
442 | created new head |
|
428 | created new head | |
443 |
|
429 | |||
444 | $ cd .. |
|
430 | $ cd .. | |
445 |
|
431 | |||
446 | $ hg clone -q -u . b b1 |
|
432 | $ hg clone -q -u . b b1 | |
447 | $ cd b1 |
|
433 | $ cd b1 | |
448 |
|
434 | |||
449 | $ hg rebase -s 2 -d 1 --tool internal:local |
|
435 | $ hg rebase -s 2 -d 1 --tool internal:local | |
450 | rebasing 2:e4e3f3546619 "c2b" (tip) |
|
436 | rebasing 2:e4e3f3546619 "c2b" (tip) | |
451 | note: rebase of 2:e4e3f3546619 created no changes to commit |
|
437 | note: rebase of 2:e4e3f3546619 created no changes to commit | |
452 | saved backup bundle to $TESTTMP/b1/.hg/strip-backup/e4e3f3546619-b0841178-backup.hg (glob) |
|
438 | saved backup bundle to $TESTTMP/b1/.hg/strip-backup/e4e3f3546619-b0841178-backup.hg (glob) | |
453 |
|
439 | |||
454 | $ hg cat c2 |
|
440 | $ hg cat c2 | |
455 | c2 |
|
441 | c2 | |
456 |
|
442 | |||
457 | $ cd .. |
|
443 | $ cd .. | |
458 |
|
444 | |||
459 |
|
445 | |||
460 | $ hg clone -q -u . b b2 |
|
446 | $ hg clone -q -u . b b2 | |
461 | $ cd b2 |
|
447 | $ cd b2 | |
462 |
|
448 | |||
463 | $ hg rebase -s 2 -d 1 --tool internal:other |
|
449 | $ hg rebase -s 2 -d 1 --tool internal:other | |
464 | rebasing 2:e4e3f3546619 "c2b" (tip) |
|
450 | rebasing 2:e4e3f3546619 "c2b" (tip) | |
465 | saved backup bundle to $TESTTMP/b2/.hg/strip-backup/e4e3f3546619-b0841178-backup.hg (glob) |
|
451 | saved backup bundle to $TESTTMP/b2/.hg/strip-backup/e4e3f3546619-b0841178-backup.hg (glob) | |
466 |
|
452 | |||
467 | $ hg cat c2 |
|
453 | $ hg cat c2 | |
468 | c2b |
|
454 | c2b | |
469 |
|
455 | |||
470 | $ cd .. |
|
456 | $ cd .. | |
471 |
|
457 | |||
472 |
|
458 | |||
473 | $ hg clone -q -u . b b3 |
|
459 | $ hg clone -q -u . b b3 | |
474 | $ cd b3 |
|
460 | $ cd b3 | |
475 |
|
461 | |||
476 | $ hg rebase -s 2 -d 1 --tool internal:fail |
|
462 | $ hg rebase -s 2 -d 1 --tool internal:fail | |
477 | rebasing 2:e4e3f3546619 "c2b" (tip) |
|
463 | rebasing 2:e4e3f3546619 "c2b" (tip) | |
478 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
464 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
479 | [1] |
|
465 | [1] | |
480 |
|
466 | |||
481 | $ hg summary |
|
467 | $ hg summary | |
482 | parent: 1:56daeba07f4b |
|
468 | parent: 1:56daeba07f4b | |
483 | c2 |
|
469 | c2 | |
484 | parent: 2:e4e3f3546619 tip |
|
470 | parent: 2:e4e3f3546619 tip | |
485 | c2b |
|
471 | c2b | |
486 | branch: default |
|
472 | branch: default | |
487 | commit: 1 modified, 1 unresolved (merge) |
|
473 | commit: 1 modified, 1 unresolved (merge) | |
488 | update: (current) |
|
474 | update: (current) | |
489 | phases: 3 draft |
|
475 | phases: 3 draft | |
490 | rebase: 0 rebased, 1 remaining (rebase --continue) |
|
476 | rebase: 0 rebased, 1 remaining (rebase --continue) | |
491 |
|
477 | |||
492 | $ hg resolve -l |
|
478 | $ hg resolve -l | |
493 | U c2 |
|
479 | U c2 | |
494 |
|
480 | |||
495 | $ hg resolve -m c2 |
|
481 | $ hg resolve -m c2 | |
496 | (no more unresolved files) |
|
482 | (no more unresolved files) | |
497 | continue: hg rebase --continue |
|
483 | continue: hg rebase --continue | |
498 | $ hg rebase -c --tool internal:fail |
|
484 | $ hg rebase -c --tool internal:fail | |
499 | rebasing 2:e4e3f3546619 "c2b" (tip) |
|
485 | rebasing 2:e4e3f3546619 "c2b" (tip) | |
500 | note: rebase of 2:e4e3f3546619 created no changes to commit |
|
486 | note: rebase of 2:e4e3f3546619 created no changes to commit | |
501 | saved backup bundle to $TESTTMP/b3/.hg/strip-backup/e4e3f3546619-b0841178-backup.hg (glob) |
|
487 | saved backup bundle to $TESTTMP/b3/.hg/strip-backup/e4e3f3546619-b0841178-backup.hg (glob) | |
502 |
|
488 | |||
503 | $ hg rebase -i |
|
489 | $ hg rebase -i | |
504 | abort: interactive history editing is supported by the 'histedit' extension (see "hg --config extensions.histedit= help -e histedit") |
|
490 | abort: interactive history editing is supported by the 'histedit' extension (see "hg --config extensions.histedit= help -e histedit") | |
505 | [255] |
|
491 | [255] | |
506 |
|
492 | |||
507 | $ hg rebase --interactive |
|
493 | $ hg rebase --interactive | |
508 | abort: interactive history editing is supported by the 'histedit' extension (see "hg --config extensions.histedit= help -e histedit") |
|
494 | abort: interactive history editing is supported by the 'histedit' extension (see "hg --config extensions.histedit= help -e histedit") | |
509 | [255] |
|
495 | [255] | |
510 |
|
496 | |||
511 | $ cd .. |
|
497 | $ cd .. | |
512 |
|
498 | |||
513 | No common ancestor |
|
499 | No common ancestor | |
514 |
|
500 | |||
515 | $ hg init separaterepo |
|
501 | $ hg init separaterepo | |
516 | $ cd separaterepo |
|
502 | $ cd separaterepo | |
517 | $ touch a |
|
503 | $ touch a | |
518 | $ hg commit -Aqm a |
|
504 | $ hg commit -Aqm a | |
519 | $ hg up -q null |
|
505 | $ hg up -q null | |
520 | $ touch b |
|
506 | $ touch b | |
521 | $ hg commit -Aqm b |
|
507 | $ hg commit -Aqm b | |
522 | $ hg rebase -d 0 |
|
508 | $ hg rebase -d 0 | |
523 | nothing to rebase from d7486e00c6f1 to 3903775176ed |
|
509 | nothing to rebase from d7486e00c6f1 to 3903775176ed | |
524 | [1] |
|
510 | [1] | |
525 | $ cd .. |
|
511 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now