Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96567850
DiffusionSvnBlameQuery.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
Sat, Dec 28, 05:54
Size
812 B
Mime Type
text/x-php
Expires
Mon, Dec 30, 05:54 (2 d)
Engine
blob
Format
Raw Data
Handle
23187145
Attached To
rPH Phabricator
DiffusionSvnBlameQuery.php
View Options
<?php
final
class
DiffusionSvnBlameQuery
extends
DiffusionBlameQuery
{
protected
function
newBlameFuture
(
DiffusionRequest
$request
,
$path
)
{
$repository
=
$request
->
getRepository
();
$commit
=
$request
->
getCommit
();
return
$repository
->
getRemoteCommandFuture
(
'blame --force %s'
,
$repository
->
getSubversionPathURI
(
$path
,
$commit
));
}
protected
function
resolveBlameFuture
(
ExecFuture
$future
)
{
list
(
$err
,
$stdout
)
=
$future
->
resolve
();
if
(
$err
)
{
return
null
;
}
$result
=
array
();
$matches
=
null
;
$lines
=
phutil_split_lines
(
$stdout
);
foreach
(
$lines
as
$line
)
{
if
(
preg_match
(
'/^
\s
*(
\d
+)/'
,
$line
,
$matches
))
{
$result
[]
=
(
int
)
$matches
[
1
];
}
else
{
$result
[]
=
null
;
}
}
return
$result
;
}
}
Event Timeline
Log In to Comment