| 1 |
#!/usr/bin/php |
#!/usr/bin/php |
| 2 |
<?php |
<?php |
| 3 |
|
|
| 4 |
// $Id: package-release-nodes.php,v 1.9 2009/03/07 21:58:34 jpetso Exp $ |
// $Id: package-release-nodes.php,v 1.10 2009/04/08 19:24:41 jpetso Exp $ |
| 5 |
|
|
| 6 |
/** |
/** |
| 7 |
* @file |
* @file |
| 175 |
$num_considered = 0; |
$num_considered = 0; |
| 176 |
$project_nids = array(); |
$project_nids = array(); |
| 177 |
|
|
| 178 |
|
// Determine the list of sufficient VCS backends, in order to avoid errors |
| 179 |
|
// in edge cases. (In the common case, unsupported backends don't generate |
| 180 |
|
// releases with VCS integration, but who knows what might happen.) |
| 181 |
|
$backends = versioncontrol_get_backends(); |
| 182 |
|
$supported_backends = array(); |
| 183 |
|
foreach ($backends as $vcs => $backend) { |
| 184 |
|
if (versioncontrol_release_is_supported_backend($vcs)) { |
| 185 |
|
$supported_backends[] = $vcs; |
| 186 |
|
} |
| 187 |
|
} |
| 188 |
|
|
| 189 |
// Read everything out of the query immediately so that we don't leave the |
// Read everything out of the query immediately so that we don't leave the |
| 190 |
// query object/connection open while doing other queries. |
// query object/connection open while doing other queries. |
| 191 |
$releases = array(); |
$releases = array(); |
| 196 |
// Fetch the repository where the project is located. |
// Fetch the repository where the project is located. |
| 197 |
$repositories = versioncontrol_get_repositories(array( |
$repositories = versioncontrol_get_repositories(array( |
| 198 |
'repo_ids' => array($release->repo_id), |
'repo_ids' => array($release->repo_id), |
| 199 |
|
'vcs' => $supported_backends, |
| 200 |
)); |
)); |
| 201 |
if (empty($repositories)) { |
if (empty($repositories)) { |
| 202 |
$num_considered++; |
$num_considered++; |