Show More
@@ -146,6 +146,15 b' class dirstatemap(object):' | |||||
146 | """Loads the underlying data, if it's not already loaded""" |
|
146 | """Loads the underlying data, if it's not already loaded""" | |
147 | self._map |
|
147 | self._map | |
148 |
|
148 | |||
|
149 | def _dirs_incr(self, filename, old_entry=None): | |||
|
150 | """incremente the dirstate counter if applicable""" | |||
|
151 | if ( | |||
|
152 | old_entry is None or old_entry.removed | |||
|
153 | ) and "_dirs" in self.__dict__: | |||
|
154 | self._dirs.addpath(filename) | |||
|
155 | if old_entry is None and "_alldirs" in self.__dict__: | |||
|
156 | self._alldirs.addpath(filename) | |||
|
157 | ||||
149 | def addfile( |
|
158 | def addfile( | |
150 | self, |
|
159 | self, | |
151 | f, |
|
160 | f, | |
@@ -190,12 +199,7 b' class dirstatemap(object):' | |||||
190 | assert size is not None |
|
199 | assert size is not None | |
191 | assert mtime is not None |
|
200 | assert mtime is not None | |
192 | old_entry = self.get(f) |
|
201 | old_entry = self.get(f) | |
193 | if ( |
|
202 | self._dirs_incr(f, old_entry) | |
194 | old_entry is None or old_entry.removed |
|
|||
195 | ) and "_dirs" in self.__dict__: |
|
|||
196 | self._dirs.addpath(f) |
|
|||
197 | if old_entry is None and "_alldirs" in self.__dict__: |
|
|||
198 | self._alldirs.addpath(f) |
|
|||
199 | e = self._map[f] = DirstateItem(state, mode, size, mtime) |
|
203 | e = self._map[f] = DirstateItem(state, mode, size, mtime) | |
200 | if e.dm_nonnormal: |
|
204 | if e.dm_nonnormal: | |
201 | self.nonnormalset.add(f) |
|
205 | self.nonnormalset.add(f) |
General Comments 0
You need to be logged in to leave comments.
Login now