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

Erik Bågfors zindar at gmail.com
Wed Dec 14 10:52:29 GMT 2005


> > > 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.
>
> I'd like to stress that I'm not suggesting that the ability to retrieve
> all logs should go away. It should just be moved to a "--full" option.

I know, I just expect to be able to do it without it.

> >
> > The same as I do with any other command.
>
> Try: cd /dev; <tab><tab>

Ehh... did you mean "cd /dev/<tab><tab"?

Anyway?

$ cd /dev; <tab><tab>
Display all 3027 possibilities? (y or n)

$ cd /dev/<tab><tab>
dri/     fd/      loop/    net/     shm/     .static/
evms/    input/   mapper/  pts/     snd/     .udevdb/

What are you getting at?
<tab><tab> in bash is an interactive program, it's inside of your
shell. It's totally different than a none interactive program such as
bzr, grep, ls, find, etc.

> > > 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.
>
> Destroy is a strong word. Did you really mean it?

Almost...
I think bzr is great and the way it works is never strange or
unexpected.  When adding checkouts to bzr, you can almost substitute
svn for bzr and the commands are pretty much the same

svn commit <-> bzr commit
svn checkout <-> bzr checkout
svn update <-> bzr update

This kind of stands out
svn log -> bzr log --full --all
bzr log -> svn log |  head -25

I think bzr has the potential to be the defacto standard RCS of the
OSS world. But people need to change to it first. This is a small
thing but at least one.

> > > 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.
>
> --full would imply --merges. I'm open to the idea of:
>
> So you'd change from:
>
> bzr log | less
> bzr log --full
>
> For the rare occasion that you're all the way up on revision 32,432 and
> want to search revision 2 as well:
>
> bzr log --full --all

I think the default should be as it is today.  This is the same way as
svn/cvs/darcs/rcs/etc and is least confusing for new users.  However,
can't we do what darcs is doing and give you the possibility to
specify defaults to a command.  For example

--merge and --nomerge are opposite options, --merge is default

--all and --last are opposite options, --all is default,

That way you can change the defaults for you to "--nomerge --last"
every time you run bzr log, and I can keep it the way I want it :).

To be honest, I think the idea of not showing everything in the log is
fine, and most likely the way most people wants it, including me.  But
I also think it's confusing and shouldn't be default.

Now, I've ranted about this like it's the most important thing in the
world, it surely isn't.  Whatever you guys decide, I'm fine with.  I
just know that I can't take the time to contribute with real code, so
I'll just nag you all instead, with all stupid details I can think of
:)

Regards,
Erik




More information about the bazaar mailing list