Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to restore Attic files in CVS

647 views
Skip to first unread message

Trinh, An

unread,
Apr 5, 2009, 12:46:18 AM4/5/09
to info...@gnu.org
Hello,

I have files that went into the Attic. How do I restore them back?
I've moved the files out of the Attic folder but when I checkout the
folder, the cvs GUI doesn't show any files under the folder. Viewing
the files revealed that they're in DEAD State. Please advise. Thank
you.

drwxrws---+ 3 11906 cvs_eai 512 Apr 3 09:41 .
drwxrws---+146 root cvs_eai 4608 Apr 2 14:25 ..
drwxrws---+ 2 c62ip74 cvs_eai 512 Apr 3 09:41 Attic
-rwxrwx---+ 1 c62ip74 cvs_eai 3136 Apr 3 13:08
EA_APRT_LOAD.esql,v
-rwxrwx---+ 1 c62ip74 cvs_eai 4153 Mar 18 08:11
EA_APRT_LOAD.msgflow,v
-rwxrwx---+ 1 c62ip74 cvs_eai 794 Mar 18 08:11 .project,v

Thanks,
An.

CONFIDENTIALITY NOTICE: This E-Mail is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you have received this communication in error, please do not distribute and delete the original message. Please notify the sender by E-Mail at the address shown. Thank you for your compliance.

Jim Hyslop

unread,
Apr 5, 2009, 12:54:56 AM4/5/09
to Trinh, An, info...@gnu.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Trinh, An wrote:
> I have files that went into the Attic. How do I restore them back?
> I've moved the files out of the Attic folder but when I checkout the
> folder, the cvs GUI doesn't show any files under the folder. Viewing
> the files revealed that they're in DEAD State.

Someone has 'cvs remove'd the files. Just restore them with 'cvs add'.

- --
Jim Hyslop
Dreampossible: Better software. Simply. http://www.dreampossible.ca
Consulting * Mentoring * Training in
C/C++ * OOD * SW Development & Practices * Version Management
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknYOYMACgkQLdDyDwyJw+PoxgCg8Xm0nU4vbwfa375yc6JjCRnW
CyMAni0+a+TsNsy2cDggDVicJ3d/2kxO
=FFvx
-----END PGP SIGNATURE-----


Peter Toft

unread,
Apr 5, 2009, 3:13:38 AM4/5/09
to Jim Hyslop, Trinh, An, info...@gnu.org
On Sun, 5 Apr 2009, Jim Hyslop wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Trinh, An wrote:
>> I have files that went into the Attic. How do I restore them back?
>> I've moved the files out of the Attic folder but when I checkout the
>> folder, the cvs GUI doesn't show any files under the folder. Viewing
>> the files revealed that they're in DEAD State.
>
> Someone has 'cvs remove'd the files. Just restore them with 'cvs add'.

cvs log <file>
Find til newest non-dead version
cvs update -r <last-version> <file>
mv <file> foo
cvs update -A <file>
mv foo <file>
cvs add <file>
cvs commit -m "bring out your dead, bring out your dead" <file>

/pto

--
Peter Toft, Ph.D. [p...@linuxbog.dk] http://petertoft.dk
I blog at http://www.version2.dk/blogs/petertoft

Larry Jones

unread,
Apr 5, 2009, 2:59:28 PM4/5/09
to Peter Toft, Trinh An, info...@gnu.org
Peter Toft writes:
>
> On Sun, 5 Apr 2009, Jim Hyslop wrote:
> >
> > Someone has 'cvs remove'd the files. Just restore them with 'cvs add'.
>
> cvs log <file>
> Find til newest non-dead version
> cvs update -r <last-version> <file>
> mv <file> foo
> cvs update -A <file>
> mv foo <file>
> cvs add <file>
> cvs commit -m "bring out your dead, bring out your dead" <file>

Neither of those suggestions is very good -- the first doesn't work at
all and the second is more complex than necessary and subject to error.
Please see the manual for the correct method:

<http://ximbiot.com/cvs/manual/cvs-1.11.23/cvs_5.html#SEC62>
--
Larry Jones

He's just jealous because I accomplish so much more than he does. -- Calvin


Trinh, An

unread,
Apr 5, 2009, 9:54:02 PM4/5/09
to Larry Jones, Peter Toft, info...@gnu.org
Larry, Peter, Jim,

Thank you for your help. Larry, based upon your guidance the two steps
are straight forward.

$ cvs update -j 1.2 -j 1.1 file1
$ cvs commit -m test

However, when I ran the update command I'm getting Permission denied.

/usr/local/bin% cvs update -j 1.2 -j 1.1
/opt/prodcvs/eai/APRT/EA_APRT_LOAD.esql,v
permission denied
cvs [update aborted]: end of file from server (consult above messages if
any)

I'm using csh and the CVSROOT is set to:
CVSROOT=:ext:c62ip74@boc01:/opt/prodcvs

I've never executed any cvs command from the shell before since we use
cvs through the GUI interface with this connection
:extssh:c62ip74@boc01:/opt/prodcvs. I also tried putting in the same
connection that I connected with the GUI
:extssh:c62ip74@boc01:/opt/prodcvs and I'm getting this error.

/usr/local/bin% cvs update -j 1.2 -j 1.1
/opt/prodcvs/eai/APRT/EA_APRT_LOAD.esql,v
cvs update: Unknown method (`extssh') in CVSROOT.
cvs [update aborted]: Bad CVSROOT: `:extssh:c62ip74@boc01:/opt/prodcvs'.

Please advise and thank you for your help.

Thanks,
An.

Larry Jones

unread,
Apr 6, 2009, 3:50:00 PM4/6/09
to Trinh, An, info...@gnu.org
Trinh, An writes:
>
> /usr/local/bin% cvs update -j 1.2 -j 1.1
> /opt/prodcvs/eai/APRT/EA_APRT_LOAD.esql,v
> permission denied
> cvs [update aborted]: end of file from server (consult above messages if
> any)

That implies that the user you're logging in to the server as doesn't
have write permission in that directory (/opt/prodcvs/eai/APRT).

> I'm using csh and the CVSROOT is set to:
> CVSROOT=:ext:c62ip74@boc01:/opt/prodcvs

Note that CVS doesn't use $CVSROOT when running in a working directory,
it uses the value saved in CVS/ROOT instead, so you may not be logging
in as the user you think you are. To force CVS to use $CVSROOT, use it
as the value of the -d global option:

cvs -d $CVSROOT update -j 1.2 -j 1.1
--
Larry Jones

Years from now when I'm successful and happy, ...and he's in
prison... I hope I'm not too mature to gloat. -- Calvin


Trinh, An

unread,
Apr 7, 2009, 11:33:42 AM4/7/09
to Larry Jones, info...@gnu.org
Hi Larry,

While running the update command I'm getting this error. Please advise.

boc01% /usr/local/bin/cvs -d /opt/prodcvs update -j 1.2 -j 1.1
/opt/prodcvs/eai/APRT/EA_APRT_LOAD.esql,v
cvs update: cannot open CVS/Entries for reading: No such file or
directory
cvs update: use `cvs add' to create an entry for
/opt/prodcvs/eai/APRT/EA_APRT_LOAD.esql,v
cvs [update aborted]: cannot open CVS/Root: No such file or directory


boc01% pwd
/opt/prodcvs/eai/APRT
boc01% ls -altr
total 34


-rwxrwx---+ 1 c62ip74 cvs_eai 794 Mar 18 08:11 .project,v
-rwxrwx---+ 1 c62ip74 cvs_eai 4153 Mar 18 08:11
EA_APRT_LOAD.msgflow,v

drwxrws---+146 root cvs_eai 4608 Apr 2 14:25 ..
drwxrws---+ 2 c62ip74 cvs_eai 512 Apr 3 09:41 Attic
-rwxrwx---+ 1 c62ip74 cvs_eai 3136 Apr 3 13:08
EA_APRT_LOAD.esql,v

drwxrws---+ 3 11906 cvs_eai 512 Apr 6 10:41 .

Thanks,
An.

-----Original Message-----
From: Larry Jones [mailto:lawrenc...@siemens.com]

Larry Jones

unread,
Apr 7, 2009, 2:34:05 PM4/7/09
to Trinh, An, info...@gnu.org
Trinh, An writes:
>
> While running the update command I'm getting this error. Please advise.
>
> boc01% /usr/local/bin/cvs -d /opt/prodcvs update -j 1.2 -j 1.1
> /opt/prodcvs/eai/APRT/EA_APRT_LOAD.esql,v
> cvs update: cannot open CVS/Entries for reading: No such file or
> directory

Assuming you're running the command in the working directory where the
file should be (which is what you should be doing), you just want the
file name, not the path to the repository version:

cvs -d /opt/prodcvs update -j 1.2 -j 1.1 EA_APRT_LOAD.esql

Even though the file doesn't exist in the working directory (because it
was deleted), CVS knows how to find it in the repository and get it
back.
--
Larry Jones

The problem with the future is that it keeps turning into the present.
-- Hobbes


Trinh, An

unread,
Apr 7, 2009, 2:42:29 PM4/7/09
to Larry Jones, info...@gnu.org
Larry,

Yes, I've done that but still getting the same error. Please advise.

boc01% pwd
/opt/prodcvs/eai/APRT
boc01% ls -altr
total 34
-rwxrwx---+ 1 c62ip74 cvs_eai 794 Mar 18 08:11 .project,v
-rwxrwx---+ 1 c62ip74 cvs_eai 4153 Mar 18 08:11
EA_APRT_LOAD.msgflow,v
drwxrws---+146 root cvs_eai 4608 Apr 2 14:25 ..
drwxrws---+ 2 c62ip74 cvs_eai 512 Apr 3 09:41 Attic
-rwxrwx---+ 1 c62ip74 cvs_eai 3136 Apr 3 13:08
EA_APRT_LOAD.esql,v
drwxrws---+ 3 11906 cvs_eai 512 Apr 6 10:41 .

boc01% /usr/local/bin/cvs -d /opt/prodcvs update -j 1.2 -j 1.1

EA_APRT_LOAD.esql,v
cvs update: cannot open CVS/Entries for reading: No such file or
directory

cvs update: use `cvs add' to create an entry for EA_APRT_LOAD.esql,v
cvs [update aborted]: cannot open CVS/Root: No such file or directory
boc01%
boc01%


boc01% /usr/local/bin/cvs -d /opt/prodcvs update -j 1.2 -j 1.1

EA_APRT_LOAD.esql


cvs update: cannot open CVS/Entries for reading: No such file or
directory

cvs update: nothing known about EA_APRT_LOAD.esql
cvs [update aborted]: cannot open CVS/Root: No such file or directory


Thanks,
An.
2-3092
215-241-3092

-----Original Message-----
From: Larry Jones [mailto:lawrenc...@siemens.com]
Sent: Tuesday, April 07, 2009 2:33 PM
To: Trinh, An
Cc: Peter Toft; Jim Hyslop; info...@gnu.org

Larry Jones

unread,
Apr 7, 2009, 2:53:25 PM4/7/09
to Trinh, An, info...@gnu.org
Trinh, An writes:
>
> Yes, I've done that

No, you haven't. You're still trying to run the command in the
repository instead of in a working directory that you've checked out.
--
Larry Jones

I don't want to be THIS good! -- Calvin


Trinh, An

unread,
Apr 7, 2009, 2:58:05 PM4/7/09
to Larry Jones, info...@gnu.org
Larry,

I have deleted the working directory that I've checked out. Just now,
I've checked out this project APRT and there's nothing inside. Is it
still possible for me to recover the file?

Thanks,
An.

-----Original Message-----
From: Larry Jones [mailto:lawrenc...@siemens.com]
Sent: Tuesday, April 07, 2009 2:44 PM
To: Trinh, An
Cc: Peter Toft; Jim Hyslop; info...@gnu.org
Subject: Re: How to restore Attic files in CVS - cannot open CVS/Entries

Jim Hyslop

unread,
Apr 7, 2009, 7:53:15 PM4/7/09
to Larry Jones, info...@gnu.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Larry Jones wrote:
> Neither of those suggestions is very good -- the first doesn't work at
> all and the second is more complex than necessary and subject to error.

<sigh> I'm out of practice - been using Clearcase for the last year and
a half. Sorry for the misinformation.

- --
Jim Hyslop
Dreampossible: Better software. Simply. http://www.dreampossible.ca
Consulting * Mentoring * Training in
C/C++ * OOD * SW Development & Practices * Version Management
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknb51EACgkQLdDyDwyJw+NwQwCgnxEjkiqfVL9DxREkxuRbuJi6
cIkAoMkmSI9DBueuVCBnVkii5d9lbdhb
=J0Vj
-----END PGP SIGNATURE-----


0 new messages