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