[MERGE] command defaults
Alexander Belchenko
bialix at ukr.net
Wed Feb 1 20:26:05 GMT 2006
Aaron Bentley пишет:
> Hi all,
> I've implemented per-user command defaults, in what I hope is a fairly
> tasteful way.
>
> In ~/.bazaar/bazzar.conf, you can now have a COMMAND_DEFAULTS section.
> If you do, the 'name' is the command name, and the 'value' is a set of
> options and arguments. As in all config files, # can be used to supply
> a comment.
>
> Example:
> [COMMAND_DEFAULTS]
> commit = --strict # doncha hate it when you forget to add a file?
> revert = --no-backup
> log = --short -r -1..-5
> merge = --reprocess
>
> When an option is supplied on the commandline that is also supplied in
> the defaults, the default for that value is ignored. For example:
> $bzr log -r -1..-10
> would combine with the above defaults to produce, effectively:
> $ bzr log --short -r -1..-10
>
> Additionally, a --no-defaults global option is available to prevent any
> defaults from being used. (Especially for scripts and the test suite.)
Wonderful! I thinking about this feature some months ago.
+1.
But I have 2 remarks.
First about your patch:
=== modified file 'bzrlib/tests/test_config.py'
--- bzrlib/tests/test_config.py
+++ bzrlib/tests/test_config.py
@@ -32,7 +32,10 @@
"email=Robert Collins <robertc at example.com>\n"
"editor=vim\n"
"gpg_signing_command=gnome-gpg\n"
- "user_global_option=something\n")
+ "user_global_option=something\n"
+ "[COMMAND_DEFAULTS]\n"
+ 'commit=-m "log message" #evil? possibly.\n'
+ 'merge=--merge-type "weave')
^ ^
Probably first double quote is unnecessary or should be matching quote
after word `weave`?
Second about broken test:
blackbox.test_too_much.TestCommands.test_external_command FAIL
Personally I don't think that support of external commands is important
now but simply to be consistent I report this. Log from test is attached.
--
Alexander
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.log
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20060201/743ae179/attachment.diff
More information about the bazaar
mailing list