[MERGE] add --detritus option to ls

Aaron Bentley aaron.bentley at utoronto.ca
Wed Jun 14 16:02:57 BST 2006


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

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.

>>-    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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEkCUg0F+nu1YWqI0RAiOgAJ4m3WMpPsRvL5/Lv9TR5sOO+Uhs+gCcC9j8
KpvDFuyr5Pwej9IFopYT26E=
=rPYo
-----END PGP SIGNATURE-----




More information about the bazaar mailing list