Skip to content

Commit

Permalink
Move aegir cloning earlier in the process so it picks up label
Browse files Browse the repository at this point in the history
transforms.
  • Loading branch information
sdboyer committed Feb 24, 2011
1 parent 7f3ec94 commit db10843
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
4 changes: 1 addition & 3 deletions db-migrate-stage1.drush.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@
// A set of repos to assemble via cloning instead
$cloners = array(
851266 => 'git://github.com/sdboyer/drupalorg-git.git', // tggm, woot!
196005 => 'git://git.aegirproject.org/export/provision', // aegir, provision
195997 => 'git://git.aegirproject.org/export/hostmaster', // aegir, hostmaster
);

$git_basedir = variable_get('drupalorg_git_basedir', '/var/git');
Expand Down Expand Up @@ -117,7 +115,7 @@
'repository' => $repo,
'operation' => array(
'passthru' => array(
"clone --bare --template $templatedir {$cloners[$project->nid]} $tgt_dir",
"clone --branch launch --bare --template $templatedir {$cloners[$project->nid]} $tgt_dir",
),
),
);
Expand Down
14 changes: 7 additions & 7 deletions dump-project-info.drush.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@
$fileobj->fwrite(sprintf('%s,%s,%d,%d' . PHP_EOL, $row->directory, $row->uri, $row->strip_trans, $row->nid));
}

function _tggm_exception_sandbox($row) {
function _tggm_exception_sandbox(&$row) {
// The 'sandbox' catchall project would cause us to import ALL sandboxes. No freakin way.
return FALSE;
}

function _tggm_exception_hostmaster($row) {
// hostmaster is being cloned in instead
return FALSE;
function _tggm_exception_hostmaster(&$row) {
$row->directory = 'git://git.aegirproject.org/export/hostmaster.git';
return TRUE;
}

function _tggm_exception_provision($row) {
// provision is being cloned in instead
return FALSE;
function _tggm_exception_provision(&$row) {
$row->directory = 'git://git.aegirproject.org/export/provision.git';
return TRUE;
}
10 changes: 9 additions & 1 deletion run-full-import.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,15 @@
$forks++;
}
else {
$success = import_directory($optsfile, $srcrepo, ($projectdata[1] == 'drupal' ? 'drupal' : 'contributions') . $projectdata[0], "$destpath/project/{$projectdata[1]}.git", TRUE);
if (preg_match('/^git:/', $projectdata[0])) {
git_invoke("git clone --bare $projectdata[0] $destpath/project/{$projectdata[1]}.git", FALSE);
convert_project_branches($projectdata[1], "$destpath/project/{$projectdata[1]}.git", $rename_patterns['contrib']['branches']);
convert_project_tags($projectdata[1], "$destpath/project/{$projectdata[1]}.git", $rename_patterns['contrib']['tagmatch'], $rename_patterns['contrib']['tags']);
exit(0);
}
else {
$success = import_directory($optsfile, $srcrepo, ($projectdata[1] == 'drupal' ? 'drupal' : 'contributions') . $projectdata[0], "$destpath/project/{$projectdata[1]}.git", TRUE);
}
exit(empty($success));
}
git_log("Finished import #$n\n", 'DEBUG');
Expand Down

0 comments on commit db10843

Please sign in to comment.