print better error message if user is confused about tag vs. branch

dww - October 24, 2006 - 07:09
Project:CVS integration
Version:4.7.x-1.x-dev
Component:X-CVS scripts
Category:task
Priority:critical
Assigned:dww
Status:closed
Description

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.

#1

dww - October 26, 2006 - 08:52
Status:active» needs review
AttachmentSize
xcvs-taginfo-branch-vs-tag-errors.patch.txt 2.74 KB

#2

dww - October 26, 2006 - 08:56

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.

AttachmentSize
xcvs-taginfo-branch-vs-tag-errors.patch_1.txt 2.77 KB

#3

dww - October 26, 2006 - 09:23
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.

#4

Frando - November 5, 2006 - 14:24
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!

#5

dww - November 5, 2006 - 21:01
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.

#6

Anonymous - November 19, 2006 - 21:16
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.