@@ -195,6 +195,11 @@ urlpatterns = [
content_type='text/plain; charset=utf-8',
template_name='layerindex/branchcompare_plain.txt'),
name='branch_comparison_plain'),
+ re_path(r'^branch_comparison_rst/$',
+ BranchCompareView.as_view(
+ content_type='text/plain; charset=utf-8',
+ template_name='layerindex/branchcompare_rst.txt'),
+ name='branch_comparison_rst'),
re_path(r'^recipe_deps/$',
RecipeDependenciesView.as_view(
template_name='layerindex/recipedeps.html'),
@@ -151,6 +151,7 @@
<span class="pull-right">
<a class="btn btn-default" href="{% url 'branch_comparison_plain' %}?{{ request.GET.urlencode }}"><i class="glyphicon glyphicon-file"></i> Plain text</a>
+ <a class="btn btn-default" href="{% url 'branch_comparison_rst' %}?{{ request.GET.urlencode }}"><i class="glyphicon glyphicon-file"></i> rST</a>
</span>
new file mode 100644
@@ -0,0 +1,35 @@
+From {{ from_branch }} to {{ to_branch }} (layers: {{ showlayers_text }})
+
+Added
+-----
+
+.. list-table::
+ :widths: 30 70
+ :header-rows: 1
+
+ * - Recipe
+ - Version(s)
+{% for recipe in added %} * - ``{{ recipe.pn }}``
+ - {% for rv in recipe.to_versions %}{{ rv.pv }}{% if not forloop.last %}, {% endif %}{% endfor %}
+{% endfor %}
+
+Changed
+-------
+
+.. list-table::
+ :widths: 20 40 40
+ :header-rows: 1
+
+ * - Recipe
+ - Previous version(s)
+ - New version(s)
+{% for recipe in changed %}{% with pv_changed=recipe.pv_changed %} * - ``{{ recipe.pn }}``
+ - {% for rv in recipe.from_versions %}{{ rv.pv }}{% if rv.srcrev and not pv_changed %} ({{ rv.srcrev|truncatechars:13 }}){% endif %}{% if not forloop.last %}, {% endif %}{% endfor %}
+ - {% for rv in recipe.to_versions %}{{ rv.pv }}{% if rv.srcrev and not pv_changed %} ({{ rv.srcrev|truncatechars:13 }}){% endif %}{% if not forloop.last %}, {% endif %}{% endfor %}
+{% endwith %}{% endfor %}
+
+Removed
+-------
+
+{% for recipe in removed %}- ``{{ recipe.pn }}``
+{% endfor %}
Add a new rST output format for the branch comparison tool. This can be used to help write the Yocto Project release notes. Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> --- An existing example (that I formatted manually at the time): https://git.yoctoproject.org/yocto-docs/tree/documentation/migration-guides/release-notes-5.2.rst?id=79cd33b06e87c04e4f873a5afd9d53714bc5047f#n876 HTML output: https://docs.yoctoproject.org/5.2.4/migration-guides/release-notes-5.2.html#recipe-upgrades-in-yocto-ver --- layerindex/urls.py | 5 +++++ templates/layerindex/branchcompare.html | 1 + templates/layerindex/branchcompare_rst.txt | 35 ++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+) --- base-commit: 459e8d6f1f18528a835513f12dffcc999c8f7fb5 change-id: 20251127-branch-compare-rst-e26338eefd53