]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Construct a diganostic parser in BaseWorkflow::getChange()
authorepriestley <git@epriestley.com>
Mon, 15 Apr 2013 19:30:56 +0000 (12:30 -0700)
committerepriestley <git@epriestley.com>
Mon, 15 Apr 2013 19:30:56 +0000 (12:30 -0700)
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

index 1406dba90fe1b1d80d4fa34ab2bc2a1ea72e9ce5..d42e75216b12700b12715571ab18dbdd699175e3 100644 (file)
@@ -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.");