Browse Source

diff_branches: fix deprecated opts listing

* Use the proper list (deprecated_opts, not new_opts)
* Sort the elements

Change-Id: I2f16ee72ed389b801590db70708db1bd4d59f88d
changes/15/246815/1
Gauvain Pocentek 6 years ago
parent
commit
19fba83f36
  1. 3
      autogenerate_config_docs/diff_branches.py
  2. 2
      autogenerate_config_docs/templates/changes.rst.j2

3
autogenerate_config_docs/diff_branches.py

@ -237,7 +237,8 @@ def get_env(project, new_branch, old_list, new_list):
# Deprecated options
if deprecated_opts:
for deprecated, new in deprecated_opts:
for deprecated, new in sorted(deprecated_opts, cmp=_cmpopts,
key=lambda tup: tup[0]):
deprecated = format_option_name(deprecated)
new = format_option_name(new)
env['deprecated_opts'].append((deprecated, new))

2
autogenerate_config_docs/templates/changes.rst.j2

@ -41,7 +41,7 @@ New, updated, and deprecated options in {{ release }} for {{ codename }}
* - Deprecated option
- New Option
{% for cells in new_opts %}
{% for cells in deprecated_opts %}
* - ``{{ cells[0] }}``
- ``{{ cells[1] }}``
{% endfor %}

Loading…
Cancel
Save