Show More
@@ -256,6 +256,7 b' class dirstatemap(object):' | |||||
256 |
|
256 | |||
257 | if not (p1_tracked or p2_tracked or wc_tracked): |
|
257 | if not (p1_tracked or p2_tracked or wc_tracked): | |
258 | self.dropfile(filename) |
|
258 | self.dropfile(filename) | |
|
259 | return | |||
259 | elif merged: |
|
260 | elif merged: | |
260 | # XXX might be merged and removed ? |
|
261 | # XXX might be merged and removed ? | |
261 | entry = self.get(filename) |
|
262 | entry = self.get(filename) | |
@@ -265,16 +266,20 b' class dirstatemap(object):' | |||||
265 | # actually mean merged. Dropping the else clause will show |
|
266 | # actually mean merged. Dropping the else clause will show | |
266 | # failure in `test-graft.t` |
|
267 | # failure in `test-graft.t` | |
267 | self.addfile(filename, merged=True) |
|
268 | self.addfile(filename, merged=True) | |
|
269 | return | |||
268 | else: |
|
270 | else: | |
269 | self.addfile(filename, from_p2=True) |
|
271 | self.addfile(filename, from_p2=True) | |
|
272 | return | |||
270 | elif not (p1_tracked or p2_tracked) and wc_tracked: |
|
273 | elif not (p1_tracked or p2_tracked) and wc_tracked: | |
271 | self.addfile(filename, added=True, possibly_dirty=possibly_dirty) |
|
274 | self.addfile(filename, added=True, possibly_dirty=possibly_dirty) | |
|
275 | return | |||
272 | elif (p1_tracked or p2_tracked) and not wc_tracked: |
|
276 | elif (p1_tracked or p2_tracked) and not wc_tracked: | |
273 | # XXX might be merged and removed ? |
|
277 | # XXX might be merged and removed ? | |
274 | old_entry = self._map.get(filename) |
|
278 | old_entry = self._map.get(filename) | |
275 | self._dirs_decr(filename, old_entry=old_entry, remove_variant=True) |
|
279 | self._dirs_decr(filename, old_entry=old_entry, remove_variant=True) | |
276 | self._map[filename] = DirstateItem.from_v1_data(b'r', 0, 0, 0) |
|
280 | self._map[filename] = DirstateItem.from_v1_data(b'r', 0, 0, 0) | |
277 | self.nonnormalset.add(filename) |
|
281 | self.nonnormalset.add(filename) | |
|
282 | return | |||
278 | elif clean_p2 and wc_tracked: |
|
283 | elif clean_p2 and wc_tracked: | |
279 | if p1_tracked or self.get(filename) is not None: |
|
284 | if p1_tracked or self.get(filename) is not None: | |
280 | # XXX the `self.get` call is catching some case in |
|
285 | # XXX the `self.get` call is catching some case in | |
@@ -285,12 +290,16 b' class dirstatemap(object):' | |||||
285 | # as merged without actually being the result of a merge |
|
290 | # as merged without actually being the result of a merge | |
286 | # action. So thing are not ideal here. |
|
291 | # action. So thing are not ideal here. | |
287 | self.addfile(filename, merged=True) |
|
292 | self.addfile(filename, merged=True) | |
|
293 | return | |||
288 | else: |
|
294 | else: | |
289 | self.addfile(filename, from_p2=True) |
|
295 | self.addfile(filename, from_p2=True) | |
|
296 | return | |||
290 | elif not p1_tracked and p2_tracked and wc_tracked: |
|
297 | elif not p1_tracked and p2_tracked and wc_tracked: | |
291 | self.addfile(filename, from_p2=True, possibly_dirty=possibly_dirty) |
|
298 | self.addfile(filename, from_p2=True, possibly_dirty=possibly_dirty) | |
|
299 | return | |||
292 | elif possibly_dirty: |
|
300 | elif possibly_dirty: | |
293 | self.addfile(filename, possibly_dirty=possibly_dirty) |
|
301 | self.addfile(filename, possibly_dirty=possibly_dirty) | |
|
302 | return | |||
294 | elif wc_tracked: |
|
303 | elif wc_tracked: | |
295 | # this is a "normal" file |
|
304 | # this is a "normal" file | |
296 | if parentfiledata is None: |
|
305 | if parentfiledata is None: | |
@@ -300,6 +309,7 b' class dirstatemap(object):' | |||||
300 | mode, size, mtime = parentfiledata |
|
309 | mode, size, mtime = parentfiledata | |
301 | self.addfile(filename, mode=mode, size=size, mtime=mtime) |
|
310 | self.addfile(filename, mode=mode, size=size, mtime=mtime) | |
302 | self.nonnormalset.discard(filename) |
|
311 | self.nonnormalset.discard(filename) | |
|
312 | return | |||
303 | else: |
|
313 | else: | |
304 | assert False, 'unreachable' |
|
314 | assert False, 'unreachable' | |
305 |
|
315 |
General Comments 0
You need to be logged in to leave comments.
Login now