From 43a8d8763df3140033874676a4714280144f0445 Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 19 May 2020 10:29:43 -0700 Subject: [PATCH] Update out-of-date API calls when rendering diffs inline in email Summary: See PHI1745. This callsite for "ChangesetParser" was not properly updated for recent changes. Test Plan: - Set `metamta.differential.inline-patches` to 100. - Created a new revision with a small (<100 line) diff, with at least one reviewer. - Ran `bin/phd debug` and observed outbound mail queue with `bin/mail list-outbound`. - Before: fatal when trying to generate the inline changes for mail. - After: clean mail generation. Differential Revision: https://secure.phabricator.com/D21270 --- .../differential/mail/DifferentialChangeDetailMailView.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/applications/differential/mail/DifferentialChangeDetailMailView.php b/src/applications/differential/mail/DifferentialChangeDetailMailView.php index d0f0be71b1..1f0eac537e 100644 --- a/src/applications/differential/mail/DifferentialChangeDetailMailView.php +++ b/src/applications/differential/mail/DifferentialChangeDetailMailView.php @@ -40,11 +40,13 @@ final class DifferentialChangeDetailMailView $diff = $this->getDiff(); $engine = new PhabricatorMarkupEngine(); + $viewstate = new PhabricatorChangesetViewState(); $out = array(); foreach ($diff->getChangesets() as $changeset) { $parser = id(new DifferentialChangesetParser()) - ->setUser($viewer) + ->setViewer($viewer) + ->setViewState($viewstate) ->setChangeset($changeset) ->setLinesOfContext(2) ->setMarkupEngine($engine);