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 tabs with spaces of Python code

To: "aq" <aquynh@xxxxxxxxx>, "xen-devel" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH] replace tabs with spaces of Python code
From: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
Date: Wed, 18 May 2005 21:06:37 +0100
Delivery-date: Wed, 18 May 2005 20:06:08 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcVb27lavCpSepNKSdymHwD6RUICmAABpfxQ
Thread-topic: [Xen-devel] [PATCH] replace tabs with spaces of Python code
 

> there are many Python codes in tools/ that mix tab and space 
> for indentation, which might introduce some silly and hidden 
> bugs. this is a serious problem and must be avoid at all cost.
> 
> here is a patch (against cset 1.1452) to replace all tabs with spaces.
> all the changes are pretty trivial, and i double checked everything.
> please take a look to see if all the modifies are OK.
> 
> Signed-off-by: Nguyen Anh Quynh <aquynh@xxxxxxxxx>

Are you sure python interprets a tab as a 4 spaces? I thought it
interpretted it as 8?

Hmm, there are a whole bunch of outstanding xend patches this this is
going to create merge hell for, so I'm not sure we want to apply this
straight away.

Could you just post the script you used, or did you just do the obvious
sed invocation?

Thanks,
Ian

> any idea? if nobody complains, i would prepare a patch like 
> this for -testing tree.
> 
> 
> $ diffstat removetab.patch 
>  logging/logging-0.4.9.2/test/mymodule.py |    6 +-
>  xen/sv/CreateDomain.py                   |   34 ++++++++--------
>  xen/sv/Daemon.py                         |    2 
>  xen/sv/DomInfo.py                        |   55 
> ++++++++++++--------------
>  xen/sv/DomList.py                        |   16 +++----
>  xen/sv/GenTabbed.py                      |    6 +-
>  xen/sv/HTMLBase.py                       |    4 -
>  xen/sv/Main.py                           |   12 ++---
>  xen/sv/NodeInfo.py                       |   16 +++----
>  xen/sv/Wizard.py                         |   64 
> +++++++++++++++----------------
>  xen/sv/util.py                           |    6 +-
>  xen/web/SrvBase.py                       |    6 +-
>  xen/web/SrvDir.py                        |    2 
>  xen/xend/EventServer.py                  |   24 +++++------
>  xen/xend/PrettyPrint.py                  |    6 +-
>  xen/xend/XendClient.py                   |    6 +-
>  xen/xend/XendDomain.py                   |    4 -
>  xen/xend/encode.py                       |    2 
>  xen/xend/server/SrvDomain.py             |    6 +-
>  xen/xend/sxp.py                          |    2 
>  xen/xm/main.py                           |   12 ++---
>  21 files changed, 143 insertions(+), 148 deletions(-)
> 
> --
> regards,
> aq
> 

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