qrebase extension
Gilles Moris
gilles.moris at free.fr
Thu May 8 11:42:01 CDT 2008
On Wed May 7 2008 19:07:37 Matt Mackall wrote:
> > That sounds good to me, although from configuring other extensions I was
> > expecting something like:
> >
> > [qrebase]
> > backup=True
> >
> > To Matt: in general, what are the "best practices" for configuring
> > extensions? The wiki seems to be mum on the subject.
>
> What Gilles is suggesting is the generic approach for adding command
> line defaults, which means no work for him. If that's not sufficient,
> adding a section for the extension is the usual way to go.
>
Matt guessed it right: a command line default means that I have just a
declaration to add in the code, so I have chosen the easy way ;-)
Originally, I did not think that qrebase was deserving its own section:
- it is so far the only configuration parameter for qrebase
- qrebase is more an "extension" of mq than a standalone module
- a configuration parameter is more obscure than a command line option
However, I have looked at the config module and it seems even more
easier to do it with
ui.configbool('qrebase', 'backup', True)
and it has a much better control of the boolean strings (True/False,
YES/NO, on/off). Is there an equivalent standard / mercurial function
for command line arguments ?
So finally, I will probably do it your way, because this is probably a
parameter you want to set once, and not on a case by case as a command
line argument.
Regards.
Gilles.
More information about the Mercurial
mailing list