mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-21 04:50:55 +01:00
Don't fatal with error in transaction diff
Test Plan: /config/edit/metamta.mail-adapter/ Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5679
This commit is contained in:
parent
1e4162f81b
commit
ef3d1150fc
2 changed files with 15 additions and 11 deletions
|
@ -33,6 +33,7 @@ final class PhabricatorApplicationTransactionTextDiffDetailView
|
||||||
$new = implode("\n", $new)."\n";
|
$new = implode("\n", $new)."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
$engine = new PhabricatorDifferenceEngine();
|
$engine = new PhabricatorDifferenceEngine();
|
||||||
$changeset = $engine->generateChangesetFromFileContent($old, $new);
|
$changeset = $engine->generateChangesetFromFileContent($old, $new);
|
||||||
|
|
||||||
|
@ -47,6 +48,9 @@ final class PhabricatorApplicationTransactionTextDiffDetailView
|
||||||
$parser->setWhitespaceMode($whitespace_mode);
|
$parser->setWhitespaceMode($whitespace_mode);
|
||||||
|
|
||||||
return $parser->render(0, PHP_INT_MAX, array());
|
return $parser->render(0, PHP_INT_MAX, array());
|
||||||
|
} catch (Exception $ex) {
|
||||||
|
return $ex->getMessage();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,7 +94,7 @@ final class PhabricatorDifferenceEngine {
|
||||||
Filesystem::writeFile($old_tmp, $old);
|
Filesystem::writeFile($old_tmp, $old);
|
||||||
Filesystem::writeFile($new_tmp, $new);
|
Filesystem::writeFile($new_tmp, $new);
|
||||||
list($err, $diff) = exec_manual(
|
list($err, $diff) = exec_manual(
|
||||||
'/usr/bin/diff %Ls %s %s',
|
'diff %Ls %s %s',
|
||||||
$options,
|
$options,
|
||||||
$old_tmp,
|
$old_tmp,
|
||||||
$new_tmp);
|
$new_tmp);
|
||||||
|
|
Loading…
Reference in a new issue