D5638: branchmap: encapsulate cache updating in the map itself
mjpieters (Martijn Pieters)
phabricator at mercurial-scm.org
Sat Jan 26 13:46:24 UTC 2019
mjpieters added inline comments.
INLINE COMMENTS
> martinvonz wrote in perf.py:2299
> Same here: I think this needs to be made compatible with both versions (before and after this patch)
I'll wait for confirmation; see the other patch.
> martinvonz wrote in localrepo.py:2077
> Hmm, it's much less clear now that this updates the cache. At the very least, it deserves a comment. Is the `updatecache()` call from `__getitem__()` necessary for your later patches? Sorry, I didn't quite follow.
Yes, the updating will change in a later, as yet to be submitted patch.
But why should it be clear //here// that there is a cache that is kept up-to-date on access to the branchmap? That's a responsibility of the cache, not of whatever accesses a branchmap. The cache is an implementation detail of branchmap, and should really not bleed out into code that merely consumes the map.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D5638
To: mjpieters, #hg-reviewers
Cc: martinvonz, mercurial-devel
More information about the Mercurial-devel
mailing list