comparison mercurial/mergestate.py @ 45164:7f41e824a02b

mergestate: remove unnecessary recordactions() from mergestate class This function is updating dirstate which sounds like not something which a method on mergestate class should do. Also this just calls another function. Lets directly call that function and remove this reducing mergestate responsibility a bit. There was single caller which is updated. Differential Revision: https://phab.mercurial-scm.org/D8737
author Pulkit Goyal <7895pulkit@gmail.com>
date Thu, 09 Jul 2020 18:20:54 +0530
parents f69253935bf8
children 01c4dccfd6b5
comparison
equal deleted inserted replaced
45163:f69253935bf8 45164:7f41e824a02b
754 for f, (r, action) in pycompat.iteritems(self._results): 754 for f, (r, action) in pycompat.iteritems(self._results):
755 if action is not None: 755 if action is not None:
756 actions[action].append((f, None, b"merge result")) 756 actions[action].append((f, None, b"merge result"))
757 return actions 757 return actions
758 758
759 def recordactions(self):
760 """record remove/add/get actions in the dirstate"""
761 branchmerge = self._repo.dirstate.p2() != nullid
762 recordupdates(self._repo, self.actions(), branchmerge, None)
763
764 def queueremove(self, f): 759 def queueremove(self, f):
765 """queues a file to be removed from the dirstate 760 """queues a file to be removed from the dirstate
766 761
767 Meant for use by custom merge drivers.""" 762 Meant for use by custom merge drivers."""
768 self._results[f] = 0, ACTION_REMOVE 763 self._results[f] = 0, ACTION_REMOVE