I would be very delighted if people could run tabnanny themselves, as
authorFabian Groffen <grobian@gentoo.org>
Wed, 23 May 2007 17:32:11 +0000 (17:32 -0000)
committerFabian Groffen <grobian@gentoo.org>
Wed, 23 May 2007 17:32:11 +0000 (17:32 -0000)
indenting python is absolutely horrible work, since Vim can't help you
with that due to this indenting=scope thing.  It also makes python
itself kind of upset usually if you mix up tabs with spaces, so another
reason to run tabnanny.

svn path=/main/branches/prefix/; revision=6599

bin/dispatch-conf
tabcheck.py

index c0b5c0138deb11953d9a6daf75443d3f99cc2cfa..3fe8cb2ee0d23b62902f235489ae93e33c78642d 100755 (executable)
@@ -13,7 +13,7 @@
 #
 
 if not hasattr(__builtins__, "set"):
-    from sets import Set as set
+       from sets import Set as set
 
 from stat import *
 from random import *
@@ -21,9 +21,9 @@ import atexit, commands, os, re, shutil, stat, sys
 try:
        import portage
 except ImportError:
-    from os import path as osp
-    sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym"))
-    import portage
+       from os import path as osp
+       sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym"))
+       import portage
 
 from portage import dispatch_conf, const
 from portage.process import find_binary
@@ -140,26 +140,26 @@ class dispatch:
                        else:
                                newconf = conf['new']
 
-            if newconf == mrgconf and \
-                self.options.get('ignore-previously-merged') != 'yes' and \
-                len(commands.getoutput(DIFF_CONTENTS % (conf['current'], mrgconf))) == 0:
-                # The current update is identical to the archived .dist
-                # version that has previously been merged.
-                os.unlink(mrgconf)
-                newconf = conf['new']
-
-            mystatus, myoutput = commands.getstatusoutput(
-                DIFF_CONTENTS  % (conf ['current'], newconf))
-            same_file = 0 == len(myoutput)
-            if mystatus >> 8 == 2:
-                # Binary files differ
-                same_cvs = False
-                same_wsc = False
-            else:
-                same_cvs = 0 == len(commands.getoutput(
-                    DIFF_CVS_INTERP % (conf ['current'], newconf)))
-                same_wsc = 0 == len(commands.getoutput(
-                    DIFF_WSCOMMENTS % (conf ['current'], newconf)))
+                        if newconf == mrgconf and \
+                                self.options.get('ignore-previously-merged') != 'yes' and \
+                                len(commands.getoutput(DIFF_CONTENTS % (conf['current'], mrgconf))) == 0:
+                               # The current update is identical to the archived .dist
+                               # version that has previously been merged.
+                               os.unlink(mrgconf)
+                               newconf = conf['new']
+
+                       mystatus, myoutput = commands.getstatusoutput(
+                               DIFF_CONTENTS  % (conf ['current'], newconf))
+                       same_file = 0 == len(myoutput)
+                       if mystatus >> 8 == 2:
+                               # Binary files differ
+                               same_cvs = False
+                               same_wsc = False
+                       else:
+                               same_cvs = 0 == len(commands.getoutput(
+                                       DIFF_CVS_INTERP % (conf ['current'], newconf)))
+                               same_wsc = 0 == len(commands.getoutput(
+                                       DIFF_WSCOMMENTS % (conf ['current'], newconf)))
 
                        # Do options permit?
                        same_cvs = same_cvs and self.options['replace-cvs'] == 'yes'
index ae9f28960cc4cccbc5441562d7caa023f9256d62..c45b748735f4a910d98719f7680d9a55cef863ab 100755 (executable)
@@ -3,5 +3,5 @@
 import tabnanny,sys
 
 for x in sys.argv:
-#      print "Tabchecking " + x
+       print "Tabchecking " + x
        tabnanny.check(x)