[Top][All Lists]

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

Re: Can't cvs unedit

From: Noel L Yap
Subject: Re: Can't cvs unedit
Date: Thu, 16 Aug 2001 10:08:18 -0400

>To reduce the complexity of the versioning process for the
>non-developers on our project we have opted to use edit -c for exclusive
>editing. We ran into problems when someone deleted the files on their
>local disk while they still had files that they had cvs edited. When cvs
>-r checkout was run the cvs edit -c call on those files failed because
>cvs won't allow multiple editors (even though if it is the same editor)
>- perfectly reasonable. Of course there was no way for them to cvs
>unedit the file either. In the end we had to change the .cvsrc file so
>that the -c option would not be passed to cvs edit, then cvs edit, cvs
>unedit and finally restore the .cvsrc file. Is there a better/proper way
>to do this?

I'm assuming you're using my patch ("cvs edit -c" doesn't exist in standart
CVS).  If not, the following may not apply.

Yes, "cvs edit -f" was supplied in the same patch as "cvs edit -c".  Also, if
you want, you can install another patch that'll add "cvs unedit -e editor"
that'll allow anyone to remove explicitly an existing edit (of course, you would
probably want to turn on notification when using this -- you'd probably want to
turn on notification anyway).

>In fact, I'm surprised this work around worked at all, I would have
>though that cvs would have thought that the cvs edit was the second edit
>on that file and the cvs unedit would just undo that edit leaving the
>original edit in place. I guess we were lucky.

This isn't luck.  This was by design.  CVS should never ever prevent multiple
edits (ie concurrent development).  The "cvs edit -c" patch gives only advisory
locks on the files.  It's up to the users to follow the advice.

I find it good practice for a team to use "cvs edit -c" to facilitate
communication.  If someone is editing a file, the would-be editor should
communicate with the editor to see if their edits will conflict (who knows,
maybe the would-be editor just wants to put temporary debug code in).  If it's
deemed safe, the new edit can proceed with "cvs edit -f".


This communication is for informational purposes only.  It is not intended as
an offer or solicitation for the purchase or sale of any financial instrument
or as an official confirmation of any transaction. All market prices, data
and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein
do not necessarily reflect those of J.P. Morgan Chase & Co., its
subsidiaries and affiliates.

reply via email to

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