LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-04-2012, 08:43 PM   #1
johnnysmithson
LQ Newbie
 
Registered: Oct 2012
Posts: 1

Rep: Reputation: Disabled
How to remove all references to files in CVS?


I was doing a CVS commit from a documentation program to my Linux CVS server over SSH when the connection timed out. Then the program wouldn't let me retry because the files already existed. Silly me, I went and deleted all those files in the module I was working with but that didn't work. I tried to cvs remove on that module directory but it was telling me it didn't know anything about it yet.

However when I try to commit I still get errors about the file already existing, even though I removed it manually from the filesystem. How can I remove any and all reference within CVS to these files?

Do I just delete the lines in the $CVSROOT/CVSROOT history and commitlog files?
 
Old 10-06-2012, 09:27 AM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
What I would try is move your checked-out directory to another name, call it dir.bak or something. Then try a checkout:
Code:
mv dir dir.bak
cvs co dir
That might work; you'll get what was committed and what wasn't and you can then try merging anything newer in dir.bak with the content of dir. You'd want to do that by looking in the CVS/History file in dir, perhaps comparing it with the same file in dir.bak. You could do that by doing cvs edit file in dir then copying the newer file from dir.bak once you've identified newer/older files (which will be a pain).

If you're feeling gutsy,
Code:
cd dir.bak
# get rid of the CVS directory, you don't want or need it
rm -rf CVS
# get back into dir
cd ../dir
# get every file editable
cvs edit *
# up one directory
cd ..
# copy every file from dir.bak to dir, keeping time stamps
cp -pr dir.bak dir
That'll copy the files to dir then you can
Code:
cd dir
cvs commit -m "this is after the screw up"
and there you go.

Hope this helps some.
 
  


Reply



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
[SOLVED] CVS lock file -- I can't find it to remove it! dwhitney67 Programming 1 05-09-2011 12:35 PM
cvs tag remove lordofring Programming 2 10-27-2005 03:30 PM
remove directory containing only CVS powah Linux - Software 0 08-25-2005 12:37 PM
create a cvs repository with existing files to cvs powah Linux - Software 1 08-19-2005 09:19 AM
CVS: Can I restrict the "cvs remove" to specific users? CaptainRandom Linux - Software 4 01-13-2005 03:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:54 PM.

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