[MERGE] Make 'ls' aware of views
Ian Clatworthy
ian.clatworthy at internode.on.net
Tue Feb 24 07:05:49 GMT 2009
Eduardo O. Padoan wrote:
> ... just attached the wrong file. Here we go again...
bb:tweak
I think the code in builtins.py should be tweaked as we merge ...
> - null=False, kind=None, show_ids=False, path=None):
> + null=False, kind=None, show_ids=False, path=None,
> + apply_view=True):
The only parameters added to run() should be options. Set apply_view
lower ...
> + if apply_view and tree.supports_views():
> + view_files = tree.views.lookup_view()
> + if view_files:
> + view_str = views.view_display_str(view_files)
> + note("*** ignoring files outside view: %s" % view_str)
Don't test apply_view here. Set it to True inside the inner if test.
> + if apply_view and tree.supports_views():
> + try:
> + views.check_path_in_view(tree, fp)
> + except errors.FileOutsideView:
> + continue
And *just* test apply_view here, don't retest tree.supports_views()
every time through the loop.
Otherwise, it all looks pretty good.
Do you think there's any chance for confusion about giving the full
tree paths in the "ignoring ..." message if the user is running
ls in a subdirectory? If so, we probably need to solve that for all
view messages, not just the ls one.
Ian C.
More information about the bazaar
mailing list