Hi.
I found:
-- CVS--Concurrent Versions System - Adding, removing, and renaming files and directories
That suggests that you can add files to a branch, but in quick skim I saw no examples. If I get some time, I'll experiment ... cheers, drl
Google search "add file to cvs branch" had a number of hits, not all appropriate, of course.
---------- Post updated at 21:53 ---------- Previous update was at 09:53 ----------
Hi.
I installed cvs in a VM and wrote this script:
#!/usr/bin/env bash
# @(#) run1 Demonstrate creation, staging, branching of cvs repository.
# Utility functions: print-as-echo, print-line-with-visual-space, debug.
pe() { for i;do printf "%s" "$i";done; printf "\n"; }
pl() { pe;pe "-----" ;pe "$*"; }
db() { ( printf " db, ";for i;do printf "%s" "$i";done; printf "\n" ) >&2 ; }
db() { : ; }
C=$HOME/bin/context && [ -f $C ] && . $C cvs
pl " Results:"
./create-repo
./stage-files
./make-branch
exit 0
producing:
% ./run1
Environment: LC_ALL = C, LANG = C
(Versions displayed with local utility "version")
OS, ker|rel, machine: Linux, 2.6.32-29-generic, i686
Distribution : Ubuntu 10.04.2 LTS (lucid)
GNU bash 4.1.5
cvs - ( /usr/bin/cvs Nov 10 2008 )
-----
Results:
CVSROOT
N myproj/collected.c
N myproj/main.c
No conflicts created by this import
cvs checkout: Updating myproj
U myproj/collected.c
U myproj/main.c
total 12
drwxr-x--- 2 drl drl 4096 Mar 13 21:30 CVS
-rw-r--r-- 1 drl drl 46 Mar 13 21:30 collected.c
-rw-r--r-- 1 drl drl 220 Mar 13 21:30 main.c
cvs tag: Tagging .
T collected.c
T main.c
cvs tag: Tagging .
T collected.c
T main.c
cvs update: Updating .
cvs add: scheduling file `suba.c' for addition on branch `new_stuff_1'
cvs add: use `cvs commit' to add this file permanently
cvs add: scheduling file `subb.c' for addition on branch `new_stuff_1'
cvs add: use `cvs commit' to add this file permanently
cvs commit: Examining .
/home/drl/try/user-problem/1019/repo/myproj/Attic/suba.c,v <-- suba.c
new revision: 1.1.2.1; previous revision: 1.1
/home/drl/try/user-problem/1019/repo/myproj/Attic/subb.c,v <-- subb.c
new revision: 1.1.2.1; previous revision: 1.1
As you can see just above, the new files were added to the branch. I recall getting an error message similar to the one you posted, but I could not elicit it just now. I did not try to merge the branch into main.
This is more of an academic question for me. We used cvs at a place I worked and one person in our group was responsible for merging branches back into main for each end-of-development-phase. It was always a struggle, often taking days to get everything right.
I think you are wise to stay away from branches unless you absolutely need to deal with them. If you do need them, then you can experiment until you are comfortable.
Good luck ... cheers, drl