[cvsnt] How to add a file on mainline when parent directory isupdated from a tag?

Arthur Barrett arthur.barrett at march-hare.com
Fri Oct 16 00:19:54 BST 2009


Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.


Cristian,

> I perform cvs update from a tag and then I would like to add a file
> under CVSNT control. I'd like to have the file added on the 
> mainline (as
> my update was from a tag, not even a branch) and I do cvs add foo.c -r
> HEAD and then commit. 
> 1. if I do not specify -r option to commit, then what happens is that
> the file is added not to the mainline, but to a branch that 
> has the name
> of my tag. What is the effect of -r on the add command, then?
> 2. if I try to specify -r HEAD option to commit, it returns:
> commit: invalid option -- r
> cvs commit: nothing known about `HEAD'
> cvs [commit aborted]: correct above errors first!
> 

It's almost impossible to help if you do not provide the basic
information requested in the FAQ:
http://march-hare.com/cvspro/faq/faq2.asp#2z

Works for me using CVS Suite 2008:

I:\testtemp>cvs -d
:sspi;force=kerberos:Administrator at cluster1.march-hare.local:/i-repo
rtag blahtag appl
cvs rtag: Tagging appl
cvs rtag: Tagging appl/app1

I:\testtemp>cvs -d
:sspi;force=kerberos:cluster1.march-hare.local:/i-repo co -r
blahtag  appl
cvs server: Updating appl
U appl/appl.sln
U appl/appl.vssscc
cvs server: Updating appl/app1
U appl/app1/stdafx.cpp
U appl/app1/stdafx.h
U appl/app1/targetver.h

I:\testtemp>cd appl

I:\testtemp\appl>notepad test.txt

I:\testtemp\appl>cvs add -r HEAD  test.txt
cvs server: scheduling file `test.txt' for addition on branch `HEAD'
cvs server: use 'cvs commit' to add this file permanently


I:\testtemp\appl>cvs ci -m "go"
cvs commit: Examining .
cvs commit: Examining app1
RCS file: /i-repo/appl/test.txt,v
done
Checking in test.txt;
/i-repo/appl/test.txt,v  <--  test.txt
new revision: 1.2; previous revision: 1.1
done


I:\testtemp\appl>cvs ver
Client: Concurrent Versions System (CVSNT) 2.5.03 (Scorpio) Build 3509
(client/server)
Server: Concurrent Versions System (CVSNT) 2.5.03 (Scorpio) Build 3509
(client/server)


What are you doing differently?

Regards,


Arthur Barrett


More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook