{# SPDX-FileCopyrightText: 2026 rishmadaan SPDX-License-Identifier: GPL-3.0-or-later #} {# The repo page's Incoming tab. When an operation just ran (Pull, Fetch), its result comes first, in its own panel built only from what the operation measured; the fresh read of the repo follows under its own heading. Every word is computed by web/routes/incoming.py. #} {% set page_url = "/repo/" ~ repo.workspace ~ "/" ~ repo.key %} {% set act = "/incoming/" ~ repo.workspace ~ "/" ~ repo.key %} {% set br %}{{ inc.branch }}{% endset %} {% set how %}moves {{ br }} forward to {{ inc.tip7 }}, the newest commit listed here, and nothing newer. It does not fetch first. If {{ br }} or {{ inc.upstream }} has changed since this list was drawn, it stops and shows the new list.{% endset %} {% set others %}Pull all in the library toolbar is different: it fetches and takes the newest.{% endset %} {% set res = inc.result %} {% macro pull_button(label, primary=True) -%} {%- endmacro %} {% macro fetch_button(label, primary=True) -%} {%- endmacro %} {% macro commit_row(c) -%}
{{ c.short }}{{ c.subject }} {{ c.author }} · {{ c.when }}{% if c.files %} · {{ c.files_word }} +{{ c.added }} −{{ c.removed }}{% endif %} {% if c.body %}
more of this message

{{ c.body }}

{% endif %}
{%- endmacro %} {% macro facts_list(facts) -%} {% if facts %}{% endif %} {%- endmacro %} {% macro list_blocks(L, pulled, base, as_prev, anchor) -%} {% set prev %}as of the previous fetch · {% endset %}

{{ 'What this pull brought in' if pulled else 'Commits' }} {{ L.count }} · {{ prev }}newest first

{% for c in L.commits %}{{ commit_row(c) }}{% endfor %}
{% if L.commits_cut %}

Showing the newest {{ L.commits|length }} of {{ L.count }} commits (scroll the box). The other {{ L.commits_rest }} are older. {% if pulled %}The pull took all {{ L.count }}.{% else %}Pull takes all {{ L.count }}, including those not listed.{% endif %} {{ L.commits_rest_cmd }}

{% endif %}

{{ 'Files it changed' if pulled else 'Files' }} {{ L.file_total }} · {{ prev }}{% if base == "diverged" %}upstream's changes since the branches split · {% endif %}click a file for its line-by-line diff

{% if L.kinds_line %}

{{ L.kinds_line }}

{% endif %}
{% for f in L.files %}
{{ f.letter }} {% if f.old_path %}{{ f.old_path }} → {% endif %}{{ f.path }} {% if f.tag %}{{ f.tag }}{% endif %} {% if f.stat %}{{ f.stat }}{% else %}+{{ f.added }} −{{ f.removed }}{% endif %} {% if f.note %}
{{ f.note }}
{% else %}
loading…
{% endif %}
{% endfor %}
{% if L.files_cut %}

Showing {{ L.files|length }} of {{ L.file_total }} files, largest first (scroll the box). {{ L.files_rest_cmd }}

{% endif %} ↑ Back to the top of this panel
{%- endmacro %} {% if res %}
{{ 'Fetch' if res.op == 'fetchfailed' else 'Pull' }} · just now
{{ res.title }} {% if res.lists %}{{ res.lists.stats }}{% endif %}
{% if res.lists and res.lists.span %}

{{ res.lists.span }}

{% endif %} {{ facts_list(res.facts) }} {% if res.retry or res.op == "changed" %}

{% if res.retry %}Retry runs the same fetch again; nothing is retried on its own.{% else %}Show redraws this page with {% if inc.kind in ("behind", "stale") %}the list as it is now, to review before pulling{% else %}this repo as it is now{% endif %}. It does not fetch: the check that stopped the pull already read the new state. The list reviewed earlier is no longer shown, because it no longer matches this repo.{% endif %}

{% endif %}
{% if res.lists %}{{ list_blocks(res.lists, True, "", False, "incoming-result") }}{% endif %}

What is here now {{ 'read again after the fetch' if res.op == 'fetchfailed' else 'read again after the pull' if res.merged else 'read again just now' }}

{% endif %} {% set k = inc.kind %} {% set held = inc.unborn_block or k %}{# an unborn branch held back by a freeze or edits gets that state's control #}
{% if inc.eyebrow_label %}Incoming · {{ inc.eyebrow_label }}{% else %}Incoming · {{ inc.upstream }} → {{ inc.branch }}{% endif %}
{{ inc.title }}Fetching…{% if inc.snapshot %}Pulling {{ inc.count }} commit{{ '' if inc.count == '1' else 's' }}…{% else %}Pulling…{% endif %} {% if inc.stats %}{{ inc.stats }}{% endif %}
{% if inc.span and not inc.compact %}

{{ inc.span }}

{% endif %} {% if not inc.compact or k == "unknown" %} {% for para in inc.lede %}

{{ para }}

{% endfor %} {% if inc.command %}
{{ inc.command }}
{% endif %} {{ facts_list(inc.facts) }} {% endif %} {% if not inc.compact %}
{% if k == "behind" %} {{ pull_button("↓ Pull these " ~ inc.count) if inc.snapshot }} {% elif k == "stale" %} {{ fetch_button("⟳ Fetch first") }}{{ pull_button("↓ Pull these " ~ inc.count ~ " without fetching", primary=False) if inc.snapshot }} {% elif held == "blocked" %} {% elif held == "frozen" %}
{% elif k in ("diverged", "noremote", "unborn") or (k in ("noupstream", "detached") and not inc.command) %} {% elif k in ("noupstream", "detached") %} {% elif k == "unknown" %} ⟳ Try again {% elif k in ("ahead", "none", "upstream-gone") %} {{ fetch_button("⟳ Fetch now", primary=False) }} {% endif %}

Asking the remote what is there now. This page shows a new list only after git has finished and the fetch succeeded. Pull is not offered while a fetch is running.

Moving {{ br }} from {{ inc.head7 }} to {{ inc.tip7 }}. This page reports success only after git has finished and gitstow has read the result back.

{% set explain %} {%- if k == "behind" %}Pull {{ how }} {{ others }} Leaving this page changes nothing. {%- elif k == "stale" %}Fetch asks the remote what is there now and redraws this list. Pull without fetching {{ how }} {{ others }} {%- elif held == "blocked" %}Resolve the local work, then come back for a fresh check. gitstow shows local changes but does not alter them, so that happens in a terminal. Committing them on this branch may mean the two histories need reconciling before a pull. {%- elif k == "diverged" %}Pull is off. Bringing the two histories together (a rebase or a merge) happens in a terminal. Come back afterwards for a fresh check. {%- elif held == "frozen" %}Unfreezing does not pull. It lets Pull and Pull all work on this repo again{% if k == "frozen" %}; the Pull button appears here once the repo is unfrozen{% endif %}. {%- elif k == "unknown" %}Try again repeats the read. If git keeps failing, the repair happens in a terminal; gitstow changes nothing in this folder. {%- endif %} {% endset %} {% if explain|trim %}

{{ explain }}

{% endif %} {% endif %}
{% if inc.lists and not inc.compact %}{{ list_blocks(inc.lists, False, inc.base, inc.as_prev, "incoming-panel") }}{% endif %} {% if inc.local_commits and not inc.compact %}

Local commits not in {{ inc.upstream }} {{ inc.local_commit_total }}

{% for c in inc.local_commits %}{{ commit_row(c) }}{% endfor %}
{% if inc.local_commits_cut %}

Showing the newest {{ inc.local_commits|length }} of {{ inc.local_commit_total }} local commits. All of them, in a terminal: {{ inc.local_log_cmd }}

{% endif %}
{% endif %}