[PLUGIN] Lesslog -> run bzr log through less automatically

James Blackwell jblack at merconline.com
Wed Dec 14 04:49:24 GMT 2005


On Tue, Dec 13, 2005 at 07:04:55PM +0100, Jan Hudec wrote:
> On Tue, Dec 13, 2005 at 17:59:31 +0100, Erik Bågfors wrote:
> > 2005/12/13, James Blackwell <jblack at merconline.com>:
> > > I find myself running 'bzr log -r-10..-1 --lines' quite a lot. Its usually
> > > what I want about 90% of the time.
> > >
> > > I think log could be a bit more useful if:
> > >
> > >  * --lines was the default, with the old behaviour coming back with --full
> > >
> > >  * A sane default is put in place for bzr log, say -15..-1. .5. If
> > >    somebody really wants more than 15 lines of logs, they can type
> > >    -r-1..1
> > 
> > I disagree with both of these.
> > 
> > The reason is that for me, half of the REALLY good thing about bzr log
> > is that I get the log from all commits in all merges.
> > 
> > Secondly, I use | less so often that I don't even think about it
> > anymore.  If feel unexpected to NOT get the full log when I do "bzr
> > log".
> 
> So woul[d] I.

It sounds to me like you're solving the problem (reviewing all logs is
generally not the most common operation) by introducing a workaround by
using |less). 

For today's bzr.dev that takes almost 1 minute to produce the 19,293 lines
of output in bzr log. Even if you hide the the output behind less the
system is still heavily hitting the cpu/disk drive for the 8-12 seconds
that its running -- which is a bit much for multi-user systems.

I believe that people are generally much more interested in the number of
logs that fit on their screen with no wrap than they are in 833 screens of
data.

So why not limit it to one screen? You wouldn't even need less most of the
time! And if you wanted something more than the last 24 merges, then
provide a option for the extra work. :) 

My ideal log command would be: 

bzr log [--full] [--merges] [--all | -r...]


> > I think the defaults should stay and people can install plugins, learn
> > how to use "| less", "| head" etc, or learn how to create aliases.
> 
> Personally I often don't want to use pager even for very long output, because
> I have very long scrollback on my terminal. That especially makes sense if
> the logs were - as I think they should - printed OLDEST FIRST. Than I see the
> more recent part immediately and scroll back to the older parts.

This means that to see whats changed recently, the computer has to print
out every log for that branch -- ever, just so that you can scroll up. 

> 
> > It could be an idea to have a "shortlog" command or make something
> > like that easily accessable with "bzr log -s" or something.
> 
> I would propose two options:
> 
> bzr log -<number>
> (for any numerical value of -<number>) would be shortcut for -r -1..-<number>
> 
> bzr log -R
> (or something else if -R is already taken) would mean to print log reversed.
> Ie. oldest to newest for the default case and in combination with the above.
> 
> -- 
> 						 Jan 'Bulb' Hudec <bulb at ucw.cz>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051213/4591d2c1/attachment.pgp 


More information about the bazaar mailing list