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

Erik Bågfors zindar at gmail.com
Tue Dec 13 16:59:31 GMT 2005


2005/12/13, James Blackwell <jblack at merconline.com>:
> On Fri, Dec 09, 2005 at 09:10:36AM -0600, John Arbash Meinel wrote:
> > Michael Ellerman wrote:
> > > Hiya,
> > >
> > > I'm a lazy arse, so typing "bzr log | less" is just too much for me. Hence the
> > > "lesslog" plugin I just wrote, alias "ll" which does the less part for you.
> > >
> > > It takes all the same options as regular log, in fact it's a subclass.
> > >
> > > Don't be too lazy to branch it!
> > >
> > > http://michael.ellerman.id.au/files/bzr/lesslog
> > > cheers
> > >
> > Maybe I'm missing the true value of "bzr log | less". If someone has
> > reasons why it is better, please let me know. My understanding is that
> > the major reason we do it, is because that is what "cvs log" does. But
> > "cvs log" is a really crappy command, which we probably don't really
> > want to emulate.
>
> 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".

Thirdly, there is a number of good reasons to stay with something
that's familiar to cvs/svn/darcs/etc users.  They all expect the full
log when running "bzr log".

A svn user will imediatly see that they get to keep the logs from all
merges, which will show this person that bzr is lots better than svn. 
But saying that the equivalent of  "svn log" is "bzr -r-1..1 --full
log"  shows that bzr is more advance (and hard to use) than svn.

I think the defaults should stay and people can install plugins, learn
how to use "| less", "| head" etc, or learn how to create aliases.

It could be an idea to have a "shortlog" command or make something
like that easily accessable with "bzr log -s" or something.

Regards,
Erik




More information about the bazaar mailing list