1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-09-20 08:58:55 +02:00

Dispatch event after building diff message

Summary:
We log time of running `arc diff`. It's easy with `--verbatim` or with users just confirming the message built in commit template.

With `--background`, I want to log only waiting time, not message editing time. This event should allow it.

Test Plan:
  $ arc diff

Haven't created the listener yet.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3394
This commit is contained in:
vrana 2012-08-27 18:21:49 -07:00
parent d83768a949
commit 600e052e72
2 changed files with 4 additions and 0 deletions

View file

@ -20,6 +20,7 @@ final class ArcanistEventType extends PhutilEventType {
const TYPE_COMMIT_WILLCOMMITSVN = 'commit.willCommitSVN';
const TYPE_DIFF_WILLBUILDMESSAGE = 'diff.willBuildMessage';
const TYPE_DIFF_DIDBUILDMESSAGE = 'diff.didBuildMessage';
const TYPE_DIFF_WASCREATED = 'diff.wasCreated';
}

View file

@ -383,6 +383,9 @@ EOTEXT
$commit_message = $this->buildCommitMessage();
PhutilEventEngine::dispatchEvent(
new PhutilEvent(ArcanistEventType::TYPE_DIFF_DIDBUILDMESSAGE));
if (!$this->shouldOnlyCreateDiff()) {
$revision = $this->buildRevisionFromCommitMessage($commit_message);
}