[MERGE] add --detritus option to ls

John Arbash Meinel john at arbash-meinel.com
Thu Jun 15 03:34:58 BST 2006


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

Aaron Bentley wrote:
> Martin Pool wrote:
>>> --detritus may not be the perfect name but I think "cruft" is jargon.  
> 
> I think the best suggestion I've heard is "debris".  I think I've
> mentioned before that I don't like "junk" because these files aren't
> junk when they're created-- they just have a very short shelf life.
> 

I agree. 'debris' is the best I've heard.

>>>> -    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?
> 
> I'm not sure how marginal it will be in the future.  I put it there
> because I thought there should be One True Way to list the debris, and
> if we do it at a higher level like cmd_ls, we'll get multiple
> implementations, none of which does exactly the same thing.  Someone
> might consider versioned files that match the regex to be debris, for
> example.
> 
> Perhaps the right way to handle this is to allow one or more (regex,
> letter) tuples to be passed into cmd_ls, so that matching is done in a
> uniform way?
> 
> Aaron

Well, to me, that would mean that 'list_files' should take a filter
function, which can be arbitrarily complex.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEkMdSJdeBCYSNAAMRAsVtAKCqHhVmQfUrQbaLDnbFPw5zeKNdigCgrCgb
zCWE/GTHexFg64XrqFmUAes=
=cSkt
-----END PGP SIGNATURE-----




More information about the bazaar mailing list