Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102115718
DiffusionMercurialRequest.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, Feb 17, 06:29
Size
487 B
Mime Type
text/x-php
Expires
Wed, Feb 19, 06:29 (2 d)
Engine
blob
Format
Raw Data
Handle
24166062
Attached To
rPH Phabricator
DiffusionMercurialRequest.php
View Options
<?php
final
class
DiffusionMercurialRequest
extends
DiffusionRequest
{
public
function
supportsBranches
()
{
return
true
;
}
protected
function
isStableCommit
(
$symbol
)
{
return
preg_match
(
'/^[a-f0-9]{40}
\z
/'
,
$symbol
);
}
public
function
getBranch
()
{
if
(
$this
->
branch
)
{
return
$this
->
branch
;
}
if
(
$this
->
repository
)
{
return
$this
->
repository
->
getDefaultBranch
();
}
throw
new
Exception
(
pht
(
'Unable to determine branch!'
));
}
}
Event Timeline
Log In to Comment