Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F116295705
DiffusionSvnRequest.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, Jun 6, 01:38
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Jun 8, 01:38 (2 d)
Engine
blob
Format
Raw Data
Handle
26620475
Attached To
rPH Phabricator
DiffusionSvnRequest.php
View Options
<?php
/**
* @group diffusion
*/
final
class
DiffusionSvnRequest
extends
DiffusionRequest
{
protected
function
getSupportsBranches
()
{
return
false
;
}
protected
function
didInitialize
()
{
if
(
$this
->
path
===
null
)
{
$subpath
=
$this
->
repository
->
getDetail
(
'svn-subpath'
);
if
(
$subpath
)
{
$this
->
path
=
$subpath
;
}
}
}
public
function
getStableCommitName
()
{
if
(
$this
->
commit
)
{
return
$this
->
commit
;
}
if
(
$this
->
stableCommitName
===
null
)
{
$commit
=
id
(
new
PhabricatorRepositoryCommit
())
->
loadOneWhere
(
'repositoryID = %d ORDER BY epoch DESC LIMIT 1'
,
$this
->
getRepository
()->
getID
());
if
(
$commit
)
{
$this
->
stableCommitName
=
$commit
->
getCommitIdentifier
();
}
else
{
// For new repositories, we may not have parsed any commits yet. Call
// the stable commit "1" and avoid fataling.
$this
->
stableCommitName
=
1
;
}
}
return
$this
->
stableCommitName
;
}
public
function
getCommit
()
{
if
(
$this
->
commit
)
{
return
$this
->
commit
;
}
return
$this
->
getStableCommitName
();
}
}
Event Timeline
Log In to Comment