evolve: further simplify a conditional
The case is simple enough to be handled on its own.
--- a/hgext3rd/evolve/evolvecmd.py Thu Dec 26 20:23:27 2019 +0100
+++ b/hgext3rd/evolve/evolvecmd.py Thu Dec 26 20:28:21 2019 +0100
@@ -430,28 +430,27 @@
# for 2) we will relocate one which is behind to the parent of ahead one and
# 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 == otherp1 and succsdivp1 == divp1:
- # both are on the same parents
+ if otherp1 == divp1:
+ # both are on the same parents
+ pass
+ elif succsotherp1 in gca and succsdivp1 in gca:
+ # both are not on the same parent but have same parents's succs.
+ if otheronly and divonly:
+ # case: we have visible csets on both side diverging from
+ # tca of "divergent" and "other". We still need to decide what
+ # to do in this case
pass
+ if otheronly:
+ relocatereq = True
+ if not haspubdiv:
+ # can't swap when public divergence, as public can't move
+ divergent, other = swapnodes(divergent, other)
+ resolutionparent = repo[succsotherp1].node()
+ elif divonly:
+ relocatereq = True
else:
- # both are not on the same parent but have same parents's succs.
- if otheronly and divonly:
- # case: we have visible csets on both side diverging from
- # tca of "divergent" and "other". We still need to decide what
- # to do in this case
- pass
- if otheronly:
- relocatereq = True
- if not haspubdiv:
- # can't swap when public divergence, as public can't move
- divergent, other = swapnodes(divergent, other)
- resolutionparent = repo[succsotherp1].node()
- elif divonly:
- relocatereq = True
- else:
- # no extra cset on either side; so not considering relocation
- pass
+ # no extra cset on either side; so not considering relocation
+ pass
elif succsotherp1 in gca and succsdivp1 not in gca:
relocatereq = True
pass