[MERGE] make ls non-recursive by default
John Arbash Meinel
john at arbash-meinel.com
Thu Mar 26 17:52:07 GMT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ian Clatworthy wrote:
> Vote 1 for progressive disclosure.
>
> The main issue here is that I've completely removed
> the --non-recursive option as explained in the NEWS
> item. This is a rarely used command so I feel that
> clearing flagging this as a compatibility break in NEWS
> is good enough. The alternative is to keep the option
> and somehow hide/deprecate it? I'm happy to take advice
> on this.
>
> Ian C.
>
Removing "--non-recursive" in favor of "--no-recursive" is fine with me.
It isn't perfect, but IMO it is good enough.
Though if we changed the argument to "--recurse" and "--no-recurse" then
it would make a lot more sense.
Note that it won't improve the speed of "ls" yet, given that ls always
recurses the entire tree, and then filters based on whether there is a
"/" in the path.
Some of that is because we need properly ordered results. I don't think
'iter_entries' or 'iter_entries_by_dir' allows you to prune anything,
though you could stop iterating the latter as soon as you end up in a
new directory. However the latter has a different sort ordering. (I
believe iter_entries is pure depth-first, while iter_entries_by_dir
outputs all entries in a dir and then recurses, which is not quite
breadth first, but not depth first either.)
So I don't have a strict problem with the changes, but I figured I'd
point out that for performance, your patch does nothing to help.
BB:comment
Not quite tweak because I'm hesitant to just approve major UI changes,
especially since "bzr ls" was meant to be a scripting interface moreso
than even a UI. (As such, scripts break when you change this sort of thing.)
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAknLwMcACgkQJdeBCYSNAAMzqACfb4mksuGXOK9YyNH9ZZNeL7I/
32sAoMbLUcNXKAqNtA2LulTATwOpST6B
=eK7G
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list