[Request] [+ ] D11319: rust-dirstatemap: temporarily use `from_v1_data` in `addfile`

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Sat Aug 21 09:56:35 UTC 2021


marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D11319

AFFECTED FILES
  mercurial/dirstatemap.py

CHANGE DETAILS

diff --git a/mercurial/dirstatemap.py b/mercurial/dirstatemap.py
--- a/mercurial/dirstatemap.py
+++ b/mercurial/dirstatemap.py
@@ -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:



To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20210821/52882c8a/attachment-0001.html>


More information about the Mercurial-patches mailing list