changeset 48174:79ebbe19d9e3

dirstate-item: replace a call to new_normal The constructor is on its way out, so we inline a relevant call before dropping it. Differential Revision: https://phab.mercurial-scm.org/D11606
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 01 Oct 2021 09:28:19 +0200
parents 20e41b367953
children d0081dbca442
files mercurial/pure/parsers.py
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/pure/parsers.py	Fri Oct 01 09:25:13 2021 +0200
+++ b/mercurial/pure/parsers.py	Fri Oct 01 09:28:19 2021 +0200
@@ -150,9 +150,12 @@
             elif size == NONNORMAL:
                 return cls(wc_tracked=True, p1_tracked=True)
             elif mtime == AMBIGUOUS_TIME:
-                instance = cls.new_normal(mode, size, 42)
-                instance._mtime = None
-                return instance
+                return cls(
+                    wc_tracked=True,
+                    p1_tracked=True,
+                    has_meaningful_mtime=False,
+                    parentfiledata=(mode, size, 42),
+                )
             else:
                 return cls.new_normal(mode, size, mtime)
         else: