D5638: branchmap: encapsulate cache updating in the map itself

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Fri Jan 25 15:53:31 EST 2019


martinvonz added inline comments.

INLINE COMMENTS

> perf.py:2299
>              else:
> -                view._branchcaches.pop(filtername, None)
> +                view._branchcaches._per_filter.pop(filtername, None)
>              view.branchmap()

Same here: I think this needs to be made compatible with both versions (before and after this patch)

> localrepo.py:2077
>              self.ui.debug('updating the branch cache\n')
> -            branchmap.updatecache(self.filtered('served'))
> +            self.filtered('served').branchmap()
>  

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.

> streamclone.py:16
>  from . import (
>      branchmap,
>      cacheutil,

`test-check-pyflakes.t` says that this is now unused

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