[MERGE/RFC] catch-all handler for filter stack lookup

Jelmer Vernooij jelmer at samba.org
Sat Mar 28 15:21:05 GMT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Ian,

Ian Clatworthy wrote:
> Jelmer wants to transparently map svn properties to bzr
> content filters. Our current filter stack registration
> function supports a dictionary mapping from
> 
>   supported value -> filter stack
> 
> but that doesn't scale to stuff like ...
> 
>   keywords = Date, Version
> 
> where the value is arbitrarily complex. This patch adds
> an optional fallback handler - a callable invoked if an
> unknown value is encountered. That should be good enough
> I think for Jelmer to weave his magic. :-)
> 
> 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.

Cheers,

Jelmer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iJwEAQECAAYFAknOQF8ACgkQDLQl4QYPZuXhQwQAiyjb4sy10usUhkCfmi6aqEMs
qv/la0OWdiI1FgkpzLu+OJDH76JlcgG+uSzgmaAufyqJdKNfqtILsgG0sKoVqwG7
N2FRDUimLyvDjRfwENNjMVlMgq52wcUQOs303X4SXajdzjSRs4Pc22jrgkOPCfym
PsFOrbnYCiHnFIwTJiA=
=5+1I
-----END PGP SIGNATURE-----



More information about the bazaar mailing list