set strip-prefix from script

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5338 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2007-10-20 20:48:02 +00:00
parent d174ef74d1
commit 1c7f4665ce

View file

@ -239,19 +239,30 @@ def CreateChangeLog():
changelog = os.path.join(newverdir,'ChangeLog')
# generate changelog xml
run(
'%s log --xml --verbose %s > %s' % (SVN, SVNROOT, changelog),
LOG_ERRORS,
'changelog failed'
)
# load changelog xml
xmlo = win32com.client.Dispatch('Microsoft.XMLDOM')
xmlo.loadXML(file(changelog).read())
xmlo.preserveWhiteSpace = True
# load xsl
xslo = win32com.client.Dispatch('Microsoft.XMLDOM')
xslo.validateOnParse = False
xslo.preserveWhiteSpace = True
xslo.loadXML(file(SVN2CL_XSL).read())
# set strip-prefix to ''
for a in xslo.selectNodes("/xsl:stylesheet/xsl:param[@name = 'strip-prefix']")[0].attributes:
if a.name == 'select':
a.value = "''"
# transform
transformed = xmlo.transformNode(xslo)
codecs.open(changelog, 'w', 'utf-8').write(transformed)