Patchwork D11707: fsmonitor: fix traceback after removal of nonnormalset (issue6600)

login
register
mail settings
Submitter phabricator
Date Oct. 20, 2021, 8:27 a.m.
Message ID <differential-rev-PHID-DREV-dxdvbuirsmsr352x7dhp-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50031/
State Superseded
Headers show

Comments

phabricator - Oct. 20, 2021, 8:27 a.m.
Alphare created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This basically does the same thing it used to do, but in the only place it's
  needed.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  hgext/fsmonitor/__init__.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/fsmonitor/__init__.py b/hgext/fsmonitor/__init__.py
--- a/hgext/fsmonitor/__init__.py
+++ b/hgext/fsmonitor/__init__.py
@@ -333,7 +333,11 @@ 
         # for better performance, directly access the inner dirstate map if the
         # standard dirstate implementation is in use.
         dmap = dmap._map
-    nonnormalset = self._map.nonnormalset
+    nonnormalset = {
+        f
+        for f, e in self._map.items()
+        if e.v1_state() != "n" or e.v1_mtime() == -1
+    }
 
     copymap = self._map.copymap
     getkind = stat.S_IFMT