Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you revert (roll back) to an earlier version of a committed file in CVS

Tags:

cvs

Let's take for example a single file committed in CVS with the following history.

test.cpp
rev 1.1
rev 1.2
rev 1.3

How do I revert to rev 1.2 discarding the changes in 1.3 and then continue to make modification from that point on?

like image 467
CodeLizard Avatar asked Apr 06 '10 21:04

CodeLizard


People also ask

How do I change a commit message in cvs?

cvs commit -m "Type your change message here" All commits are logged automatically and posted to the project's cvs mailing list. Then follow up with the "cvs commit filename" command. If you do not first add the file, CVS does not recognize it.

How do I undo cvs remove?

A removal must be committed before it affects the repository. If you notice that you accidentally removed a file you need (before you run cvs commit ), you can use cvs add to undo the removal and then use cvs update to retrieve the removed file. This process leaves no record in the repository.

How do I find my cvs history?

The history database You can use the history file (see section The history file) to log various CVS actions. To retrieve the information from the history file, use the cvs history command (see section history--Show status of files and users).


1 Answers

cvs update -j 1.3 -j 1.2 test.cpp

like image 86
CodeLizard Avatar answered Oct 31 '22 21:10

CodeLizard