[MERGE] add --detritus option to ls

Martin Pool mbp at canonical.com
Thu Jun 8 10:35:22 BST 2006


On  7 Jun 2006, Aaron Bentley <aaron.bentley at utoronto.ca> wrote:
> This bundle adds --detritus support to bzr ls, so that people can use it
> with xargs, or their tool of choice.

I'm in favour of adding more filters to bzr ls.

--detritus may not be the perfect name but I think "cruft" is jargon.  

(I was thinking about http://www.google.com/search?q=define%3Adebride
but not very seriously.)

The test is solid but rather coupled to the particular output format of
ls.  I wonder if it would be better done at a lower level where it gets
the results as a Python list or iter?  But then this is mostly moved
code so it doesn't block this improvement.

>  
> -    def list_files(self):
> +    def list_files(self, allow_detritus=False):
>          """Recursively list all files as (path, class, kind, id, entry).
>  

Adding it as a parameter here is a bit strange for a somewhat marginal
feature.  Can't we just pass it back as unknown and filter at a higher
level?

However it is good for the detritus predicate to be supplied by the
WorkingTree.

-- 
Martin




More information about the bazaar mailing list