Commit 64628edd authored by Pierre-Yves David's avatar Pierre-Yves David 🐙
Browse files

evolve: further simplify a conditional

The case is simple enough to be handled on its own.
parent ef1978a0fcc0
Pipeline #2044 passed with stage
in 4 minutes and 42 seconds
......@@ -430,28 +430,27 @@ def _solvedivergent(ui, repo, divergent, evolvestate, displayer, dryrun=False,
# 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment