# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1601022485 -19800 # Node ID 9f14bb4d59ea4475e54c51ab15997230552bfc83 # Parent 463ca8af8c72ab8c7c355e5e3d4d5793cac4e724 mergestate: update _stateextras instead of reassinging `merge.applyupdates()` can store extras for a file and _stateextras may not be empty always. Hence reassigning loses the old values. We can directly update like this because we switched to using `collections.defaultdict` for `_stateextras` sometime ago. diff -r 463ca8af8c72 -r 9f14bb4d59ea mercurial/mergestate.py --- a/mercurial/mergestate.py Mon Sep 14 14:11:45 2020 +0530 +++ b/mercurial/mergestate.py Fri Sep 25 13:58:05 2020 +0530 @@ -261,7 +261,7 @@ hex(fco.filenode()), fcl.flags(), ] - self._stateextras[fd] = {b'ancestorlinknode': hex(fca.node())} + self._stateextras[fd][b'ancestorlinknode'] = hex(fca.node()) self._dirty = True def addpathconflict(self, path, frename, forigin):