comparison tests/test-rewind.t @ 3863:c31be22d1d90

rewind: update the working copy if it gets obsoleted If the working copy parent is rewinded, follow the rewind.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 17 Jun 2018 00:33:43 +0200
parents 8d3eed113b77
children 0254c96ce108
comparison
equal deleted inserted replaced
3862:8d3eed113b77 3863:c31be22d1d90
361 ---------------------------------------------------------------- 361 ----------------------------------------------------------------
362 362
363 $ hg rewind --hidden --to 'min(desc("c_B0"))' 363 $ hg rewind --hidden --to 'min(desc("c_B0"))'
364 rewinded to 1 changesets 364 rewinded to 1 changesets
365 (1 changesets obsoleted) 365 (1 changesets obsoleted)
366 working directory is now at d8b4471cfb3c
366 $ hg debugobsolete 367 $ hg debugobsolete
367 7e594302a05d3769b27be88fc3cdfd39d7498498 25c8f5ab0c3bb569ec672570f1a901be4c6f032b 0 (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '9', 'operation': 'amend', 'user': 'test'} 368 7e594302a05d3769b27be88fc3cdfd39d7498498 25c8f5ab0c3bb569ec672570f1a901be4c6f032b 0 (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '9', 'operation': 'amend', 'user': 'test'}
368 7e594302a05d3769b27be88fc3cdfd39d7498498 48acf2c0d9c8961859ce9a913671eb2adc9b057b 4 (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '34', 'operation': 'rewind', 'user': 'test'} 369 7e594302a05d3769b27be88fc3cdfd39d7498498 48acf2c0d9c8961859ce9a913671eb2adc9b057b 4 (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '34', 'operation': 'rewind', 'user': 'test'}
369 48acf2c0d9c8961859ce9a913671eb2adc9b057b 0 {579f120ba91885449adc92eedf48ef3569742cee} (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'} 370 48acf2c0d9c8961859ce9a913671eb2adc9b057b 0 {579f120ba91885449adc92eedf48ef3569742cee} (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'}
370 7e594302a05d3769b27be88fc3cdfd39d7498498 d8b4471cfb3caa290e0a78ae6bc57d78656c9075 4 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '34', 'operation': 'rewind', 'user': 'test'} 371 7e594302a05d3769b27be88fc3cdfd39d7498498 d8b4471cfb3caa290e0a78ae6bc57d78656c9075 4 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '34', 'operation': 'rewind', 'user': 'test'}
371 25c8f5ab0c3bb569ec672570f1a901be4c6f032b d8b4471cfb3caa290e0a78ae6bc57d78656c9075 0 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '43', 'operation': 'rewind', 'user': 'test'} 372 25c8f5ab0c3bb569ec672570f1a901be4c6f032b d8b4471cfb3caa290e0a78ae6bc57d78656c9075 0 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '43', 'operation': 'rewind', 'user': 'test'}
372 $ hg obslog --rev 'desc("c_B0")' 373 $ hg obslog --rev 'desc("c_B0")'
373 o d8b4471cfb3c (5) c_B0 374 @ d8b4471cfb3c (5) c_B0
374 |\ 375 |\
375 @ | 25c8f5ab0c3b (3) c_B1 376 x | 25c8f5ab0c3b (3) c_B1
376 |/ rewritten(description, meta, date, content) as d8b4471cfb3c using rewind by test (Thu Jan 01 00:00:02 1970 +0000) 377 |/ rewritten(description, meta, date, content) as d8b4471cfb3c using rewind by test (Thu Jan 01 00:00:02 1970 +0000)
377 | 378 |
378 x 7e594302a05d (2) c_B0 379 x 7e594302a05d (2) c_B0
379 rewritten(description, content) as 25c8f5ab0c3b using amend by test (Thu Jan 01 00:00:01 1970 +0000) 380 rewritten(description, content) as 25c8f5ab0c3b using amend by test (Thu Jan 01 00:00:01 1970 +0000)
380 rewritten(meta, date) as 48acf2c0d9c8 using rewind by test (Thu Jan 01 00:00:01 1970 +0000) 381 rewritten(meta, date) as 48acf2c0d9c8 using rewind by test (Thu Jan 01 00:00:01 1970 +0000)
381 rewritten(meta, date) as d8b4471cfb3c using rewind by test (Thu Jan 01 00:00:02 1970 +0000) 382 rewritten(meta, date) as d8b4471cfb3c using rewind by test (Thu Jan 01 00:00:02 1970 +0000)
382 383
383 $ hg log -G 384 $ hg log -G
384 o changeset: 5:d8b4471cfb3c 385 @ changeset: 5:d8b4471cfb3c
385 | tag: tip 386 | tag: tip
386 | parent: 1:579f120ba918 387 | parent: 1:579f120ba918
387 | user: test 388 | user: test
388 | date: Thu Jan 01 00:00:02 1970 +0000 389 | date: Thu Jan 01 00:00:02 1970 +0000
389 | summary: c_B0 390 | summary: c_B0
390 | 391 |
391 | @ changeset: 3:25c8f5ab0c3b
392 |/ parent: 1:579f120ba918
393 | user: test
394 | date: Thu Jan 01 00:00:00 1970 +0000
395 | obsolete: rewritten using rewind as 5:d8b4471cfb3c
396 | summary: c_B1
397 |
398 o changeset: 1:579f120ba918 392 o changeset: 1:579f120ba918
399 | user: test 393 | user: test
400 | date: Thu Jan 01 00:00:00 1970 +0000 394 | date: Thu Jan 01 00:00:00 1970 +0000
401 | summary: c_A0 395 | summary: c_A0
402 | 396 |
404 user: test 398 user: test
405 date: Thu Jan 01 00:00:00 1970 +0000 399 date: Thu Jan 01 00:00:00 1970 +0000
406 summary: c_ROOT 400 summary: c_ROOT
407 401
408 $ hg log -G --hidden 402 $ hg log -G --hidden
409 o changeset: 5:d8b4471cfb3c 403 @ changeset: 5:d8b4471cfb3c
410 | tag: tip 404 | tag: tip
411 | parent: 1:579f120ba918 405 | parent: 1:579f120ba918
412 | user: test 406 | user: test
413 | date: Thu Jan 01 00:00:02 1970 +0000 407 | date: Thu Jan 01 00:00:02 1970 +0000
414 | summary: c_B0 408 | summary: c_B0
418 | user: test 412 | user: test
419 | date: Thu Jan 01 00:00:01 1970 +0000 413 | date: Thu Jan 01 00:00:01 1970 +0000
420 | obsolete: pruned using prune 414 | obsolete: pruned using prune
421 | summary: c_B0 415 | summary: c_B0
422 | 416 |
423 | @ changeset: 3:25c8f5ab0c3b 417 | x changeset: 3:25c8f5ab0c3b
424 |/ parent: 1:579f120ba918 418 |/ parent: 1:579f120ba918
425 | user: test 419 | user: test
426 | date: Thu Jan 01 00:00:00 1970 +0000 420 | date: Thu Jan 01 00:00:00 1970 +0000
427 | obsolete: rewritten using rewind as 5:d8b4471cfb3c 421 | obsolete: rewritten using rewind as 5:d8b4471cfb3c
428 | summary: c_B1 422 | summary: c_B1