bug-cvs
[Top][All Lists]
Advanced

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

Re: "cvs admin -n" aborts if tag not found


From: Stephen Rasku
Subject: Re: "cvs admin -n" aborts if tag not found
Date: Mon, 12 Mar 2001 23:43:21 -0800 (PST)

I wrote:
>
>Tested for CVS 1.10.8 (pserver) on Solaris 7.
>
>If you do:
>
>       cvs admin -n<new tag>:<old tag>
>       
>from the top of a workspace, it will abort with the following error 
if 
><old tag> is not found in a file:
>
>RCS file: 
/ash/cvsroot/tgx/3rdparty/belcarra/exim/tgx.postinstall.sh,v
>cvs [server aborted]: tag `exim' does not exist
>
>It should, instead, make no modifications to that file and continue 
on 
>with the rest of the files.
>

I have attached a patch and a script that will reproduce the problem 
and verify the fix.  The problem was that the function RCS_tag2rev() 
would exit the program if it didn't find the requested tag.  I have 
changed it to return NULL in this case.  This function appears to be 
called in only one place so this fix should be safe.  Where it was 
being called, it was already checking for NULL.  This makes the patch 
trivial.

I tested this on 1.10.8 but it appears that 1.11 has the same code so 
the patch should be applied against it as well.

-- 
Stephen Rasku                   E-mail: address@hidden
Senior Software Engineer        Web:    http://www.pop-star.net/
TGI Technologies
Index: src/rcs.c
===================================================================
RCS file: /ash/cvsroot/tools/cvs/src/rcs.c,v
retrieving revision 1.1.1.1
diff -b -u -r1.1.1.1 rcs.c
--- src/rcs.c   2001/02/04 20:23:40     1.1.1.1
+++ src/rcs.c   2001/03/13 07:35:50
@@ -2564,8 +2564,7 @@
     if (rev)
         return rev;
 
-    error (1, 0, "tag `%s' does not exist", tag);
-    /* NOT REACHED -- error (1 ... ) does not return here */
+    error (0, 0, "tag `%s' does not exist", tag);
     return 0;
 }
 

Attachment: admin-test.sh
Description: admin-test.sh


reply via email to

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