comparison tests/test-strip.t @ 25695:ce3d4b858420

merge with stable
author Matt Mackall <mpm@selenic.com>
date Wed, 01 Jul 2015 16:33:31 -0500
parents 6084926366b9 af5b2f4ed594
children d815a5997576
comparison
equal deleted inserted replaced
25694:5ede49f4383a 25695:ce3d4b858420
690 $ hg strip -r 0 690 $ hg strip -r 0
691 saved backup bundle to $TESTTMP/doublebundle/.hg/strip-backup/3903775176ed-54390173-backup.hg (glob) 691 saved backup bundle to $TESTTMP/doublebundle/.hg/strip-backup/3903775176ed-54390173-backup.hg (glob)
692 $ ls .hg/strip-backup 692 $ ls .hg/strip-backup
693 3903775176ed-54390173-backup.hg 693 3903775176ed-54390173-backup.hg
694 3903775176ed-e68910bd-backup.hg 694 3903775176ed-e68910bd-backup.hg
695 $ cd ..
696
697 Test that we only bundle the stripped changesets (issue4736)
698 ------------------------------------------------------------
699
700 initialisation (previous repo is empty anyway)
701
702 $ hg init issue4736
703 $ cd issue4736
704 $ echo a > a
705 $ hg add a
706 $ hg commit -m commitA
707 $ echo b > b
708 $ hg add b
709 $ hg commit -m commitB
710 $ echo c > c
711 $ hg add c
712 $ hg commit -m commitC
713 $ hg up 'desc(commitB)'
714 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
715 $ echo d > d
716 $ hg add d
717 $ hg commit -m commitD
718 created new head
719 $ hg up 'desc(commitC)'
720 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
721 $ hg merge 'desc(commitD)'
722 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
723 (branch merge, don't forget to commit)
724 $ hg ci -m 'mergeCD'
725 $ hg log -G
726 @ changeset: 4:d8db9d137221
727 |\ tag: tip
728 | | parent: 2:5c51d8d6557d
729 | | parent: 3:6625a5168474
730 | | user: test
731 | | date: Thu Jan 01 00:00:00 1970 +0000
732 | | summary: mergeCD
733 | |
734 | o changeset: 3:6625a5168474
735 | | parent: 1:eca11cf91c71
736 | | user: test
737 | | date: Thu Jan 01 00:00:00 1970 +0000
738 | | summary: commitD
739 | |
740 o | changeset: 2:5c51d8d6557d
741 |/ user: test
742 | date: Thu Jan 01 00:00:00 1970 +0000
743 | summary: commitC
744 |
745 o changeset: 1:eca11cf91c71
746 | user: test
747 | date: Thu Jan 01 00:00:00 1970 +0000
748 | summary: commitB
749 |
750 o changeset: 0:105141ef12d0
751 user: test
752 date: Thu Jan 01 00:00:00 1970 +0000
753 summary: commitA
754
755
756 Check bundle behavior:
757
758 $ hg bundle -r 'desc(mergeCD)' --base 'desc(commitC)' ../issue4736.hg
759 2 changesets found
760 $ hg log -r 'bundle()' -R ../issue4736.hg
761 changeset: 3:6625a5168474
762 parent: 1:eca11cf91c71
763 user: test
764 date: Thu Jan 01 00:00:00 1970 +0000
765 summary: commitD
766
767 changeset: 4:d8db9d137221
768 tag: tip
769 parent: 2:5c51d8d6557d
770 parent: 3:6625a5168474
771 user: test
772 date: Thu Jan 01 00:00:00 1970 +0000
773 summary: mergeCD
774
775
776 check strip behavior
777
778 $ hg --config extensions.strip= strip 'desc(commitD)' --debug
779 resolving manifests
780 branchmerge: False, force: True, partial: False
781 ancestor: d8db9d137221+, local: d8db9d137221+, remote: eca11cf91c71
782 c: other deleted -> r
783 removing c
784 d: other deleted -> r
785 removing d
786 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
787 2 changesets found
788 list of changesets:
789 6625a516847449b6f0fa3737b9ba56e9f0f3032c
790 d8db9d1372214336d2b5570f20ee468d2c72fa8b
791 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/6625a5168474-345bb43d-backup.hg (glob)
792 invalid branchheads cache (served): tip differs
793 truncating cache/rbc-revs-v1 to 24
794 $ hg log -G
795 o changeset: 2:5c51d8d6557d
796 | tag: tip
797 | user: test
798 | date: Thu Jan 01 00:00:00 1970 +0000
799 | summary: commitC
800 |
801 @ changeset: 1:eca11cf91c71
802 | user: test
803 | date: Thu Jan 01 00:00:00 1970 +0000
804 | summary: commitB
805 |
806 o changeset: 0:105141ef12d0
807 user: test
808 date: Thu Jan 01 00:00:00 1970 +0000
809 summary: commitA
810
811
812 strip backup content
813
814 $ hg log -r 'bundle()' -R .hg/strip-backup/6625a5168474-*-backup.hg
815 changeset: 3:6625a5168474
816 parent: 1:eca11cf91c71
817 user: test
818 date: Thu Jan 01 00:00:00 1970 +0000
819 summary: commitD
820
821 changeset: 4:d8db9d137221
822 tag: tip
823 parent: 2:5c51d8d6557d
824 parent: 3:6625a5168474
825 user: test
826 date: Thu Jan 01 00:00:00 1970 +0000
827 summary: mergeCD
828