Skip to main content

Module source

Module source 

Source
Expand description

The ReviewSource abstraction: sources say what to check out, the vcs module decides how. See the design plan for the GitHub/moz-phab implementations; this module currently only has the shared types and trait.

Re-exports§

pub use crate::state::ReviewKey;

Modules§

diffstat
Renders a git diff --stat/jj diff --stat-style summary from per-file line counts, for sources that report changed files via their own API (Phabricator’s differential.querydiffs) or only an aggregate count (GitHub’s PR object) rather than a local git/jj diff.
github
GitHub review source.
moz_phab
Mozilla’s Phabricator, via the moz-phab CLI. Not a general-purpose Phabricator source - see the module name. moz-phab is the tool every Mozilla contributor already uses to submit and apply patches; delegating the actual checkout to it, rather than reimplementing diff fetching and application ourselves, was a deliberate pivot after an earlier from-scratch implementation turned out to duplicate work moz-phab already does more robustly. Everything below the “Checkout” heading was verified empirically against the real, live Mozilla Phabricator and a real moz-phab install (not just read from its source), specifically because the earlier from-scratch approach had exactly this kind of thing wrong.

Structs§

ForkRef
The PR head’s own remote+branch, e.g. https://github.com/alice/firefox + feature-x. None when the source fork has been deleted, in which case the jj backend falls back to a raw fetch-and-import of refspec/commit instead.
Patch
RepoRef
A repo referenced by a review, before it’s resolved to a canonical local repo. Serialized into state.json (as part of ReviewEntry) so rq fetch/the TUI can resolve it later without re-querying the source.
Review

Enums§

Checkout
Lifecycle
ReviewKind
Serialized into state.json (as part of ReviewEntry) so a review’s kind survives between sync and a later on-demand rq fetch.

Traits§

ReviewSource