From b0a04147667c2ad3f731b59aaa002e050d294641 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 15 Apr 2013 12:30:56 -0700 Subject: [PATCH] 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 --- src/workflow/ArcanistBaseWorkflow.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/workflow/ArcanistBaseWorkflow.php b/src/workflow/ArcanistBaseWorkflow.php index 1406dba9..d42e7521 100644 --- a/src/workflow/ArcanistBaseWorkflow.php +++ b/src/workflow/ArcanistBaseWorkflow.php @@ -1065,7 +1065,7 @@ abstract class ArcanistBaseWorkflow extends Phobject { // operation, so special case it. if (empty($this->changeCache[$path])) { $diff = $repository_api->getRawDiffText($path); - $parser = new ArcanistDiffParser(); + $parser = $this->newDiffParser(); $changes = $parser->parseDiff($diff); if (count($changes) != 1) { throw new Exception("Expected exactly one change.");