From: vrana Date: Fri, 1 Feb 2013 22:59:09 +0000 (-0800) Subject: Dispatch event after collecting changes in diff X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=39cef6cb991a75307a5ad2ae9b45def6e362150e;p=arcanist.git Dispatch event after collecting changes in diff Summary: FB currently starts Sandcastle push before starting the diff workflow. If `arc diff` commits something then we need to restart the push. I want to avoid this by starting the push after commit. Test Plan: Will test after implementing the listener. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4785 --- diff --git a/src/events/constant/ArcanistEventType.php b/src/events/constant/ArcanistEventType.php index 409fac72..26dfa260 100644 --- a/src/events/constant/ArcanistEventType.php +++ b/src/events/constant/ArcanistEventType.php @@ -4,6 +4,7 @@ final class ArcanistEventType extends PhutilEventType { const TYPE_COMMIT_WILLCOMMITSVN = 'commit.willCommitSVN'; + const TYPE_DIFF_DIDCOLLECTCHANGES = 'diff.didCollectChanges'; const TYPE_DIFF_WILLBUILDMESSAGE = 'diff.willBuildMessage'; const TYPE_DIFF_DIDBUILDMESSAGE = 'diff.didBuildMessage'; const TYPE_DIFF_WASCREATED = 'diff.wasCreated'; diff --git a/src/workflow/ArcanistDiffWorkflow.php b/src/workflow/ArcanistDiffWorkflow.php index 801eb5b1..374217b9 100644 --- a/src/workflow/ArcanistDiffWorkflow.php +++ b/src/workflow/ArcanistDiffWorkflow.php @@ -685,6 +685,10 @@ EOTEXT } } } + + $this->dispatchEvent( + ArcanistEventType::TYPE_DIFF_DIDCOLLECTCHANGES, + array()); } private function buildRevisionFromCommitMessage(