Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93613658
DiffusionSvnStableCommitNameQuery.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
Sat, Nov 30, 04:15
Size
633 B
Mime Type
text/x-php
Expires
Mon, Dec 2, 04:15 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
22676268
Attached To
rPH Phabricator
DiffusionSvnStableCommitNameQuery.php
View Options
<?php
final
class
DiffusionSvnStableCommitNameQuery
extends
DiffusionStableCommitNameQuery
{
protected
function
executeQuery
()
{
$repository
=
$this
->
getRepository
();
$commit
=
id
(
new
PhabricatorRepositoryCommit
())
->
loadOneWhere
(
'repositoryID = %d ORDER BY epoch DESC LIMIT 1'
,
$repository
->
getID
());
if
(
$commit
)
{
$stable_commit_name
=
$commit
->
getCommitIdentifier
();
}
else
{
// For new repositories, we may not have parsed any commits yet. Call
// the stable commit "1" and avoid fataling.
$stable_commit_name
=
1
;
}
return
$stable_commit_name
;
}
}
Event Timeline
Log In to Comment