changeset 45583:9f14bb4d59ea

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.
author Pulkit Goyal <7895pulkit@gmail.com>
date Fri, 25 Sep 2020 13:58:05 +0530
parents 463ca8af8c72
children 4c8a93ec6908
files mercurial/mergestate.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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):