the xcvs-taginfo.php script needs to support regexp-based validation of tag names for the new release system[1]. attached patch adds this trivial but critical functionality. i'll provide a patch against xcvs-config.php with the appropriate regexps to install on d.o in a separate comment, once the naming conventions are completely finalized and we're actually ready to deploy this.

Comments

dww’s picture

dww’s picture

Status: Needs review » Needs work

upon further consideration, i want to add 2 settings: regexps for valid branches, and regexps for valid tags. now that http://drupal.org/node/83332 is committed, xcvs-taginfo.php already knows if it's a branch or a tag. we're going to want the flexibility to validate branches and tags differently, since the conventions we want to enforce will be different for each. should be pretty trivial to make this change.

dww’s picture

Status: Needs work » Needs review
StatusFileSize
new4.28 KB

as promised, separate lists of regexps and separate error messages for branches vs. tags.

for example, instead of the old way:

$xcvs['tag_valid'] = array('DRUPAL-3-0', 'DRUPAL-4-0', 'DRUPAL-4-1', 'DRUPAL-4-2', 'DRUPAL-4-3', 'DRUPAL-4-4', 'DRUPAL-4-5', 'DRUPAL-4-6', 'DRUPAL-4-7');

with this patch, this could be:

$xcvs['valid_branches'] = array('@^DRUPAL-3-0$@', '@^DRUPAL-4-[0-7]$@', '@^DRUPAL-5-0$@');

better yet, you could do the more fancy validation we'll need for the new release system, and/or enforce different conventions on branches vs. tags (to prevent people from making non-branch tags like "DRUPAL-4-7" on part/all of their module, for example).

dww’s picture

Status: Needs review » Fixed
StatusFileSize
new4.66 KB

after review from killes, committed to TRUNK and 4.7.

meanwhile, here's a patch against xcvs-config.php for all of the d.o customizations (except the real DB password, of course). ;) this will make it easier to keep the d.o version in sync with what's in cvs.

dww’s picture

Priority: Critical » Normal
Status: Fixed » Needs work

minor whoops: the version as currently installed doesn't have the nice error messages for invalid tags and branches. besides, the copy on d.o of those messages could be even more explicit to spell out what makes a tag or branch valid for our particular conventions...

i'll roll a new d.o-specific patch once i've had some sleep.

dww’s picture

minor whoops: the version as currently installed doesn't have the nice error messages for invalid tags and branches. besides, the copy on d.o of those messages could be even more explicit to spell out what makes a tag or branch valid for our particular conventions...

i'll roll a new d.o-specific patch once i've had some sleep.

dww’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new4.69 KB

here's a new patch (for the contrib repo) that doesn't remove the error messages for invalid tags and branches. it doesn't yet spell out what a valid branch/tag would look like, since that's about to change, anyway, and we can spend the effort getting this text how we want it once the new conventions are in place.

i'll attach another patch momentarily for the core repo.

dww’s picture

StatusFileSize
new932 bytes

and here's a patch for the core repo. this just modifies the contrib-repo's config. so, to use this, you want to:

  1. check out a fresh, clean copy of the xcvs directory from cvs.
  2. apply http://drupal.org/files/issues/xcvs-config_drupal.org_patch_1.txt
  3. apply this patch

hope that's not too much trouble. ;) good news is that even though the xcvs to contrib patch might have to change in the future, this one should pretty much remain valid for a long time. ;)

thanks,
-derek

dww’s picture

Status: Reviewed & tested by the community » Closed (fixed)

killes installed this all on d.o. for now, we're done. we'll have to change the branch/tag validation regexps for the new release system, once we finalize the tag naming conventions. ;) but, i'll just open that as a d.o infra issue, since that's all it is -- d.o-specific settings in the xcvs-config.php file.