X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=module-tools.py;h=99c160b7257b4e1b4b91eb8e0aedfe6a0dc7a089;hb=56f5fccfbf608c9d538ae0e96d3fb935fc342134;hp=27265d31c74ba141d07b805a18444da57c896833;hpb=c6dbe97cccb1fd7a8653eeedea55c9b90f81ac75;p=build.git diff --git a/module-tools.py b/module-tools.py index 27265d31..99c160b7 100755 --- a/module-tools.py +++ b/module-tools.py @@ -1,6 +1,6 @@ #!/usr/bin/python -u -import sys, os +import sys, os, os.path import re import time import tempfile @@ -16,14 +16,11 @@ RENAMED_SVN_MODULES = { "PLCAPI": "plcapi", "BootManager": "bootmanager", "BootCD": "bootcd", - "VserverReference": "vserver-reference", - "BootstrapFS": "bootstrapfs", "MyPLC": "myplc", "CoDemux": "codemux", "NodeManager": "nodemanager", "NodeUpdate": "nodeupdate", "Monitor": "monitor", - } def svn_to_git_name(module): @@ -1271,7 +1268,14 @@ def release_changelog(options, buildtag_old, buildtag_new): except: print "ERROR: provide a tagfile name (eg. onelab, onelab-k27, planetlab)" return - tagfile = "%s-tags.mk" % tagfile + # mmh, sounds wrong to blindly add the extension + # if in a build directory, guess from existing files + if os.path.isfile (tagfile): + pass + elif os.path.isfile ("%s-tags.mk" % tagfile): + tagfile="%s-tags.mk" % tagfile + else: + tagfile = "%s-tags.mk" % tagfile print '----' print '----' @@ -1328,7 +1332,7 @@ def release_changelog(options, buildtag_old, buildtag_new): print ' * to', second, m.repository.gitweb() print '{{{' - os.system("diff -u %s %s" % (tmpfile, specfile)) + os.system("diff -u %s %s | sed -e 's,%s,[[previous version]],'" % (tmpfile, specfile,tmpfile)) print '}}}' os.unlink(tmpfile) @@ -1573,8 +1577,10 @@ Branches: Module.html_dump_footer() else: # if we provide, say a b c d, we want to build (a,b) (b,c) and (c,d) - for (f,t) in zip ( args[:-1], args [1:]): - release_changelog(options, f,t) + # remember that the changelog in the twiki comes latest first, so + # we typically have here latest latest-1 latest-2 + for (tag_to,tag_from) in zip ( args[:-1], args [1:]): + release_changelog(options, tag_from,tag_to) ####################