Skip to content

Check a backport against its source

A backport carries a change that already merged onto another branch. Revue compares it with the pull request it came from, so you can read only where the two differ and mark the rest viewed.

Revue checks a pull request when you open it if:

  • Check backports against their source is on in Settings › Diff and review. It’s on unless you turn it off.
  • Its repository is one of the Repositories listed under it.
  • It carries the Label set there, backport unless you change it.

To find the source, Revue reads the backport’s description first: the lines a backport bot writes, then any line that starts with “Backport”, “Backports” or “Backported” and names pull requests. If those find nothing, it tries a branch named backport-<number>, then the (#number) in its commit messages. A backport can have several sources.

The line under the bar at the top then says what it found, for example:

  • “Matches #2497.” The backport changes the same lines in the same way.
  • “3 files differ from #2497.” Some files don’t match.
  • “Same words as #2497, but the lines differ in 2 files.” The changes match, but in different places.
  • “No source pull request found for this backport.” Choose one yourself (see below).

Only pull requests in the same repository are compared. A source in another repository is named, but not read.

Choose Read differences on that line, press ⌥4, or choose View › Backport Comparison.

A backport’s diff compared with its source, with the line reading what differs from #2497, matching lines dimmed, and Back to snapshotA backport’s diff compared with its source, with the line reading what differs from #2497, matching lines dimmed, and Back to snapshot

The diff stays the backport’s snapshot. Lines that match the source are dimmed, so what differs stands out. Line numbers, comments and viewed marks are the snapshot’s, so anything you do here is the same as on the snapshot. Press ⌥4 again, or choose Back to snapshot, to leave the comparison.

To read the source itself, choose Go › Open Backport Source.

If Revue found the wrong source, or none:

  1. Choose View › Choose Backport Source, or Choose source in the snapshot menu.
  2. Type the source’s number or link. To name several, put commas between them.
  3. Choose Compare.
The snapshot menu with Backport vs 5 sources turned on, found from the description, listing each source and Choose sourceThe snapshot menu with Backport vs 5 sources turned on, found from the description, listing each source and Choose source

A source you choose is kept, and Revue doesn’t look for one again. Clear chosen source in the same sheet goes back to the one Revue finds. You can name up to 20 sources.

Files that match the source don’t need a second read. Choose Review › Mark Matching Files Viewed to mark every one of them viewed at once. Revue never marks them by itself.

SettingWhereOptionsDefault
Check backports against their sourceSettings › Diff and reviewOn or offOn
LabelSettings › Diff and reviewbackport

Repositories sits beside these in Settings › Diff and review. Put each repository as owner/repo. The Settings reference lists its default.