[Updated] [+ ] D8624: wip: this does not help but seems less wrong

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Thu Jun 11 19:46:30 UTC 2020


durin42 updated this revision to Diff 21625.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8624?vs=21622&id=21625

BRANCH
  default

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8624/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D8624

AFFECTED FILES
  mercurial/mergestate.py

CHANGE DETAILS

diff --git a/mercurial/mergestate.py b/mercurial/mergestate.py
--- a/mercurial/mergestate.py
+++ b/mercurial/mergestate.py
@@ -865,6 +865,7 @@
         self._basectx = ctx
         self.reset()
         self._ancestor_filectxs = {}
+        self._state = {}
 
     def __iter__(self):
         return iter(sorted(self._conflicts))
@@ -875,7 +876,9 @@
         # TODO(augie): the rebase codepath depends on non-implicit
         # ancestor. I think we should fix things so that ancestor can
         # be passed in to reset().
-        self._ancestor_filectxs[fcl.path()] = fca
+        print('paths', fcl.path(), fco.path(), fca.path(), fd)
+        self._ancestor_filectxs[fd] = fca
+        self._state[fd] = fcl, fco, fca
 
     # Since memmergestate isn't mutable yet, these are all trivial
     # implementations used by the "happy path" in merge code.
@@ -949,12 +952,13 @@
             fca = _filectxorabsent(
                 nullhex if dfile not in actx else None, actx, dfile
             )
+        fcl, fco, fca = self._state[dfile]
         fn = filemerge.premerge if preresolve else filemerge.filemerge
         complete, mergeret, deleted = fn(
             self._repo,
             wctx,
             self._local,
-            dfile,  # orig
+            fcl.path(),
             fcd,
             fco,
             fca,



To: durin42, #hg-reviewers
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200611/db912706/attachment-0002.html>


More information about the Mercurial-patches mailing list