the xcvs-taginfo script already has a notion of a list of regular expressions that are valid tags vs. valid branches. as people try to use the new release system, they're already getting confused about what should be a tag, and what should be a branch. it'd be nice that if the requested branch is a valid tag, but not a valid branch, or if they're trying to add a tag that would be a valid branch, we could print something more descriptive. something like:

  • invalid branch:
    "ERROR: %s is a valid name for a tag, but not a branch. You must either remove the -b option to your cvs tag command if you do not want to create a branch, or choose a valid branch name. See http://drupal.org/handbook/page/here for info about valid branch and tag names."
  • invalid tag:
    "ERROR: %s is a valid name for a branch, but not a tag. You must either use the -b option if to your cvs tag command if you wish to create a branch, or choose a valid tag name. See http://drupal.org/handbook/page/here for info about valid branch and tag names."

should be quite easy.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dww’s picture

Status: Active » Needs review
FileSize
2.74 KB
dww’s picture

slightly better patch: if the new error messages aren't defined in xcvs-config.php, fall back to the usual invalid_tag or invalid_branch message, instead of not printing anything.

dww’s picture

Status: Needs review » Fixed

in IRC killes reviewed this and said it was RTBC.
committed to DRUPAL-4-7, DRUPAL-4-7--2 and HEAD.
killes is about to install this on d.o, so this is hereby fixed.

Frando’s picture

Status: Fixed » Active

This doesn't seem to work on scratch.d.o.

I just tried to create an invalid tag (DRUPAL-5--2), and I got the following error message:

CVSROOT=:pserver:frando@cvs.drupal.org:/scratch/cvs/drupal-contrib

** ERROR: invalid tag for this directory:
** contributions/themes/bluebreeze
cvs tag: Pre-tag check failed
** ERROR: invalid tag for this directory:
** contributions/themes/bluebreeze/bluebreeze-fixed
cvs tag: Pre-tag check failed
** ERROR: invalid tag for this directory:
** contributions/themes/bluebreeze/images
cvs tag: Pre-tag check failed
cvs [tag aborted]: correct the above errors first!
dww’s picture

Status: Active » Fixed

turns out the configuration file for the cvs access control stuff on scratch.d.o was slightly out of date from how i had it checked into CVS, which is why you saw this. natrak just fixed it on s.d.o, so it's working properly now. thanks for the report.

Anonymous’s picture

Status: Fixed » Closed (fixed)