[PLUGIN] Lesslog -> run bzr log through less automatically
Erik Bågfors
zindar at gmail.com
Wed Dec 14 09:54:06 GMT 2005
> 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).
Nope, I'm doing what I expect and know from other software. I've
used cvs, svn and darcs, rcs and all of them prints the full log when
I ask them for the log. The same way "grep blaha file" lists ALL
lines that matches "blaha" in the file. I would be VERY surprised if
I didn't get them all.
This is the way 99% of unix commands work. They list everything you
ask for. Can you imagine if find or ls would just give you part of
the output? :) (I know this is pushing it, but you get my point :) )
I use the unix tools daily and using "| less", "| grep" etc is very
common. That's how I expect to solve the "problem" (as you call it, I
call it normal usage).
> 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.
1 minute? What bzr are you using?
: [bagfors at zyrgelkwyt]$ ; time bzr log > /dev/null
real 0m10.443s
user 0m5.365s
sys 0m0.319s
10 seconds here.
Are you using gnome-terminal perhaps? It's dead slow, but that's not
bzr's fault. In gnome-terminal it takes a minute to do it, in xterm
12.4 seconds.
> 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.
Agreed, but I want to send it to less, to grep, to perl, to a file, to
an ssh connection etc.
The same as I do with any other command.
> 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. :)
I'm all for that, and I think it's fine to provide functionality to do
that. "bzr last" or "bzr lastlog" or "bzr log -s" or something. Just
don't destroy the normal bzr log.
> My ideal log command would be:
>
> bzr log [--full] [--merges] [--all | -r...]
I'd really hate that. That means that I would have to do "bzr log
--full --merges --all | grep searchterm". Most likely I would have to
start by doing "bzr log --help" to get to know how to write that line.
For me, searching through the history is quite common. It's quite
common if you are 50+ people working on the same project to need to
know who closed a specific bug, who added functionality,etc. And if
you have bzr/svn/etc in front of you it's more efficient just
searching the log than to go to the bugtrack.
In fact, I'd almost like "bzr log -v" to be default, then I can
search/grep/whatever for whatever I'm interested in, using the tools I
know and love :)
Logs from merges is the real killer thing for me, I'd really like that
to be default, I can easily imagine the situation where merges are
very very common and half of all commits would just be "merge
from.....". I strongly belive that people will be suprised if merges
and all are not default. I know I HATE that I loose all history from
merges in svn.
/Erik
More information about the bazaar
mailing list