LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   use cvs to get a particular version (https://www.linuxquestions.org/questions/linux-newbie-8/use-cvs-to-get-a-particular-version-328535/)

powah 05-30-2005 09:39 AM

use cvs to get a particular version
 
How to use cvs to get a particular version of a file?
How to use cvs to get a particular version of the entire directories and subdirectories?

e.g.
How to use cvs to get the version 1.69 of the file index.php?
How to use cvs to get the version 1.69 of the entire directories /var/cvsroot/project/content/ and its subdirectories?

# cvs log index.php

RCS file: /var/cvsroot/project/content/index.php,v
Working file: index.php
head: 1.70
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 70; selected revisions: 70
description:
----------------------------
revision 1.70
date: 2005/05/17 20:41:08; author: a; state: Exp; lines: +6 -0
*** empty log message ***
----------------------------
revision 1.69
date: 2005/05/17 18:29:27; author: b; state: Exp; lines: +116 -116
*** empty log message ***
----------------------------

rose_bud4201 05-30-2005 09:52 AM

Quote:

Updating your files from the repository
To make your files reflect what's currently in the repository:

cvs update

This isn't always sufficient, however. If new files have been added, you may need to use the -d option to get the missing files. If you want to remove empty directories, use the -P (prune) option.

The directory you're currently in determines which directories will be updated, so to make sure you have all files, do the following:

cd d:\wx2\wxWidgets
cvs update -d

If you wish to get a particular version of the file (say you've added a bad change and want to scrap it), you can do this:

cvs update -r1.78 textctrl.cpp

This sets the 'sticky' tag, which means that all your subsequent updates will retrieve that revision until you update with

cvs update -A textctrl.cpp

In this example, to revert the changes in textctrl.cpp revision 1.79, you can update with -r1.78, copy the file to textctrl.bak, then update with -A, copy textctrl.bak to textctrl.cpp, and commit again.
From http://wxwidgets.org/cvs.htm, maybe it helps?


All times are GMT -5. The time now is 05:32 AM.