[MERGE] left align log output if it only contains merge revisions
John Arbash Meinel
john at arbash-meinel.com
Fri Jul 6 20:06:10 BST 2007
John Arbash Meinel has voted +1 (conditional).
Status is now: Semi-approved
Comment:
I actually misunderstood what Kent was doing originally. But why are you
doing:
+ depths = list(set([d for r,n,d in view_revisions]))
+ depths.sort()
+ min_depth = depths[0]
rather than:
min_depth = min(d for r,n,d in view_revisions)
I don't see any reason to go through a set and a sort just to extract
the minimum of a list. (I assume you used a set because you didn't want
to sort the full list, but the built in 'min()' function is quite a bit
better).
I would also prefer:
if min_depth != 0:
to
if min_depth:
I realize they are the same thing, but for me the former is a lot more
obvious of what you are trying to check. (There isn't any reason that
min_depth would be None or False).
As for flushing left or not... I'm starting to lean more into the 'it is
wasting space on the left', rather than specific significance for
mainline revs. The dotted revnos would probably make it clear, and this
only actually takes effect when you are obviously displaying a merged
branch.
I really wonder how this code handles:
bzr log -r 123.4.5..123.7.8
But that is really your other changes, not this one.
For details, see:
http://bundlebuggy.aaronbentley.com/request/%3C4641D88F.5060802%40gmail.com%3E
More information about the bazaar
mailing list