Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F76064929
DiffusionMercurialBlameQuery.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Aug 6, 00:50
Size
821 B
Mime Type
text/x-php
Expires
Thu, Aug 8, 00:50 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
19657679
Attached To
rPH Phabricator
DiffusionMercurialBlameQuery.php
View Options
<?php
final
class
DiffusionMercurialBlameQuery
extends
DiffusionBlameQuery
{
protected
function
newBlameFuture
(
DiffusionRequest
$request
,
$path
)
{
$repository
=
$request
->
getRepository
();
$commit
=
$request
->
getCommit
();
// NOTE: We're using "--debug" to make "--changeset" give us the full
// commit hashes.
return
$repository
->
getLocalCommandFuture
(
'annotate --debug --changeset --rev %s -- %s'
,
$commit
,
$path
);
}
protected
function
resolveBlameFuture
(
ExecFuture
$future
)
{
list
(
$err
,
$stdout
)
=
$future
->
resolve
();
if
(
$err
)
{
return
null
;
}
$result
=
array
();
$lines
=
phutil_split_lines
(
$stdout
);
foreach
(
$lines
as
$line
)
{
list
(
$commit
)
=
explode
(
':'
,
$line
,
2
);
$result
[]
=
$commit
;
}
return
$result
;
}
}
Event Timeline
Log In to Comment