Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93903868
migrate-maniphest-revisions.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, Dec 2, 09:46
Size
618 B
Mime Type
text/x-php
Expires
Wed, Dec 4, 09:46 (2 d)
Engine
blob
Format
Raw Data
Handle
22720280
Attached To
rPH Phabricator
migrate-maniphest-revisions.php
View Options
<?php
echo
pht
(
'Migrating task revisions to edges...'
).
"
\n
"
;
$table
=
new
ManiphestTask
();
$table
->
establishConnection
(
'w'
);
foreach
(
new
LiskMigrationIterator
(
$table
)
as
$task
)
{
$id
=
$task
->
getID
();
echo
pht
(
'Task %d: '
,
$id
);
$revs
=
$task
->
getAttachedPHIDs
(
DifferentialRevisionPHIDType
::
TYPECONST
);
if
(!
$revs
)
{
echo
"-
\n
"
;
continue
;
}
$editor
=
new
PhabricatorEdgeEditor
();
foreach
(
$revs
as
$rev
)
{
$editor
->
addEdge
(
$task
->
getPHID
(),
ManiphestTaskHasRevisionEdgeType
::
EDGECONST
,
$rev
);
}
$editor
->
save
();
echo
pht
(
'OKAY'
).
"
\n
"
;
}
echo
pht
(
'Done.'
).
"
\n
"
;
Event Timeline
Log In to Comment