[Commented On] D10851: vfs: add a `register_file` method on the vfs class

baymax (Baymax, Your Personal Patch-care Companion) phabricator at mercurial-scm.org
Tue Jun 15 14:25:32 UTC 2021


baymax added a comment.
baymax updated this revision to Diff 28573.


  ✅ refresh by Heptapod after a successful CI run (🐙 💚)

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D10851?vs=28528&id=28573

BRANCH
  default

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D10851/new/

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

AFFECTED FILES
  mercurial/store.py
  mercurial/vfs.py

CHANGE DETAILS

diff --git a/mercurial/vfs.py b/mercurial/vfs.py
--- a/mercurial/vfs.py
+++ b/mercurial/vfs.py
@@ -329,6 +329,9 @@
                     None  # pytype: disable=attribute-error
                 )
 
+    def register_file(self, path):
+        """generic hook point to lets fncache steer its stew"""
+
 
 class vfs(abstractvfs):
     """Operate files relative to a base directory
diff --git a/mercurial/store.py b/mercurial/store.py
--- a/mercurial/store.py
+++ b/mercurial/store.py
@@ -730,6 +730,11 @@
         else:
             return self.vfs.join(path)
 
+    def register_file(self, path):
+        """generic hook point to lets fncache steer its stew"""
+        if path.startswith(b'data/') or path.startswith(b'meta/'):
+            self.fncache.add(path)
+
 
 class fncachestore(basicstore):
     def __init__(self, path, vfstype, dotencode):



To: marmoute, #hg-reviewers, pulkit
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210615/e20e2289/attachment-0002.html>


More information about the Mercurial-patches mailing list