Change config changes generator script

Change diff_branches.py to generate the config-changes file with an
xml:id that always contains the release name instead of the name of
the new branch. This way it can be avoided that the id changes, when
stable branch is cut close to the end of a release cycle.

Change-Id: I96ef56fef7dac98f344296d1217586326740b46e
This commit is contained in:
Ildiko Vancsa 2014-12-12 16:00:21 +01:00
parent a86c86f39c
commit 5177dfe361
1 changed files with 4 additions and 3 deletions

View File

@ -212,13 +212,14 @@ def release_from_branch(branch):
def generate_docbook(project, new_branch, old_list, new_list):
"""Generate the diff between the 2 options lists for `project`."""
new_opts, changed_default, deprecated_opts = diff(old_list, new_list)
release = release_from_branch(new_branch)
XMLNS = '{http://www.w3.org/XML/1998/namespace}'
DOCBOOKMAP = {None: "http://docbook.org/ns/docbook"}
section = etree.Element("section", nsmap=DOCBOOKMAP, version="5.0")
id = "%(project)s-conf-changes-%(branch)s" % {'project': project,
'branch': new_branch}
id = "%(project)s-conf-changes-%(release)s" % {'project': project,
'release': release.lower()}
section.set(XMLNS + 'id', id)
section.append(etree.Comment(" Warning: Do not edit this file. It is "
"automatically generated and your changes "
@ -228,7 +229,7 @@ def generate_docbook(project, new_branch, old_list, new_list):
title = etree.Element("title")
title.text = ("New, updated and deprecated options "
"in %(release)s for %(project)s" %
{'release': release_from_branch(new_branch),
{'release': release,
'project': CODENAME_TITLE[project]})
section.append(title)