comparison mercurial/dirstatemap.py @ 47894:226c7dbeea11

rust-dirstatemap: temporarily use `from_v1_data` in `addfile` We are about to change the `__init__` for `DirstateItem`. To make the transition easier, we move existing caller to `DirstateItem.from_v1_data`. The Rust dirstate map will need an overall once the durst settle anyway. Differential Revision: https://phab.mercurial-scm.org/D11319
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 20 Aug 2021 22:35:52 +0200
parents 0b35bc0b8636
children d5b54917eb92
comparison
equal deleted inserted replaced
47893:0b35bc0b8636 47894:226c7dbeea11
613 self.addfile( 613 self.addfile(
614 filename, added=True, possibly_dirty=possibly_dirty 614 filename, added=True, possibly_dirty=possibly_dirty
615 ) 615 )
616 elif (p1_tracked or p2_tracked) and not wc_tracked: 616 elif (p1_tracked or p2_tracked) and not wc_tracked:
617 # XXX might be merged and removed ? 617 # XXX might be merged and removed ?
618 self[filename] = DirstateItem(b'r', 0, 0, 0) 618 self[filename] = DirstateItem.from_v1_data(b'r', 0, 0, 0)
619 self.nonnormalset.add(filename) 619 self.nonnormalset.add(filename)
620 elif clean_p2 and wc_tracked: 620 elif clean_p2 and wc_tracked:
621 if p1_tracked or self.get(filename) is not None: 621 if p1_tracked or self.get(filename) is not None:
622 # XXX the `self.get` call is catching some case in 622 # XXX the `self.get` call is catching some case in
623 # `test-merge-remove.t` where the file is tracked in p1, the 623 # `test-merge-remove.t` where the file is tracked in p1, the