Patchwork D11606: dirstate-item: replace a call to new_possibly_dirty

login
register
mail settings
Submitter phabricator
Date Oct. 3, 2021, 10:54 a.m.
Message ID <differential-rev-PHID-DREV-5xvzghgzfock46gm5br5-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49928/
State Superseded
Headers show

Comments

phabricator - Oct. 3, 2021, 10:54 a.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  The constructor is on its way out, so we inline a relevant call before
  dropping it.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/pure/parsers.py

CHANGE DETAILS




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

Patch

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