Page MenuHomeSealhub

ArcanistMercurialCommitMessageHardpointQuery.php
No OneTemporary

ArcanistMercurialCommitMessageHardpointQuery.php

<?php
final class ArcanistMercurialCommitMessageHardpointQuery
extends ArcanistWorkflowMercurialHardpointQuery {
public function getHardpoints() {
return array(
ArcanistCommitRef::HARDPOINT_MESSAGE,
);
}
protected function canLoadRef(ArcanistRef $ref) {
return ($ref instanceof ArcanistCommitRef);
}
public function loadHardpoint(array $refs, $hardpoint) {
$api = $this->getRepositoryAPI();
$hashes = mpull($refs, 'getCommitHash');
$unique_hashes = array_fuse($hashes);
// TODO: Batch this properly and make it future oriented.
$messages = array();
foreach ($unique_hashes as $unique_hash) {
$messages[$unique_hash] = $api->getCommitMessage($unique_hash);
}
foreach ($hashes as $ref_key => $hash) {
$hashes[$ref_key] = $messages[$hash];
}
yield $this->yieldMap($hashes);
}
}

File Metadata

Mime Type
text/x-php
Expires
Fri, Nov 28, 15:08 (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1044412
Default Alt Text
ArcanistMercurialCommitMessageHardpointQuery.php (869 B)

Event Timeline