D1285: repoview: add a new attribute _visibilityexceptions and related API
yuja (Yuya Nishihara)
phabricator at mercurial-scm.org
Sat Dec 9 01:24:21 UTC 2017
yuja added a comment.
>> How long should the visibilityexception be preserved?
>
> The visibility exceptions must be preserved until we calculate filteredrevs for that filter. After adding the expections, we clear filteredrevcache to make sure we calculate that again.
Sounds like it is actually a temporary variable. Instead, how about making
`filtertable` or `filterfunc` dynamic?
repo.filtertable['visible:blahblah'] = partial(computehidden, exceptrevs)
repo.filtered('visible:blahblah')
>> We could attach it to `unfi`, but in which case, we have to be careful to not leak
>> the current visibilityexception to the subsequent sessions. A `repo` object may
>> live longer than a single command/request session in hgweb or command server.
>
> Since we want them while calculating filteredrevs where we pass a unfiltered repo, we need a way to get visibilityexceptions for a filtername from unfi. Maybe we can clear out the exceptions after using them.
I guess the hard part is when we can say the exceptions are "used."
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D1285
To: pulkit, #hg-reviewers, quark, yuja
Cc: yuja, lothiraldan, quark, mercurial-devel
More information about the Mercurial-devel
mailing list