LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-17-2006, 09:14 AM   #1
zWaR
Member
 
Registered: Dec 2003
Distribution: Slackware, Alpine Linux, Ubuntu, Debian
Posts: 219

Rep: Reputation: 35
Retrieving deleted files from CVS


Hello.

I'm wondering how i can retrieve deleted files from CVS repository if i've already committed changes:
Code:
cvs remove test.txt
cvs commit
Is there a way to retrieve test.txt back and use it in my current revision? And if yes, how could be this managed?
 
Old 07-18-2006, 03:09 AM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Yes there is. When you remove a file, it gets moved into a sub-directory of the repository below where it originally was called Attic. It still has its history, so you can retrieve it. As an example, if the last "live" version was 1.1 prior to your remove/commit you could do the following in your source directory where you deleted the file:
Code:
cvs -Q update -p -r 1.1 test.txt > test.txt
cvs add test.txt

Now, you should get a message like this:
cvs add: re-adding file test.txt (in place of dead revision 1.2)
cvs add: use 'cvs commit' to add this file permanently

cvs ci -m "revived test.txt" test.txt

Now, you should get a message like this:
Checking in test.txt;
/usr/local/cvsrepos/src/test.txt,v  <-- test.txt
new revision: 1.3; previous revision: 1.2
done
That's from a CVS tutorial at http://cvsbook.red-bean.com/cvsbook....ove%20A%20File which helped me - hope it's useful...
 
Old 07-19-2006, 01:59 PM   #3
zWaR
Member
 
Registered: Dec 2003
Distribution: Slackware, Alpine Linux, Ubuntu, Debian
Posts: 219

Original Poster
Rep: Reputation: 35
gilead 10x!!! Yes, your reply was very useful!! And thanks for the URL to the e-book!!
 
Old 07-19-2006, 03:06 PM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
That's good news - I'm glad it helped
 
  


Reply

Tags
cvs


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mozilla crashes when retrieving PDF files (debian/sarge) philippeP Debian 1 02-17-2006 09:50 PM
Ubuntu 5.04 Live CD - retrieving files nasanta Linux - Newbie 2 12-11-2005 08:29 PM
create a cvs repository with existing files to cvs powah Linux - Software 1 08-19-2005 10:19 AM
Retrieving variables from contents of files using awk or any other bash tool genderbender Programming 8 01-21-2005 04:27 AM
Retrieving lost files after botched mv buggi22 Linux - Newbie 1 09-12-2004 10:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration