At 3:16 PM -0600 3/9/00, Steele Kennett wrote:
>I had a working file in the repository. The client said that he
>wanted it to look a totally different way. So i changed it and then
>committed it again. Now the client says he liked it the way it was
>before! How do i get that file back?
Assuming the file was called "myfile.html", and the old version, the
one you want back, is version 1.1, and you're using UNIX:
$ cvs update -p -r1.1 myfile.html > myfile.html
$ cvs commit -m 'reverted to content of version 1.1' myfile.html
The key magic here is the '-p', which has two effects: (1) the file
you check out goes to standard output instead of directly to the
filesystem; (2) the result is not sticky. The command above uses
output redirection to clobber it with an old version, _without_
making the version number sticky.
If you don't know the version, but the version you want was current
yesterday, you could do:
$ cvs update -p -D yesterday myfile.html > myfile.html
--
+-------------------------------------------------------------------+
| Dave Makower <[EMAIL PROTECTED]> |
| Manager of Portal Architecture & Development |
+--------------------------------+----------------------------------+
| iClick, Inc. | (914) 872-8030 |
| 120 Bloomingdale Road | (914) 872-8100 fax |
| 3rd Floor | (914) 872-8000 main |
| White Plains, NY 10605 | http://www.iclick.com/ |
+--------------------------------+----------------------------------+