##// END OF EJS Templates
rebase: don't preserve most extra fields...
Siddharth Agarwal -
r27977:b698abf9 3.7.1 stable
parent child Browse files
Show More
@@ -621,10 +621,7 b' def concludenode(repo, rev, p1, p2, comm'
621 621 if commitmsg is None:
622 622 commitmsg = ctx.description()
623 623 keepbranch = keepbranches and repo[p1].branch() != ctx.branch()
624 extra = ctx.extra().copy()
625 if not keepbranches:
626 del extra['branch']
627 extra['rebase_source'] = ctx.hex()
624 extra = {'rebase_source': ctx.hex()}
628 625 if extrafn:
629 626 extrafn(ctx, extra)
630 627
@@ -152,14 +152,6 b' stabilise'
152 152 rebasing 11:c13eb81022ca "f"
153 153 $ hg up tip -q
154 154
155 check that extra has accumulated from histedit and rebase
156
157 $ hg log -T '{extras % "{key}={value}\n"}\n' -r tip
158 branch=default
159 histedit_source=cacdfd884a9321ec4e1de275ef3949fa953a1f83
160 rebase_source=c13eb81022caa686a369223fe7f926bc4f7db576
161
162
163 155 Test dropping of changeset on the top of the stack
164 156 -------------------------------------------------------
165 157
@@ -173,7 +165,7 b' dropped changeset to be hidden.'
173 165 $ cd droplast
174 166 $ hg histedit -r '40db8afa467b' --commands - << EOF
175 167 > pick 40db8afa467b 10 c
176 > drop 947ece25170f 11 f
168 > drop b449568bf7fc 11 f
177 169 > EOF
178 170 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
179 171 $ hg log -G
@@ -221,7 +213,7 b' Check that histedit respect immutability'
221 213 $ hg ph -pv '.^'
222 214 phase changed for 2 changesets
223 215 $ hg log -G
224 @ 13:947ece25170f (draft) f
216 @ 13:b449568bf7fc (draft) f
225 217 |
226 218 o 12:40db8afa467b (public) c
227 219 |
@@ -243,17 +235,17 b' Prepare further testing'
243 235 > done
244 236 $ hg phase --force --secret .~2
245 237 $ hg log -G
246 @ 18:14bda137d5b3 (secret) k
238 @ 18:ee118ab9fa44 (secret) k
247 239 |
248 o 17:c62e7241a4f2 (secret) j
240 o 17:3a6c53ee7f3d (secret) j
249 241 |
250 o 16:9cd3934e05af (secret) i
242 o 16:b605fb7503f2 (secret) i
251 243 |
252 o 15:ee4a24fc4dfa (draft) h
244 o 15:7395e1ff83bd (draft) h
253 245 |
254 o 14:d22905de3528 (draft) g
246 o 14:6b70183d2492 (draft) g
255 247 |
256 o 13:947ece25170f (draft) f
248 o 13:b449568bf7fc (draft) f
257 249 |
258 250 o 12:40db8afa467b (public) c
259 251 |
@@ -271,33 +263,33 b' New-commit as draft (default)'
271 263
272 264 $ cp -r base simple-draft
273 265 $ cd simple-draft
274 $ hg histedit -r '947ece25170f' --commands - << EOF
275 > edit 947ece25170f 11 f
276 > pick d22905de3528 12 g
277 > pick ee4a24fc4dfa 13 h
278 > pick 9cd3934e05af 14 i
279 > pick c62e7241a4f2 15 j
280 > pick 14bda137d5b3 16 k
266 $ hg histedit -r 'b449568bf7fc' --commands - << EOF
267 > edit b449568bf7fc 11 f
268 > pick 6b70183d2492 12 g
269 > pick 7395e1ff83bd 13 h
270 > pick b605fb7503f2 14 i
271 > pick 3a6c53ee7f3d 15 j
272 > pick ee118ab9fa44 16 k
281 273 > EOF
282 274 0 files updated, 0 files merged, 6 files removed, 0 files unresolved
283 275 adding f
284 Editing (947ece25170f), you may commit or record as needed now.
276 Editing (b449568bf7fc), you may commit or record as needed now.
285 277 (hg histedit --continue to resume)
286 278 [1]
287 279 $ echo f >> f
288 280 $ hg histedit --continue
289 281 $ hg log -G
290 @ 24:12925f763c90 (secret) k
282 @ 24:12e89af74238 (secret) k
291 283 |
292 o 23:4545a6e77442 (secret) j
284 o 23:636a8687b22e (secret) j
293 285 |
294 o 22:d947a0798e76 (secret) i
286 o 22:ccaf0a38653f (secret) i
295 287 |
296 o 21:28fb35ae4ebb (draft) h
288 o 21:11a89d1c2613 (draft) h
297 289 |
298 o 20:10b22a5a9645 (draft) g
290 o 20:c1dec7ca82ea (draft) g
299 291 |
300 o 19:c5a1db4a69f5 (draft) f
292 o 19:087281e68428 (draft) f
301 293 |
302 294 o 12:40db8afa467b (public) c
303 295 |
@@ -314,33 +306,33 b' New-commit as draft (default)'
314 306 > [phases]
315 307 > new-commit=secret
316 308 > EOF
317 $ hg histedit -r '947ece25170f' --commands - << EOF
318 > edit 947ece25170f 11 f
319 > pick d22905de3528 12 g
320 > pick ee4a24fc4dfa 13 h
321 > pick 9cd3934e05af 14 i
322 > pick c62e7241a4f2 15 j
323 > pick 14bda137d5b3 16 k
309 $ hg histedit -r 'b449568bf7fc' --commands - << EOF
310 > edit b449568bf7fc 11 f
311 > pick 6b70183d2492 12 g
312 > pick 7395e1ff83bd 13 h
313 > pick b605fb7503f2 14 i
314 > pick 3a6c53ee7f3d 15 j
315 > pick ee118ab9fa44 16 k
324 316 > EOF
325 317 0 files updated, 0 files merged, 6 files removed, 0 files unresolved
326 318 adding f
327 Editing (947ece25170f), you may commit or record as needed now.
319 Editing (b449568bf7fc), you may commit or record as needed now.
328 320 (hg histedit --continue to resume)
329 321 [1]
330 322 $ echo f >> f
331 323 $ hg histedit --continue
332 324 $ hg log -G
333 @ 24:12925f763c90 (secret) k
325 @ 24:12e89af74238 (secret) k
334 326 |
335 o 23:4545a6e77442 (secret) j
327 o 23:636a8687b22e (secret) j
336 328 |
337 o 22:d947a0798e76 (secret) i
329 o 22:ccaf0a38653f (secret) i
338 330 |
339 o 21:28fb35ae4ebb (draft) h
331 o 21:11a89d1c2613 (draft) h
340 332 |
341 o 20:10b22a5a9645 (draft) g
333 o 20:c1dec7ca82ea (draft) g
342 334 |
343 o 19:c5a1db4a69f5 (draft) f
335 o 19:087281e68428 (draft) f
344 336 |
345 337 o 12:40db8afa467b (public) c
346 338 |
@@ -357,27 +349,27 b' It seems more important to present the s'
357 349
358 350 $ cp -r base reorder
359 351 $ cd reorder
360 $ hg histedit -r '947ece25170f' --commands - << EOF
361 > pick 947ece25170f 11 f
362 > pick c62e7241a4f2 15 j
363 > pick d22905de3528 12 g
364 > pick 9cd3934e05af 14 i
365 > pick ee4a24fc4dfa 13 h
366 > pick 14bda137d5b3 16 k
352 $ hg histedit -r 'b449568bf7fc' --commands - << EOF
353 > pick b449568bf7fc 11 f
354 > pick 3a6c53ee7f3d 15 j
355 > pick 6b70183d2492 12 g
356 > pick b605fb7503f2 14 i
357 > pick 7395e1ff83bd 13 h
358 > pick ee118ab9fa44 16 k
367 359 > EOF
368 360 0 files updated, 0 files merged, 5 files removed, 0 files unresolved
369 361 $ hg log -G
370 @ 23:9e712162b2c1 (secret) k
362 @ 23:558246857888 (secret) k
371 363 |
372 o 22:490861543602 (secret) h
364 o 22:28bd44768535 (secret) h
373 365 |
374 o 21:86aeda50b70d (secret) i
366 o 21:d5395202aeb9 (secret) i
375 367 |
376 o 20:b2fa360bc090 (secret) g
368 o 20:21edda8e341b (secret) g
377 369 |
378 o 19:e10fb4e3eb8e (secret) j
370 o 19:5ab64f3a4832 (secret) j
379 371 |
380 o 13:947ece25170f (draft) f
372 o 13:b449568bf7fc (draft) f
381 373 |
382 374 o 12:40db8afa467b (public) c
383 375 |
@@ -399,13 +391,13 b' Note that there is a few reordering in t'
399 391 > [phases]
400 392 > new-commit=secret
401 393 > EOF
402 $ hg histedit -r '947ece25170f' --commands - << EOF
403 > pick ee4a24fc4dfa 13 h
404 > fold 947ece25170f 11 f
405 > pick d22905de3528 12 g
406 > fold c62e7241a4f2 15 j
407 > pick 9cd3934e05af 14 i
408 > fold 14bda137d5b3 16 k
394 $ hg histedit -r 'b449568bf7fc' --commands - << EOF
395 > pick 7395e1ff83bd 13 h
396 > fold b449568bf7fc 11 f
397 > pick 6b70183d2492 12 g
398 > fold 3a6c53ee7f3d 15 j
399 > pick b605fb7503f2 14 i
400 > fold ee118ab9fa44 16 k
409 401 > EOF
410 402 0 files updated, 0 files merged, 6 files removed, 0 files unresolved
411 403 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
@@ -415,29 +407,29 b' Note that there is a few reordering in t'
415 407 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
416 408 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
417 409 $ hg log -G
418 @ 27:769e8ee8708e (secret) i
410 @ 27:f9daec13fb98 (secret) i
419 411 |
420 o 24:3de6dbab1b62 (secret) g
412 o 24:49807617f46a (secret) g
421 413 |
422 o 21:1d51647632b2 (draft) h
414 o 21:050280826e04 (draft) h
423 415 |
424 416 o 12:40db8afa467b (public) c
425 417 |
426 418 o 0:cb9a9f314b8b (public) a
427 419
428 $ hg co 3de6dbab1b62
420 $ hg co 49807617f46a
429 421 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
430 422 $ echo wat >> wat
431 423 $ hg add wat
432 424 $ hg ci -m 'add wat'
433 425 created new head
434 $ hg merge 769e8ee8708e
426 $ hg merge f9daec13fb98
435 427 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
436 428 (branch merge, don't forget to commit)
437 429 $ hg ci -m 'merge'
438 430 $ echo not wat > wat
439 431 $ hg ci -m 'modify wat'
440 $ hg histedit 1d51647632b2
432 $ hg histedit 050280826e04
441 433 abort: cannot edit history that contains merges
442 434 [255]
443 435 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now