comparison tests/test-evolve-content-divergence.t @ 3882:55b8c7e7e352

compat: temporarily move copies fix to compat.py This patch moves a fixed version of copies._fullcopytracing() to compat.py as this was not fixed in core before release and also we need to do this anyway for the older versions of mercurial. This fix is that when base changeset is not ancestor of any of the merging commits, we don't throw an error. The phabricator differential which will fix this in core is https://phab.mercurial-scm.org/D3896. This fixes the traceback we get in previous changeset while relocating one of the content-divergent changeset.
author Pulkit Goyal <7895pulkit@gmail.com>
date Sat, 21 Jul 2018 02:42:29 +0530
parents 9cf45b94f977
children f7afd3a158e3 ef22eef37ecc
comparison
equal deleted inserted replaced
3881:9cf45b94f977 3882:55b8c7e7e352
694 694
695 $ hg evolve --continue 695 $ hg evolve --continue
696 evolving 23:3f7a1f693080 "added z" 696 evolving 23:3f7a1f693080 "added z"
697 updating to "local" side of the conflict: 53242575ffa9 697 updating to "local" side of the conflict: 53242575ffa9
698 merging "other" content-divergent changeset 'cdb0643c69fc' 698 merging "other" content-divergent changeset 'cdb0643c69fc'
699 transaction abort! 699 merging y
700 rollback completed 700 warning: conflicts while merging y! (edit, then use 'hg resolve --mark')
701 ** Unknown exception encountered with possibly-broken third-party extension evolve 701 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
702 ** which supports versions 4.6 of Mercurial. 702 fix conflicts and see `hg help evolve.interrupted`
703 ** Please disable evolve and try your action again.
704 ** If that fixes the bug please report it to https://bz.mercurial-scm.org/
705 ** Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]
706 ** Mercurial Distributed SCM (version 4.7rc0+2-10d40c83205b)
707 ** Extensions loaded: rebase, evolve
708 Traceback (most recent call last):
709 File "/tmp/hgtests.rpfl6k/install/bin/hg", line 41, in <module>
710 dispatch.run()
711 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/dispatch.py", line 90, in run
712 status = dispatch(req)
713 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/dispatch.py", line 213, in dispatch
714 ret = _runcatch(req) or 0
715 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/dispatch.py", line 354, in _runcatch
716 return _callcatch(ui, _runcatchfunc)
717 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/dispatch.py", line 362, in _callcatch
718 return scmutil.callcatch(ui, func)
719 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/scmutil.py", line 161, in callcatch
720 return func()
721 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/dispatch.py", line 344, in _runcatchfunc
722 return _dispatch(req)
723 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/dispatch.py", line 984, in _dispatch
724 cmdpats, cmdoptions)
725 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/dispatch.py", line 730, in runcommand
726 ret = _runcommand(ui, options, cmd, d)
727 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/dispatch.py", line 992, in _runcommand
728 return cmdfunc()
729 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/dispatch.py", line 981, in <lambda>
730 d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
731 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/util.py", line 1528, in check
732 return func(*args, **kwargs)
733 File "/home/foobar/repo/mutable-history/hgext3rd/evolve/evolvecmd.py", line 1519, in evolve
734 continueevolve(ui, repo, evolvestate, progresscb)
735 File "/home/foobar/repo/mutable-history/hgext3rd/evolve/evolvecmd.py", line 1706, in continueevolve
736 _continuecontentdivergent(ui, repo, evolvestate, progresscb)
737 File "/home/foobar/repo/mutable-history/hgext3rd/evolve/evolvecmd.py", line 1752, in _continuecontentdivergent
738 evolvestate)
739 File "/home/foobar/repo/mutable-history/hgext3rd/evolve/evolvecmd.py", line 512, in _mergecontentdivergents
740 mergeancestor=True)
741 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/merge.py", line 2052, in update
742 followcopies, matcher=matcher, mergeforce=mergeforce)
743 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/merge.py", line 1337, in calculateupdates
744 acceptremote, followcopies)
745 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/merge.py", line 1138, in manifestmerge
746 ret = copies.mergecopies(repo, wctx, p2, pa)
747 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/copies.py", line 383, in mergecopies
748 return _fullcopytracing(repo, c1, c2, base)
749 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/copies.py", line 537, in _fullcopytracing
750 assert not both2['incomplete']
751 AssertionError
752 [1] 703 [1]
753 704
754 $ hg diff 705 $ hg diff
755 diff -r 7bbcf24ddecf z 706 diff -r 53242575ffa9 y
756 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 707 --- a/y Thu Jan 01 00:00:00 1970 +0000
757 +++ b/z Thu Jan 01 00:00:00 1970 +0000 708 +++ b/y Thu Jan 01 00:00:00 1970 +0000
758 @@ -0,0 +1,1 @@ 709 @@ -1,1 +1,5 @@
759 +bar 710 +<<<<<<< local: 53242575ffa9 bar - test: added z
711 watbar
712 +=======
713 +foo
714 +>>>>>>> other: cdb0643c69fc - test: added z
760 715
761 $ echo foo > y 716 $ echo foo > y
762 $ hg resolve -m 717 $ hg resolve -m
763 abort: resolve command not applicable when not merging 718 (no more unresolved files)
764 [255] 719 continue: hg evolve --continue
765 $ hg evolve --continue 720 $ hg evolve --continue
766 evolving 23:3f7a1f693080 "added z" 721 working directory is now at 6fc7d9682de6
767 updating to "local" side of the conflict: 53242575ffa9 722
768 merging "other" content-divergent changeset '4954f28e111b' 723 $ hg glog
769 transaction abort! 724 @ 27:6fc7d9682de6 added z
770 rollback completed
771 ** Unknown exception encountered with possibly-broken third-party extension evolve
772 ** which supports versions 4.6 of Mercurial.
773 ** Please disable evolve and try your action again.
774 ** If that fixes the bug please report it to https://bz.mercurial-scm.org/
775 ** Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]
776 ** Mercurial Distributed SCM (version 4.7rc0+2-10d40c83205b)
777 ** Extensions loaded: rebase, evolve
778 Traceback (most recent call last):
779 File "/tmp/hgtests.rpfl6k/install/bin/hg", line 41, in <module>
780 dispatch.run()
781 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/dispatch.py", line 90, in run
782 status = dispatch(req)
783 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/dispatch.py", line 213, in dispatch
784 ret = _runcatch(req) or 0
785 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/dispatch.py", line 354, in _runcatch
786 return _callcatch(ui, _runcatchfunc)
787 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/dispatch.py", line 362, in _callcatch
788 return scmutil.callcatch(ui, func)
789 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/scmutil.py", line 161, in callcatch
790 return func()
791 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/dispatch.py", line 344, in _runcatchfunc
792 return _dispatch(req)
793 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/dispatch.py", line 984, in _dispatch
794 cmdpats, cmdoptions)
795 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/dispatch.py", line 730, in runcommand
796 ret = _runcommand(ui, options, cmd, d)
797 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/dispatch.py", line 992, in _runcommand
798 return cmdfunc()
799 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/dispatch.py", line 981, in <lambda>
800 d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
801 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/util.py", line 1528, in check
802 return func(*args, **kwargs)
803 File "/home/foobar/repo/mutable-history/hgext3rd/evolve/evolvecmd.py", line 1519, in evolve
804 continueevolve(ui, repo, evolvestate, progresscb)
805 File "/home/foobar/repo/mutable-history/hgext3rd/evolve/evolvecmd.py", line 1706, in continueevolve
806 _continuecontentdivergent(ui, repo, evolvestate, progresscb)
807 File "/home/foobar/repo/mutable-history/hgext3rd/evolve/evolvecmd.py", line 1752, in _continuecontentdivergent
808 evolvestate)
809 File "/home/foobar/repo/mutable-history/hgext3rd/evolve/evolvecmd.py", line 512, in _mergecontentdivergents
810 mergeancestor=True)
811 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/merge.py", line 2052, in update
812 followcopies, matcher=matcher, mergeforce=mergeforce)
813 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/merge.py", line 1337, in calculateupdates
814 acceptremote, followcopies)
815 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/merge.py", line 1138, in manifestmerge
816 ret = copies.mergecopies(repo, wctx, p2, pa)
817 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/copies.py", line 383, in mergecopies
818 return _fullcopytracing(repo, c1, c2, base)
819 File "/tmp/hgtests.rpfl6k/install/lib/python/mercurial/copies.py", line 537, in _fullcopytracing
820 assert not both2['incomplete']
821 AssertionError
822 [1]
823
824 $ hg glog
825 * 25:53242575ffa9 added z
826 | () [bar] draft 725 | () [bar] draft
827 | * 23:3f7a1f693080 added z 726 o 21:7bbcf24ddecf added y
828 | | () [default] draft 727 | () [bar] draft
829 @ | 21:7bbcf24ddecf added y 728 o 15:b006cf317e0e added foo to x
830 | | () [bar] draft 729 | () [bar] draft
831 o | 15:b006cf317e0e added foo to x 730 o 10:4ae4427ee9f8 added d
832 | | () [bar] draft 731 | () [default] draft
833 o | 10:4ae4427ee9f8 added d 732 o 9:917281f93fcb added c
834 | | () [default] draft 733 | () [default] draft
835 o | 9:917281f93fcb added c
836 |/ () [default] draft
837 o 8:171614c9a791 added b 734 o 8:171614c9a791 added b
838 | () [default] draft 735 | () [default] draft
839 o 1:c7586e2a9264 added a 736 o 1:c7586e2a9264 added a
840 | () [default] draft 737 | () [default] draft
841 o 0:8fa14d15e168 added hgignore 738 o 0:8fa14d15e168 added hgignore
845 # HG changeset patch 742 # HG changeset patch
846 # User test 743 # User test
847 # Date 0 0 744 # Date 0 0
848 # Thu Jan 01 00:00:00 1970 +0000 745 # Thu Jan 01 00:00:00 1970 +0000
849 # Branch bar 746 # Branch bar
850 # Node ID 7bbcf24ddecfe97d7c2ac6fa8c07c155c8fda47b 747 # Node ID 6fc7d9682de6e3bee6c8b1266b756ed7d522b7e4
851 # Parent b006cf317e0ed16dbe786c439577475580f645f1 748 # Parent 7bbcf24ddecfe97d7c2ac6fa8c07c155c8fda47b
852 added y 749 added z
853 750
854 diff -r b006cf317e0e -r 7bbcf24ddecf y 751 diff -r 7bbcf24ddecf -r 6fc7d9682de6 y
752 --- a/y Thu Jan 01 00:00:00 1970 +0000
753 +++ b/y Thu Jan 01 00:00:00 1970 +0000
754 @@ -1,1 +1,1 @@
755 -watbar
756 +foo
757 diff -r 7bbcf24ddecf -r 6fc7d9682de6 z
855 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 758 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
856 +++ b/y Thu Jan 01 00:00:00 1970 +0000 759 +++ b/z Thu Jan 01 00:00:00 1970 +0000
857 @@ -0,0 +1,1 @@ 760 @@ -0,0 +1,1 @@
858 +watbar 761 +bar
859 762
860 $ cd .. 763 $ cd ..
861 764
862 Resolving content-divergence of a stack with same parents 765 Resolving content-divergence of a stack with same parents
863 --------------------------------------------------------- 766 ---------------------------------------------------------