@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix "show raw file" showing wrong file

Summary:
In a revision with multiple diffs like
https://secure.phabricator.com/D3168?vs=6094&id=6095
clicking "Show Raw File (Left)" while comparing diffs 1 and 2 brings up
the version from base, instead of from diff 1. This is because the hunks
are stored as diffs between base and diff X, and the raw file is
generated from the hunks. This introduces a hack which is probably not
actually correct but seems to work for the 90% case.

(The "Show Raw File (Right)" button was and remains correct.)

Test Plan: Click raw file buttons while comparing different diffs.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3169

+7
+7
src/applications/differential/controller/DifferentialChangesetViewController.php
··· 55 55 case 'new': 56 56 return $this->buildRawFileResponse($changeset, $is_new = true); 57 57 case 'old': 58 + if ($vs && ($vs != -1)) { 59 + $vs_changeset = id(new DifferentialChangeset())->load($vs); 60 + if ($vs_changeset) { 61 + $vs_changeset->attachHunks($vs_changeset->loadHunks()); 62 + return $this->buildRawFileResponse($vs_changeset, $is_new = true); 63 + } 64 + } 58 65 return $this->buildRawFileResponse($changeset, $is_new = false); 59 66 default: 60 67 return new Aphront400Response();