Patchwork D1344: dirstate: remove _droppath method

login
register
mail settings
Submitter phabricator
Date Nov. 17, 2017, 10:29 p.m.
Message ID <f026c990e0abe0551b36d05a9ed26005@localhost.localdomain>
Download mbox | patch
Permalink /patch/25629/
State Not Applicable
Headers show

Comments

phabricator - Nov. 17, 2017, 10:29 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG8b498ae36d0c: dirstate: remove _droppath method (authored by mbthomas, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1344?vs=3518&id=3617

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS




To: mbthomas, #hg-reviewers, durin42
Cc: mercurial-devel

Patch

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