Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F134385
repo_phid.php
All Users
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
epriestley
Mar 24 2014, 11:42 PM
2014-03-24 23:42:40 (UTC+0)
Size
805 B
Referenced Files
None
Subscribers
None
repo_phid.php
View Options
<?php
require_once
'scripts/__init_script__.php'
;
$conn_w
=
id
(
new
DifferentialRevision
())->
establishConnection
(
'w'
);
foreach
(
new
LiskMigrationIterator
(
new
DifferentialRevision
())
as
$rev
)
{
$id
=
$rev
->
getID
();
echo
"Checking D{$id}...
\n
"
;
if
(
$rev
->
getRepositoryPHID
())
{
// Already has a repository PHID, skip it.
continue
;
}
$diff
=
$rev
->
loadActiveDiff
();
if
(!
$diff
)
{
// Oldschool broken no-diff rev, skip it.
continue
;
}
if
(!
$diff
->
getRepositoryPHID
())
{
// Diff doesn't have a repository PHID either, skip it.
continue
;
}
echo
"Updating D{$id}...
\n
"
;
queryfx
(
$conn_w
,
'UPDATE %T SET repositoryPHID = %s WHERE id = %d'
,
id
(
new
DifferentialRevision
())->
getTableName
(),
$diff
->
getRepositoryPHID
(),
$id
);
}
echo
"Done.
\n
"
;
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/q4/7s/pnutwhjd43auxsc7
Default Alt Text
repo_phid.php (805 B)
Attached To
Mode
P1100 repo_phid.php
Attached
Detach File
Event Timeline
Log In to Comment