[MERGE] [Bug #148908] Return an error if the revisionspec contains merge revisions, but the log formatter doesn't support them.]

Kent Gibson warthog618 at gmail.com
Mon Nov 12 23:48:28 GMT 2007


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


Aaron Bentley wrote:
> John Arbash Meinel wrote:
>> John Arbash Meinel has voted tweak. Status is now: Semi-approved
>> Comment: I would sort of prefer it if we could log them in the
>> single point case. (bzr log --short -r 1.2.2)
>
>> However, this error is better than getting an ugly traceback.
>
>> Oh, and I would generally prefer to use:
>
>> if (rev_id in dict) rather than (dict.has_key(rev_id))
>
> bb:approve
>
> True, but this is still a case of look-before-you-leap.  We could
> avoid any performance hit in the general case by handling the
> exception in _filter_revision_range instead of trying to avoid that
> exception.
>
I looked at that, but I would need to either pass the
generate_merge_revisions flag in so _filter_revision_range could
accurately determine the source of the exception, or get it to throw a
more specific exception than ValueError, which could be caught and
handled in _show_log.  Both of those resulted in code more ugly than the
simple precondition check, IMHO of course.
I'm more than happy to change it to one of those, or some other way, if
you'd like.

> Not that it matters in this case.  But avoiding
> look-before-you-leap is a good habit to get into.
>
Agreed.  I was quite uncomfortable with doing it with the precondition,
in fact my first attempt was to handle the exception, which was why I
pointed it out in my submit comment.

Thanks,
Kent.
ps Aaron - sorry about the dupe.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHOOZLgoxTFTi1P8QRAgCuAKDN1bQuXrHhzha377UTMZl2WSYQ1gCgi1JJ
q6ZgLXBBCl2tTj13OFjaGrU=
=s+QJ
-----END PGP SIGNATURE-----



More information about the bazaar mailing list