[RFC][PATCH] support for aliases in bazaar.conf
John A Meinel
john at arbash-meinel.com
Fri Feb 10 23:55:17 GMT 2006
Erik Bågfors wrote:
> 2006/2/6, Martin Pool <mbp at sourcefrog.net>:
>> On 5 Feb 2006, Erik B?gfors <zindar at gmail.com> wrote:
>>> Hi
>>>
>>> I keep doing simple things that I want in bzr...
>>>
>>> I implemented support for aliases in bazaar.conf. The following are
>>> some examples
>>>
>>> [ALIASES]
>>> lastlog=log --line -r-10..-1
>>> ll=log --line -r-10..-1
>>> h=help
>>> up=pull
>> I think it seems like a pretty useful feature; quite a few people seem
>> to like to have shortcuts like these and they seem personal enough that
>> we probably can't please everyone with builtins.
>>
>> However, I would like to see some tests that cover this: that aliases
>> work, that aliases with options work, that --no-aliases disables them,
>> etc. I think there are some things in bzrlib.tests.test_config that you
>> could use for this.
>
> I have now built tests for this. Both blackbox and normal. I also
> merged jam-integration, because it makes blackbox tests work. I put
> all blackbox tests into one test method, don't know if that's the
> wrong thing to do or not (they really do three tests, in one). Please
> take a look and see what you think.
>
> Regards,
> Erik
>
>
Your 'aliases' also seem to affect the same things that Aaron's defaults
affect. They at least are trying to solve the same problem. So I would
like to understand the differences. And have a discussion about the
tradeoffs.
I don't think we want to have both defaults and aliases. Since otherwise
scripting interfaces would need something like 'bzr --no-aliases
--no-defaults status'.
I think we might want a bigger knob or perhaps just expand --builtins to
disable all non-default behavior. I'm not sure if it should disable
plugins (right now the thought is that plugins can provide extra
transports, so while we don't want to use overwritten commands, we do
want to use the extra transports).
Anyway, the idea of aliases is nice, and it seems a little bit more
flexible than defaults. Though do you allow overriding a command with an
alias?
[ALIASES]
log = log -r -10..-1
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060210/e2040434/attachment.pgp
More information about the bazaar
mailing list