evolve: simplify some conditional
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 26 Dec 2019 20:23:27 +0100
changeset 5031 ef1978a0fcc0
parent 5030 1403cc7c2cee
child 5032 31b0b29245bb
evolve: simplify some conditional extracted from a changeset of Sushil khanchi <sushilkhanchi97@gmail.com>
hgext3rd/evolve/evolvecmd.py
--- a/hgext3rd/evolve/evolvecmd.py	Thu Dec 26 20:17:01 2019 +0100
+++ b/hgext3rd/evolve/evolvecmd.py	Thu Dec 26 20:23:27 2019 +0100
@@ -377,8 +377,8 @@
         ui.write_err(hint)
         return (False, b".")
 
-    succsotherp1 = other.p1().rev()
-    succsdivp1 = divergent.p1().rev()
+    otherp1 = succsotherp1 = other.p1().rev()
+    divp1 = succsdivp1 = divergent.p1().rev()
 
     # finding single successors of otherp1 and divp1
     try:
@@ -431,7 +431,7 @@
     # then solve the content-divergence the way we solve 1)
     # for 3) and 4), we still have to decide
     if succsotherp1 in gca and succsdivp1 in gca:
-        if succsotherp1 == other.p1().rev() and succsdivp1 == divergent.p1().rev():
+        if succsotherp1 == otherp1 and succsdivp1 == divp1:
             # both are on the same parents
             pass
         else: