Mercurial > evolve
diff tests/test-topic.t @ 2679:5156a67f66a6
topics: update current topic to the topic of newly rebased commit (issue5551)
The rebase code passes branchmerge equals to True while updating to the rebased
commit. We need to make sure topic is preserved even after rebase and hence we
need to update the topic even when branchmerge argument is set to True. But
there is a twist in the tale, merge also uses this part of code and we allow to
update topic when brancmerge is True, in merge cases the topic after merge will
the topic of the destination commit, not the topic of working directory parent.
So we need the function to have information about whether a rebase is going on,
and we do it by wrapping the rebase command and storing some value in the
config. This is a bit hacky but works for now. This patch fixes issue related to
loosing of topic while rebase.
Thanks to Boris Feld for the rigourous tests.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Thu, 29 Jun 2017 02:31:55 +0530 |
parents | 0ade6e87346b |
children | 9b68a2083dac |
line wrap: on
line diff
--- a/tests/test-topic.t Tue Jun 27 23:28:58 2017 +0530 +++ b/tests/test-topic.t Thu Jun 29 02:31:55 2017 +0530 @@ -630,12 +630,11 @@ rebasing 12:18b70b8de1f0 "fran?" switching to topic wat $ hg topic - * wat + wat $ hg log -Gr 'draft()' - @ changeset: 14:503497a14c3e + @ changeset: 14:45358f7a5892 | tag: tip - | topic: wat | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: fran? @@ -653,7 +652,7 @@ $ hg topic watwat $ hg ci --amend $ hg log -Gr 'draft()' - @ changeset: 16:024d9c69f30f + @ changeset: 16:6c40a4c21bbe | tag: tip | topic: watwat | parent: 13:686a642006db @@ -674,7 +673,7 @@ $ hg topic --clear $ hg ci --amend $ hg log -r . - changeset: 18:573ab57c6de2 + changeset: 18:0f9cd5070654 tag: tip parent: 13:686a642006db user: test @@ -690,7 +689,7 @@ $ hg co 19 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg log -Gr 'draft()' - @ changeset: 19:2539ecb09b37 + @ changeset: 19:980a0f608481 | tag: tip | topic: watwat | parent: 13:686a642006db @@ -711,7 +710,7 @@ changed topic on 2 changes please run hg evolve --rev "topic(changewat)" now $ hg log -Gr 'draft()' - @ changeset: 21:993d145391f5 + @ changeset: 21:56c83be6105f | tag: tip | topic: changewat | user: test @@ -743,7 +742,7 @@ | date: Thu Jan 01 00:00:00 1970 +0000 | summary: gamma | - | o changeset: 21:993d145391f5 + | o changeset: 21:56c83be6105f |/ topic: changewat | user: test | date: Thu Jan 01 00:00:00 1970 +0000 @@ -769,7 +768,7 @@ | date: Thu Jan 01 00:00:00 1970 +0000 | summary: gamma | - | o changeset: 24:658ae31a0c05 + | o changeset: 24:369c6e2e5474 |/ topic: changewut | user: test | date: Thu Jan 01 00:00:00 1970 +0000