1---2pagination:3 data: forge.pages.revisions4---5{% extends "base.njk" %}6{% import "macros.njk" as m with context %}7{% import "ui.njk" as ui %}8{% set rv = p.review %}9{% block head %}{{ m.reviewMeta(rv, p.repo, p.title, p.repo.urls.revision(rv.id, p.rev.n).href) }}{% endblock %}10{% block scripts %}<script src="{{ assets.diffs }}" defer></script>11{% endblock %}12{% block content %}13{% css %}14/* range-diff: a block per pair of commits */15.pk { font-size: var(--text-sm); font-weight: var(--fw-strong); }16.pk.same { color: var(--muted); }17.pk.changed { color: var(--warn); }18.pk.add { color: var(--add-fg); }19.pk.del { color: var(--del-fg); }20.subj { font-weight: var(--fw-strong); overflow-wrap: anywhere; }21.pairrow { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-3); margin: 0; padding: var(--space-2) var(--space-3); border-bottom: var(--hairline) solid var(--border); font-size: var(--text-sm); }22details.pairs { margin: 0; padding: var(--space-2) var(--space-3); border-bottom: var(--hairline) solid var(--border); font-size: var(--text-sm); }23.pairlist > :last-child { border-bottom: 0; }24details.pairs > summary { cursor: pointer; color: var(--muted); font-weight: var(--fw-medium); }25details.pairs .pairrow { margin: 0; padding: var(--space-2) 0 0; border: 0; }26.pair .fh .subj { color: var(--fg); }2728/* No line numbers here: the marker sticks at the left edge, not after them. */29.code.range .mk { left: 0; }30.code.range .l.sect .lc { font-weight: var(--fw-strong); }31.code.range .lc .i { color: var(--add-fg); font-weight: var(--fw-strong); }32.code.range .lc .d { color: var(--del-fg); font-weight: var(--fw-strong); }33{% endcss %}34<div class="meta-head">35<h1><a href="{{ p.repo.urls.review(rv.id).href }}" data-key="u">{{ rv.title }}</a> <span class="desc">#{{ rv.id }}</span></h1>36{% if p.rev.summary %}<div class="byline"><span class="jev-sum {{ p.rev.summary.kind }}" title="What this revision changed, according to Jev">{{ p.rev.summary.text | capitalize }}</span></div>{% endif %}37{% if p.rev.view == 'diff' %}38<div class="byline">What changed from r{{ p.rev.prev }} ({{ p.from.sha | commitLink(p.repo) | safe }}) to r{{ p.rev.n }} ({{ p.rev.sha | commitLink(p.repo) | safe }}), pushed {{ p.rev.ts | ago }}. Both are on the same base, so this is the diff between their tips{% if rv.parent %}, including any change to the layers below{% endif %}.</div>39</div>40{% set tools %}{{ ui.checkbox('wrap lines', false, 'data-wrap') }}{% endset %}41{{ p.files | diffstatHtml('', tools) | safe }}42{% if not p.files.length %}<div class="panel"><p class="empty">The trees are identical: only commit messages or history changed.</p></div>{% endif %}43{{ p.files | diffHtml(p.repo) | safe }}44{% else %}45<div class="byline">What changed from r{{ p.rev.prev }} to r{{ p.rev.n }}, pushed {{ p.rev.ts | ago }}. {% if p.from.base and p.rev.base %}The branch was rebased, from {{ p.from.base | commitLink(p.repo) | safe }} onto {{ p.rev.base | commitLink(p.repo) | safe }}{% else %}The base isn't known for both revisions{% endif %}, so a diff of the tips would mix in everything that landed in between. Instead each commit is paired with its earlier version (git range-diff).</div>46</div>47{{ p.rev.range | rangeDiffHtml(p.repo) | safe }}48{% endif %}49{% endblock %}