bzr.dev has broken 'bzr log --short' (it shows merges)
John Arbash Meinel
john at arbash-meinel.com
Fri Jan 16 22:15:53 GMT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I realize this may be somewhat intentional, but the output of "bzr log
- --short" just changed in bzr.dev.
Specifically, it is now showing merged revisions. (Which means it also
computes dotted revnos, and takes 2.6s instead of 0.4s for 'bzr log
- --short --forward -r-10..-1').
I don't see a new flag that allows me to say "I really don't want merged
revisions", so I have the feeling something was accidentally broken in
Ian's recent revisions, which caused "--short" to no-longer indicate
that we didn't want to show merged revisions.
I'm not sure how this wasn't caught, though I wouldn't be surprised if
the test suite wasn't explicitly testing that with log --short isn't
showing merged revs.
I found the bug, which is that we have these lines:
include_merges = generate_merge_revisions or specific_fileid
view_revs_iter = get_view_revisions(mainline_revs, rev_nos, branch,
direction, include_merges=include_merges)
And in get_view_revisions we have:
if include_merges is False:
So for "bzr log --short -r -10..-1" we actually have
generate_merge_revisions = False
and
specific_fileid = None
Which means that include_merges is actually "None" and not False. (I'm
guessing Ian didn't entirely realize the pythonism:
(a or b) is b
(a or b) is not False
Or
(False or None) is None
the "or" operator actually returns the second object, not a boolean value.
Anyway, I prefer:
if not include_merges:
Anyway, rather than "is False".
Because this is broken for me "right now", I'm going to submit this patch:
=== modified file 'bzrlib/log.py'
- --- bzrlib/log.py 2009-01-15 14:05:13 +0000
+++ bzrlib/log.py 2009-01-16 22:14:55 +0000
@@ -620,7 +620,7 @@
:return: an iterator of (revision_id, revno, merge_depth)
(if there is no revno for a revision, None is supplied)
"""
- - if include_merges is False:
+ if not include_merges:
revision_ids = mainline_revs[1:]
if direction == 'reverse':
revision_ids.reverse()
And then hopefully I'll get a proper patch with a test that we can review.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAklxBxkACgkQJdeBCYSNAAPhNwCff64b4rZVgC1U7TOoSKE72QsO
cGwAoM7lBRgZekSqGHLTC/Mg68qIcAel
=YUGd
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list