changeset 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 22c39f8acf78
files mercurial/dirstatemap.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dirstatemap.py	Fri Jul 16 16:30:52 2021 +0200
+++ b/mercurial/dirstatemap.py	Fri Aug 20 22:35:52 2021 +0200
@@ -615,7 +615,7 @@
                 )
             elif (p1_tracked or p2_tracked) and not wc_tracked:
                 # XXX might be merged and removed ?
-                self[filename] = DirstateItem(b'r', 0, 0, 0)
+                self[filename] = DirstateItem.from_v1_data(b'r', 0, 0, 0)
                 self.nonnormalset.add(filename)
             elif clean_p2 and wc_tracked:
                 if p1_tracked or self.get(filename) is not None: