mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-26 00:32:41 +01:00
Construct a diganostic parser in BaseWorkflow::getChange()
Summary: @ender is reporting a parsing issue in SVN, but we don't build a parser with setWriteDiffOnFailure() set in this workflow right now so I can't get the raw file to fix the issue. Use the onboard mechanism to build a parser with `setWriteDiffOnFailure()` set, so it will write the diff, so I can get a copy so I can fix the problem. Test Plan: Ran `arc diff --preview` in an SVN repo with a linter. Reviewers: ender, btrahan Reviewed By: ender CC: aran Differential Revision: https://secure.phabricator.com/D5699
This commit is contained in:
parent
2df40b5445
commit
b0a0414766
1 changed files with 1 additions and 1 deletions
|
@ -1065,7 +1065,7 @@ abstract class ArcanistBaseWorkflow extends Phobject {
|
||||||
// operation, so special case it.
|
// operation, so special case it.
|
||||||
if (empty($this->changeCache[$path])) {
|
if (empty($this->changeCache[$path])) {
|
||||||
$diff = $repository_api->getRawDiffText($path);
|
$diff = $repository_api->getRawDiffText($path);
|
||||||
$parser = new ArcanistDiffParser();
|
$parser = $this->newDiffParser();
|
||||||
$changes = $parser->parseDiff($diff);
|
$changes = $parser->parseDiff($diff);
|
||||||
if (count($changes) != 1) {
|
if (count($changes) != 1) {
|
||||||
throw new Exception("Expected exactly one change.");
|
throw new Exception("Expected exactly one change.");
|
||||||
|
|
Loading…
Reference in a new issue