Show More
@@ -175,16 +175,27 b' class dirstate(object):' | |||
|
175 | 175 | return self._copymap |
|
176 | 176 | |
|
177 | 177 | def _incpath(self, path): |
|
178 |
|
|
|
179 |
|
|
|
180 |
self._dirs |
|
|
181 | self._dirs[pc] += 1 | |
|
178 | c = path.rfind('/') | |
|
179 | if c >= 0: | |
|
180 | dirs = self._dirs | |
|
181 | base = path[:c] | |
|
182 | if base not in dirs: | |
|
183 | self._incpath(base) | |
|
184 | dirs[base] = 1 | |
|
185 | else: | |
|
186 | dirs[base] += 1 | |
|
182 | 187 | |
|
183 | 188 | def _decpath(self, path): |
|
184 | for c in strutil.findall(path, '/'): | |
|
185 |
|
|
|
186 | self._dirs.setdefault(pc, 0) | |
|
187 | self._dirs[pc] -= 1 | |
|
189 | if "_dirs" in self.__dict__: | |
|
190 | c = path.rfind('/') | |
|
191 | if c >= 0: | |
|
192 | base = path[:c] | |
|
193 | dirs = self._dirs | |
|
194 | if dirs[base] == 1: | |
|
195 | del dirs[base] | |
|
196 | self._decpath(base) | |
|
197 | else: | |
|
198 | dirs[base] -= 1 | |
|
188 | 199 | |
|
189 | 200 | def _incpathcheck(self, f): |
|
190 | 201 | if '\r' in f or '\n' in f: |
General Comments 0
You need to be logged in to leave comments.
Login now