Hey,


I wrote a bash script that will retrieve a specified version/tag of a CVS
file without using a sandbox.  I added the option of falling back to the
"HEAD" tag when the requested version was not available  (by checking to see
if  "cvs checkout " was successful (0) or not.) 

The problem is that CVS appears to always return 0 when there are no user
tags defined in a CVS file.  (This is probably depended on other options as
well ("-p" p" piping file to STDOUT  and/or  "-kb"  using binary mode......
Of course, that's assuming that I'm not just missing some something really
obvious.)



Here is essentially what I tried:  (I renamed the tags/files)

        cvs checkout -p -kb -r MY_TAG CVS-DIR/my-file >  output.file    ||
        cvs checkout -p -kb -r HEAD CVS-DIR/my-file >  output.file

The   "CVS-DIR/my-file" did not contain the MY_TAG tag, so the first command
should fail, causing the second command to get the "HEAD" version. But, what
I found is that the first command would exit successfully (without as much
as a warning message, or any of the normal CVS file header information on
STDERR as you would normally get using the "-p" option.), meaning that the
second command would never execute (leaving me with an empty file.  And many
hours of confusion...)

Then I added a tag to the CVS file:   (from  "CVS-DIR/"  in my local
sandbox)

        cvs tag JUST_A_TAG my-file

At this point I re-ran the "cvs checkout" that I had originally tried.  It
worked fine now.


Is this correct behavior, or a bug on in CVS?  I just want to make sure this
is NOT how CVS is supposed to work, before I bother the CVS bug/devel
mailing list.





Thanks in advance,

Lowell C. Alleman
[EMAIL PROTECTED]
Martin's Famous Pastry Shoppe


_______________________________________________
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs

Reply via email to