[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: checkout prior version of file
From: |
Mark D. Baushke |
Subject: |
Re: checkout prior version of file |
Date: |
Sat, 27 Sep 2003 09:44:14 -0700 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Terrence Brannon <address@hidden> writes:
> I have a file in cvs repository with the history shown below. I want to do
> the following:
>
> 1) get version 1.3 of this file into my current working directory
>
> here is my attempt at this:
>
> [unix shell]: cvs -d:ext:address@hidden:/cvsroot/net-ftp-common
> checkout -j1.3 lib/Net/FTP/Common.pm
>
> cvs server: cannot find module `lib/Net/FTP/Common.pm' - ignored
> cvs [checkout aborted]: cannot expand modules
> [unix shell]:
>
The lib/Net/FTP/CVS/Repository for your tree probably has the entry:
net-ftp-common/lib/Net/FTP
in it which means that the top-level module in your repository that holds
the lib/Net/FTP directory is "net-ftp-common" so the checkout command
would need to use net-ftp-common/lib/Net/FTP/Common.pm to specify the
file. Doing the checkout will create the necessary subdirectories to
hold the Common.pm file, so if you wanted a copy in your current working
directory the command would need to be something like this:
cvs -d:ext:address@hidden:/cvsroot/net-ftp-common \
checkout -r1.3 -p net-ftp-common/lib/Net/FTP/Common.pm > Common.pm
However, doing this just copies that version of the file to your
current working directory without any of the book keeping needed for
a checkin.
What I suspect you want to do is the following:
mkdir some-new-directory
cd some-new-directory
cvs -d:ext:address@hidden:/cvsroot/net-ftp-common \
checkout -d FTP net-ftp-common/lib/Net/FTP/Common.pm
cd FTP
cvs up -j1.4 -j1.3 Common.pm
cvs diff -r1.3 Common.pm
...the file should look a lot like version 1.3 now...
...make any additional edits as needed to resolve conflicts...
cvs commit -m'revered to version 1.3 of Common.pm' Common.pm
cd ..
cvs -d:ext:address@hidden:/cvsroot/net-ftp-common \
release -d FTP
cd ..
rmdir some-new-directory
I hope this is what you wanted done...
Enjoy!
-- Mark
> 2) edit this file
> 3) make the edits become version 1.5 and continue working.
>
> I saw a means to do step 1) as follows:
>
> $ co -p1.2 `cat CVS/Repository`/file1,v > file1
> $ cvs diff file1
> $ cvs commit -m"reverted to version 1.2 which worked" file1
>
> but:
> (1) this looks sort of like I am peeking under the hood. it seems that
> I should be able to make a CVS call to do this (2) I assume that the
> commit will properly bump the version number to +0.1 past the latest
> version in this example?
>
> ------ file history:
>
> [unix shell]: cvs log lib/Net/FTP/Common.pm
> address@hidden's password:
>
> RCS file: /cvsroot/net-ftp-common/net-ftp-common/lib/Net/FTP/Common.pm,v
> Working file: lib/Net/FTP/Common.pm
> head: 1.4
> branch:
> locks: strict
> access list:
> symbolic names:
> start: 1.1.1.1
> vendor_none: 1.1.1
> keyword substitution: kv
> total revisions: 5; selected revisions: 5
> description:
> ----------------------------
> revision 1.4
> date: 2003/09/27 04:53:59; author: metaperl; state: Exp; lines: +53 -59
> first version to use fields pragma.
>
> test suite passes.
> ----------------------------
> revision 1.3
> date: 2003/09/27 04:33:32; author: metaperl; state: Exp; lines: +1 -1
> *** empty log message ***
> ----------------------------
> revision 1.2
> date: 2003/09/25 03:38:38; author: metaperl; state: Exp; lines: +0 -7
> removed log level hash.
> ----------------------------
> revision 1.1
> date: 2003/09/25 03:23:30; author: metaperl; state: Exp;
> branches: 1.1.1;
> Initial revision
> ----------------------------
> revision 1.1.1.1
> date: 2003/09/25 03:23:30; author: metaperl; state: Exp; lines: +0 -0
> Initial import.
> =============================================================================
> [unix shell]:
> _______________________________________________
> Info-cvs mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/info-cvs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)
iD8DBQE/db5e3x41pRYZE/gRAutvAKCXmnyBgZX6wdASIH6O4MApFXEAAQCeOw/1
qOGipJPTScTKSdxjNJYy54E=
=5qCG
-----END PGP SIGNATURE-----