Re: [Python-Dev] Reindenting patches

2010-05-09 Thread Meador Inge
On Wed, May 5, 2010 at 8:10 AM, Antoine Pitrou wrote: > For the record, I've added to the untabify script a patch rewriting option > ("-p") which reindents all patch hunks for C files containing tabs. It > should > minimize manual reformatting work with existing patches. > I just tried '-p' with

[Python-Dev] Reindenting patches

2010-05-05 Thread Antoine Pitrou
Nick Coghlan gmail.com> writes: > > 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. For t

Re: [Python-Dev] reindenting

2010-05-04 Thread Antoine Pitrou
Le Tue, 04 May 2010 11:27:58 -0400, Zvezdan Petkovic a écrit : > > A simple replacement of a tab with 4 spaces as you propose does not work > on such a code. Right, I was simplifying a bit. I've just written a script which does a slightly more elaborate reindentation of C files, but still with

Re: [Python-Dev] Reindenting the C code base?

2008-12-16 Thread anatoly techtonik
On Sat, Dec 13, 2008 at 11:26 PM, Guido van Rossum wrote: > > I think we should not do this. We should use 4 space indents for new > files, but existing files should not be reindented. If you reindent, > much of the history of the file is essentially lost -- "svn blame" > will blame whoever reinde

Re: [Python-Dev] Reindenting the C code base?

2008-12-16 Thread Sylvain Fourmanoit
On Sat, 13 Dec 2008, Guido van Rossum wrote: If you reindent, much of the history of the file is essentially lost -- "svn blame" will blame whoever reindented the code, and it's a pain to go back. I am not a subversion specialist, but it appears this part can be handled gracefully by passing

Re: [Python-Dev] Reindenting the C code base?

2008-12-16 Thread Kirk McDonald
On Mon, Dec 15, 2008 at 11:21 AM, Brett Cannon wrote: > On Mon, Dec 15, 2008 at 00:20, Georg Brandl wrote: > > Jeffrey Yasskin schrieb: > >> On Sun, Dec 14, 2008 at 8:26 AM, Guido van Rossum > wrote: > >>> On Sat, Dec 13, 2008 at 2:11 PM, Antoine Pitrou > wrote: > Guido van Rossum python

Re: [Python-Dev] Reindenting the C code base?

2008-12-15 Thread bharat satsangi
please unsubscribe me On Tue, Dec 16, 2008 at 12:51 AM, Brett Cannon wrote: > On Mon, Dec 15, 2008 at 00:20, Georg Brandl wrote: > > Jeffrey Yasskin schrieb: > >> On Sun, Dec 14, 2008 at 8:26 AM, Guido van Rossum > wrote: > >>> On Sat, Dec 13, 2008 at 2:11 PM, Antoine Pitrou > wrote: > >>>

Re: [Python-Dev] Reindenting the C code base?

2008-12-15 Thread Alexandre Vassalotti
On Mon, Dec 15, 2008 at 3:59 PM, Guido van Rossum wrote: > Aha! A specific file. I'm supportive of fixing that specific file. Now > if you can figure out how to do it and still allow merging between 2.6 > and 3.0 that would be cool. > Here's the simplest solution I thought so far to allow smooth

Re: [Python-Dev] Reindenting the C code base?

2008-12-15 Thread Martin v. Löwis
> Aha! A specific file. I'm supportive of fixing that specific file. Now > if you can figure out how to do it and still allow merging between 2.6 > and 3.0 that would be cool. In the specific case, I think it's best to fix the 2.7 source, and then merge the changes into 3k. The 3.x version is stil

Re: [Python-Dev] Reindenting the C code base?

2008-12-15 Thread Scott Dial
Guido van Rossum wrote: > Aha! A specific file. I'm supportive of fixing that specific file. Now > if you can figure out how to do it and still allow merging between 2.6 > and 3.0 that would be cool. Like "svn blame", you can use "svn merge -x -w" to avoid merging whitespace changes. However, svnm

Re: [Python-Dev] Reindenting the C code base?

2008-12-15 Thread Guido van Rossum
Aha! A specific file. I'm supportive of fixing that specific file. Now if you can figure out how to do it and still allow merging between 2.6 and 3.0 that would be cool. --Guido van Rossum (home page: http://www.python.org/~guido/) On Sun, Dec 14, 2008 at 9:54 AM, Alexandre Vassalotti wrote: > O

Re: [Python-Dev] Reindenting the C code base?

2008-12-15 Thread Brett Cannon
On Mon, Dec 15, 2008 at 00:20, Georg Brandl wrote: > Jeffrey Yasskin schrieb: >> On Sun, Dec 14, 2008 at 8:26 AM, Guido van Rossum wrote: >>> On Sat, Dec 13, 2008 at 2:11 PM, Antoine Pitrou wrote: Guido van Rossum python.org> writes: > > I think we should not do this. We should use

Re: [Python-Dev] Reindenting the C code base?

2008-12-15 Thread Steve Holden
Miguel Lobo wrote: >> I think we should not do this. We should use 4 space indents for new >> files, but existing files should not be reindented. If you reindent, >> much of the history of the file is essentially lost -- "svn blame" >> will blame whoever reindented the code, and it's a pain to go b

Re: [Python-Dev] Reindenting the C code base?

2008-12-15 Thread M.-A. Lemburg
On 2008-12-14 21:43, Martin v. Löwis wrote: >> Personally, I think the indentation of, at least, >> Objects/unicodeobject.c should be fixed. This file has become so >> mixed-up with tab and space indents that I have no-idea what to use >> when I edit it. Just to give an idea how messy it is, they a

Re: [Python-Dev] Reindenting the C code base?

2008-12-15 Thread Georg Brandl
Jeffrey Yasskin schrieb: > On Sun, Dec 14, 2008 at 8:26 AM, Guido van Rossum wrote: >> On Sat, Dec 13, 2008 at 2:11 PM, Antoine Pitrou wrote: >>> Guido van Rossum python.org> writes: I think we should not do this. We should use 4 space indents for new files, but existing files sho

Re: [Python-Dev] Reindenting the C code base?

2008-12-14 Thread Antoine Pitrou
Martin v. Löwis v.loewis.de> writes: > > I guess it would be possible to write a Kate plugin that does that. Or perhaps more simply, Kate allows modelines at the beginning and at the end of source files. I don't know if it's ok to add these to the code base though. ___

Re: [Python-Dev] Reindenting the C code base?

2008-12-14 Thread Martin v. Löwis
> Same question for Kate! Although I guess that if emacs isn't able to do it, > Kate > won't do it either... > > (Kate allows configuring on a directory basis, on a file extension basis, but > not on a filename basis) I guess it would be possible to write a Kate plugin that does that. Regards,

Re: [Python-Dev] Reindenting the C code base?

2008-12-14 Thread Martin v. Löwis
> Personally, I think the indentation of, at least, > Objects/unicodeobject.c should be fixed. This file has become so > mixed-up with tab and space indents that I have no-idea what to use > when I edit it. Just to give an idea how messy it is, they are 5214 > lines indented with tabs and 4272 inde

Re: [Python-Dev] Reindenting the C code base?

2008-12-14 Thread Martin v. Löwis
> I've never figured out how to configure emacs to deduce whether the > current file uses spaces or tabs and has a 4 or 8 space indent. If it is now official policy that different files use different styles, then I think it would be helpful to put Emacs variables at the end of each file. See the e

Re: [Python-Dev] Reindenting the C code base?

2008-12-14 Thread Alexandre Vassalotti
On Sun, Dec 14, 2008 at 12:57 PM, Alexandre Vassalotti wrote: > On Sun, Dec 14, 2008 at 12:43 PM, Jeffrey Yasskin wrote: >> I've never figured out how to configure emacs to deduce whether the >> current file uses spaces or tabs and has a 4 or 8 space indent. I >> always try to get it right anyway

Re: [Python-Dev] Reindenting the C code base?

2008-12-14 Thread Alexandre Vassalotti
On Sun, Dec 14, 2008 at 12:43 PM, Jeffrey Yasskin wrote: > I've never figured out how to configure emacs to deduce whether the > current file uses spaces or tabs and has a 4 or 8 space indent. I > always try to get it right anyway, but it'd be a lot more convenient > if my editor did it for me. If

Re: [Python-Dev] Reindenting the C code base?

2008-12-14 Thread Alexandre Vassalotti
On Sat, Dec 13, 2008 at 5:11 PM, Antoine Pitrou wrote: > Guido van Rossum python.org> writes: >> >> I think we should not do this. We should use 4 space indents for new >> files, but existing files should not be reindented. > > Well, right now many files are indented with a mix of spaces and tabs

Re: [Python-Dev] Reindenting the C code base?

2008-12-14 Thread Antoine Pitrou
Jeffrey Yasskin gmail.com> writes: > > I've never figured out how to configure emacs to deduce whether the > current file uses spaces or tabs and has a 4 or 8 space indent. Same question for Kate! Although I guess that if emacs isn't able to do it, Kate won't do it either... (Kate allows config

Re: [Python-Dev] Reindenting the C code base?

2008-12-14 Thread Jeffrey Yasskin
On Sun, Dec 14, 2008 at 8:26 AM, Guido van Rossum wrote: > On Sat, Dec 13, 2008 at 2:11 PM, Antoine Pitrou wrote: >> Guido van Rossum python.org> writes: >>> >>> I think we should not do this. We should use 4 space indents for new >>> files, but existing files should not be reindented. >> >> Wel

Re: [Python-Dev] Reindenting the C code base?

2008-12-14 Thread Guido van Rossum
On Sat, Dec 13, 2008 at 2:11 PM, Antoine Pitrou wrote: > Guido van Rossum python.org> writes: >> >> I think we should not do this. We should use 4 space indents for new >> files, but existing files should not be reindented. > > Well, right now many files are indented with a mix of spaces and tabs

Re: [Python-Dev] Reindenting the C code base?

2008-12-13 Thread Miguel Lobo
> I think we should not do this. We should use 4 space indents for new > files, but existing files should not be reindented. If you reindent, > much of the history of the file is essentially lost -- "svn blame" > will blame whoever reindented the code, and it's a pain to go back. I believe "svn bl

Re: [Python-Dev] Reindenting the C code base?

2008-12-13 Thread Antoine Pitrou
Guido van Rossum python.org> writes: > > I think we should not do this. We should use 4 space indents for new > files, but existing files should not be reindented. Well, right now many files are indented with a mix of spaces and tabs, depending on who did the edit and how their editor was config

Re: [Python-Dev] Reindenting the C code base?

2008-12-13 Thread Guido van Rossum
On Sat, Dec 13, 2008 at 1:22 PM, Antoine Pitrou wrote: > I remember there were some talks of reindenting the C code base (from tabs to > 4-space indents) after py3k is released, but I can't find the discussion > thread > again. Was a decision ever taken about it? I think we should not do this. W

[Python-Dev] Reindenting the C code base?

2008-12-13 Thread Antoine Pitrou
Hello, I remember there were some talks of reindenting the C code base (from tabs to 4-space indents) after py3k is released, but I can't find the discussion thread again. Was a decision ever taken about it? Regards Antoine. ___ Python-Dev mailing l