[PATCH] opts['option'] replaced with opts.get('option') where appropriate for all commands, making them more tolerate to API calls

Dirkjan Ochtman dirkjan at ochtman.nl
Mon Oct 13 03:31:08 CDT 2008


Marek Kubica <marek <at> xivilization.net> writes:
> What advantage does this have? A dictionary that has no such key will
> throw errors both using the function as well as the literal. The
> literal is only faster, because it does not need to look up the
> ``get`` function. Or am I missing something?

The advantage is for API users, who currently have to pass in all the options,
even when the command-line interface assumes sane defaults...

I think this would be great to fix, but we need to be careful about doing it.

Cheers,

Dirkjan



More information about the Mercurial-devel mailing list