[PATCH] cmdutil: rename '_deleted' to 'deleted' since it is used

Pierre-Yves David pierre-yves.david at ens-lyon.org
Mon Oct 6 15:25:32 CDT 2014



On 10/06/2014 01:21 PM, Mads Kiilerich wrote:
> On 10/03/2014 09:48 PM, Pierre-Yves David wrote:
>>
>>
>> On 10/03/2014 01:50 PM, Martin von Zweigbergk wrote:
>>> # HG changeset patch
>>> # User Martin von Zweigbergk <martinvonz at gmail.com>
>>> # Date 1412362128 25200
>>> #      Fri Oct 03 11:48:48 2014 -0700
>>> # Node ID 27a6af7fdd92f97cd587faae9502c044b292fb83
>>> # Parent  78c916f24dd99a56e4c29153a5df3bd7d1c40edd
>>> cmdutil: rename '_deleted' to 'deleted' since it is used
>>>
>>> Underscore seems to be used as a prefix in some places to indicate
>>> that a variable is not used, so avoid using it for a variable that is
>>> used.
>>
>>
>> No thanks, The variable is only used in the direct vicinity for a
>> quick computation. The other have a great destiny much lower in the
>> rest of this hug function.
>
> What??? That do not make sense to me. I could kind of understand it if
> the _ was added (in the end) to make the name unique - a bit like how we
> use a and a' in math. Or if it was a binding done at module or class
> level and you wanted to keep it "private". But here you use the _ prefix
> is to designate that this great variable is less important than other
> great variables in this function? ERR. If this variable is unimportant
> in an unique and important way then it deserves a name that describes that

Unlike all other variable, this old is never used in the huge table used 
in the middle of the revert function. Go read the function for details.

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list