[EMAIL PROTECTED] on 2000.07.19 10:31:17
>The change you describle does change the standard behaviour of unedit,
>since the file no longer reverts to the original version.  For what it's
>worth: My opinion is that unless this is accepted by most CVS users, it
>is probably your new behaviour that needs an option.  The reason is
>simply that the new default behavior will break or change the behaviour
>of a lot of tools built on top of CVS.

"cvs unedit" never reverted the file back to the original version.  It has
always (up till my patch) reverted it back to the version existing at the
time of "cvs edit".

Usually, options should be given to a command to turn things on, not to turn
them off.

IIRC, I've only gotten one or two complaints including yours.  The fact is
that most CVS users don't even use "cvs edit" and family.  Therefore, there
won't be too many broken usages.  Those few having scripts relying on the
old (IMO broken) behaviour can rewrite their scripts (to copy back the backup
file).

>This new behaviour means that the WinCVS client will no longer work as
>expected, so in order for things to fix this, I'd have to change WinCVS
>(in such a way that it might not work with the official CVS release), or
>patch your patch to make the unedit work again by default.

Yes, that's right.  Like I said, the existing behaviour is broken -- it doesn't
do what it advertises (ie revert the file back), it's not minimal.

>Would it be a lot of work to make "unedit" revert to the original file
>(but not use the Base directory)?  I know I have no real right to ask,
>but I think it would make a lot of people happy...

If you mean to revert the file back to a copy as it exists in the repository,
yes.  You can use "cvs up -C" (thanks to Larry, I think) to get a clean copy
(I've made a patch to this, too, to fix a bug regarding "cvs up -C" and merges).

If you mean to revert back to the version at the time of "cvs edit", edit.c
(I think) can be patched to do this.  It should be a one-line patch but I
won't do it 'cos I believe it is wrong for "cvs unedit" to unmodify the file
(especially to an unknown version (ie the version that existed at the time of
"cvs edit")).

>If not, is it simple to make the current CVS 1.10 unedit make the file
>in the Base directory write protected?  We're talking about the WinNT
>CVS 1.10 client here.  Would you happen to know where in the code I
>would have to make this change?

I haven't looked at the code in a while, but, IIRC, it should be.  The change
should make sure to make the copy writable each time someone does a "cvs edit"
(so that it can be overwritten with the latest local copy).  I'm not sure what
other side effects may occur.  All code should be located in edit.c

Noel




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 & Co. Incorporated, its
subsidiaries and affiliates.

Reply via email to