mergestate: don't pop stateextras when there are no conflicts on filemerge
authorPulkit Goyal <7895pulkit@gmail.com>
Wed, 10 Mar 2021 13:08:41 +0530
changeset 46781 1099ca176ba1
parent 46780 6266d19556ad
child 46782 6b52cffd8d0a
mergestate: don't pop stateextras when there are no conflicts on filemerge Even if `filemerge.filemerge()` didn't result in conflicts, we should not remove stateextras for a file since we now use that for more things than just merge time information. We use stateextras to store information which is required to be used by commit. I tracked this down while finding why a patch of mine which adds more commit related information does not work as expected and looses the extras in mergestate. Differential Revision: https://phab.mercurial-scm.org/D10148
mercurial/mergestate.py
--- a/mercurial/mergestate.py	Wed Jan 13 16:14:58 2021 +0100
+++ b/mercurial/mergestate.py	Wed Mar 10 13:08:41 2021 +0530
@@ -382,7 +382,6 @@
         if merge_ret is None:
             # If return value of merge is None, then there are no real conflict
             del self._state[dfile]
-            self._stateextras.pop(dfile, None)
             self._dirty = True
         elif not merge_ret:
             self.mark(dfile, MERGE_RECORD_RESOLVED)