[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Retrieving deleted file from the Attic
From: |
Larry Jones |
Subject: |
Re: Retrieving deleted file from the Attic |
Date: |
Thu, 14 Nov 2002 11:12:00 -0500 (EST) |
Jason Yeung writes:
>
> I was wondering if it's possible to recover a file that is in the Attic
> directory? When you remove a file (and committed), the file gets copied to
> the Attic directory. For all purposes, it's removed from the repository.
Hardly -- you can still use most CVS commands on the file, you just have
to give the file name explicitly since there's no local file:
bash-2.02$ ls foo
ls: foo: No such file or directory
bash-2.02$ cvs status foo
===================================================================
File: no file foo Status: Up-to-date
Working revision: No entry for foo
Repository revision: 1.3 /tmp/cvstest/test/Attic/foo,v
bash-2.02$ cvs log foo
RCS file: /tmp/cvstest/test/Attic/foo,v
Working file: foo
head: 1.3
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 3; selected revisions: 3
description:
----------------------------
revision 1.3
date: 2002/11/14 16:06:49; author: scjones; state: dead; lines: +0 -0
.
----------------------------
revision 1.2
date: 2002/11/14 16:06:38; author: scjones; state: Exp; lines: +1 -1
.
----------------------------
revision 1.1
date: 2002/11/14 16:06:31; author: scjones; state: Exp;
.
=============================================================================
As explained in the CVS manual, you can resurrect a removed file by
undoing the change that removed it:
bash-2.02$ cvs up -j1.3 -j1.2 foo
U foo
bash-2.02$ cvs status foo
===================================================================
File: foo Status: Locally Added
Working revision: New file!
Repository revision: 1.3 /tmp/cvstest/test/Attic/foo,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)
bash-2.02$ cvs ci -m.
cvs commit: Examining .
Checking in foo;
/tmp/cvstest/test/foo,v <-- foo
new revision: 1.4; previous revision: 1.3
done
bash-2.02$ cvs status foo
===================================================================
File: foo Status: Up-to-date
Working revision: 1.4 Thu Nov 14 16:06:49 2002
Repository revision: 1.4 /tmp/cvstest/test/foo,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)
-Larry Jones
It's going to be a long year. -- Calvin