Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F106166456
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
Sun, Mar 23, 06:32
Size
633 B
Mime Type
text/x-php
Expires
Tue, Mar 25, 06:32 (2 d)
Engine
blob
Format
Raw Data
Handle
25105029
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