Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98196523
DiffusionMercurialStableCommitNameQuery.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, Jan 10, 22:56
Size
764 B
Mime Type
text/x-php
Expires
Sun, Jan 12, 22:56 (2 d)
Engine
blob
Format
Raw Data
Handle
23529561
Attached To
rPH Phabricator
DiffusionMercurialStableCommitNameQuery.php
View Options
<?php
final
class
DiffusionMercurialStableCommitNameQuery
extends
DiffusionStableCommitNameQuery
{
protected
function
executeQuery
()
{
$repository
=
$this
->
getRepository
();
// NOTE: For branches with spaces in their name like "a b", this
// does not work properly:
//
// $ hg log --rev 'a b'
//
// We can use revsets instead:
//
// $ hg log --rev branch('a b')
//
// ...but they require a somewhat newer version of Mercurial. Instead,
// use "-b" flag with limit 1 for greatest compatibility across
// versions.
list
(
$stable_commit_name
)
=
$repository
->
execxLocalCommand
(
'log --template=%s -b %s --limit 1'
,
'{node}'
,
$this
->
getBranch
());
return
$stable_commit_name
;
}
}
Event Timeline
Log In to Comment