Mercurial > public > mercurial-scm > hg-stable
diff mercurial/vfs.py @ 47759:d7515d29761d stable 5.9rc0
branching: merge default into stable
This mark the start of the 5.9 freeze.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 21 Jul 2021 22:52:09 +0200 |
parents | 9ab54aa56982 |
children | 98c3fa6a3ac2 |
line wrap: on
line diff
--- a/mercurial/vfs.py Fri Jul 09 00:25:14 2021 +0530 +++ b/mercurial/vfs.py Wed Jul 21 22:52:09 2021 +0200 @@ -307,7 +307,7 @@ # multiple instances puts us at risk of running out of file descriptors # only allow to use backgroundfilecloser when in main thread. if not isinstance( - threading.currentThread(), + threading.current_thread(), threading._MainThread, # pytype: disable=module-attr ): yield @@ -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 @@ -483,7 +486,7 @@ fp = checkambigatclosing(fp) if backgroundclose and isinstance( - threading.currentThread(), + threading.current_thread(), threading._MainThread, # pytype: disable=module-attr ): if (