cd wdir
cvs import -m "Setting up blah blah" rdir yoyo start
e.g,.
cd ~/dfile/graphicsio
cvs import -m "making graphicsio" dfile/graphicsio yoyo start
cvs checkout dirname
cvs co -d localdirname dirnamee.g.,
cd cvs checkout -d cutil roblibs/cutil cvs -d :ext:mom.cvrti.utah.edu:/usr/local/cvsroot co -d cutil roblibs/cutil
places all the files from roblibs/cutil into a local subdirectory cutil.
export CVS_RSH=/usr/local/bin/ssh cvs -d :ext:server.host:server-cvs-dir checkout module-namee.g.,
cvs -d :ext:mom.cvrti.utah.edu:/u/macleod/cvsroot checkout gfile/lib cvs -d :ext:mom.cvrti.utah.edu:/usr/local/cvsroot checkout map3d cvs -d :ext:cvsserv.sci.utah.edu:/usr/sci/projects/cvsrepository co SCIRun cvs -d :ext:cvsserv.sci.utah.edu:/usr/sci/projects/SpectralElementGroup co -d IEEESBEM0 Latex/Papers/BioElectric/Stochastic/IEEETBME-SBEM07
cvs -d :ext:csf.cs.utah.edu:/csafe_noexport/cvs/cvsroot checkout -l SCIRun/src
checks out all the files in the SCIRun/src directory but nothing below that.
cvs -d :ext:csf.cs.utah.edu:/csafe_noexport/cvs/cvsroot co -r v1_4_0 SCIRunUse the -r option to check out from a branch of the repository tree e.g., to get a copy of the 5.2 release of map3d and its direct progency:
cvs checkout -r rel-5-2-bugfix map3dsee 5) below for more important details and how to create the branch
cvs update -P
Updates all the files and prunes any resulting empty directories. The resulting list shows the status of the files as follows:
cvs commmit -m "message" filename(s)
cvs add [-k_option ] [-m message] file(s) cvs commit filename(s) rm filename(s) cvs remove filename(s) cvs commit filename(s)
mkdir dirname cvs add dirnameThere is no need to perform a commit. But you do need to perform a subsequent update to download the new directory by using
cvs update -d
cd dirname rm filename(s) cvs remove filename(s) cvs commit -m "removal message" filename(s) cd .. cvs update -P
cvs rm -Rf dirname cvs commit -m "blah blah" cvs update -PNote the last step, in which we perform an update on the empty directory to get rid of it.
cvs add -kb -m"message" filename(s) cvs ci -m"message" filename(s)
cvs admin -kb filename(s) cvs update -A filename(s) cvs commit -m"message" filename(s)
To create a branch off the main tree of the repository, make a tag that names the new branch, e.g., to make a branch of map3d called rel-5-2-bugfix:
cvs tag -b rel-5-2-bugfixNote: tag name cannot have any special characters (like ".") To check out the latest version along that branch, go to the top of the repository tree and type
cvs checkout -r rel-5-2-bugfix map3dThe only way for you to get two working copies is for you to check out two different trees. For example:
cd robs_trunk; cvs co map3d; cd robs_branch; cvs co -r rel-5-2-bugfix map3d;
now you have two completey different trees, to use for your purposes. An individual file within your working tree can only be relative to one tag at a time, and you will always have only one of that file.
Be careful not to mix and match. You can checkout a single file relative to any tag, or version, or date within any tree.
To see what tags and hence branches there are:
cvs status -v filename.ccwhich produces a list of existing tags and also says if there is a Sticky Tag, which means that the file is from one of the branches.
To merge the changes from a branch into the main trunk:
To: worthen@cs.utah.edu In-reply-to: <Pine.SGI.4.21.0108031340310.494956-100000@river.cs.utah.edu> (message from Bryan Jeffery Worthen on Fri, 3 Aug 2001 13:41:17 -0600) Subject: Re: bugfix BCC: macleod@cvrti.utah.edu CC: martyc, chrism References: <Pine.SGI.4.21.0108031340310.494956-100000@river.cs.utah.edu> --text follows thi line--
Bryan,
You can check this by looking at the sticky tag of any file in your working directory.
cvs status -v filename.cc
and then look at the Sticky Tag: line. If you are on a branch, it will say so and give the name of the branch.
I just tried an update and only got one file
ParseCommandLineOptions.cc
so if you have changes in other files, then I suspect that you have checked them in against the bigfix tag.
Now, it should be easy to merge the branch changes into the main trunk. You just check out a fresh main trunk copy (be careful to commit and get rid of the branch working copy or save it someplace different).
cvs checkout map3d
and then merge the branch in
cvs update -j rel-5-2-bugfix
If there are conflicts--and I don't think this will be the case--you will have to resolve them and then finally run. One can also specify specific files to update by adding them the update command, as in
cvs update -j rel-5-2-bugfix thefile.c
Then when you have reconciled any differences, commit the result back to the trunk.
cvs commit
The problem that the manual talks about is that if we have to merge the branch again later, it will get confused over which version of the branch to merge. There are two solutions, either to merge the two branch versions with two -j commands, but for this, we have to know the version number at the time of the previous merge. Or we mark a tag on the branch whenever we do a merge and then merge against that tag. So then the merge command looks something like
cvs update -j rel-5-2-bugfix-merged -j rel-5-2-bugfix
Confused yet? I am.
I tried the merging myself and it seems to work fine, then I tagged the branch with the command
cvs rtag -r rel-5-2-bugfix rel-5-2-bugfix-merge1 map3d
so we now have a new tag the same branch and this is what we will have to merge from next time.
So, as for how to manage this without spending hours reading the cvs manual, I suggest we try *REALLY HARD* to keep all new development to the main trunk and use the bigfix branch only for small things that we discover are busted with 5.2. It may be easiest to just copy those changes from the branch version manually to the trunk version to avoid having to merge too often; after all, we do not want to be on the branch for very much, right?
So, save your working directory someplace for now, checkout a fresh copy of the trunk and diff the files with what you have to see if you have anything to update from your old working copy. Then develop along the trunk untill we discover a real bug that needs fixing on the branch.
Does that sound reasonable?
Cheers,
Rob