Mercurial > evolve
changeset 5725:e6b0ed34bc18
divergence-resolution: return rev from _pickresolutionparent()
This change makes the code clear and will help us in upcoming
patches.
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Thu, 22 Oct 2020 21:12:50 +0530 |
parents | 61d2f1cf90f0 |
children | 1319abf8d8c4 |
files | hgext3rd/evolve/evolvecmd.py |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py Fri Jan 22 11:04:55 2021 +0100 +++ b/hgext3rd/evolve/evolvecmd.py Thu Oct 22 21:12:50 2020 +0530 @@ -310,7 +310,7 @@ # 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) @@ -334,7 +334,7 @@ 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 @@ -384,7 +384,7 @@ # to do in this case pass if otheronly: - resolutionparent = repo[succsotherp1].node() + resolutionparent = succsotherp1 elif divonly: pass else: @@ -393,7 +393,7 @@ elif succsotherp1 in gca and succsdivp1 not in gca: pass elif succsdivp1 in gca and succsotherp1 not in 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) @@ -474,6 +474,7 @@ # 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