##// END OF EJS Templates
dirstatemap: move `_dirs_incr` and `_dirs_decr` methods out of the common...
Raphaël Gomès -
r50009:2c78dd3f default
parent child Browse files
Show More
@@ -79,25 +79,6 b' class _dirstatemapcommon:'
79 79 def __getitem__(self, item):
80 80 return self._map[item]
81 81
82 ### sub-class utility method
83 #
84 # Use to allow for generic implementation of some method while still coping
85 # with minor difference between implementation.
86
87 def _dirs_incr(self, filename, old_entry=None):
88 """increment the dirstate counter if applicable
89
90 This might be a no-op for some subclasses who deal with directory
91 tracking in a different way.
92 """
93
94 def _dirs_decr(self, filename, old_entry=None, remove_variant=False):
95 """decrement the dirstate counter if applicable
96
97 This might be a no-op for some subclasses who deal with directory
98 tracking in a different way.
99 """
100
101 82 ### disk interaction
102 83
103 84 def _opendirstatefile(self):
@@ -354,7 +335,7 b' class dirstatemap(_dirstatemapcommon):'
354 335 # (e.g. "has_dir")
355 336
356 337 def _dirs_incr(self, filename, old_entry=None):
357 """incremente the dirstate counter if applicable"""
338 """increment the dirstate counter if applicable"""
358 339 if (
359 340 old_entry is None or old_entry.removed
360 341 ) and "_dirs" in self.__dict__:
@@ -363,7 +344,7 b' class dirstatemap(_dirstatemapcommon):'
363 344 self._alldirs.addpath(filename)
364 345
365 346 def _dirs_decr(self, filename, old_entry=None, remove_variant=False):
366 """decremente the dirstate counter if applicable"""
347 """decrement the dirstate counter if applicable"""
367 348 if old_entry is not None:
368 349 if "_dirs" in self.__dict__ and not old_entry.removed:
369 350 self._dirs.delpath(filename)
General Comments 0
You need to be logged in to leave comments. Login now