[MERGE/RFC] Working tree content filtering

Ian Clatworthy ian.clatworthy at internode.on.net
Thu Apr 17 15:43:50 BST 2008


Here's a patch providing my progress so far on this. A lot more tests
are needed but there's an outside chance it basically works now. Brave
souls may wish to:

* write some experimental content filters
* patch in a _content_filter_stack() method to the WorkingTree class (in
  workingtree.py) to enable them
* tell me how broken or otherwise things are.

To state the obvious, this isn't production code. I'm publishing it now
in order to get some feedback on things like:

* how easy or otherwise it is for developers to create filters
* whether the implementation is heading in the right direction
  (before I add a heap more tests)
* places I've missed making changes to, e.g. PreviewTrees?

FWIW, until earlier tonight, the delta was much smaller than it is now
because I had a function in bzrlib.filters that returned the stack of
content filters given an absolute path. I decided to make the
content-filter-stack lookup a responsibility of a Tree and to use paths
relative to the top of the tree. That feels a better design IMO. Let me
know if you think the responsibility better belongs somewhere else.

Finally, a big thank-you to Alexander who did the hard work on finding
most of the spots that needed changes made. Had he not done the original
code, this patch would have taken me much longer.

Ian C.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wt_content_filters.patch
Type: text/x-diff
Size: 28328 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080418/224dbf8b/attachment-0001.bin 


More information about the bazaar mailing list