evolve: add tests of relocation case in public divergence
These tests cover the cases when "other" is behind the "public"
one and we would have to relocate "other" here. It covers
all the conflicting and non-conflicting cases.
Setup=====$."$TESTDIR/testlib/topic_setup.sh"$hginittest-list$cdtest-list$cat<<EOF>>.hg/hgrc>[phases]>publish=false>EOF$cat<<EOF>>$HGRCPATH>[experimental]>#disablethenewgraphstyleuntilwedrop3.7support>graphstyle.missing=|>#turnevolutionon>evolution=all>EOF$mkcommit(){>echo"$1">"$1">hgadd"$1">hgci-m"add $1">}Buildsomebasicgraph----------------------$forxinbase_abase_bbase_cbase_dbase_e;do>mkcommit$x>doneAddanotherbranchwithtwoheads$hgup'desc(base_a)'0filesupdated,0filesmerged,4filesremoved,0filesunresolved$hgbranchlakemarkedworkingdirectoryasbranchlake(branchesarepermanentandglobal,didyouwantabookmark?)$mkcommitlake_a$mkcommitlake_b$hgup'desc(lake_a)'0filesupdated,0filesmerged,1filesremoved,0filesunresolved$mkcommitlake_ccreatednewhead(considerusingtopicforlightweightbranches.See'hg help topic')Addsometopics---------------Asimpletopicthatneedrebasing$hgup'desc(base_c)'2filesupdated,0filesmerged,2filesremoved,0filesunresolved$hgtopicbazmarkedworkingdirectoryastopic:baz$mkcommitbaz_aactivetopic'baz'grewitsfirstchangeset(see'hg help topics'formoreinformation)$mkcommitbaz_bAsimpletopicwithunstability$hgup'desc(base_d)'1filesupdated,0filesmerged,2filesremoved,0filesunresolved$hgtopicfuzmarkedworkingdirectoryastopic:fuz$mkcommitfuz_aactivetopic'fuz'grewitsfirstchangeset(see'hg help topics'formoreinformation)$mkcommitfuz_b$mkcommitfuz_c$hgup'desc(fuz_a)'0filesupdated,0filesmerged,2filesremoved,0filesunresolved$hgcommit--amend--message'fuz1_a'2neworphanchangesetsAtopicwithmultipleheads$hgup'desc(base_e)'1filesupdated,0filesmerged,1filesremoved,0filesunresolved$hgtopicbarmarkedworkingdirectoryastopic:bar$mkcommitbar_aactivetopic'bar'grewitsfirstchangeset(see'hg help topics'formoreinformation)$mkcommitbar_b$mkcommitbar_c$hgup'desc(bar_b)'0filesupdated,0filesmerged,1filesremoved,0filesunresolved$mkcommitbar_d$mkcommitbar_e$hgup'desc(bar_d)'0filesupdated,0filesmerged,1filesremoved,0filesunresolved$hgcommit--amend--message'bar1_d'1neworphanchangesetstopic'foo'onthemultiheadedbranch$hgup'desc(lake_a)'1filesupdated,0filesmerged,7filesremoved,0filesunresolved$hgtopicfoomarkedworkingdirectoryastopic:foo$mkcommitfoo_aactivetopic'foo'grewitsfirstchangeset(see'hg help topics'formoreinformation)$mkcommitfoo_bSummary-------$hgsummaryparent:21:3e54b49a3113tipaddfoo_bbranch:lakecommit:(clean)update:2newchangesets(update)phases:22draftorphan:3changesetstopic:foo$hglog--graph-T'{desc} ({branch}) [{topic}]'@addfoo_b(lake)[foo]|oaddfoo_a(lake)[foo]||obar1_d(default)[bar]||||*addbar_e(default)[bar]|||||xaddbar_d(default)[bar]||/||oaddbar_c(default)[bar]||/|oaddbar_b(default)[bar]|||oaddbar_a(default)[bar]||||ofuz1_a(default)[fuz]||||||*addfuz_c(default)[fuz]|||||||*addfuz_b(default)[fuz]|||||||xaddfuz_a(default)[fuz]|||/|||oaddbaz_b(default)[baz]|||||||oaddbaz_a(default)[baz]||||+-------oaddlake_c(lake)[]||||+-------oaddlake_b(lake)[]||||o|||addlake_a(lake)[]|||||o||addbase_e(default)[]||//|o/addbase_d(default)[]||/|oaddbase_c(default)[]|||oaddbase_b(default)[]|/oaddbase_a(default)[]ActualTesting==============basicoutput$hgtopicbar(5changesets,1troubled,2heads)baz(2changesets)*foo(2changesets)fuz(3changesets,2troubled)quietversion$hgtopic--quietbarbazfoofuzverbose$hgtopic--verbosebar(onbranch:default,5changesets,1troubled,2heads)baz(onbranch:default,2changesets,2behind)*foo(onbranch:lake,2changesets,ambiguousdestination:branch'lake'has2heads)fuz(onbranch:default,3changesets,2troubled,1behind)json$hgtopic-Tjson[{"active":false,"changesetcount":5,"headcount":2,"topic":"bar","troubledcount":1},{"active":false,"changesetcount":2,"topic":"baz"},{"active":true,"changesetcount":2,"topic":"foo"},{"active":false,"changesetcount":3,"topic":"fuz","troubledcount":2}]json--verbose$hgtopic-Tjson--verbose[{"active":false,"branches+":"default","changesetcount":5,"headcount":2,"topic":"bar","troubledcount":1},{"active":false,"behindcount":2,"branches+":"default","changesetcount":2,"topic":"baz"},{"active":true,"behinderror":"ambiguous destination: branch 'lake' has 2 heads","branches+":"lake","changesetcount":2,"topic":"foo"},{"active":false,"behindcount":1,"branches+":"default","changesetcount":3,"topic":"fuz","troubledcount":2}]Alsotestthissituationwith'hg stack'=======================================$hgstackbar ### topic: bar (2 heads) ### target: default (branch)s5:addbar_cs2^addbar_b(base)s4$addbar_e(unstable)s3:bar1_ds2:addbar_bs1:addbar_as0^addbase_e(base)$hgstackbar-v ### topic: bar (2 heads) ### target: default (branch)s5(9cbadf11b44d):addbar_cs2(e555c7e8c767)^addbar_b(base)s4(a920412b5a05)$addbar_e(unstable)s3(6915989374b1):bar1_ds2(e555c7e8c767):addbar_bs1(a5c2b4e00bbf):addbar_as0(92f489a6251f)^addbase_e(base)$hgstackbaz ### topic: baz ### target: default (branch), 2 behinds2:addbaz_bs1:addbaz_as0^addbase_c(base)$hgstackfoo ### topic: foo ### target: lake (branch), ambiguous rebase destination - branch 'lake' has 2 headss2@addfoo_b(current)s1:addfoo_as0^addlake_a(base)$hgstackfuz ### topic: fuz ### target: default (branch), 1 behinds3$addfuz_c(unstable)s2$addfuz_b(unstable)s1:fuz1_as0^addbase_d(base)