Mercurial > evolve
changeset 4413:2360a1e050a6
evolve: pin the public cset to local side in merging when solving public div
While working on public divergence, I think it would be better to pin
the public cset to local side of merge for understanding and handling
the future cases without any ambiguity.
Changes in tests reflect the changed behaviour.
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Mon, 25 Feb 2019 22:50:24 +0530 |
parents | dcbe64c954dc |
children | 29645d5ba3d9 |
files | hgext3rd/evolve/evolvecmd.py tests/test-evolve-public-content-divergent.t |
diffstat | 2 files changed, 13 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py Sat Feb 23 00:47:14 2019 +0530 +++ b/hgext3rd/evolve/evolvecmd.py Mon Feb 25 22:50:24 2019 +0530 @@ -382,6 +382,11 @@ haspubdiv = True publicdiv = other evolvestate['public-divergent'] = other.node() + # for simplicity, lets keep public one to local side while merging the + # two csets.(local side is divergent one) + divergent, other = other, divergent + evolvestate['divergent'] = divergent.node() + evolvestate['other-divergent'] = other.node() # we don't handle merge content-divergent changesets yet if len(other.parents()) > 1: msg = _("skipping %s: %s changeset can't be "
--- a/tests/test-evolve-public-content-divergent.t Sat Feb 23 00:47:14 2019 +0530 +++ b/tests/test-evolve-public-content-divergent.t Mon Feb 25 22:50:24 2019 +0530 @@ -63,10 +63,11 @@ Lets resolve the public content-divergence: $ hg evolve --content-divergent - merge:[3] updated b - with: [2] added b + merge:[2] added b + with: [3] updated b base: [1] added b - merging "other" content-divergent changeset '44f360db368f' + updating to "local" side of the conflict: 44f360db368f + merging "other" content-divergent changeset 'dcdaf152280a' merging b 0 files updated, 1 files merged, 0 files removed, 0 files unresolved computing new diff @@ -160,10 +161,11 @@ Lets resolve the divergence: $ hg evolve --content-divergent - merge:[3] updated b - with: [2] added b + merge:[2] added b + with: [3] updated b base: [1] added b - merging "other" content-divergent changeset '580f2d01e52c' + updating to "local" side of the conflict: 580f2d01e52c + merging "other" content-divergent changeset '0e805383168e' merging b warning: conflicts while merging b! (edit, then use 'hg resolve --mark') 0 files updated, 0 files merged, 0 files removed, 1 files unresolved