Patchwork D10987: dirstate-item: use the properties in fakedirstatewritetime

login
register
mail settings
Submitter phabricator
Date July 5, 2021, 9:34 a.m.
Message ID <differential-rev-PHID-DREV-b5vdxrz7dvvft6yiido5-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49301/
State Superseded
Headers show

Comments

phabricator - July 5, 2021, 9:34 a.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  tests/fakedirstatewritetime.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/fakedirstatewritetime.py b/tests/fakedirstatewritetime.py
--- a/tests/fakedirstatewritetime.py
+++ b/tests/fakedirstatewritetime.py
@@ -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)