Order in output of "bzr status -S -r"
John Arbash Meinel
john at arbash-meinel.com
Sat Mar 12 13:15:43 UTC 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 3/12/2011 11:27 AM, Eli Zaretskii wrote:
> "bzr status -rR1..R2" shows the files that were
> added/removed/renamed/modified between the two specified revisions.
> It shows them nicely ordered alphabetically in each category.
>
> By contrast, "bzr status -S -rR1..R2" does not keep that order, and
> instead shows the files in some seemingly random order, which makes
> the output less convenient for human consumption. Is this on purpose,
> or should I file a bug?
>
> TIA
>
I'm guessing the latter shows the status in "iter_changes" or
"dirblocks" order. I can go into detailed description, but roughly every
file in a directory is scanned before descending into subdirs. So if you
have:
a
b/
h/
i
j
k/
l
m/
n
o
p
They will come out as:
a
b
m
p
b/h
b/k
b/h/i
b/h/j
b/k/l
m/n
m/o
It is an ordering that matches pretty darn well with disk scanning.
Because you complete all directory entries before doing a context switch.
If you really wanted perfectly sorted order, you could always do:
bzr status | sort -k 2
or if you want to group and sort, you can do
bzr status | sort
I'm pretty sure it is intentional, though you can file a wishlist bug if
you want.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk17cf8ACgkQJdeBCYSNAANokwCdGTFMRM9qJMlv1NhTio4pFw5w
388AoK4ZDCnee9v5Es2EzDUGu/Ns6JQ3
=lMCZ
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list