Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F72190566
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
Mon, Jul 15, 05:39
Size
812 B
Mime Type
text/x-php
Expires
Wed, Jul 17, 05:39 (2 d)
Engine
blob
Format
Raw Data
Handle
18981947
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