# HG changeset patch # User Sushil khanchi # Date 1597233618 -19800 # Node ID c61a31489da00c0160f811aae0fac7f64b030211 # Parent 355a7c91ce9afdb13c0485085a311434bad9eb4e evolve: move a block of code up for early return diff -r 355a7c91ce9a -r c61a31489da0 hgext3rd/evolve/evolvecmd.py --- a/hgext3rd/evolve/evolvecmd.py Wed Aug 12 17:21:05 2020 +0530 +++ b/hgext3rd/evolve/evolvecmd.py Wed Aug 12 17:30:18 2020 +0530 @@ -307,6 +307,17 @@ evolvestate[b'old-other'] = None evolvestate[b'old-divergent'] = None + # we don't handle merge content-divergent changesets yet + if len(other.parents()) > 1: + msg = _(b"skipping %s: %s changeset can't be " + b"a merge (yet)\n") % (divergent, TROUBLES['CONTENTDIVERGENT']) + ui.write_err(msg) + hint = _(b"You have to fallback to solving this by hand...\n" + b"| This probably means redoing the merge and using \n" + b"| `hg prune` to kill older version.\n") + ui.write_err(hint) + return (False, b".") + def swapnodes(div, other): div, other = other, div evolvestate[b'divergent'] = div.node() @@ -326,17 +337,6 @@ publicdiv = divergent evolvestate[b'public-divergent'] = publicdiv.node() - # we don't handle merge content-divergent changesets yet - if len(other.parents()) > 1: - msg = _(b"skipping %s: %s changeset can't be " - b"a merge (yet)\n") % (divergent, TROUBLES['CONTENTDIVERGENT']) - ui.write_err(msg) - hint = _(b"You have to fallback to solving this by hand...\n" - b"| This probably means redoing the merge and using \n" - b"| `hg prune` to kill older version.\n") - ui.write_err(hint) - return (False, b".") - otherp1 = succsotherp1 = other.p1().rev() divp1 = succsdivp1 = divergent.p1().rev()