Show More
@@ -1,317 +1,317 b'' | |||
|
1 | 1 | $ cat >> $HGRCPATH <<EOF |
|
2 | 2 | > [extensions] |
|
3 | 3 | > rebase= |
|
4 | 4 | > |
|
5 | 5 | > [alias] |
|
6 | 6 | > tglog = log -G --template "{rev}: {node|short} '{desc}'\n" |
|
7 | 7 | > |
|
8 | 8 | > [extensions] |
|
9 | 9 | > drawdag=$TESTDIR/drawdag.py |
|
10 | 10 | > EOF |
|
11 | 11 | |
|
12 | 12 | Rebasing D onto B detaching from C (one commit): |
|
13 | 13 | |
|
14 | 14 | $ hg init a1 |
|
15 | 15 | $ cd a1 |
|
16 | 16 | |
|
17 | 17 | $ hg debugdrawdag <<EOF |
|
18 | 18 | > D |
|
19 | 19 | > | |
|
20 | 20 | > C B |
|
21 | 21 | > |/ |
|
22 | 22 | > A |
|
23 | 23 | > EOF |
|
24 | 24 | $ hg phase --force --secret D |
|
25 | 25 | |
|
26 | 26 | $ hg rebase -s D -d B |
|
27 | 27 | rebasing 3:e7b3f00ed42e "D" (D tip) |
|
28 | 28 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/e7b3f00ed42e-6f368371-rebase.hg |
|
29 | 29 | |
|
30 | 30 | $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n" |
|
31 | 31 | o 3:secret 'D' |
|
32 | 32 | | |
|
33 | 33 | | o 2:draft 'C' |
|
34 | 34 | | | |
|
35 | 35 | o | 1:draft 'B' |
|
36 | 36 | |/ |
|
37 | 37 | o 0:draft 'A' |
|
38 | 38 | |
|
39 | 39 | $ hg manifest --rev tip |
|
40 | 40 | A |
|
41 | 41 | B |
|
42 | 42 | D |
|
43 | 43 | |
|
44 | 44 | $ cd .. |
|
45 | 45 | |
|
46 | 46 | |
|
47 | 47 | Rebasing D onto B detaching from C (two commits): |
|
48 | 48 | |
|
49 | 49 | $ hg init a2 |
|
50 | 50 | $ cd a2 |
|
51 | 51 | |
|
52 | 52 | $ hg debugdrawdag <<EOF |
|
53 | 53 | > E |
|
54 | 54 | > | |
|
55 | 55 | > D |
|
56 | 56 | > | |
|
57 | 57 | > C B |
|
58 | 58 | > |/ |
|
59 | 59 | > A |
|
60 | 60 | > EOF |
|
61 | 61 | |
|
62 | 62 | $ hg rebase -s D -d B |
|
63 | 63 | rebasing 3:e7b3f00ed42e "D" (D) |
|
64 | 64 | rebasing 4:69a34c08022a "E" (E tip) |
|
65 | 65 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/e7b3f00ed42e-a2ec7cea-rebase.hg |
|
66 | 66 | |
|
67 | 67 | $ hg tglog |
|
68 | 68 | o 4: ee79e0744528 'E' |
|
69 | 69 | | |
|
70 | 70 | o 3: 10530e1d72d9 'D' |
|
71 | 71 | | |
|
72 | 72 | | o 2: dc0947a82db8 'C' |
|
73 | 73 | | | |
|
74 | 74 | o | 1: 112478962961 'B' |
|
75 | 75 | |/ |
|
76 | 76 | o 0: 426bada5c675 'A' |
|
77 | 77 | |
|
78 | 78 | $ hg manifest --rev tip |
|
79 | 79 | A |
|
80 | 80 | B |
|
81 | 81 | D |
|
82 | 82 | E |
|
83 | 83 | |
|
84 | 84 | $ cd .. |
|
85 | 85 | |
|
86 | 86 | Rebasing C onto B using detach (same as not using it): |
|
87 | 87 | |
|
88 | 88 | $ hg init a3 |
|
89 | 89 | $ cd a3 |
|
90 | 90 | |
|
91 | 91 | $ hg debugdrawdag <<EOF |
|
92 | 92 | > D |
|
93 | 93 | > | |
|
94 | 94 | > C B |
|
95 | 95 | > |/ |
|
96 | 96 | > A |
|
97 | 97 | > EOF |
|
98 | 98 | |
|
99 | 99 | $ hg rebase -s C -d B |
|
100 | 100 | rebasing 2:dc0947a82db8 "C" (C) |
|
101 | 101 | rebasing 3:e7b3f00ed42e "D" (D tip) |
|
102 | 102 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/dc0947a82db8-b8481714-rebase.hg |
|
103 | 103 | |
|
104 | 104 | $ hg tglog |
|
105 | 105 | o 3: 7375f3dbfb0f 'D' |
|
106 | 106 | | |
|
107 | 107 | o 2: bbfdd6cb49aa 'C' |
|
108 | 108 | | |
|
109 | 109 | o 1: 112478962961 'B' |
|
110 | 110 | | |
|
111 | 111 | o 0: 426bada5c675 'A' |
|
112 | 112 | |
|
113 | 113 | $ hg manifest --rev tip |
|
114 | 114 | A |
|
115 | 115 | B |
|
116 | 116 | C |
|
117 | 117 | D |
|
118 | 118 | |
|
119 | 119 | $ cd .. |
|
120 | 120 | |
|
121 | 121 | |
|
122 | 122 | Rebasing D onto B detaching from C and collapsing: |
|
123 | 123 | |
|
124 | 124 | $ hg init a4 |
|
125 | 125 | $ cd a4 |
|
126 | 126 | |
|
127 | 127 | $ hg debugdrawdag <<EOF |
|
128 | 128 | > E |
|
129 | 129 | > | |
|
130 | 130 | > D |
|
131 | 131 | > | |
|
132 | 132 | > C B |
|
133 | 133 | > |/ |
|
134 | 134 | > A |
|
135 | 135 | > EOF |
|
136 | 136 | $ hg phase --force --secret E |
|
137 | 137 | |
|
138 | 138 | $ hg rebase --collapse -s D -d B |
|
139 | 139 | rebasing 3:e7b3f00ed42e "D" (D) |
|
140 | 140 | rebasing 4:69a34c08022a "E" (E tip) |
|
141 | 141 | saved backup bundle to $TESTTMP/a4/.hg/strip-backup/e7b3f00ed42e-a2ec7cea-rebase.hg |
|
142 | 142 | |
|
143 | 143 | $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n" |
|
144 | 144 | o 3:secret 'Collapsed revision |
|
145 | 145 | | * D |
|
146 | 146 | | * E' |
|
147 | 147 | | o 2:draft 'C' |
|
148 | 148 | | | |
|
149 | 149 | o | 1:draft 'B' |
|
150 | 150 | |/ |
|
151 | 151 | o 0:draft 'A' |
|
152 | 152 | |
|
153 | 153 | $ hg manifest --rev tip |
|
154 | 154 | A |
|
155 | 155 | B |
|
156 | 156 | D |
|
157 | 157 | E |
|
158 | 158 | |
|
159 | 159 | $ cd .. |
|
160 | 160 | |
|
161 | 161 | Rebasing across null as ancestor |
|
162 | 162 | $ hg init a5 |
|
163 | 163 | $ cd a5 |
|
164 | 164 | |
|
165 | 165 | $ hg debugdrawdag <<EOF |
|
166 | 166 | > E |
|
167 | 167 | > | |
|
168 | 168 | > D |
|
169 | 169 | > | |
|
170 | 170 | > C |
|
171 | 171 | > | |
|
172 | 172 | > A B |
|
173 | 173 | > EOF |
|
174 | 174 | |
|
175 | 175 | $ hg rebase -s C -d B |
|
176 | 176 | rebasing 2:dc0947a82db8 "C" (C) |
|
177 | 177 | rebasing 3:e7b3f00ed42e "D" (D) |
|
178 | 178 | rebasing 4:69a34c08022a "E" (E tip) |
|
179 | 179 | saved backup bundle to $TESTTMP/a5/.hg/strip-backup/dc0947a82db8-3eefec98-rebase.hg |
|
180 | 180 | |
|
181 | 181 | $ hg tglog |
|
182 | 182 | o 4: e3d0c70d606d 'E' |
|
183 | 183 | | |
|
184 | 184 | o 3: e9153d36a1af 'D' |
|
185 | 185 | | |
|
186 | 186 | o 2: a7ac28b870a8 'C' |
|
187 | 187 | | |
|
188 | 188 | o 1: fc2b737bb2e5 'B' |
|
189 | 189 | |
|
190 | 190 | o 0: 426bada5c675 'A' |
|
191 | 191 | |
|
192 | 192 | $ hg rebase -d 1 -s 3 |
|
193 | 193 | rebasing 3:e9153d36a1af "D" |
|
194 | 194 | rebasing 4:e3d0c70d606d "E" (tip) |
|
195 | 195 | saved backup bundle to $TESTTMP/a5/.hg/strip-backup/e9153d36a1af-db7388ed-rebase.hg |
|
196 | 196 | $ hg tglog |
|
197 | 197 | o 4: 2c24e540eccd 'E' |
|
198 | 198 | | |
|
199 | 199 | o 3: 73f786ed52ff 'D' |
|
200 | 200 | | |
|
201 | 201 | | o 2: a7ac28b870a8 'C' |
|
202 | 202 | |/ |
|
203 | 203 | o 1: fc2b737bb2e5 'B' |
|
204 | 204 | |
|
205 | 205 | o 0: 426bada5c675 'A' |
|
206 | 206 | |
|
207 | 207 | $ cd .. |
|
208 | 208 | |
|
209 | 209 | Verify that target is not selected as external rev (issue3085) |
|
210 | 210 | |
|
211 | 211 | $ hg init a6 |
|
212 | 212 | $ cd a6 |
|
213 | 213 | |
|
214 | 214 | $ hg debugdrawdag <<EOF |
|
215 | 215 | > H |
|
216 | 216 | > | G |
|
217 | 217 | > |/| |
|
218 | 218 | > F E |
|
219 | 219 | > |/ |
|
220 | 220 | > A |
|
221 | 221 | > EOF |
|
222 | 222 | $ hg up -q G |
|
223 | 223 | |
|
224 | 224 | $ echo "I" >> E |
|
225 | 225 | $ hg ci -m "I" |
|
226 | 226 | $ hg tag --local I |
|
227 | 227 | $ hg merge H |
|
228 | 228 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
229 | 229 | (branch merge, don't forget to commit) |
|
230 | 230 | $ hg ci -m "Merge" |
|
231 | 231 | $ echo "J" >> F |
|
232 | 232 | $ hg ci -m "J" |
|
233 | 233 | $ hg tglog |
|
234 | 234 | @ 7: c6aaf0d259c0 'J' |
|
235 | 235 | | |
|
236 | 236 | o 6: 0cfbc7e8faaf 'Merge' |
|
237 | 237 | |\ |
|
238 | 238 | | o 5: b92d164ad3cb 'I' |
|
239 | 239 | | | |
|
240 | 240 | o | 4: 4ea5b230dea3 'H' |
|
241 | 241 | | | |
|
242 | 242 | | o 3: c6001eacfde5 'G' |
|
243 | 243 | |/| |
|
244 | 244 | o | 2: 8908a377a434 'F' |
|
245 | 245 | | | |
|
246 | 246 | | o 1: 7fb047a69f22 'E' |
|
247 | 247 | |/ |
|
248 | 248 | o 0: 426bada5c675 'A' |
|
249 | 249 | |
|
250 | 250 | $ hg rebase -s I -d H --collapse --config ui.merge=internal:other |
|
251 | 251 | rebasing 5:b92d164ad3cb "I" (I) |
|
252 | 252 | rebasing 6:0cfbc7e8faaf "Merge" |
|
253 | 253 | rebasing 7:c6aaf0d259c0 "J" (tip) |
|
254 | 254 | saved backup bundle to $TESTTMP/a6/.hg/strip-backup/b92d164ad3cb-88fd7ab7-rebase.hg |
|
255 | 255 | |
|
256 | 256 | $ hg tglog |
|
257 | 257 | @ 5: 65079693dac4 'Collapsed revision |
|
258 | 258 | | * I |
|
259 | 259 | | * Merge |
|
260 | 260 | | * J' |
|
261 | 261 | o 4: 4ea5b230dea3 'H' |
|
262 | 262 | | |
|
263 | 263 | | o 3: c6001eacfde5 'G' |
|
264 | 264 | |/| |
|
265 | 265 | o | 2: 8908a377a434 'F' |
|
266 | 266 | | | |
|
267 | 267 | | o 1: 7fb047a69f22 'E' |
|
268 | 268 | |/ |
|
269 | 269 | o 0: 426bada5c675 'A' |
|
270 | 270 | |
|
271 | 271 | |
|
272 | 272 | $ hg log --rev tip |
|
273 | 273 | changeset: 5:65079693dac4 |
|
274 | 274 | tag: tip |
|
275 | 275 | user: test |
|
276 | 276 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
277 | 277 | summary: Collapsed revision |
|
278 | 278 | |
|
279 | 279 | |
|
280 | 280 | $ cd .. |
|
281 | 281 | |
|
282 | 282 | Ensure --continue restores a correct state (issue3046) and phase: |
|
283 | 283 | $ hg init a7 |
|
284 | 284 | $ cd a7 |
|
285 | 285 | |
|
286 | 286 | $ hg debugdrawdag <<EOF |
|
287 | 287 | > C B |
|
288 | 288 | > |/ |
|
289 | 289 | > A |
|
290 | 290 | > EOF |
|
291 | 291 | $ hg up -q C |
|
292 | 292 | $ echo 'B2' > B |
|
293 | 293 | $ hg ci -A -m 'B2' |
|
294 | 294 | adding B |
|
295 | 295 | $ hg phase --force --secret . |
|
296 |
$ hg rebase -s . -d B --config ui.merge=internal: |
|
|
296 | $ hg rebase -s . -d B --config ui.merge=internal:merge | |
|
297 | 297 | rebasing 3:17b4880d2402 "B2" (tip) |
|
298 | 298 | merging B |
|
299 | 299 | warning: conflicts while merging B! (edit, then use 'hg resolve --mark') |
|
300 | 300 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
301 | 301 | [1] |
|
302 | 302 | $ hg resolve --all -t internal:local |
|
303 | 303 | (no more unresolved files) |
|
304 | 304 | continue: hg rebase --continue |
|
305 | 305 | $ hg rebase -c |
|
306 | 306 | rebasing 3:17b4880d2402 "B2" (tip) |
|
307 | 307 | note: rebase of 3:17b4880d2402 created no changes to commit |
|
308 | 308 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/17b4880d2402-1ae1f6cc-rebase.hg |
|
309 | 309 | $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n" |
|
310 | 310 | o 2:draft 'C' |
|
311 | 311 | | |
|
312 | 312 | | @ 1:draft 'B' |
|
313 | 313 | |/ |
|
314 | 314 | o 0:draft 'A' |
|
315 | 315 | |
|
316 | 316 | |
|
317 | 317 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now