cvs diff: Diffing cvs_deploy Index: cvs_deploy/cvs_deploy.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/cvs_deploy/cvs_deploy.module,v retrieving revision 1.9.2.1 diff -u -p -r1.9.2.1 cvs_deploy.module --- cvs_deploy/cvs_deploy.module 28 Jul 2007 19:00:12 -0000 1.9.2.1 +++ cvs_deploy/cvs_deploy.module 28 Nov 2007 09:08:27 -0000 @@ -83,6 +83,26 @@ function cvs_deploy_version_alter(&$vers } /** + * Implementation of hook_datestamp_alter(). + */ +function cvs_deploy_datestamp_alter(&$datestamp, $project) { + if (!empty($datestamp)) { + // The .info file already defined a datestamp, use that. + return; + } + // The .info file contains no datestamp data. We'll use the last + // modification time on the CVS/Entries file as our best guess. + $cvs_dir = dirname($project['filename']) .'/CVS'; + if (is_dir($cvs_dir)) { + if (file_exists($cvs_dir .'/Entries')) { + if ($stat = stat($cvs_dir .'/Entries')) { + $datestamp = $stat[9]; + } + } + } +} + +/** * Implementation of hook_form_alter(). * * Modifies the system modules page (admin/build/modules) to add cvs diff: Diffing update_status Index: update_status/update_status.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/update_status/update_status.module,v retrieving revision 1.83.2.22 diff -u -p -r1.83.2.22 update_status.module --- update_status/update_status.module 2 Oct 2007 08:46:41 -0000 1.83.2.22 +++ update_status/update_status.module 28 Nov 2007 09:08:28 -0000 @@ -572,15 +572,24 @@ function update_status_get_projects() { // Give other modules a chance to fill-in and clean the version. // We can't use module_invoke_all() since we pass a reference to // the hook so it can modify the version string. + $project = array(); + $project['name'] = $file->name; + $project['project'] = $info['project']; + $project['filename'] = $file->filename; foreach (module_implements('version_alter') as $module) { $function = $module .'_version_alter'; - $project = array(); - $project['name'] = $file->name; - $project['project'] = $info['project']; - $project['filename'] = $file->filename; $function($info['version'], $project); } + // Similarly, give other modules a chance to fill-in and clean the + // datestamp. Note: in D6 this isn't necessary since we alter the + // entire .info file array. However, in D5, we need this hook for + // cvs_deploy to be able to specify dates based on CVS meta data. + foreach (module_implements('datestamp_alter') as $module) { + $function = $module .'_datestamp_alter'; + $function($info['datestamp'], $project); + } + if (!isset($projects[$info['project']])) { // Only process this if we haven't done this project, since a single // project can have multiple modules. cvs diff: Diffing update_status/po