changeset 5554:c61a31489da0

evolve: move a block of code up for early return
author Sushil khanchi <sushilkhanchi97@gmail.com>
date Wed, 12 Aug 2020 17:30:18 +0530
parents 355a7c91ce9a
children 742c8202d556
files hgext3rd/evolve/evolvecmd.py
diffstat 1 files changed, 11 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- 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()