# HG changeset patch # User Sushil khanchi # Date 1551115224 -19800 # Node ID 2360a1e050a66d64724d16188736f6b12915e5f4 # Parent dcbe64c954dc78ac90f36d9ddb62410bce205d82 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. diff -r dcbe64c954dc -r 2360a1e050a6 hgext3rd/evolve/evolvecmd.py --- 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 " diff -r dcbe64c954dc -r 2360a1e050a6 tests/test-evolve-public-content-divergent.t --- 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