WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] Replace tab-indent with space-indent

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] [PATCH] Replace tab-indent with space-indent
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Fri, 11 Jul 2008 18:37:46 +0100
Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>, Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
Delivery-date: Fri, 11 Jul 2008 10:38:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <18539.24947.441008.301481@xxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <45C8DC0B983004kanno.masaki@xxxxxxxxxxxxxx> <18539.24947.441008.301481@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.9
On Wednesday 02 July 2008, Ian Jackson wrote:
> Masaki Kanno writes ("[Xen-devel] [PATCH] Replace tab-indent with 
space-indent"):
> > This patch replaces tab-indent with space-indent in the following
> > Xend codes.
> >  - tools/python/xen/xend/XendConfig.py
> >  - tools/python/xen/xend/image.py
> >  - tools/python/xen/xend/osdep.py
>
> I don't think that patches like this should be committed.  They have
> no benefit, but they do impose costs (such as  hg annotate  no longer
> giving accurate answers).

If this weren't Python code or was a large change I might be dubious about it.  
However, since a classic source of Python bugs is the mixing of tabs and 
spaces, standardising on spaces (which is what we've always aimed to do) 
seems quite desirable - if for no other reason than to avoid future 
contributors making the same mistake.

That said, it's doubly important to thoroughly check any tab->space 
conversions since these can easily do something other than what's expected...  
Converting a lot of them would be a bit scary...

Kan, are these the only cases of tabs you found in Python code, or might there 
be more elsewhere?  If these are the only few that remain, I'd suggest we 
eliminate them and then work to avoid introducing any more tabs in future  
(ideally, we'd push a check for these into a test suite that's run before the 
patch is accepted).  That would bring us fully into conformance with our own 
coding style; the patch looks small enough to cause a minimal disruption to 
annotate.

If we have a wide tabs / spaces problem in the code then we might want to keep 
this patch on hold and figure out just how large the problem is - and 
therefore whether it's safer to standardise or leave it alone!

Cheers,
Mark


-- 
Push Me Pull You - Distributed SCM tool (http://www.cl.cam.ac.uk/~maw48/pmpu/)

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>