Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F12656024
ArcanistMercurialCommitMessageHardpointQuery.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
869 B
Referenced Files
None
Subscribers
None
ArcanistMercurialCommitMessageHardpointQuery.php
View Options
<?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
Details
Attached
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)
Attached To
Mode
R118 Arcanist - fork
Attached
Detach File
Event Timeline
Log In to Comment