Update of /cvsroot/pywin32/pywin32/win32/scripts/VersionStamp
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv20331/win32/scripts/VersionStamp
Modified Files:
Tag: py3k
BrandProject.py bulkstamp.py vssutil.py
Log Message:
many more upgrades to py3k syntax
Index: bulkstamp.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/scripts/VersionStamp/bulkstamp.py,v
retrieving revision 1.6
retrieving revision 1.6.4.1
diff -C2 -d -r1.6 -r1.6.4.1
*** bulkstamp.py 24 Oct 2003 07:06:24 -0000 1.6
--- bulkstamp.py 26 Nov 2008 09:03:30 -0000 1.6.4.1
***************
*** 65,72 ****
verstamp.stamp(vars, pathname, desc, is_dll=is_dll)
numStamped = numStamped + 1
! except win32api.error, (hr, func, desc):
! print "Could not stamp", pathname, "Error", hr, "-", desc
else:
! print 'WARNING: description not provided for:', name
# skip branding this - assume already branded or handled elsewhere
# print "Stamped", pathname
--- 65,73 ----
verstamp.stamp(vars, pathname, desc, is_dll=is_dll)
numStamped = numStamped + 1
! except win32api.error as xxx_todo_changeme:
! (hr, func, desc) = xxx_todo_changeme.args
! print("Could not stamp", pathname, "Error", hr, "-", desc)
else:
! print('WARNING: description not provided for:', name)
# skip branding this - assume already branded or handled elsewhere
# print "Stamped", pathname
***************
*** 86,90 ****
idx1 = idx2
if idx1 == -1:
! print 'ERROR: bad syntax in description file at line %d.' % (i+1)
sys.exit(1)
--- 87,91 ----
idx1 = idx2
if idx1 == -1:
! print('ERROR: bad syntax in description file at line %d.' % (i+1))
sys.exit(1)
***************
*** 97,107 ****
if not retvars.has_key('product'):
! print 'ERROR: description file is missing the product name.'
sys.exit(1)
if not retvars.has_key('major'):
! print 'ERROR: description file is missing the major version number.'
sys.exit(1)
if not retvars.has_key('minor'):
! print 'ERROR: description file is missing the minor version number.'
sys.exit(1)
--- 98,108 ----
if not retvars.has_key('product'):
! print('ERROR: description file is missing the product name.')
sys.exit(1)
if not retvars.has_key('major'):
! print('ERROR: description file is missing the major version number.')
sys.exit(1)
if not retvars.has_key('minor'):
! print('ERROR: description file is missing the minor version number.')
sys.exit(1)
***************
*** 114,118 ****
build = string.atoi(build)
except ValueError:
! print 'ERROR: build number is not a number: %s' % build
sys.exit(1)
--- 115,119 ----
build = string.atoi(build)
except ValueError:
! print('ERROR: build number is not a number: %s' % build)
sys.exit(1)
***************
*** 128,136 ****
os.path.walk(root, walk, arg)
! print "Stamped %d files." % (numStamped)
if __name__ == '__main__':
if len(sys.argv) != 4:
! print "ERROR: incorrect invocation. See script's header comments."
sys.exit(1)
--- 129,137 ----
os.path.walk(root, walk, arg)
! print("Stamped %d files." % (numStamped))
if __name__ == '__main__':
if len(sys.argv) != 4:
! print("ERROR: incorrect invocation. See script's header comments.")
sys.exit(1)
Index: vssutil.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/scripts/VersionStamp/vssutil.py,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -C2 -d -r1.1 -r1.1.4.1
*** vssutil.py 2 Sep 1999 00:19:34 -0000 1.1
--- vssutil.py 26 Nov 2008 09:03:30 -0000 1.1.4.1
***************
*** 23,27 ****
for item in project.GetVersions(constants.VSSFLAG_RECURSYES):
! print item.VSSItem.Name, item.VersionNumber, item.Action
--- 23,27 ----
for item in project.GetVersions(constants.VSSFLAG_RECURSYES):
! print(item.VSSItem.Name, item.VersionNumber, item.Action)
***************
*** 45,49 ****
except:
traceback.print_exc()
! print "Could not substitute", strVal
if not didSubst:
newFields.append(strVal)
--- 45,49 ----
except:
traceback.print_exc()
! print("Could not substitute", strVal)
if not didSubst:
newFields.append(strVal)
***************
*** 91,95 ****
import win32api
if win32api.GetFullPathName(inName)==win32api.GetFullPathName(outName):
! raise RuntimeError, "The input and output filenames can not be the same"
sourceSafe=GetSS()
project = sourceSafe.VSSItem(projectName)
--- 91,95 ----
import win32api
if win32api.GetFullPathName(inName)==win32api.GetFullPathName(outName):
! raise RuntimeError("The input and output filenames can not be the same")
sourceSafe=GetSS()
project = sourceSafe.VSSItem(projectName)
***************
*** 100,104 ****
break
else:
! print "Couldnt find a label in the sourcesafe project!"
return
# Setup some local helpers for the conversion strings.
--- 100,104 ----
break
else:
! print("Couldnt find a label in the sourcesafe project!")
return
# Setup some local helpers for the conversion strings.
***************
*** 150,154 ****
buildNo = str(buildNo)
except ValueError:
! raise error, "The previous label could not be incremented: %s" % (oldBuild)
if not auto:
--- 150,154 ----
buildNo = str(buildNo)
except ValueError:
! raise error("The previous label could not be incremented: %s" % (oldBuild))
if not auto:
***************
*** 158,162 ****
i.Label(buildNo, "Build %s: %s" % (buildNo,buildDesc))
if auto:
! print "Branded project %s with label %s" % (project, buildNo)
return buildNo
--- 158,162 ----
i.Label(buildNo, "Build %s: %s" % (buildNo,buildDesc))
if auto:
! print("Branded project %s with label %s" % (project, buildNo))
return buildNo
Index: BrandProject.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/scripts/VersionStamp/BrandProject.py,v
retrieving revision 1.2
retrieving revision 1.2.4.1
diff -C2 -d -r1.2 -r1.2.4.1
*** BrandProject.py 8 Mar 2000 09:56:02 -0000 1.2
--- BrandProject.py 26 Nov 2008 09:03:30 -0000 1.2.4.1
***************
*** 17,21 ****
build = vssutil.MakeNewBuildNo(vssProjectName, buildDesc, auto, bRebrand)
if build is None:
! print "Cancelled"
return
--- 17,21 ----
build = vssutil.MakeNewBuildNo(vssProjectName, buildDesc, auto, bRebrand)
if build is None:
! print("Cancelled")
return
***************
*** 26,31 ****
def usage(msg):
! print msg
! print """\
%s Usage:
%s [options] vssProject descFile stampPath
--- 26,31 ----
def usage(msg):
! print(msg)
! print("""\
%s Usage:
%s [options] vssProject descFile stampPath
***************
*** 44,48 ****
-f infile=outfile - Substitute special VSS labels in the specified text
file with the text extracted from VSS.
! """ % (os.path.basename(sys.argv[0]), os.path.basename(sys.argv[0]))
sys.exit(1)
--- 44,48 ----
-f infile=outfile - Substitute special VSS labels in the specified text
file with the text extracted from VSS.
! """ % (os.path.basename(sys.argv[0]), os.path.basename(sys.argv[0])))
sys.exit(1)
***************
*** 51,55 ****
import getopt
opts, args = getopt.getopt(sys.argv[1:], "af:d:r")
! except getopts.error, msg:
usage(msg)
bAuto = bRebrand = 0
--- 51,55 ----
import getopt
opts, args = getopt.getopt(sys.argv[1:], "af:d:r")
! except getopts.error as msg:
usage(msg)
bAuto = bRebrand = 0
|