changeset 35083:e8ae0b2d88a8

dirstate: remove _droppath method This method now doesn't do very much interesting and can be removed. The updated files set can be updated where _droppath was originally called. Differential Revision: https://phab.mercurial-scm.org/D1344
author Mark Thomas <mbthomas@fb.com>
date Wed, 15 Nov 2017 01:07:42 -0800
parents e6c64744781f
children 61888bd0b300
files mercurial/dirstate.py
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dirstate.py	Wed Nov 15 01:07:42 2017 -0800
+++ b/mercurial/dirstate.py	Wed Nov 15 01:07:42 2017 -0800
@@ -386,9 +386,6 @@
     def copies(self):
         return self._map.copymap
 
-    def _droppath(self, f):
-        self._updatedfiles.add(f)
-
     def _addpath(self, f, state, mode, size, mtime):
         oldstate = self[f]
         if state == 'a' or oldstate == 'r':
@@ -465,7 +462,6 @@
     def remove(self, f):
         '''Mark a file removed.'''
         self._dirty = True
-        self._droppath(f)
         oldstate = self[f]
         size = 0
         if self._pl[1] != nullid:
@@ -477,6 +473,7 @@
                 elif entry[0] == 'n' and entry[2] == -2: # other parent
                     size = -2
                     self._map.otherparentset.add(f)
+        self._updatedfiles.add(f)
         self._map.removefile(f, oldstate, size)
         if size == 0:
             self._map.copymap.pop(f, None)
@@ -492,7 +489,7 @@
         oldstate = self[f]
         if self._map.dropfile(f, oldstate):
             self._dirty = True
-            self._droppath(f)
+            self._updatedfiles.add(f)
             self._map.copymap.pop(f, None)
 
     def _discoverpath(self, path, normed, ignoremissing, exists, storemap):