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

John Arbash Meinel john at arbash-meinel.com
Sat Mar 28 03:10:47 GMT 2009


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

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?
> 
> Ian C.
> 

So it seems to me that the obvious thing would be to provide the filter
objects with some amount of state, provided by their configuration. (Or
they just read the configuration directly.)

I don't really know what you are thinking about with 'fallback', but any
decent system is going to need a way to be configured...

John
=:->

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

iEYEARECAAYFAknNlTcACgkQJdeBCYSNAAPkoQCeJ4McEsCaLRlw4u98YU2Bgn37
caEAn2sfvhE32MT5da0gh4CN7/nfkoFQ
=xNK/
-----END PGP SIGNATURE-----



More information about the bazaar mailing list