[MERGE] Support logging single merge revisions with short and line log formatters.

Robert Collins robertc at robertcollins.net
Sun Nov 18 19:26:17 GMT 2007


On Sat, 2007-11-17 at 19:50 +0900, Kent Gibson wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> This patch adds support for logging single merge revisions using the
> short and line log formatters.
> e.g.
> $ bzr log --line -r 2978.3.1
> 2978.3.1: Kent Gibson 2007-11-12 Return an error if the revisionspec
> contain...
> 
> and
> 
> $ bzr log --short -r 2978.3.1
> 2978.3.1 Kent Gibson    2007-11-12
>       Return an error if the revisionspec contains merge revisions,
> but the log formatter doesn't support them.
> 
> 
> The patch was inspired by John's review of one of my recent bug fix
> patches.
> 
> It's being a bit lazy, but the tests are basically just a cut and
> paste of other tests.  The log tests, both core and blackbox, are ripe
> for a bit of rationalisation to allow the tests to share building the
> workingtree or even the workingtree instance itself, but I'd rather
> put that off until a subsequent patch.  Any suggestions along those
> lines are welcome.
> 
> There are also a couple of minor tidy ups in there - removed some
> unused imports from _show_log and moved the test_short_log_with_merges
> test from the TestLineLogFormatter to TestShortLogFormatter.

I haven't read the whole patch just yet, only glanced over it. However I
note you are moving imports around into if blocks and the like.

Our coding standard is that imports should be done at the top of the
module wherever possible. Lazy imports make the cost of doing that
negligible if the import isn't actually used during a particular method
call, and it keeps the locking involved in imports outside of inner
loops and so on.

-Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20071119/f465a4ac/attachment.pgp 


More information about the bazaar mailing list