Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F451391
DiffusionLowLevelMercurialPathsQuery.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
807 B
Referenced Files
None
Subscribers
None
DiffusionLowLevelMercurialPathsQuery.php
View Options
<?php
/**
* Execute and parse a low-level Mercurial paths query using `hg locate`.
*/
final
class
DiffusionLowLevelMercurialPathsQuery
extends
DiffusionLowLevelQuery
{
private
$commit
;
private
$path
;
public
function
withCommit
(
$commit
)
{
$this
->
commit
=
$commit
;
return
$this
;
}
public
function
withPath
(
$path
)
{
$this
->
path
=
$path
;
return
$this
;
}
protected
function
executeQuery
()
{
$repository
=
$this
->
getRepository
();
$path
=
$this
->
path
;
$commit
=
$this
->
commit
;
$match_against
=
trim
(
$path
,
'/'
);
$prefix
=
trim
(
'./'
.
$match_against
,
'/'
);
list
(
$entire_manifest
)
=
$repository
->
execxLocalCommand
(
'locate --print0 --rev %s -I %s'
,
hgsprintf
(
'%s'
,
$commit
),
$prefix
);
return
explode
(
"
\0
"
,
$entire_manifest
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, May 4, 10:19 PM (1 d, 10 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
68268
Default Alt Text
DiffusionLowLevelMercurialPathsQuery.php (807 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment