Index: modules/cvslog/cvs.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/cvslog/cvs.module,v retrieving revision 1.157 diff -u -p -r1.157 cvs.module --- modules/cvslog/cvs.module 23 Jul 2007 03:15:36 -0000 1.157 +++ modules/cvslog/cvs.module 6 Aug 2007 19:08:38 -0000 @@ -2510,6 +2510,37 @@ function _cvs_get_repository_options($la } /** + * Returns an object of version number values based on the given tag. + * + * If there is a local, site-specific implementation, use that. Otherwise, + * the tag is inserted directly into the "extra" field in the version object. + */ +function cvs_get_version_from_tag($tag, $project) { + if (function_exists('cvs_local_get_version_from_tag')) { + return cvs_local_get_version_from_tag($tag, $project); + } + $version = new stdClass(); + $version->version_extra = $tag->tag; + return $version; +} + +/** + * Returns the CVS tag that should match the given version information. + * + * If there is a local, site-specific implementation, use that. Otherwise, + * the tag made by concatenating all parts of the version with hyphens. + */ +function cvs_get_tag_from_version($version, $project) { + if (function_exists('cvs_local_get_tag_from_version')) { + return cvs_local_get_tag_from_version($version, $project); + } + $version_array = (array)$version; + $tag = implode('-', $version_array); + return $tag; +} + + +/** * Return strings used in CVS account administration. */ function _cvs_get_strings() { Index: modules/cvslog/cvs_local.example.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/cvslog/cvs_local.example.inc,v retrieving revision 1.5 diff -u -p -r1.5 cvs_local.example.inc --- modules/cvslog/cvs_local.example.inc 21 Mar 2007 22:03:07 -0000 1.5 +++ modules/cvslog/cvs_local.example.inc 6 Aug 2007 19:08:38 -0000 @@ -12,9 +12,9 @@ */ /** - * Returns an array of version number values based on the given tag. + * Returns an object of version number values based on the given tag. */ -function cvs_get_version_from_tag($tag, $project) { +function cvs_local_get_version_from_tag($tag, $project) { // First, split on '--', if it's there, that tells us API vs. regular list($first_ver, $second_ver) = explode('--', $tag->tag); $first = explode('-', $first_ver, 5); @@ -80,7 +80,7 @@ function cvs_get_version_from_tag($tag, /** * Returns the CVS tag that should match the given version information */ -function cvs_get_tag_from_version($version, $project) { +function cvs_local_get_tag_from_version($version, $project) { $tag = 'DRUPAL-'; // all tags start with this. $parts[] = $version->version_major; if (isset($version->version_minor)) {