Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ever managed to get an older Version of your files?

Status
Not open for further replies.

acetv

Programmer
May 3, 2005
1
GB
Well,
I did not. No matter how much I googled to find it - no matter how much I tried on my own and even asking others resulted in nothing worth mentioning.

Now I turn to you, a forum of well experienced CVS-Hardcore Users and dare you not be able to provide the golden answer to my question ;)

Once for all:
-------------------
HOW DO YOU RETRIEVE AN OLDER VERSION OF:
- a file
- a whole directory
????????????????????????????????????????????????

Currently our Release-syntax looks like this:
date_time
e.g. 20050503_1400

Now what if I wanted to switch back to 20050503_1100 on one single file or better a whole folder (which results in a million different revision numbers;))?

How do I do that?

Thanx a million for anyone who can help!
 
This might a bit overkill but I use Eclipse which has CVS functions. I can use Team > Show in Resource History and get a complete listing of changes and comments of a file.

I can then overwrite or just get contents.
I'm sure there is another way.

 
If you are programming on a windows machine, I can't suggest TortoiseCVS highly enough. It's quite easy to get an older version of a file through that.
 
for example, if you want to return to file with revision 1.7,
use

Code:
cvs update -r 1.7 your_file

it replaces your_file in ypur porject with version with specified revision,
you can return to the last version by specifying latest revision for your_file

to view all revisions for your_file
use

Code:
cvs log your_file


from help

Usage: cvs update [-ABPCdflRpbmt] [-k kopt] [-r rev] [-D date] [-j rev]
[-I ign] [-W spec] [files...]
-3 Produce 3-way conflicts.
-A Reset any sticky tags/date/kopts.
-b Perform -j merge from branch point.
-C Overwrite locally modified files with clean repository copies.
-c Update base revision copies.
-D date Set date to update from (is sticky).
-d Build directories, like checkout does.
-f Force a head revision match if tag/date not found.
-I ign More files to ignore (! to reset).
-j rev Merge in changes made between current revision and rev.
-k kopt Use RCS kopt -k option on checkout. (is sticky)
-l Local directory only, no recursion.
-m Perform -j merge from last merge point (default).
-P Prune empty directories.
-p Send updates to standard output (avoids stickiness).
-R Process directories recursively.
-r rev Update using specified revision/tag (is sticky).
-S Select between conflicting case sensitive names.
-t Update using last checkin time.
-W spec Wrappers specification line.


Zhavic

---------------------------------------------------------------
In the 1960s you needed the power of two Comodore64s to get a rocket to the moon. Now you need a machine which is a vast number of times more powerful just to run the most popular GUI.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top