[Python-checkins] CVS: python/dist/src/Tools/scripts classfix.py,1.10,1.11 dutree.py,1.9,1.10 fixcid.py,1.8,1.9 fixnotice.py,1.4,1.5 methfix.py,1.5,1.6 pathfix.py,1.3,1.4
Tim Peters
tim_one@users.sourceforge.net
Wed, 17 Jan 2001 01:13:35 -0800
Update of /cvsroot/python/python/dist/src/Tools/scripts
In directory usw-pr-cvs1:/tmp/cvs-serv18036/python/dist/src/Tools/scripts
Modified Files:
classfix.py dutree.py fixcid.py fixnotice.py methfix.py
pathfix.py
Log Message:
Hand repair of cases where reindent changed lines of the form
\t\t\t\t\treal code
##\t\t\t\t\tunused code
\t\t\t\t\treal code
via untabifying and shifting the real code left. Semantically the
same but made the intent of the commented-out-in-column-0 unused code
unclear. The exact same unused code appears to have gotten copied from
file to file over the years.
Index: classfix.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/scripts/classfix.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** classfix.py 2001/01/17 08:48:39 1.10
--- classfix.py 2001/01/17 09:13:33 1.11
***************
*** 81,85 ****
def fix(filename):
! ## dbg('fix(' + `filename` + ')\n')
try:
f = open(filename, 'r')
--- 81,85 ----
def fix(filename):
! ## dbg('fix(' + `filename` + ')\n')
try:
f = open(filename, 'r')
Index: dutree.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/scripts/dutree.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** dutree.py 2001/01/17 08:48:39 1.9
--- dutree.py 2001/01/17 09:13:33 1.10
***************
*** 43,48 ****
list.append((tsub, key))
if tsub is not None: sum = sum + tsub
! ## if sum < total:
! ## list.append((total - sum, os.curdir))
list.sort()
list.reverse()
--- 43,48 ----
list.append((tsub, key))
if tsub is not None: sum = sum + tsub
! ## if sum < total:
! ## list.append((total - sum, os.curdir))
list.sort()
list.reverse()
Index: fixcid.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/scripts/fixcid.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** fixcid.py 2001/01/17 08:48:39 1.8
--- fixcid.py 2001/01/17 09:13:33 1.9
***************
*** 117,121 ****
def fix(filename):
! ## dbg('fix(' + `filename` + ')\n')
if filename == '-':
# Filter mode
--- 117,121 ----
def fix(filename):
! ## dbg('fix(' + `filename` + ')\n')
if filename == '-':
# Filter mode
***************
*** 227,231 ****
def fixline(line):
global Program
! ## print '-->', `line`
i = 0
while i < len(line):
--- 227,231 ----
def fixline(line):
global Program
! ## print '-->', `line`
i = 0
while i < len(line):
***************
*** 233,239 ****
if i < 0: break
found = Program.group(0)
! ## if Program is InsideCommentProgram: print '...',
! ## else: print ' ',
! ## print found
if len(found) == 2:
if found == '/*':
--- 233,239 ----
if i < 0: break
found = Program.group(0)
! ## if Program is InsideCommentProgram: print '...',
! ## else: print ' ',
! ## print found
if len(found) == 2:
if found == '/*':
***************
*** 250,261 ****
continue
if NotInComment.has_key(found):
! ## print 'Ignored in comment:',
! ## print found, '-->', subst
! ## print 'Line:', line,
subst = found
! ## else:
! ## print 'Substituting in comment:',
! ## print found, '-->', subst
! ## print 'Line:', line,
line = line[:i] + subst + line[i+n:]
n = len(subst)
--- 250,261 ----
continue
if NotInComment.has_key(found):
! ## print 'Ignored in comment:',
! ## print found, '-->', subst
! ## print 'Line:', line,
subst = found
! ## else:
! ## print 'Substituting in comment:',
! ## print found, '-->', subst
! ## print 'Line:', line,
line = line[:i] + subst + line[i+n:]
n = len(subst)
Index: fixnotice.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/scripts/fixnotice.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** fixnotice.py 2000/09/01 23:29:29 1.4
--- fixnotice.py 2001/01/17 09:13:33 1.5
***************
*** 31,35 ****
i = string.find(data, OLD_NOTICE)
if i < 0:
! ## print "No old notice in", arg
return
data = data[:i] + NEW_NOTICE + data[i+len(OLD_NOTICE):]
--- 31,35 ----
i = string.find(data, OLD_NOTICE)
if i < 0:
! ## print "No old notice in", arg
return
data = data[:i] + NEW_NOTICE + data[i+len(OLD_NOTICE):]
Index: methfix.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/scripts/methfix.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** methfix.py 2001/01/17 08:48:39 1.5
--- methfix.py 2001/01/17 09:13:33 1.6
***************
*** 79,83 ****
def fix(filename):
! ## dbg('fix(' + `filename` + ')\n')
try:
f = open(filename, 'r')
--- 79,83 ----
def fix(filename):
! ## dbg('fix(' + `filename` + ')\n')
try:
f = open(filename, 'r')
Index: pathfix.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/scripts/pathfix.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pathfix.py 2001/01/17 08:48:39 1.3
--- pathfix.py 2001/01/17 09:13:33 1.4
***************
*** 88,92 ****
def fix(filename):
! ## dbg('fix(' + `filename` + ')\n')
try:
f = open(filename, 'r')
--- 88,92 ----
def fix(filename):
! ## dbg('fix(' + `filename` + ')\n')
try:
f = open(filename, 'r')