content-divergence: store the resolved revs in evolvestate['replacements']
authorPulkit Goyal <7895pulkit@gmail.com>
Tue, 22 May 2018 20:33:42 +0530
changeset 3759 3fe3f3070df9
parent 3758 131758265150
child 3760 88601e1cd5d8
content-divergence: store the resolved revs in evolvestate['replacements'] The support for continuing a conflicted content-divergence resolution was added some time ago. That support lacked storing of the resolved rev in the evolvestate['replacements'] which marks the node as resolved and does not try to resolve that node again. Since we didn't store, the resolution, processes the same node again. This patch makes sure we store the information in evolvestate that a certain content-divergent node is resolved to prevent pre-processing it again.
hgext3rd/evolve/evolvecmd.py
tests/test-stabilize-result.t
--- a/hgext3rd/evolve/evolvecmd.py	Tue May 22 23:51:57 2018 +0530
+++ b/hgext3rd/evolve/evolvecmd.py	Tue May 22 20:33:42 2018 +0530
@@ -1383,11 +1383,14 @@
             tr = None
             try:
                 tr = repo.transaction('evolve')
+                divergent = evolvestate['divergent']
+                other = evolvestate['other-divergent']
                 repo = repo.unfiltered()
-                _completecontentdivergent(ui, repo, progresscb,
-                                          repo[evolvestate['divergent']],
-                                          repo[evolvestate['other-divergent']],
-                                          evolvestate)
+                ret = _completecontentdivergent(ui, repo, progresscb,
+                                                repo[divergent],
+                                                repo[other],
+                                                evolvestate)
+                evolvestate['replacements'][divergent] = ret[1]
                 tr.close()
             finally:
                 tr.release()
--- a/tests/test-stabilize-result.t	Tue May 22 23:51:57 2018 +0530
+++ b/tests/test-stabilize-result.t	Tue May 22 20:33:42 2018 +0530
@@ -413,12 +413,6 @@
   (no more unresolved files)
   continue: hg evolve --continue
   $ hg evolve --continue
-  merge:[17] More addition (2)
-  with: [18] More addition (2)
-  base: [16] More addition
-  updating to "local" side of the conflict: 0b336205a5d0
-  merging "other" content-divergent changeset 'e015aa78acee'
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory is now at e015aa78acee
   $ glog
   @  18:e015aa78acee@default(draft) bk:[] More addition (2)