Discussion:
Unremoving a file?
Jake Colman
2010-03-10 14:45:43 UTC
Permalink
I 'cvs removed' a file from a branch. I now realize that it should not
have been removed. How do I get it back?

TIA!
--
Jake Colman | Director, Software Development
Principia Partners LLC
101 West Elm Street | Conshohocken | PA 19428 | +1 (610) 755 9770
t: +1 (610) 755 9786 | c: +1 (610) 348 2788 | f: +1 (201) 221 8929
e: ***@ppllc.com | w: www.principiapartners.com
Credit technology innovation awards winner 2008 and 2009
Mark D. Baushke
2010-03-20 05:44:48 UTC
Permalink
Post by Jake Colman
I 'cvs removed' a file from a branch. I now realize that it should not
have been removed. How do I get it back?
If you have not yet done a 'cvs commit', then 'cvs add filename' will
undo the 'cvs remove filename' operation. If you have done a 'cvs
commit', then using something like the command:

cvs log filename

to find the correct revisions for the branch should see a 'dead'
revision.

For example, if you see that your branch has a 1.1.2.10 as the 'dead'
revision, then

cvs update -j1.1.2.10 -j1.1.2.9 filename

will apply the reverse patch to revert the change which cause the file
to be removed from the branch. Doing a 'cvs commit' will re-add the file
under the 1.1.2.11 revision to the branch such that 1.1.2.9 and 1.1.2.11
should compare as the same file modulo the differences in any RCS keyword
values.

-- Mark

Loading...