Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:facebook/phabricator
Browse files Browse the repository at this point in the history
  • Loading branch information
csilvers committed May 27, 2015
2 parents e4660ed + ebb7ca8 commit 1de9d93
Show file tree
Hide file tree
Showing 1,020 changed files with 8,929 additions and 6,933 deletions.
1 change: 0 additions & 1 deletion .arcconfig
@@ -1,5 +1,4 @@
{
"project.name" : "phabricator",
"phabricator.uri" : "https://phabricator.khanacademy.org/",
"unit.engine" : "PhutilUnitTestEngine",
"load" : ["src/"]
Expand Down
178 changes: 95 additions & 83 deletions resources/celerity/map.php

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions resources/sql/autopatches/20140106.macromailkey.2.php
@@ -1,14 +1,14 @@
<?php

echo "Adding mailkeys to macros.\n";
echo pht('Adding mailkeys to macros.')."\n";

$table = new PhabricatorFileImageMacro();
$conn_w = $table->establishConnection('w');
$iterator = new LiskMigrationIterator($table);
foreach ($iterator as $macro) {
$id = $macro->getID();

echo "Populating macro {$id}...\n";
echo pht('Populating macro %d...', $id)."\n";

if (!$macro->getMailKey()) {
queryfx(
Expand All @@ -20,4 +20,4 @@
}
}

echo "Done.\n";
echo pht('Done.')."\n";
6 changes: 3 additions & 3 deletions resources/sql/autopatches/20140108.ddbpname.2.php
@@ -1,14 +1,14 @@
<?php

echo "Adding names to Drydock blueprints.\n";
echo pht('Adding names to Drydock blueprints.')."\n";

$table = new DrydockBlueprint();
$conn_w = $table->establishConnection('w');
$iterator = new LiskMigrationIterator($table);
foreach ($iterator as $blueprint) {
$id = $blueprint->getID();

echo "Populating blueprint {$id}...\n";
echo pht('Populating blueprint %d...', $id)."\n";

if (!strlen($blueprint->getBlueprintName())) {
queryfx(
Expand All @@ -20,4 +20,4 @@
}
}

echo "Done.\n";
echo pht('Done.')."\n";
6 changes: 3 additions & 3 deletions resources/sql/autopatches/20140113.legalpadsig.2.php
@@ -1,14 +1,14 @@
<?php

echo "Adding secretkeys to legalpad document signatures.\n";
echo pht('Adding secretkeys to legalpad document signatures.')."\n";

$table = new LegalpadDocumentSignature();
$conn_w = $table->establishConnection('w');
$iterator = new LiskMigrationIterator($table);
foreach ($iterator as $sig) {
$id = $sig->getID();

echo "Populating signature {$id}...\n";
echo pht('Populating signature %d...', $id)."\n";

if (!$sig->getSecretKey()) {
queryfx(
Expand All @@ -20,4 +20,4 @@
}
}

echo "Done.\n";
echo pht('Done.')."\n";
4 changes: 2 additions & 2 deletions resources/sql/autopatches/20140115.auth.3.unlimit.php
Expand Up @@ -9,7 +9,7 @@
foreach (new LiskMigrationIterator($session_table) as $session) {
$id = $session->getID();

echo "Migrating session {$id}...\n";
echo pht('Migrating session %d...', $id)."\n";
$old_type = $session->getType();
$new_type = preg_replace('/-.*$/', '', $old_type);

Expand All @@ -23,4 +23,4 @@
}
}

echo "Done.\n";
echo pht('Done.')."\n";
6 changes: 3 additions & 3 deletions resources/sql/autopatches/20140205.cal.3.phid-mig.php
Expand Up @@ -3,11 +3,11 @@
$table = new PhabricatorCalendarEvent();
$conn_w = $table->establishConnection('w');

echo "Assigning PHIDs to events...\n";
echo pht('Assigning PHIDs to events...')."\n";
foreach (new LiskMigrationIterator($table) as $event) {
$id = $event->getID();

echo "Updating event {$id}...\n";
echo pht('Updating event %d...', $id)."\n";
if ($event->getPHID()) {
continue;
}
Expand All @@ -19,4 +19,4 @@
$table->generatePHID(),
$id);
}
echo "Done.\n";
echo pht('Done.')."\n";
Expand Up @@ -3,7 +3,8 @@
$table = new HeraldCondition();
$conn_w = $table->establishConnection('w');

echo "Migrating Herald conditions of type Herald rule from IDs to PHIDs...\n";
echo pht(
"Migrating Herald conditions of type Herald rule from IDs to PHIDs...\n");
foreach (new LiskMigrationIterator($table) as $condition) {
if ($condition->getFieldName() != HeraldAdapter::FIELD_RULE) {
continue;
Expand All @@ -14,7 +15,7 @@
continue;
}
$id = $condition->getID();
echo "Updating condition {$id}...\n";
echo pht('Updating condition %s...', $id)."\n";

$rule = id(new HeraldRuleQuery())
->setViewer(PhabricatorUser::getOmnipotentUser())
Expand All @@ -28,4 +29,4 @@
json_encode($rule->getPHID()),
$id);
}
echo "Done.\n";
echo pht('Done.')."\n";
5 changes: 2 additions & 3 deletions resources/sql/autopatches/20140210.projcfield.1.blurb.php
Expand Up @@ -5,10 +5,9 @@

$rows = new LiskRawMigrationIterator($conn_w, 'project_profile');

echo "Migrating project descriptions to custom storage...\n";
echo pht('Migrating project descriptions to custom storage...')."\n";
foreach ($rows as $row) {
$phid = $row['projectPHID'];
echo "Migrating {$phid}...\n";

$desc = $row['blurb'];
if (strlen($desc)) {
Expand All @@ -23,4 +22,4 @@
}
}

echo "Done.\n";
echo pht('Done.')."\n";
10 changes: 5 additions & 5 deletions resources/sql/autopatches/20140211.dx.2.migcommenttext.php
Expand Up @@ -7,18 +7,18 @@
PhabricatorContentSource::SOURCE_LEGACY,
array())->serialize();

echo "Migrating Differential comment text to modern storage...\n";
echo pht('Migrating Differential comment text to modern storage...')."\n";
foreach ($rows as $row) {
$id = $row['id'];
echo "Migrating Differential comment {$id}...\n";
echo pht('Migrating Differential comment %d...', $id)."\n";
if (!strlen($row['content'])) {
echo "Comment has no text, continuing.\n";
echo pht('Comment has no text, continuing.')."\n";
continue;
}

$revision = id(new DifferentialRevision())->load($row['revisionID']);
if (!$revision) {
echo "Comment has no valid revision, continuing.\n";
echo pht('Comment has no valid revision, continuing.')."\n";
continue;
}

Expand Down Expand Up @@ -68,4 +68,4 @@
$row['id']);
}

echo "Done.\n";
echo pht('Done.')."\n";
8 changes: 4 additions & 4 deletions resources/sql/autopatches/20140212.dx.1.armageddon.php
Expand Up @@ -7,14 +7,14 @@
PhabricatorContentSource::SOURCE_LEGACY,
array())->serialize();

echo "Migrating Differential comments to modern storage...\n";
echo pht('Migrating Differential comments to modern storage...')."\n";
foreach ($rows as $row) {
$id = $row['id'];
echo "Migrating comment {$id}...\n";
echo pht('Migrating comment %d...', $id)."\n";

$revision = id(new DifferentialRevision())->load($row['revisionID']);
if (!$revision) {
echo "No revision, continuing.\n";
echo pht('No revision, continuing.')."\n";
continue;
}

Expand Down Expand Up @@ -219,4 +219,4 @@
}

}
echo "Done.\n";
echo pht('Done.')."\n";
6 changes: 3 additions & 3 deletions resources/sql/autopatches/20140218.passwords.4.vcs.php
Expand Up @@ -3,13 +3,13 @@
$table = new PhabricatorRepositoryVCSPassword();
$conn_w = $table->establishConnection('w');

echo "Upgrading password hashing for VCS passwords.\n";
echo pht('Upgrading password hashing for VCS passwords.')."\n";

$best_hasher = PhabricatorPasswordHasher::getBestHasher();
foreach (new LiskMigrationIterator($table) as $password) {
$id = $password->getID();

echo "Migrating VCS password {$id}...\n";
echo pht('Migrating VCS password %d...', $id)."\n";

$input_hash = $password->getPasswordHash();
$input_envelope = new PhutilOpaqueEnvelope($input_hash);
Expand All @@ -24,4 +24,4 @@
$id);
}

echo "Done.\n";
echo pht('Done.')."\n";
6 changes: 3 additions & 3 deletions resources/sql/autopatches/20140226.dxcustom.1.fielddata.php
Expand Up @@ -3,12 +3,12 @@
$conn_w = id(new DifferentialRevision())->establishConnection('w');
$rows = new LiskRawMigrationIterator($conn_w, 'differential_auxiliaryfield');

echo "Modernizing Differential auxiliary field storage...\n";
echo pht('Modernizing Differential auxiliary field storage...')."\n";

$table_name = id(new DifferentialCustomFieldStorage())->getTableName();
foreach ($rows as $row) {
$id = $row['id'];
echo "Migrating row {$id}...\n";
echo pht('Migrating row %d...', $id)."\n";
queryfx(
$conn_w,
'INSERT IGNORE INTO %T (objectPHID, fieldIndex, fieldValue)
Expand All @@ -19,4 +19,4 @@
$row['value']);
}

echo "Done.\n";
echo pht('Done.')."\n";
18 changes: 9 additions & 9 deletions resources/sql/autopatches/20140321.mstatus.2.mig.php
Expand Up @@ -11,10 +11,10 @@

$conn_w = id(new ManiphestTask())->establishConnection('w');

echo "Migrating tasks to new status constants...\n";
echo pht('Migrating tasks to new status constants...')."\n";
foreach (new LiskMigrationIterator(new ManiphestTask()) as $task) {
$id = $task->getID();
echo "Migrating T{$id}...\n";
echo pht('Migrating %s...', "T{$id}")."\n";

$status = $task->getStatus();
if (isset($status_map[$status])) {
Expand All @@ -27,13 +27,13 @@
}
}

echo "Done.\n";
echo pht('Done.')."\n";


echo "Migrating task transactions to new status constants...\n";
echo pht('Migrating task transactions to new status constants...')."\n";
foreach (new LiskMigrationIterator(new ManiphestTransaction()) as $xaction) {
$id = $xaction->getID();
echo "Migrating {$id}...\n";
echo pht('Migrating %d...', $id)."\n";

if ($xaction->getTransactionType() == ManiphestTransaction::TYPE_STATUS) {
$old = $xaction->getOldValue();
Expand All @@ -55,14 +55,14 @@
$id);
}
}
echo "Done.\n";
echo pht('Done.')."\n";

$conn_w = id(new PhabricatorSavedQuery())->establishConnection('w');

echo "Migrating searches to new status constants...\n";
echo pht('Migrating searches to new status constants...')."\n";
foreach (new LiskMigrationIterator(new PhabricatorSavedQuery()) as $query) {
$id = $query->getID();
echo "Migrating {$id}...\n";
echo pht('Migrating %d...', $id)."\n";

if ($query->getEngineClassName() !== 'ManiphestTaskSearchEngine') {
continue;
Expand Down Expand Up @@ -91,4 +91,4 @@
}
}
}
echo "Done.\n";
echo pht('Done.')."\n";
6 changes: 3 additions & 3 deletions resources/sql/autopatches/20140323.harbor.1.renames.php
Expand Up @@ -14,14 +14,14 @@
id(new HarbormasterBuildTarget())->getTableName(),
);

echo "Renaming Harbormaster classes...\n";
echo pht('Renaming Harbormaster classes...')."\n";

$conn_w = id(new HarbormasterBuildStep())->establishConnection('w');
foreach ($names as $name) {
$old = $name;
$new = 'Harbormaster'.$name;

echo "Renaming {$old} -> {$new}...\n";
echo pht('Renaming %s -> %s...', $old, $new)."\n";
foreach ($tables as $table) {
queryfx(
$conn_w,
Expand All @@ -32,4 +32,4 @@
}
}

echo "Done.\n";
echo pht('Done.')."\n";
6 changes: 3 additions & 3 deletions resources/sql/autopatches/20140325.push.3.groups.php
Expand Up @@ -2,15 +2,15 @@

$conn_w = id(new PhabricatorRepository())->establishConnection('w');

echo "Adding transaction log event groups...\n";
echo pht('Adding transaction log event groups...')."\n";

$logs = queryfx_all(
$conn_w,
'SELECT * FROM %T GROUP BY transactionKey ORDER BY id ASC',
'repository_pushlog');
foreach ($logs as $log) {
$id = $log['id'];
echo "Migrating log {$id}...\n";
echo pht('Migrating log %d...', $id)."\n";
if ($log['pushEventPHID']) {
continue;
}
Expand Down Expand Up @@ -40,4 +40,4 @@
$log['transactionKey']);
}

echo "Done.\n";
echo pht('Done.')."\n";
8 changes: 3 additions & 5 deletions resources/sql/autopatches/20140410.accountsecret.2.php
@@ -1,12 +1,10 @@
<?php

echo "Updating users...\n";

echo pht('Updating users...')."\n";

foreach (new LiskMigrationIterator(new PhabricatorUser()) as $user) {

$id = $user->getID();
echo "Updating {$id}...\n";
echo pht('Updating %d...', $id)."\n";

if (strlen($user->getAccountSecret())) {
continue;
Expand All @@ -20,4 +18,4 @@
$id);
}

echo "Done.\n";
echo pht('Done.')."\n";
6 changes: 3 additions & 3 deletions resources/sql/autopatches/20140420.rel.2.objectmig.php
Expand Up @@ -4,11 +4,11 @@
$table_name = $pull_table->getTableName();
$conn_w = $pull_table->establishConnection('w');

echo "Setting object PHIDs for requests...\n";
echo pht('Setting object PHIDs for requests...')."\n";
foreach (new LiskMigrationIterator($pull_table) as $pull) {
$id = $pull->getID();

echo "Migrating pull request {$id}...\n";
echo pht('Migrating pull request %d...', $id)."\n";
if ($pull->getRequestedObjectPHID()) {
// We already have a valid PHID, so skip this request.
continue;
Expand Down Expand Up @@ -42,4 +42,4 @@
$id);
}

echo "Done.\n";
echo pht('Done.')."\n";

0 comments on commit 1de9d93

Please sign in to comment.