[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is there any way to revert a file in CVS which was locally deleted??

From: Jim Hyslop
Subject: Re: Is there any way to revert a file in CVS which was locally deleted??
Date: Mon, 09 Jan 2006 09:24:44 -0500
User-agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)

Hash: SHA1

Barathi Sukumar wrote:
>         I had a file(say, a.txt) which I deleted locally in my working
> copy using cvs rm a.txt
> Now when I commit my deletion to the repository, I got the following
> error 
> cvs server: Up-to-date check failed for `a.txt'
> cvs [server aborted]: correct above errors first! [ This means my
> working copy is not in sync with the repository ]
>                  When I perform a 'cvs update -d' on the file a.txt, I
> don't get the file back in my local copy.. 
> Is there any way to get the file which was locally deleted in cvs??

You have another, more serious error to correct first: communications
with the other developers. In between the time you checked out your copy
of the file and the time you removed it, someone else modified that same
file and checked it in. This suggests the two of you are working at
cross purposes, and need to coordinate your activities better.

Now, to answer your question: issue the command 'cvs add a.txt'. This
will restore the version you had originally checked out, and you can now
'cvs update a.txt' and continue working. Note that any changes you may
have made to a.txt before you removed it will be lost: the 'cvs add'
command simply checks out a fresh copy of the file from the repository.

Tip: I have found that issuing the command 'cvs -nq up' before issuing
any removes or commits saves a lot of time and effort. You can see
immediately if your local copy is out of date, before trying to commit

- --
Jim Hyslop
Dreampossible: Better software. Simply.
                 Consulting * Mentoring * Training in
    C/C++ * OOD * SW Development & Practices * Version Management
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Thunderbird -


reply via email to

[Prev in Thread] Current Thread [Next in Thread]