[PATCH 1 of 9] largefiles: use 'list*' variables for consistency and clarity

Martin von Zweigbergk martinvonz at gmail.com
Mon Sep 22 11:46:33 CDT 2014

On Sat, Sep 20, 2014 at 9:31 AM, Mads Kiilerich <mads at kiilerich.com> wrote:
> On 09/17/2014 10:40 PM, Martin von Zweigbergk wrote:
>> # HG changeset patch
>> # User Martin von Zweigbergk <martinvonz at gmail.com>
>> # Date 1410885827 25200
>> #      Tue Sep 16 09:43:47 2014 -0700
>> # Node ID 3eb908098e46eb9b60bf6d4cc66a416111f2e201
>> # Parent  48791c2bea1ceda4e4f28bc11651e281d636ce1a
>> largefiles: use 'list*' variables for consistency and clarity
>> The variables 'listignored', 'listclean' and 'listunknown' are
>> initialized to the values of 'ignored', 'clean' and 'unknown',
>> respectively. However, the 'ignored', 'clean' and 'unknown' themselves
>> get a different meaning further down in the method, so use the list*
>> names for clarity, since they only have one meaning.
> AFAICS it is only 'clean' that is used for other purposes later on. (It was
> changed recently when unused values were given a _ prefix.) 'clean' starts
> out as a parameter in a monkey patched wrapper function so it should keep
> its name.


> I think the real problem is that we reuse 'clean' later on - it
> would be better to fix that and avoid introducing the 'list*' aliases.

The same pattern as in reposetup.py is actually used in context.py and
dirstate.py. In both of those methods, all the variables get
reassigned different meaning. I'll just drop this patch and maybe I'll
address it in a different way later.

More information about the Mercurial-devel mailing list