1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 05:50:55 +01:00

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
This commit is contained in:
epriestley 2020-05-19 10:29:43 -07:00
parent 86d6abe9db
commit 43a8d8763d

View file

@ -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);