Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2890182
ArcanistBrowseRevisionURIHardpointQuery.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
ArcanistBrowseRevisionURIHardpointQuery.php
View Options
<?php
final
class
ArcanistBrowseRevisionURIHardpointQuery
extends
ArcanistBrowseURIHardpointQuery
{
const
BROWSETYPE
=
'revision'
;
public
function
loadHardpoint
(
array
$refs
,
$hardpoint
)
{
$refs
=
$this
->
getRefsWithSupportedTypes
(
$refs
)
;
if
(
!
$refs
)
{
yield
$this
->
yieldMap
(
array
(
)
)
;
}
yield
$this
->
yieldRequests
(
$refs
,
array
(
ArcanistBrowseRef
::
HARDPOINT_COMMITREFS
,
)
)
;
$states
=
array
(
)
;
$map
=
array
(
)
;
foreach
(
$refs
as
$key
=>
$ref
)
{
foreach
(
$ref
->
getCommitRefs
(
)
as
$commit_ref
)
{
$hash
=
$commit_ref
->
getCommitHash
(
)
;
$states
[
$hash
]
=
id
(
new
ArcanistWorkingCopyStateRef
(
)
)
->
setCommitRef
(
$commit_ref
)
;
$map
[
$hash
]
[
]
=
$key
;
}
}
if
(
!
$states
)
{
yield
$this
->
yieldMap
(
array
(
)
)
;
}
yield
$this
->
yieldRequests
(
$states
,
array
(
'revisionRefs'
,
)
)
;
$results
=
array
(
)
;
foreach
(
$states
as
$hash
=>
$state
)
{
foreach
(
$state
->
getRevisionRefs
(
)
as
$revision
)
{
if
(
$revision
->
isClosed
(
)
)
{
// Don't resolve closed revisions.
continue
;
}
$uri
=
$revision
->
getURI
(
)
;
foreach
(
$map
[
$hash
]
as
$key
)
{
$results
[
$key
]
[
]
=
$this
->
newBrowseURIRef
(
)
->
setURI
(
$uri
)
;
}
}
}
yield
$this
->
yieldMap
(
$results
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jan 19, 13:10 (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1118070
Default Alt Text
ArcanistBrowseRevisionURIHardpointQuery.php (1 KB)
Attached To
Mode
rARC Arcanist
Attached
Detach File
Event Timeline
Log In to Comment