[Commented On] D11318: dirstatemap: temporarily use `from_v1_data` in `addfile`

baymax (Baymax, Your Personal Patch-care Companion) phabricator at mercurial-scm.org
Thu Aug 26 13:00:57 UTC 2021


baymax added a comment.
baymax updated this revision to Diff 30044.


  ✅ refresh by Heptapod after a successful CI run (🐙 💚)

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D11318?vs=29967&id=30044

BRANCH
  default

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D11318/new/

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

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
@@ -220,7 +220,7 @@
         assert mtime is not None
         old_entry = self.get(f)
         self._dirs_incr(f, old_entry)
-        e = self._map[f] = DirstateItem(state, mode, size, mtime)
+        e = self._map[f] = DirstateItem.from_v1_data(state, mode, size, mtime)
         if e.dm_nonnormal:
             self.nonnormalset.add(f)
         if e.dm_otherparent:
@@ -273,7 +273,7 @@
             # XXX might be merged and removed ?
             old_entry = self._map.get(filename)
             self._dirs_decr(filename, old_entry=old_entry, remove_variant=True)
-            self._map[filename] = DirstateItem(b'r', 0, 0, 0)
+            self._map[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, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210826/8eefc0c4/attachment-0002.html>


More information about the Mercurial-patches mailing list