On Wed, 7 Feb 2007, Will Harrison wrote:

> Hello,
> How can I download a certain version/branch of a file using the command-line
> CVS tool on Linux? Is there a command or option that I need to add? For
> example, I would like to download version 1.1 of the 747-200 from CVS
> instead of all of the newest files. Sorry if this seems like a stupid
> question, I'm a relatively new Linux user.

Hi,

You use 'cvs update' but tell it that you need a specific revision.

$ cvs update -h
update: invalid option -- h
Usage: cvs update [-APCdflRp] [-k kopt] [-r rev] [-D date] [-j rev]
     [-I ign] [-W spec] [files...]
         -A      Reset any sticky tags/date/kopts.
         -P      Prune empty directories.
         -C      Overwrite locally modified files with clean repository 
copies.
         -d      Build directories, like checkout does.
         -f      Force a head revision match if tag/date not found.
         -l      Local directory only, no recursion.
         -R      Process directories recursively.
         -p      Send updates to standard output (avoids stickiness).
         -k kopt Use RCS kopt -k option on checkout. (is sticky)
         -r rev  Update using specified revision/tag (is sticky).
         -D date Set date to update from (is sticky).
         -j rev  Merge in changes made between current revision and rev.
         -I ign  More files to ignore (! to reset).
         -W spec Wrappers specification line.

In your case (go into the 747-200 subdirectory of your working directory 
first - or better yet make a copy of it and do this in the copy - that way 
you don't disturb your main tree):

$ cvs update -r 1.1

to get revision 1.1 of all files in the directory.
However, since the revision changes of each file is completely independent
there is no guarantee that revision 1.1 of each file existed at the same 
time as the others. (E.g. 747-200-set.xml is at rev. 1.3 while
747-200.xml is at rev. 1.2 in HEAD.)

So it is better if you know the date of the version you want, then you can 
do (e.g.)
$ cvs update -D 2007-12-24
to switch the work directory to the versions from Dec 24.
Note that this work directory is now stuck at this date - even if you do 
'cvs update' you won't get give the newest files again.
(Though, 'cvs update -r HEAD' should do that IIRC.)

The CVS manual is a good reference for further information:
http://ximbiot.com/cvs/manual/cvs-1.12.13/cvs.html

Cheers,

Anders
-- 
---------------------------------------------------------------------------
Anders Gidenstam
mail: andersg(at)gidenstam.org
WWW: http://www.gidenstam.org/FlightGear/JSBSim-LTA/

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Flightgear-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-users

Reply via email to