Patchwork D10148: mergestate: don't pop stateextras when there are no conflicts on filemerge

login
register
mail settings
Submitter phabricator
Date March 10, 2021, 9:04 a.m.
Message ID <differential-rev-PHID-DREV-6xvzv7cqzdyvjsxug53q-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48463/
State Superseded
Headers show

Comments

phabricator - March 10, 2021, 9:04 a.m.
pulkit created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/mergestate.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/mergestate.py b/mercurial/mergestate.py
--- a/mercurial/mergestate.py
+++ b/mercurial/mergestate.py
@@ -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)