Index: modules/cvslog/cvs.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/cvslog/cvs.module,v retrieving revision 1.106.2.19.2.17 diff -u -p -r1.106.2.19.2.17 cvs.module --- modules/cvslog/cvs.module 5 Nov 2006 22:12:42 -0000 1.106.2.19.2.17 +++ modules/cvslog/cvs.module 7 Nov 2006 00:27:36 -0000 @@ -528,12 +528,12 @@ function cvs_alter_project_release_form( } } if (function_exists('cvs_local_version_is_valid')) { - $version_is_valid = cvs_local_version_is_valid($version, $project); + $vers_is_valid = cvs_local_version_is_valid($version, $tag, $project); } else { - $version_is_valid = isset($version); + $vers_is_valid = isset($version); } - if ($version_is_valid) { + if ($vers_is_valid) { $version_str = project_release_get_version($version, $project); unset($form['validate_version']); } Index: modules/cvslog/cvs_local.example.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/cvslog/Attic/cvs_local.example.inc,v retrieving revision 1.1.2.11 diff -u -p -r1.1.2.11 cvs_local.example.inc --- modules/cvslog/cvs_local.example.inc 6 Nov 2006 23:07:33 -0000 1.1.2.11 +++ modules/cvslog/cvs_local.example.inc 7 Nov 2006 00:27:36 -0000 @@ -1,5 +1,5 @@ version_major = $second[0] ? $second[0] : 1; - $version->version_patch = $second[1] ? $second[1] : 0; + // after the '--' (the default stable branch), we want "-1.x-dev". + $version->version_major = isset($second[0]) ? $second[0] : 1; + $version->version_patch = isset($second[1]) ? $second[1] : 'x'; $version->version_extra = $tag->branch ? 'dev' : _cvs_get_extra($second[2]); } if ($tree = project_release_get_api_taxonomy()) { @@ -94,7 +94,7 @@ function cvs_local_alter_project_release $tag = $_POST['edit']['tag']; } if (isset($tag) && $tag === 'HEAD') { - $form['version']['num']['#description'] = t('For releases being rebuilt from the trunk of the CVS repository (HEAD), you should probably use 0 for both the %major and %patch versions, to indicate that this is the initial version compatibile with the selected version of Drupal core. Furthermore, you should use "dev" in the %extra to indicate it is a development snapshot.', array('%major' => theme('placeholder', t('Major')), '%patch' => theme('placeholder', t('Patch-level')), '%extra' => theme('placeholder', t('Extra identifier')))); + $form['version']['num']['#description'] = t('For releases being rebuilt from the trunk of the CVS repository (HEAD), you must use "x" for the %patch version and "dev" in the %extra to indicate it is a development snapshot. Furthermore, you should probably use "1" for the %major version to indicate that this is the initial version compatibile with the selected version of Drupal core, unless you are using HEAD as a place to develop new features still compatible with a previous version of core, in which case you should use "2" or higher, as appropriate.', array('%major' => theme('placeholder', t('Major')), '%patch' => theme('placeholder', t('Patch-level')), '%extra' => theme('placeholder', t('Extra identifier')))); unset($form['version']['num']['version_extra']['#description']); } } @@ -108,7 +108,7 @@ function cvs_local_project_release_form_ * Decides if the given version object has enough information for * us to move on to the next page. */ -function cvs_local_version_is_valid($version, $project) { +function cvs_local_version_is_valid($version, $tag, $project) { if (!isset($version)) { return false; } @@ -140,11 +140,21 @@ function cvs_local_version_is_valid($ver } if (!isset($version->version_major)) { $is_valid = false; - form_set_error('version_major', t('Major version number is required.')); + form_set_error('version_major', t('Major version number is required, and must be a number.')); } if (!isset($version->version_patch)) { $is_valid = false; - form_set_error('version_patch', t('Patch-level version number is required.')); + form_set_error('version_patch', t('Patch-level version number is required, and must be either a number or the letter "x".')); + } + } + if ($tag->branch) { + if ($version->version_patch != 'x') { + $is_valid = false; + form_set_error('version_patch', t('The %patch must be "x" for snapshot releases from a branch (or HEAD).', array('%patch' => theme('placeholder', 'Patch-level')))); + } + if ($version->version_extra != 'dev') { + $is_valid = false; + form_set_error('version_extra', t('The %extra must be "dev" for snapshot releases from a branch (or HEAD).', array('%extra' => theme('placeholder', 'Extra identifier')))); } } if ($is_valid) { Index: modules/project/release/project_release_update.php =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/project/release/Attic/project_release_update.php,v retrieving revision 1.1.2.16 diff -u -p -r1.1.2.16 project_release_update.php --- modules/project/release/project_release_update.php 3 Nov 2006 17:02:12 -0000 1.1.2.16 +++ modules/project/release/project_release_update.php 7 Nov 2006 00:27:36 -0000 @@ -164,7 +164,7 @@ function convert_release($old_release) { if ($old_release->version == 'cvs') { // TODO: maybe we should just leave this "release" alone, $node->version_major = 5; - $node->version_patch = 0; + $node->version_patch = 'x'; $node->version_extra = 'dev'; $node->rebuild = 1; $node->tag = 'HEAD'; @@ -196,8 +196,6 @@ function convert_release($old_release) { } elseif ($old_release->version == 'cvs') { // The "cvs" version is a nightly tarball from the trunk - $node->version_major = 0; - $node->version_patch = 0; $node->version_extra = 'dev'; $node->tag = 'HEAD'; $node->rebuild = 1; @@ -210,7 +208,7 @@ function convert_release($old_release) { } $target_api = "$matches[1].$matches[2].x"; $node->version_major = 1; - $node->version_patch = 0; + $node->version_patch = 'x'; $node->version_extra = 'dev'; $node->tag = 'DRUPAL-' . $matches[1] . '-' . $matches[2]; $node->rebuild = 1; @@ -229,7 +227,12 @@ function convert_release($old_release) { // Now, set the right kind of title. $version = ''; if ($node->tag == 'HEAD') { - $version = t('HEAD'); + if ($old_release->nid == 3060) { + $verson = '5.x-dev'; + } + else { + $version = t('HEAD'); + } } else { $version = project_release_get_version($node);