[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Oops I deleted some files
From: |
Jim.Hyslop |
Subject: |
RE: Oops I deleted some files |
Date: |
Mon, 2 Feb 2004 09:30:08 -0500 |
Tony Ennis [mailto:address@hidden wrote:
> A few days ago I was cleaning up a project and deleted a
> directory, commited, etc. Now, about a week later, I refetch
> the project only to find that the directory and the files
> within were important. Ooops.
>
> How do I get them back? I have tried checking out with the
> date to no avail. The files are still in the Attic on the cvs server.
If they're in the Attic, you should be able to retrieve them.
A rather brute-force way to get your files back would be to issue the
following commands for each file you want recovered:
cvs log -h filename | grep head
cvs update -p -r (HEAD-1) filename > filename
cvs add filename
The first command tells you what revision number HEAD corresponds to, so you
can calculate (HEAD-1) for the second command. Note that CVS won't recognize
"HEAD-1" - you'll have to manually calculate that and supply the actual
revision number.
If there are a lot of files, you could probably write a PERL script to do
this.
Oh, before you begin, issue a "cvs update -A" command to clear any existing
sticky tags.
--
Jim Hyslop
Senior Software Designer
Leitch Technology International Inc. (<http://www.leitch.com/>)
Columnist, C/C++ Users Journal (<http://www.cuj.com/experts>)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- RE: Oops I deleted some files,
Jim.Hyslop <=