# HG changeset patch # User Sushil khanchi # Date 1595441279 -19800 # Node ID d542e9720b1e735fb68a2c81b82d2b9c09d33477 # Parent 21956b2a16eb3a25961f58bbc86b94bbbecb052b orphan: fix buggy case of try resolving orphan merge two times Because of not having the exact condition (see the changes) it was not filtering the case when none of the parent is obsolete. Changes in test file reflect the fixed behavior. diff -r 21956b2a16eb -r d542e9720b1e hgext3rd/evolve/evolvecmd.py --- a/hgext3rd/evolve/evolvecmd.py Tue Jul 28 14:26:44 2020 +0530 +++ b/hgext3rd/evolve/evolvecmd.py Wed Jul 22 23:37:59 2020 +0530 @@ -108,7 +108,7 @@ keepbranch = orig.p2().branch() != orig.branch() elif not p2obs and p1obs: pass - else: + elif p1obs and p2obs: # store that we are resolving an orphan merge with both parents # obsolete and proceed with first parent evolvestate[b'orphanmerge'] = True @@ -2208,7 +2208,7 @@ repo.dirstate.setparents(ctxparents[0].node(), currentp1) - else: + elif p1obs and p2obs: # both the parents were obsoleted, if orphanmerge is set, we # are processing the second parent first (to keep parent order) if evolvestate.get(b'orphanmerge'): diff -r 21956b2a16eb -r d542e9720b1e tests/test-issue-6028.t --- a/tests/test-issue-6028.t Tue Jul 28 14:26:44 2020 +0530 +++ b/tests/test-issue-6028.t Wed Jul 22 23:37:59 2020 +0530 @@ -167,4 +167,3 @@ $ hg evolve -r . cannot solve instability of c920dd828523, skipping - cannot solve instability of c920dd828523, skipping