[Python-Dev] Standardising C file indentation (was Re: Running Clang 2.7's static analyzer over the code base)

Nick Coghlan ncoghlan at gmail.com
Wed May 5 00:41:04 CEST 2010


Eric Smith wrote:
> Dirkjan Ochtman wrote:
>> On Tue, May 4, 2010 at 14:41, Antoine Pitrou <solipsis at pitrou.net> wrote:
>>> I think we should reindent all 3 branches. Most of the work can
>>> probably be
>>> scripted (str.replace("\t", " " * 4)), and then a visual pass is
>>> necessary to
>>> fix vertical alignments and the like.
>>
>> If the script is robust enough, I can run it as part of the
>> conversion, making sure that all branches get cleaned up...
> 
> Could this be done as part of the conversion without affecting the history?

I don't think that would be a good idea - it's just whitespace, but I
think we risk more problems by leaving it out of the history than we do
by preserving.

Howver, if we delay fixing the C file indentation until we're already on
hg, the merge tools should offer the best chance of being able to apply
pre-fix patches and have the software figure out where the whitespace
changes need to be accounted for.

If we do it before, or don't record the change in the history at all,
then hg won't have any changeset information to work with and will
almost certainly get just as confused by the whitespace changes as the
basic "patch" command would.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------


More information about the Python-Dev mailing list