Show More
@@ -79,25 +79,6 b' class _dirstatemapcommon:' | |||||
79 | def __getitem__(self, item): |
|
79 | def __getitem__(self, item): | |
80 | return self._map[item] |
|
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 | ### disk interaction |
|
82 | ### disk interaction | |
102 |
|
83 | |||
103 | def _opendirstatefile(self): |
|
84 | def _opendirstatefile(self): | |
@@ -354,7 +335,7 b' class dirstatemap(_dirstatemapcommon):' | |||||
354 | # (e.g. "has_dir") |
|
335 | # (e.g. "has_dir") | |
355 |
|
336 | |||
356 | def _dirs_incr(self, filename, old_entry=None): |
|
337 | def _dirs_incr(self, filename, old_entry=None): | |
357 |
"""increment |
|
338 | """increment the dirstate counter if applicable""" | |
358 | if ( |
|
339 | if ( | |
359 | old_entry is None or old_entry.removed |
|
340 | old_entry is None or old_entry.removed | |
360 | ) and "_dirs" in self.__dict__: |
|
341 | ) and "_dirs" in self.__dict__: | |
@@ -363,7 +344,7 b' class dirstatemap(_dirstatemapcommon):' | |||||
363 | self._alldirs.addpath(filename) |
|
344 | self._alldirs.addpath(filename) | |
364 |
|
345 | |||
365 | def _dirs_decr(self, filename, old_entry=None, remove_variant=False): |
|
346 | def _dirs_decr(self, filename, old_entry=None, remove_variant=False): | |
366 |
"""decrement |
|
347 | """decrement the dirstate counter if applicable""" | |
367 | if old_entry is not None: |
|
348 | if old_entry is not None: | |
368 | if "_dirs" in self.__dict__ and not old_entry.removed: |
|
349 | if "_dirs" in self.__dict__ and not old_entry.removed: | |
369 | self._dirs.delpath(filename) |
|
350 | self._dirs.delpath(filename) |
General Comments 0
You need to be logged in to leave comments.
Login now