bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tags with slash character


From: Alan Harder
Subject: Re: Tags with slash character
Date: Mon, 08 Aug 2005 17:22:02 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041217

Hi-
I tried this patch against current cvs of ccvs and it works for me.
(I just tried the tag command, not the sanity script)
I suggest also updating the comments both above and inside the
RCS_check_tag function to reflect what it will do now.
Thanks,

        - Alan


Jim Hyslop wrote:
Alan Harder wrote:

I was going by the message I received when I first tried to create a tag
with a "." in it...

% cvs tag tag.test file
cvs [tag aborted]: tag `tag.test' must not contain the characters `$,.:;@'


I've written a small patch to change the test, and resulting error message. The sanity.sh changes aren't quite working right under Cygwin - it's complaining about the output not matching (it seems to be a line-ending issue). Could someone with a *NIX box please test the patch to make sure it does what it's supposed to:


Index: rcs.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/rcs.c,v
retrieving revision 1.348
diff -u -r1.348 rcs.c
--- rcs.c    27 May 2005 18:07:48 -0000    1.348
+++ rcs.c    4 Aug 2005 02:27:28 -0000
@@ -3347,7 +3347,6 @@
 void
 RCS_check_tag (const char *tag)
 {
-    char *invalid = "$,.:;@";        /* invalid RCS tag characters */
     const char *cp;

     /*
@@ -3359,12 +3358,9 @@
     {
     for (cp = tag; *cp; cp++)
     {
-        if (!isgraph ((unsigned char) *cp))
-        error (1, 0, "tag `%s' has non-visible graphic characters",
-               tag);
-        if (strchr (invalid, *cp))
-        error (1, 0, "tag `%s' must not contain the characters `%s'",
-               tag, invalid);
+        if (!isalnum ((unsigned char) *cp) && *cp != '_' && *cp != '-' )
+ error (1, 0, "tag `%s' may contain only letters, numbers, _ and -",
+               tag );
     }
     }
     else
Index: sanity.sh
===================================================================
...




reply via email to

[Prev in Thread] Current Thread [Next in Thread]