evolve: factor out logic to merge content divergent csets in separate fn
This will help us in reusing the logic if we need to while doing evolve
--continue.
--- a/hgext3rd/evolve/evolvecmd.py Thu Jun 07 20:27:03 2018 +0530
+++ b/hgext3rd/evolve/evolvecmd.py Thu Jun 07 18:13:54 2018 +0530
@@ -449,6 +449,13 @@
keepbranch=True)
other = repo[newother]
+ _mergecontentdivergents(repo, progresscb, divergent, other, base,
+ evolvestate)
+ return _completecontentdivergent(ui, repo, progresscb, divergent, other,
+ base, evolvestate)
+
+def _mergecontentdivergents(repo, progresscb, divergent, other, base,
+ evolvestate):
if divergent not in repo[None].parents():
repo.ui.status(_("updating to \"local\" side of the conflict: %s\n") %
divergent.hex()[:12])
@@ -474,9 +481,6 @@
raise error.Abort(_("fix conflicts and run 'hg evolve --continue' or"
" use 'hg update -C .' to abort"))
- return _completecontentdivergent(ui, repo, progresscb, divergent, other,
- base, evolvestate)
-
def _completecontentdivergent(ui, repo, progresscb, divergent, other,
base, evolvestate):
"""completes the content-divergence resolution"""