Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F103272344
DiffusionMercurialLastModifiedQuery.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
Fri, Feb 28, 17:59
Size
770 B
Mime Type
text/x-php
Expires
Sun, Mar 2, 17:59 (1 d, 19 h)
Engine
blob
Format
Raw Data
Handle
24531724
Attached To
rPH Phabricator
DiffusionMercurialLastModifiedQuery.php
View Options
<?php
final
class
DiffusionMercurialLastModifiedQuery
extends
DiffusionLastModifiedQuery
{
protected
function
executeQuery
()
{
$drequest
=
$this
->
getRequest
();
$repository
=
$drequest
->
getRepository
();
$path
=
$drequest
->
getPath
();
list
(
$hash
)
=
$repository
->
execxLocalCommand
(
'log --template %s --limit 1 --rev %s::0 -- %s'
,
'{node}'
,
$drequest
->
getCommit
(),
nonempty
(
ltrim
(
$path
,
'/'
),
'.'
));
$commit
=
id
(
new
PhabricatorRepositoryCommit
())->
loadOneWhere
(
'repositoryID = %d AND commitIdentifier = %s'
,
$repository
->
getID
(),
$hash
);
if
(
$commit
)
{
$commit_data
=
$commit
->
loadCommitData
();
}
else
{
$commit_data
=
null
;
}
return
array
(
$commit
,
$commit_data
);
}
}
Event Timeline
Log In to Comment