[MERGE] catch-all handler for filter stack lookup

Ian Clatworthy ian.clatworthy at internode.on.net
Sun Mar 29 04:13:15 BST 2009


Jelmer Vernooij wrote:

>> I'm making this an RFC because I want Jelmer to confirm
>> this meets his needs and because I'm not sure how best
>> to expand the lazy registration function Jelmer added.
>> Perhaps we want to register a compound object rather
>> than a (map,fallback) tuple? If so, we could point to that
>> object. Or we could point lazily to both a map and a fallback
>> callable?
> Thanks! I can confirm this would meet my needs, but it would also be
> nice to load the svn keywords support in bzr-svn lazily.
> 
> Perhaps just the fallback parameter could be supported for lazy loading?
> The dictionary lookup can be done inside of the fallback function as well.

That's true, but I'd prefer to keep the semantics of the fallback
the same, regardless of how it is registered. I've therefore gone
with (lazy) registering a (filter_stack_map, fallback) tuple and
I've updated the docstring to reflect this. I've removed the RFC
from this patch accordingly.

FWIW, I'm still not quite ready to make the registry used behind
the scenes public yet. My main concern is that we'll need some
way of optionally giving a priority to different filters so
that things get done in a particular order. That's YAGNI currently
but it's my reason for retaining the special registration functions
for now.

Ian C.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: filter-stack-fallback-2.patch
Type: text/x-diff
Size: 8144 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090329/fc630a53/attachment-0001.bin 


More information about the bazaar mailing list