mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 06:42:42 +01:00
Remove various old things in scripts/
Summary: These have all been obsolete for a reasonable amount of time, or are no longer relevant. Test Plan: shrug~ Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D8941
This commit is contained in:
parent
2022a70e16
commit
827fbb3782
7 changed files with 0 additions and 111 deletions
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
echo "This script is obsolete. Run `bin/celerity map` instead.\n";
|
||||
exit(1);
|
|
@ -1,35 +0,0 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
$root = dirname(dirname(dirname(__FILE__)));
|
||||
require_once $root.'/scripts/__init_script__.php';
|
||||
|
||||
$revision = new DifferentialRevision();
|
||||
|
||||
$empty_revisions = queryfx_all(
|
||||
$revision->establishConnection('r'),
|
||||
'select distinct r.id from differential_revision r left join '.
|
||||
'differential_diff d on r.id=d.revisionID where d.revisionID is NULL');
|
||||
|
||||
$empty_revisions = ipull($empty_revisions, 'id');
|
||||
|
||||
if (!$empty_revisions) {
|
||||
echo "No empty revisions found.\n";
|
||||
exit(0);
|
||||
}
|
||||
|
||||
echo phutil_console_wrap(
|
||||
"The following revision don't contain any diff:\n".
|
||||
implode(', ', $empty_revisions));
|
||||
|
||||
if (!phutil_console_confirm('Do you want to delete them?')) {
|
||||
echo "Cancelled.\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
foreach ($empty_revisions as $revision_id) {
|
||||
$revision = id(new DifferentialRevision())->load($revision_id);
|
||||
$revision->delete();
|
||||
}
|
||||
|
||||
echo "Done.\n";
|
|
@ -1,41 +0,0 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
$root = dirname(dirname(dirname(__FILE__)));
|
||||
require_once $root.'/scripts/__init_script__.php';
|
||||
|
||||
echo "Examining users.\n";
|
||||
foreach (new LiskMigrationIterator(new PhabricatorUser()) as $user) {
|
||||
$file = id(new PhabricatorFile())
|
||||
->loadOneWhere('phid = %s', $user->getProfileImagePHID());
|
||||
|
||||
if (!$file) {
|
||||
echo 'No pic for user ', $user->getUserName(), "\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
$data = $file->loadFileData();
|
||||
$img = imagecreatefromstring($data);
|
||||
$sx = imagesx($img);
|
||||
$sy = imagesy($img);
|
||||
|
||||
if ($sx != 50 || $sy != 50) {
|
||||
echo 'Found one! User ', $user->getUserName(), "\n";
|
||||
$xformer = new PhabricatorImageTransformer();
|
||||
|
||||
// Resize OAuth image to a reasonable size
|
||||
$small_xformed = $xformer->executeProfileTransform(
|
||||
$file,
|
||||
$width = 50,
|
||||
$min_height = 50,
|
||||
$max_height = 50);
|
||||
|
||||
$user->setProfileImagePHID($small_xformed->getPHID());
|
||||
$user->save();
|
||||
break;
|
||||
} else {
|
||||
echo '.';
|
||||
}
|
||||
}
|
||||
echo "\n";
|
||||
echo "Done.\n";
|
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
echo "This script has been replaced with `bin/audit`.\n";
|
||||
exit(1);
|
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
echo "This script is obsolete. Use `bin/repository` to manage repositories.\n";
|
||||
exit(1);
|
|
@ -1,15 +0,0 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
$root = dirname(dirname(dirname(__FILE__)));
|
||||
require_once $root.'/scripts/__init_script__.php';
|
||||
|
||||
ini_set('memory_limit', -1);
|
||||
$tasks = id(new ManiphestTask())->loadAll();
|
||||
echo "Updating relationships for ".count($tasks)." tasks";
|
||||
foreach ($tasks as $task) {
|
||||
ManiphestTaskProject::updateTaskProjects($task);
|
||||
ManiphestTaskSubscriber::updateTaskSubscribers($task);
|
||||
echo '.';
|
||||
}
|
||||
echo "\nDone.\n";
|
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
echo "This script is obsolete. Use 'bin/cache' instead.\n";
|
||||
exit(1);
|
Loading…
Reference in a new issue