Page MenuHomePhabricator
Paste P1108

migrate_repos_fixed.php
ActivePublic

Authored by epriestley on Apr 2 2014, 12:48 AM.
Tags
None
Referenced Files
F137049: migrate_repos_fixed.php
Apr 2 2014, 12:48 AM
Subscribers
None
<?php
require_once 'scripts/__init_script__.php';
foreach (new LiskMigrationIterator(new PhabricatorRepository()) as $repo) {
$callsign = $repo->getCallsign();
echo "Repository: {$callsign}\n";
$old = $repo->getDetail('close-commits-filter', array());
// Set this to the value you want to use.
$new = array('master');
$old_string = implode(', ', $old);
$new_string = implode(', ', $new);
echo "Changing: {$old_string} -> {$new_string}\n";
$repo->setDetail('close-commits-filter', $new);
// Uncomment this to actually save changes.
// $repo->save();
}

Event Timeline

epriestley changed the title of this paste from untitled to migrate_repos_fixed.php.
epriestley updated the paste's language from autodetect to autodetect.