[PLUGIN] Lesslog -> run bzr log through less automatically
John Arbash Meinel
john at arbash-meinel.com
Tue Dec 13 16:34:44 GMT 2005
Aaron Bentley wrote:
> James Blackwell wrote:
>
>>>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
>
>
> (there's already the --long flag, not --full)
>
> While I'm flattered, and I'm all for sensible defaults, this would be
> suboptimal for some common uses, as it does not show merges. I do
> frequently find that I want to hide merges, though, which is when I turn
> to --line. It also doesn't show revno, but I guess I'm convinced that
> should be added to it.
>
> I think it would be good to provide a general facility for setting
> defaults. e.g.
>
> $ bzr default-options log
> No default options set for "bzr log"
> $ bzr default-options log --line
> Default options for "bzr log" are "--line"
> $ bzr log -r -1
> Martin Pool 2005-12-13 MsgEditor tests should be skipped on platforms
> withou...
> $ bzr --no-defaults log -r -1
> ------------------------------------------------------------
> revno: 1487
> committer: Martin Pool <mbp at sourcefrog.net>
> branch nick: bzr.dev (Main development branch)
> timestamp: Tue 2005-12-13 16:48:04 +1100
> message:
> MsgEditor tests should be skipped on platforms without unicode fs.
>
>
>>>Interesting problem trying to figure out how to reliably detect when a
>>>branch becomes diverged in a reasonable manner.
>
>
> You could do it by branch nick, or by committer. I should note that my
> committer id changes more frequently than my branch nick.
> Unfortunately, you'll get the same pattern if J. Random Hacker starts
> working on bzr.dev.
>
> But it's UI, so the requirements for reliability aren't as great.
>
> Aaron
I would actually do this as a ~/.bazaar/bazaar.conf or
~/.bazaar/branches.conf setting.
So if you want per-branch defaults for log, then you could put it in
~/.bazaar/branches.conf, and if you want to set your user preferences,
then you do it in ~/.bazaar/bazaar.conf
I would really like to see defaults be configurable. So far I just wrote
a plugin which sets my defaults. But some people would like commit to
always be verbose, etc.
I'm not sure what the syntax should be. I know cvs has cvsrc which is
something like "cvs update -dP" which always sets -dP whenever cvs
update is run. I don't know that there is a way to disable them, which
would be nice.
Maybe something like:
~/.bazaar/bazaar.conf
[DEFAULT]
cmd log default = --line -r -10..-1
cmd branch default = --verbose
So the syntax would be "cmd <command name> default = <default args>"
The only problem is that I know 'bzr log' will fail if you supply a
range which doesn't exist. So if you do "bzr log -r -10..-1" with a
branch which only has 6 revisions, it will fail. Which is where '--limit
10' would make a little more sense. (Though I could also argue that
negative numbers just limit themselves to 0).
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051213/f838697b/attachment.pgp
More information about the bazaar
mailing list