- publishing free software manuals
Version Management with CVS - the CVS manual
by Per Cederqvist et al.
Paperback (6"x9"), 216 pages, 8 figures
ISBN 0954161718
RRP £19.95 ($29.95)

Get a printed copy>>>

5.9 Merging can add or remove files

If the changes which you are merging involve removing or adding some files, update -j will reflect such additions or removals.

For example:

$ cvs update -A
$ touch a b c
$ cvs add a b c ; cvs ci -m "added" a b c
$ cvs tag -b branchtag
$ cvs update -r branchtag
$ touch d ; cvs add d
$ rm a ; cvs rm a
$ cvs ci -m "added d, removed a"
$ cvs update -A
$ cvs update -jbranchtag

After these commands are executed and a ‘cvs commit’ is done, file ‘a’ will be removed and file ‘d’ added in the main branch.

Note that using a single static tag (‘-j tagname) rather than a dynamic tag (‘-j branchname) to merge changes from a branch will usually not remove files which were removed on the branch since CVS does not automatically add static tags to dead revisions. The exception to this rule occurs when a static tag has been attached to a dead revision manually. Use the branch tag to merge all changes from the branch or use two static tags as merge endpoints to be sure that all intended changes are propagated in the merge.

ISBN 0954161718Version Management with CVS - the CVS manualSee the print edition