dirstate-item: use the properties in fakedirstatewritetime
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 05 Jul 2021 06:24:51 +0200
changeset 47543 20b65f34d704
parent 47542 b8013cb71ef3
child 47544 5363610f61ef
dirstate-item: use the properties in fakedirstatewritetime Differential Revision: https://phab.mercurial-scm.org/D10987
tests/fakedirstatewritetime.py
--- a/tests/fakedirstatewritetime.py	Mon Jul 05 03:58:38 2021 +0200
+++ b/tests/fakedirstatewritetime.py	Mon Jul 05 06:24:51 2021 +0200
@@ -42,8 +42,10 @@
     # for consistency
     actualnow = int(now)
     for f, e in dmap.items():
-        if e[0] == 'n' and e[3] == actualnow:
-            e = parsers.DirstateItem(e[0], e[1], e[2], -1)
+        if e.need_delay(actualnow):
+            e = parsers.DirstateItem(
+                e.state, e.mode, e.size, dirstatemapmod.AMBIGUOUS_TIME
+            )
             dmap[f] = e
 
     return orig(dmap, copymap, pl, fakenow)