[PATCH 1 of 4] largefiles: don't pop largefile specific arguments to the add command

Pierre-Yves David pierre-yves.david at ens-lyon.org
Fri Jan 16 03:14:18 CST 2015



On 01/15/2015 09:23 PM, Martin von Zweigbergk wrote:
> At first I had assumed that it was protected from reaching that piece of
> code without 'normal' present, but that doesn't seem to be the case. I
> would have assumed, like you seem to have, that opts['normal'] would
> only present if --normal was given on the command line, but take a look
> at uisetup.py, which seems to register extra options to the command. I
> haven't checked, but I would guess the third option there is the default
> (None in this case), which some early piece of code (dispatch.py?) must
> read and create opts based on that and the arguments given on the
> command line. Mostly guessing here, though.

The command parsing code does magic around that an always populated the 
dict.

It is usually considered polite to write code as if this was not there 
to allow extension to call the command.

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list