[Updated] D11479: filecache: abstract the fetching of the list of tracked file
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Tue Sep 28 08:08:42 UTC 2021
Closed by commit rHG1c447fb82232: filecache: abstract the fetching of the list of tracked file (authored by marmoute).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D11479?vs=30353&id=30406
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D11479/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D11479
AFFECTED FILES
mercurial/scmutil.py
CHANGE DETAILS
diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -1662,6 +1662,9 @@
def __init__(self, *paths):
self.paths = paths
+ def tracked_paths(self, obj):
+ return [self.join(obj, path) for path in self.paths]
+
def join(self, obj, fname):
"""Used to compute the runtime path of a cached file.
@@ -1690,7 +1693,7 @@
if entry.changed():
entry.obj = self.func(obj)
else:
- paths = [self.join(obj, path) for path in self.paths]
+ paths = self.tracked_paths(obj)
# We stat -before- creating the object so our cache doesn't lie if
# a writer modified between the time we read and stat
@@ -1709,7 +1712,7 @@
if self.name not in obj._filecache:
# we add an entry for the missing value because X in __dict__
# implies X in _filecache
- paths = [self.join(obj, path) for path in self.paths]
+ paths = self.tracked_paths(obj)
ce = filecacheentry(paths, False)
obj._filecache[self.name] = ce
else:
To: marmoute, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210928/ab368d20/attachment-0002.html>
More information about the Mercurial-patches
mailing list