comparison tests/test-uncommit-interactive.t @ 6665:d2b90c9e5829 stable

uncommit: set uncommit_source extra consistently in interactive mode Previously, the uncommit_source extra was only explicitly set on the temporary changeset created during the uncommit command. Due to a contract mismatch because the extra() method returned a dict that might be reused for multiple callers and this call site expected a fresh dict, the resulting changeset produced by the uncommit command might or might not have had the correct extra nonetheless. This changeset ensures that it will be set consistently. There is a discussion whether the extra() method (in core) should always return a fresh dict. Independent of the outcome of the discussion, this fix should work. I checked that the tests work no matter whether extra() returns a fresh dict or a reused one (current core behavior).
author Manuel Jacob <me@manueljacob.de>
date Thu, 01 Feb 2024 19:13:24 +0100
parents e20841870e51
children a77b939c79e1
comparison
equal deleted inserted replaced
6664:e20841870e51 6665:d2b90c9e5829
270 270
271 patching file a 271 patching file a
272 Hunk #1 succeeded at 2 with fuzz 1 (offset 0 lines). 272 Hunk #1 succeeded at 2 with fuzz 1 (offset 0 lines).
273 273
274 $ hg diff 274 $ hg diff
275 diff -r 46e35360be47 a 275 diff -r ef651ea03f87 a
276 --- a/a Thu Jan 01 00:00:00 1970 +0000 276 --- a/a Thu Jan 01 00:00:00 1970 +0000
277 +++ b/a Thu Jan 01 00:00:00 1970 +0000 277 +++ b/a Thu Jan 01 00:00:00 1970 +0000
278 @@ -1,3 +1,6 @@ 278 @@ -1,3 +1,6 @@
279 +-2 279 +-2
280 +-1 280 +-1
287 4 287 4
288 5 288 5
289 +babar 289 +babar
290 290
291 $ hg exp -T '{extras|json}\n' 291 $ hg exp -T '{extras|json}\n'
292 {"branch": "default", "uncommit_source": "f70fb463d5bf"} 292 {"branch": "default", "uncommit_source": "678a59e5ff90"}
293 293
294 $ hg exp 294 $ hg exp
295 # HG changeset patch 295 # HG changeset patch
296 # User test 296 # User test
297 # Date 0 0 297 # Date 0 0
298 # Thu Jan 01 00:00:00 1970 +0000 298 # Thu Jan 01 00:00:00 1970 +0000
299 # Node ID 46e35360be473bf761bedf3d05de4a68ffd9d9f8 299 # Node ID ef651ea03f873a6d70aeeb9ac351d4f65c84fb3b
300 # Parent 7733902a8d94c789ca81d866bea1893d79442db6 300 # Parent 7733902a8d94c789ca81d866bea1893d79442db6
301 another one 301 another one
302 302
303 diff -r 7733902a8d94 -r 46e35360be47 a 303 diff -r 7733902a8d94 -r ef651ea03f87 a
304 --- a/a Thu Jan 01 00:00:00 1970 +0000 304 --- a/a Thu Jan 01 00:00:00 1970 +0000
305 +++ b/a Thu Jan 01 00:00:00 1970 +0000 305 +++ b/a Thu Jan 01 00:00:00 1970 +0000
306 @@ -1,5 +1,7 @@ 306 @@ -1,5 +1,7 @@
307 1 307 1
308 2 308 2
316 316
317 $ hg debugobsolete 317 $ hg debugobsolete
318 e9635f4beaf11f64a07ccc74684092b144c53d89 0 {7733902a8d94c789ca81d866bea1893d79442db6} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'uncommit', 'user': 'test'} 318 e9635f4beaf11f64a07ccc74684092b144c53d89 0 {7733902a8d94c789ca81d866bea1893d79442db6} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'uncommit', 'user': 'test'}
319 f70fb463d5bf9f0ffd38f105521d96e9f2591bc1 678a59e5ff90754d5e94719bd82ad169be773c21 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'note': 'note on amend --extract', 'operation': 'uncommit', 'user': 'test'} 319 f70fb463d5bf9f0ffd38f105521d96e9f2591bc1 678a59e5ff90754d5e94719bd82ad169be773c21 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'note': 'note on amend --extract', 'operation': 'uncommit', 'user': 'test'}
320 7ca9935a62f11b39b60c7fb8861377c7d45b3e99 0 {7733902a8d94c789ca81d866bea1893d79442db6} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'uncommit', 'user': 'test'} 320 7ca9935a62f11b39b60c7fb8861377c7d45b3e99 0 {7733902a8d94c789ca81d866bea1893d79442db6} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'uncommit', 'user': 'test'}
321 678a59e5ff90754d5e94719bd82ad169be773c21 46e35360be473bf761bedf3d05de4a68ffd9d9f8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'note': 'testing uncommit on dirty wdir', 'operation': 'uncommit', 'user': 'test'} 321 678a59e5ff90754d5e94719bd82ad169be773c21 ef651ea03f873a6d70aeeb9ac351d4f65c84fb3b 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'note': 'testing uncommit on dirty wdir', 'operation': 'uncommit', 'user': 'test'}
322 $ hg obslog 322 $ hg obslog
323 @ 46e35360be47 (5) another one 323 @ ef651ea03f87 (5) another one
324 | amended(content) from 678a59e5ff90 using uncommit by test (Thu Jan 01 00:00:00 1970 +0000) 324 | amended(content) from 678a59e5ff90 using uncommit by test (Thu Jan 01 00:00:00 1970 +0000)
325 | note: testing uncommit on dirty wdir 325 | note: testing uncommit on dirty wdir
326 | 326 |
327 x 678a59e5ff90 (3) another one 327 x 678a59e5ff90 (3) another one
328 | amended(content) from f70fb463d5bf using uncommit by test (Thu Jan 01 00:00:00 1970 +0000) 328 | amended(content) from f70fb463d5bf using uncommit by test (Thu Jan 01 00:00:00 1970 +0000)
333 333
334 Push the changes back to the commit and more commits for more testing 334 Push the changes back to the commit and more commits for more testing
335 335
336 $ hg amend 336 $ hg amend
337 $ hg exp -T '{extras|json}\n' 337 $ hg exp -T '{extras|json}\n'
338 {"amend_source": "46e35360be473bf761bedf3d05de4a68ffd9d9f8", "branch": "default", "uncommit_source": "f70fb463d5bf"} 338 {"amend_source": "ef651ea03f873a6d70aeeb9ac351d4f65c84fb3b", "branch": "default", "uncommit_source": "678a59e5ff90"}
339 $ glog 339 $ glog
340 @ 6:905eb2a23ea2@default(draft) another one 340 @ 6:f4c93db9c5cd@default(draft) another one
341 | 341 |
342 o 0:7733902a8d94@default(draft) The base commit 342 o 0:7733902a8d94@default(draft) The base commit
343 343
344 $ touch foo 344 $ touch foo
345 $ echo "hey" >> foo 345 $ echo "hey" >> foo
367 (use 'hg prune .' to remove it) 367 (use 'hg prune .' to remove it)
368 368
369 $ hg status 369 $ hg status
370 A foo 370 A foo
371 $ hg diff 371 $ hg diff
372 diff -r 857367499298 foo 372 diff -r 665843692be0 foo
373 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 373 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
374 +++ b/foo Thu Jan 01 00:00:00 1970 +0000 374 +++ b/foo Thu Jan 01 00:00:00 1970 +0000
375 @@ -0,0 +1,1 @@ 375 @@ -0,0 +1,1 @@
376 +hey 376 +hey
377 377
378 $ hg exp -T '{extras|json}\n' 378 $ hg exp -T '{extras|json}\n'
379 {"branch": "default", "uncommit_source": "feb6bcb52f6f"} 379 {"branch": "default", "uncommit_source": "6316d2de2cc6"}
380 380
381 $ hg exp 381 $ hg exp
382 # HG changeset patch 382 # HG changeset patch
383 # User test 383 # User test
384 # Date 0 0 384 # Date 0 0
385 # Thu Jan 01 00:00:00 1970 +0000 385 # Thu Jan 01 00:00:00 1970 +0000
386 # Node ID 857367499298e999b5841bb01df65f73088b5d3b 386 # Node ID 665843692be04cb0619d8ad1f81ec31c7b33f366
387 # Parent 905eb2a23ea2d92073419d0e19165b90d36ea223 387 # Parent f4c93db9c5cde0d4ab20badcb9c514cfbf7b9e38
388 Added foo 388 Added foo
389 389
390 $ hg amend 390 $ hg amend
391 391
392 Testing to uncommit removed files completely 392 Testing to uncommit removed files completely
399 $ hg exp 399 $ hg exp
400 # HG changeset patch 400 # HG changeset patch
401 # User test 401 # User test
402 # Date 0 0 402 # Date 0 0
403 # Thu Jan 01 00:00:00 1970 +0000 403 # Thu Jan 01 00:00:00 1970 +0000
404 # Node ID 219cfe20964e93f8bb9bd82ceaa54d3b776046db 404 # Node ID 24fcae345f93a1161b224f849c3a9ab362f76f44
405 # Parent 42cc15efbec26c14d96d805dee2766ba91d1fd31 405 # Parent 3f44e16f88daf37e5798606082ae9895eb90fc4d
406 Removed a 406 Removed a
407 407
408 diff -r 42cc15efbec2 -r 219cfe20964e a 408 diff -r 3f44e16f88da -r 24fcae345f93 a
409 --- a/a Thu Jan 01 00:00:00 1970 +0000 409 --- a/a Thu Jan 01 00:00:00 1970 +0000
410 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 410 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
411 @@ -1,11 +0,0 @@ 411 @@ -1,11 +0,0 @@
412 --2 412 --2
413 --1 413 --1
452 452
453 new changeset is empty 453 new changeset is empty
454 (use 'hg prune .' to remove it) 454 (use 'hg prune .' to remove it)
455 455
456 $ hg diff 456 $ hg diff
457 diff -r 737487f1e5f8 a 457 diff -r 3778ffc6315b a
458 --- a/a Thu Jan 01 00:00:00 1970 +0000 458 --- a/a Thu Jan 01 00:00:00 1970 +0000
459 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 459 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
460 @@ -1,11 +0,0 @@ 460 @@ -1,11 +0,0 @@
461 --2 461 --2
462 --1 462 --1
470 -5 470 -5
471 -babar 471 -babar
472 $ hg status 472 $ hg status
473 R a 473 R a
474 $ hg exp -T '{extras|json}\n' 474 $ hg exp -T '{extras|json}\n'
475 {"branch": "default", "uncommit_source": "219cfe20964e"} 475 {"branch": "default", "uncommit_source": "24fcae345f93"}
476 $ hg exp 476 $ hg exp
477 # HG changeset patch 477 # HG changeset patch
478 # User test 478 # User test
479 # Date 0 0 479 # Date 0 0
480 # Thu Jan 01 00:00:00 1970 +0000 480 # Thu Jan 01 00:00:00 1970 +0000
481 # Node ID 737487f1e5f853e55decb73ea31522c63e7f5980 481 # Node ID 3778ffc6315b9cefdb01c218413677c23bf5bc9f
482 # Parent 42cc15efbec26c14d96d805dee2766ba91d1fd31 482 # Parent 3f44e16f88daf37e5798606082ae9895eb90fc4d
483 Removed a 483 Removed a
484 484
485 485
486 $ hg prune . 486 $ hg prune .
487 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 487 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
488 working directory is now at 42cc15efbec2 488 working directory is now at 3f44e16f88da
489 1 changesets pruned 489 1 changesets pruned
490 $ hg revert --all 490 $ hg revert --all
491 undeleting a 491 undeleting a
492 492
493 $ glog 493 $ glog
494 @ 10:42cc15efbec2@default(draft) Added foo 494 @ 10:3f44e16f88da@default(draft) Added foo
495 | 495 |
496 o 6:905eb2a23ea2@default(draft) another one 496 o 6:f4c93db9c5cd@default(draft) another one
497 | 497 |
498 o 0:7733902a8d94@default(draft) The base commit 498 o 0:7733902a8d94@default(draft) The base commit
499 499
500 500
501 Testing when a new file is added in the last commit 501 Testing when a new file is added in the last commit
533 discard change 2/2 to 'x'? 533 discard change 2/2 to 'x'?
534 (enter ? for help) [Ynesfdaq?] n 534 (enter ? for help) [Ynesfdaq?] n
535 535
536 536
537 $ hg exp -T '{extras|json}\n' 537 $ hg exp -T '{extras|json}\n'
538 {"branch": "default", "uncommit_source": "0ff0d9a6d4be"} 538 {"branch": "default", "uncommit_source": "9260adff7488"}
539 539
540 $ hg exp 540 $ hg exp
541 # HG changeset patch 541 # HG changeset patch
542 # User test 542 # User test
543 # Date 0 0 543 # Date 0 0
544 # Thu Jan 01 00:00:00 1970 +0000 544 # Thu Jan 01 00:00:00 1970 +0000
545 # Node ID 25a080d13cb23dbd014839f54d99a96e57ba7e9b 545 # Node ID 5fcbf1c538b13186c920c63ca6a7dab443ad6663
546 # Parent 42cc15efbec26c14d96d805dee2766ba91d1fd31 546 # Parent 3f44e16f88daf37e5798606082ae9895eb90fc4d
547 Added x 547 Added x
548 548
549 diff -r 42cc15efbec2 -r 25a080d13cb2 x 549 diff -r 3f44e16f88da -r 5fcbf1c538b1 x
550 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 550 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
551 +++ b/x Thu Jan 01 00:00:00 1970 +0000 551 +++ b/x Thu Jan 01 00:00:00 1970 +0000
552 @@ -0,0 +1,1 @@ 552 @@ -0,0 +1,1 @@
553 +abcd 553 +abcd
554 554
555 $ hg diff 555 $ hg diff
556 diff -r 25a080d13cb2 foo 556 diff -r 5fcbf1c538b1 foo
557 --- a/foo Thu Jan 01 00:00:00 1970 +0000 557 --- a/foo Thu Jan 01 00:00:00 1970 +0000
558 +++ b/foo Thu Jan 01 00:00:00 1970 +0000 558 +++ b/foo Thu Jan 01 00:00:00 1970 +0000
559 @@ -1,1 +1,2 @@ 559 @@ -1,1 +1,2 @@
560 hey 560 hey
561 +foo 561 +foo
568 568
569 Testing between the stack and with dirty working copy 569 Testing between the stack and with dirty working copy
570 ===================================================== 570 =====================================================
571 571
572 $ glog 572 $ glog
573 @ 16:25a080d13cb2@default(draft) Added x 573 @ 16:5fcbf1c538b1@default(draft) Added x
574 | 574 |
575 o 10:42cc15efbec2@default(draft) Added foo 575 o 10:3f44e16f88da@default(draft) Added foo
576 | 576 |
577 o 6:905eb2a23ea2@default(draft) another one 577 o 6:f4c93db9c5cd@default(draft) another one
578 | 578 |
579 o 0:7733902a8d94@default(draft) The base commit 579 o 0:7733902a8d94@default(draft) The base commit
580 580
581 $ hg up 905eb2a23ea2 581 $ hg up f4c93db9c5cd
582 0 files updated, 0 files merged, 2 files removed, 0 files unresolved 582 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
583 583
584 $ touch bar 584 $ touch bar
585 $ echo "foo" >> bar 585 $ echo "foo" >> bar
586 $ hg add bar 586 $ hg add bar
587 $ hg status 587 $ hg status
588 A bar 588 A bar
589 ? foo.orig 589 ? foo.orig
590 590
591 $ hg exp -T '{extras|json}\n' 591 $ hg exp -T '{extras|json}\n'
592 {"amend_source": "46e35360be473bf761bedf3d05de4a68ffd9d9f8", "branch": "default", "uncommit_source": "f70fb463d5bf"} 592 {"amend_source": "ef651ea03f873a6d70aeeb9ac351d4f65c84fb3b", "branch": "default", "uncommit_source": "678a59e5ff90"}
593 593
594 $ hg exp 594 $ hg exp
595 # HG changeset patch 595 # HG changeset patch
596 # User test 596 # User test
597 # Date 0 0 597 # Date 0 0
598 # Thu Jan 01 00:00:00 1970 +0000 598 # Thu Jan 01 00:00:00 1970 +0000
599 # Node ID 905eb2a23ea2d92073419d0e19165b90d36ea223 599 # Node ID f4c93db9c5cde0d4ab20badcb9c514cfbf7b9e38
600 # Parent 7733902a8d94c789ca81d866bea1893d79442db6 600 # Parent 7733902a8d94c789ca81d866bea1893d79442db6
601 another one 601 another one
602 602
603 diff -r 7733902a8d94 -r 905eb2a23ea2 a 603 diff -r 7733902a8d94 -r f4c93db9c5cd a
604 --- a/a Thu Jan 01 00:00:00 1970 +0000 604 --- a/a Thu Jan 01 00:00:00 1970 +0000
605 +++ b/a Thu Jan 01 00:00:00 1970 +0000 605 +++ b/a Thu Jan 01 00:00:00 1970 +0000
606 @@ -1,5 +1,11 @@ 606 @@ -1,5 +1,11 @@
607 +-2 607 +-2
608 +-1 608 +-1
658 patching file a 658 patching file a
659 Hunk #1 succeeded at 1 with fuzz 1 (offset -1 lines). 659 Hunk #1 succeeded at 1 with fuzz 1 (offset -1 lines).
660 2 new orphan changesets 660 2 new orphan changesets
661 661
662 $ hg diff 662 $ hg diff
663 diff -r 676366511f95 a 663 diff -r 98a3d38b1b81 a
664 --- a/a Thu Jan 01 00:00:00 1970 +0000 664 --- a/a Thu Jan 01 00:00:00 1970 +0000
665 +++ b/a Thu Jan 01 00:00:00 1970 +0000 665 +++ b/a Thu Jan 01 00:00:00 1970 +0000
666 @@ -8,3 +8,4 @@ 666 @@ -8,3 +8,4 @@
667 bar 667 bar
668 4 668 4
669 5 669 5
670 +babar 670 +babar
671 diff -r 676366511f95 bar 671 diff -r 98a3d38b1b81 bar
672 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 672 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
673 +++ b/bar Thu Jan 01 00:00:00 1970 +0000 673 +++ b/bar Thu Jan 01 00:00:00 1970 +0000
674 @@ -0,0 +1,1 @@ 674 @@ -0,0 +1,1 @@
675 +foo 675 +foo
676 676
677 $ hg exp -T '{extras|json}\n' 677 $ hg exp -T '{extras|json}\n'
678 {"amend_source": "46e35360be473bf761bedf3d05de4a68ffd9d9f8", "branch": "default", "uncommit_source": "f70fb463d5bf"} 678 {"amend_source": "ef651ea03f873a6d70aeeb9ac351d4f65c84fb3b", "branch": "default", "uncommit_source": "f4c93db9c5cd"}
679 679
680 $ hg exp 680 $ hg exp
681 # HG changeset patch 681 # HG changeset patch
682 # User test 682 # User test
683 # Date 0 0 683 # Date 0 0
684 # Thu Jan 01 00:00:00 1970 +0000 684 # Thu Jan 01 00:00:00 1970 +0000
685 # Node ID 676366511f95ca4122413dcf79b45eaab61fb387 685 # Node ID 98a3d38b1b812aeca00a61a5554dfa228d632b9e
686 # Parent 7733902a8d94c789ca81d866bea1893d79442db6 686 # Parent 7733902a8d94c789ca81d866bea1893d79442db6
687 another one 687 another one
688 688
689 diff -r 7733902a8d94 -r 676366511f95 a 689 diff -r 7733902a8d94 -r 98a3d38b1b81 a
690 --- a/a Thu Jan 01 00:00:00 1970 +0000 690 --- a/a Thu Jan 01 00:00:00 1970 +0000
691 +++ b/a Thu Jan 01 00:00:00 1970 +0000 691 +++ b/a Thu Jan 01 00:00:00 1970 +0000
692 @@ -1,5 +1,10 @@ 692 @@ -1,5 +1,10 @@
693 +-2 693 +-2
694 +-1 694 +-1
739 discard change 2/2 to 'a'? 739 discard change 2/2 to 'a'?
740 (enter ? for help) [Ynesfdaq?] n 740 (enter ? for help) [Ynesfdaq?] n
741 741
742 742
743 $ hg exp -T '{extras|json}\n' 743 $ hg exp -T '{extras|json}\n'
744 {"amend_source": "46e35360be473bf761bedf3d05de4a68ffd9d9f8", "branch": "default", "uncommit_source": "f70fb463d5bf"} 744 {"amend_source": "ef651ea03f873a6d70aeeb9ac351d4f65c84fb3b", "branch": "default", "uncommit_source": "98a3d38b1b81"}
745 745
746 $ hg exp 746 $ hg exp
747 # HG changeset patch 747 # HG changeset patch
748 # User test 748 # User test
749 # Date 0 0 749 # Date 0 0
750 # Thu Jan 01 00:00:00 1970 +0000 750 # Thu Jan 01 00:00:00 1970 +0000
751 # Node ID 62d907d0c4fa13b4b8bfeed05f13751035daf963 751 # Node ID 9c6818648d9e694d2decfde377c6821191c5bfd5
752 # Parent 7733902a8d94c789ca81d866bea1893d79442db6 752 # Parent 7733902a8d94c789ca81d866bea1893d79442db6
753 another one 753 another one
754 754
755 diff -r 7733902a8d94 -r 62d907d0c4fa a 755 diff -r 7733902a8d94 -r 9c6818648d9e a
756 --- a/a Thu Jan 01 00:00:00 1970 +0000 756 --- a/a Thu Jan 01 00:00:00 1970 +0000
757 +++ b/a Thu Jan 01 00:00:00 1970 +0000 757 +++ b/a Thu Jan 01 00:00:00 1970 +0000
758 @@ -1,5 +1,7 @@ 758 @@ -1,5 +1,7 @@
759 1 759 1
760 2 760 2
763 +bar 763 +bar
764 4 764 4
765 5 765 5
766 766
767 $ hg diff 767 $ hg diff
768 diff -r 62d907d0c4fa a 768 diff -r 9c6818648d9e a
769 --- a/a Thu Jan 01 00:00:00 1970 +0000 769 --- a/a Thu Jan 01 00:00:00 1970 +0000
770 +++ b/a Thu Jan 01 00:00:00 1970 +0000 770 +++ b/a Thu Jan 01 00:00:00 1970 +0000
771 @@ -1,3 +1,6 @@ 771 @@ -1,3 +1,6 @@
772 +-2 772 +-2
773 +-1 773 +-1
778 @@ -5,3 +8,4 @@ 778 @@ -5,3 +8,4 @@
779 bar 779 bar
780 4 780 4
781 5 781 5
782 +babar 782 +babar
783 diff -r 62d907d0c4fa bar 783 diff -r 9c6818648d9e bar
784 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 784 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
785 +++ b/bar Thu Jan 01 00:00:00 1970 +0000 785 +++ b/bar Thu Jan 01 00:00:00 1970 +0000
786 @@ -0,0 +1,1 @@ 786 @@ -0,0 +1,1 @@
787 +foo 787 +foo
788 788
816 $ hg export 816 $ hg export
817 # HG changeset patch 817 # HG changeset patch
818 # User test 818 # User test
819 # Date 0 0 819 # Date 0 0
820 # Thu Jan 01 00:00:00 1970 +0000 820 # Thu Jan 01 00:00:00 1970 +0000
821 # Node ID be5c67225e80b050867862bbd9f4755c4e9207c5 821 # Node ID bbdfefb59fb08650a9a663367ab18a3c2d072691
822 # Parent c280a907fddcef2ffe9fadcc2d87f29998e22b2f 822 # Parent 4f15d398b049b07eb4f4c98d3466a7f708e61735
823 some more changes 823 some more changes
824 824
825 diff -r c280a907fddc -r be5c67225e80 a 825 diff -r 4f15d398b049 -r bbdfefb59fb0 a
826 --- a/a Thu Jan 01 00:00:00 1970 +0000 826 --- a/a Thu Jan 01 00:00:00 1970 +0000
827 +++ b/a Thu Jan 01 00:00:00 1970 +0000 827 +++ b/a Thu Jan 01 00:00:00 1970 +0000
828 @@ -9,3 +9,4 @@ 828 @@ -9,3 +9,4 @@
829 4 829 4
830 5 830 5
831 babar 831 babar
832 +celeste 832 +celeste
833 diff -r c280a907fddc -r be5c67225e80 b 833 diff -r 4f15d398b049 -r bbdfefb59fb0 b
834 --- a/b Thu Jan 01 00:00:00 1970 +0000 834 --- a/b Thu Jan 01 00:00:00 1970 +0000
835 +++ b/b Thu Jan 01 00:00:00 1970 +0000 835 +++ b/b Thu Jan 01 00:00:00 1970 +0000
836 @@ -5,3 +5,4 @@ 836 @@ -5,3 +5,4 @@
837 e 837 e
838 f 838 f
854 854
855 $ hg status 855 $ hg status
856 M a 856 M a
857 ? foo.orig 857 ? foo.orig
858 $ hg diff 858 $ hg diff
859 diff -r c701d7c8d18b a 859 diff -r 0873ba67273f a
860 --- a/a Thu Jan 01 00:00:00 1970 +0000 860 --- a/a Thu Jan 01 00:00:00 1970 +0000
861 +++ b/a Thu Jan 01 00:00:00 1970 +0000 861 +++ b/a Thu Jan 01 00:00:00 1970 +0000
862 @@ -9,3 +9,4 @@ 862 @@ -9,3 +9,4 @@
863 4 863 4
864 5 864 5
865 babar 865 babar
866 +celeste 866 +celeste
867 $ hg exp -T '{extras|json}\n' 867 $ hg exp -T '{extras|json}\n'
868 {"branch": "default", "uncommit_source": "be5c67225e80"} 868 {"branch": "default", "uncommit_source": "bbdfefb59fb0"}
869 $ hg export 869 $ hg export
870 # HG changeset patch 870 # HG changeset patch
871 # User test 871 # User test
872 # Date 0 0 872 # Date 0 0
873 # Thu Jan 01 00:00:00 1970 +0000 873 # Thu Jan 01 00:00:00 1970 +0000
874 # Node ID c701d7c8d18be55a92688f4458c26bd74fb1f525 874 # Node ID 0873ba67273ff5654e032c98df89be8cf431cb63
875 # Parent c280a907fddcef2ffe9fadcc2d87f29998e22b2f 875 # Parent 4f15d398b049b07eb4f4c98d3466a7f708e61735
876 some more changes 876 some more changes
877 877
878 diff -r c280a907fddc -r c701d7c8d18b b 878 diff -r 4f15d398b049 -r 0873ba67273f b
879 --- a/b Thu Jan 01 00:00:00 1970 +0000 879 --- a/b Thu Jan 01 00:00:00 1970 +0000
880 +++ b/b Thu Jan 01 00:00:00 1970 +0000 880 +++ b/b Thu Jan 01 00:00:00 1970 +0000
881 @@ -5,3 +5,4 @@ 881 @@ -5,3 +5,4 @@
882 e 882 e
883 f 883 f
930 $ hg status 930 $ hg status
931 M a 931 M a
932 ? foo.orig 932 ? foo.orig
933 933
934 $ hg diff 934 $ hg diff
935 diff -r 28d5de12b225 a 935 diff -r 72c07d186be7 a
936 --- a/a Thu Jan 01 00:00:00 1970 +0000 936 --- a/a Thu Jan 01 00:00:00 1970 +0000
937 +++ b/a Thu Jan 01 00:00:00 1970 +0000 937 +++ b/a Thu Jan 01 00:00:00 1970 +0000
938 @@ -1,3 +1,4 @@ 938 @@ -1,3 +1,4 @@
939 +-3 939 +-3
940 -2 940 -2
941 -1 941 -1
942 0 942 0
943 943
944 $ hg exp -T '{extras|json}\n' 944 $ hg exp -T '{extras|json}\n'
945 {"amend_source": "c701d7c8d18be55a92688f4458c26bd74fb1f525", "branch": "default", "uncommit_source": "be5c67225e80"} 945 {"amend_source": "0873ba67273ff5654e032c98df89be8cf431cb63", "branch": "default", "uncommit_source": "14428547a95c"}
946 946
947 $ hg export 947 $ hg export
948 # HG changeset patch 948 # HG changeset patch
949 # User test 949 # User test
950 # Date 0 0 950 # Date 0 0
951 # Thu Jan 01 00:00:00 1970 +0000 951 # Thu Jan 01 00:00:00 1970 +0000
952 # Node ID 28d5de12b225d1e0951110cced8d8994227be026 952 # Node ID 72c07d186be791e6fa80bfdaf85f493dca503df2
953 # Parent c280a907fddcef2ffe9fadcc2d87f29998e22b2f 953 # Parent 4f15d398b049b07eb4f4c98d3466a7f708e61735
954 some more changes 954 some more changes
955 955
956 diff -r c280a907fddc -r 28d5de12b225 a 956 diff -r 4f15d398b049 -r 72c07d186be7 a
957 --- a/a Thu Jan 01 00:00:00 1970 +0000 957 --- a/a Thu Jan 01 00:00:00 1970 +0000
958 +++ b/a Thu Jan 01 00:00:00 1970 +0000 958 +++ b/a Thu Jan 01 00:00:00 1970 +0000
959 @@ -9,3 +9,4 @@ 959 @@ -9,3 +9,4 @@
960 4 960 4
961 5 961 5
962 babar 962 babar
963 +celeste 963 +celeste
964 diff -r c280a907fddc -r 28d5de12b225 b 964 diff -r 4f15d398b049 -r 72c07d186be7 b
965 --- a/b Thu Jan 01 00:00:00 1970 +0000 965 --- a/b Thu Jan 01 00:00:00 1970 +0000
966 +++ b/b Thu Jan 01 00:00:00 1970 +0000 966 +++ b/b Thu Jan 01 00:00:00 1970 +0000
967 @@ -5,3 +5,4 @@ 967 @@ -5,3 +5,4 @@
968 e 968 e
969 f 969 f