# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2021-03-10 07:38:41 # Node ID 1099ca176ba1914297eb49a06832fac853c3dfa0 # Parent 6266d19556ad186f81caf3e892148a993428c407 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 diff --git a/mercurial/mergestate.py b/mercurial/mergestate.py --- a/mercurial/mergestate.py +++ b/mercurial/mergestate.py @@ -382,7 +382,6 @@ class _mergestate_base(object): 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)