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 2e897406 authored by Sushil Khanchi's avatar Sushil Khanchi 🐨
Browse files

evolve: return rev from _pickresolutionparent()

This change makes the code clear and will help us in upcoming
patches.
parent cc918e3317c4
......@@ -312,7 +312,7 @@ def _pickresolutionparent(ui, repo, divergent, other, evolvestate):
# Otherwise, we are going to rebase the "behind" branch up to the new
# brancmap level.
publicdiv = divergent if other.mutable() else other
resolutionparent = publicdiv.p1().node()
resolutionparent = publicdiv.p1().rev()
evolvestate[b'public-divergent'] = publicdiv.node()
return (True, resolutionparent)
......@@ -336,7 +336,7 @@ def _pickresolutionparent(ui, repo, divergent, other, evolvestate):
return (False, b".")
# the changeset on which resolution changeset will be based on
resolutionparent = repo[succsdivp1].node()
resolutionparent = succsdivp1
# the nullrev has to be handled specially because -1 is overloaded to both
# mean nullrev (this meaning is used for the result of changectx.rev(), as
......@@ -386,7 +386,7 @@ def _pickresolutionparent(ui, repo, divergent, other, evolvestate):
# to do in this case
pass
if otheronly:
resolutionparent = repo[succsotherp1].node()
resolutionparent = succsotherp1
elif divonly:
pass
else:
......@@ -395,7 +395,7 @@ def _pickresolutionparent(ui, repo, divergent, other, evolvestate):
elif succsotherp1 == gca:
pass
elif succsdivp1 == gca:
resolutionparent = repo[succsotherp1].node()
resolutionparent = succsotherp1
else:
msg = _(b"skipping %s: have a different parent than %s "
b"(not handled yet)\n") % (divergent, other)
......@@ -476,6 +476,7 @@ def _solvedivergent(ui, repo, divergent, evolvestate, displayer, dryrun=False,
# setup everything before merging two content-divergent csets
picked, resolutionparent = _pickresolutionparent(ui, repo, divergent,
other, evolvestate)
resolutionparent = repo[resolutionparent].node()
if not picked:
return (False, b".")
evolvestate[b'resolutionparent'] = resolutionparent
......
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