Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F123292115
20130409.commitdrev.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, Jul 26, 07:46
Size
866 B
Mime Type
text/x-php
Expires
Mon, Jul 28, 07:46 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27662946
Attached To
rPH Phabricator
20130409.commitdrev.php
View Options
<?php
echo
pht
(
'Migrating %s to edges...'
,
'differential.revisionPHID'
).
"
\n
"
;
$commit_table
=
new
PhabricatorRepositoryCommit
();
$data_table
=
new
PhabricatorRepositoryCommitData
();
$editor
=
new
PhabricatorEdgeEditor
();
$commit_table
->
establishConnection
(
'w'
);
$edges
=
0
;
foreach
(
new
LiskMigrationIterator
(
$commit_table
)
as
$commit
)
{
$data
=
$commit
->
loadOneRelative
(
$data_table
,
'commitID'
);
if
(!
$data
)
{
continue
;
}
$revision_phid
=
$data
->
getCommitDetail
(
'differential.revisionPHID'
);
if
(!
$revision_phid
)
{
continue
;
}
$commit_drev
=
DiffusionCommitHasRevisionEdgeType
::
EDGECONST
;
$editor
->
addEdge
(
$commit
->
getPHID
(),
$commit_drev
,
$revision_phid
);
$edges
++;
if
(
$edges
%
256
==
0
)
{
echo
'.'
;
$editor
->
save
();
$editor
=
new
PhabricatorEdgeEditor
();
}
}
echo
'.'
;
$editor
->
save
();
echo
"
\n
"
.
pht
(
'Done.'
).
"
\n
"
;
Event Timeline
Log In to Comment