cvs [diff aborted]: no such directory `modules/cvs_deploy' Index: modules/cvs_deploy/cvs_deploy.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/cvs_deploy/cvs_deploy.module,v retrieving revision 1.10 diff -u -p -r1.10 cvs_deploy.module --- modules/cvs_deploy/cvs_deploy.module 21 Jun 2007 09:34:59 -0000 1.10 +++ modules/cvs_deploy/cvs_deploy.module 27 Jun 2007 23:19:23 -0000 @@ -40,13 +40,13 @@ function cvs_deploy_version_from_tag($ta /** * Implementation of hook_version_alter(). */ -function cvs_deploy_version_alter(&$version, $project) { +function cvs_deploy_system_info_alter(&$info, $file) { static $available = array(); $match = array(); - if (empty($version)) { + if (empty($info['version'])) { // The .info file contains no version data. Find the version based // on the sticky tag in the local workspace (the CVS/Tag file). - $cvs_dir = dirname($project['filename']) .'/CVS'; + $cvs_dir = dirname($file->filename) .'/CVS'; if (is_dir($cvs_dir)) { $tag = ''; // If there's no Tag file, there's no tag, a.k.a. HEAD. if (file_exists($cvs_dir .'/Tag')) { @@ -60,9 +60,12 @@ function cvs_deploy_version_alter(&$vers } } // The weird concatenation prevents CVS from 'expanding' this $Name. - elseif (preg_match('/\$'.'Name: (.*?)\$/', $version, $match)) { + elseif (preg_match('/\$'.'Name: (.*?)\$/', $info['version'], $match)) { $version = cvs_deploy_version_from_tag(trim($match[1])); } + else { + $version = $info['version']; + } if (module_exists('update_status') && $version == 'HEAD') { // If there's available update_status data, we can use the version string @@ -70,9 +73,9 @@ function cvs_deploy_version_alter(&$vers if (empty($available)) { $available = update_status_get_available(); } - $project_name = isset($project['project']) ? $project['project'] : $project['name']; - if (isset($available[$project_name]['releases'])) { - foreach ($available[$project_name]['releases'] as $release) { + $project = update_status_get_project($file); + if (isset($available[$project]['releases'])) { + foreach ($available[$project]['releases'] as $release) { if (isset($release['tag']) && $release['tag'] == 'HEAD') { $version = $release['version']; break; @@ -80,26 +83,6 @@ function cvs_deploy_version_alter(&$vers } } } -} -/** - * Implementation of hook_form_alter(). - * - * Modifies the system modules page (admin/build/modules) to add - * human-readable version strings for modules deployed via CVS. - */ -function cvs_deploy_form_alter(&$form, $form_state, $form_id) { - if ($form_id == 'system_modules') { - $files = $form['validation_modules']['#value']; - foreach ($files as $modulename => $file) { - $project = array(); - if (module_exists('update_status')) { - $project['project'] = update_status_get_project($file); - } - $project['filename'] = $file->filename; - $project['name'] = $file->name; - cvs_deploy_version_alter($file->info['version'], $project); - $form['version'][$modulename]['#value'] = $file->info['version']; - } - } + $info['version'] = $version; }