This instance will be upgraded to Heptapod 0.23.2 on 2021-08-05 at 11:00 UTC+2 (a few minutes of down time)

Commit 4df49886 authored by Sushil Khanchi's avatar Sushil Khanchi 🐨
Browse files

evolve: no need to keep it as a smartset as it's a single value

This will also make it easy for us to use gca value in upcoming
patches.
parent 777ca21a6f71
......@@ -344,9 +344,9 @@ def _pickresolutionparent(ui, repo, divergent, other, evolvestate):
# format specifier, as used below)
if nodemod.nullrev in (succsotherp1, succsdivp1):
# nullrev is the only possible ancestor if succsotherp1 or succsdivp1 is nullrev
gca = [nodemod.nullrev]
gca = nodemod.nullrev
else:
gca = repo.revs(b"ancestor(%d, %d)" % (succsotherp1, succsdivp1))
gca = repo.revs(b"ancestor(%d, %d)" % (succsotherp1, succsdivp1)).first()
# divonly: non-obsolete csets which are topological ancestor of "divergent"
# but not "other"
divonly = repo.revs(b"only(%d, %d) - obsolete()" % (divergent.rev(),
......@@ -378,7 +378,7 @@ def _pickresolutionparent(ui, repo, divergent, other, evolvestate):
elif divergent == other.p1():
# both are in parent-child relation
pass
elif succsotherp1 in gca and succsdivp1 in gca:
elif succsotherp1 == gca and succsdivp1 == 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
......@@ -392,9 +392,9 @@ def _pickresolutionparent(ui, repo, divergent, other, evolvestate):
else:
# no extra cset on either side
pass
elif succsotherp1 in gca and succsdivp1 not in gca:
elif succsotherp1 == gca and succsdivp1 != gca:
pass
elif succsdivp1 in gca and succsotherp1 not in gca:
elif succsdivp1 == gca and succsotherp1 != gca:
resolutionparent = repo[succsotherp1].node()
else:
msg = _(b"skipping %s: have a different parent than %s "
......
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