This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Using the external cvs client, if you modify a file and then choose CVS>Edit>UndoEdit, it does not allways (or very often) revert the file changes.
Created attachment 1256 [details] log
Moving to the cvs.
We were not able to reproduce it here. Are you sure, that you call CVS->Edit before you start to edit the file ? You should use it when the checked out file is read-only. Then an automatic Edit command is executed when you try to modify the file and later you can revert your changes by CVS->Undo Edit. But if you didn't run Edit before your modifications, you can not expect it to work.
I can still reproduce it almost every time. I am not ever doing CVS->Edit before hand. I don't have any read-only files. I guess my bug should be changed to the automatic cvs edit command is not being executed or failing. If this is how it is going to be then, my issue is that if you do an Undo Edit when you cannot, they netbeans shouldn't prompt you indicating that the file has been reverted (when it has not!).
Sorry, but have to lower the priority of the issue, because of the bad usage of the command. CVS->Undo Edit works only in conjunction with CVS->Edit. If you don't run CVS->Edit, you can not expect CVS->Undo Edit to work. The CVS module does nothing more, than executes the appropriate CVS commands in this case. The automatic Edit command is executed only on read-only files. However you are right, that the module should not tell you, that the file was successfully reverted when it's not true. I will try to solve this inconsistency.
Why is the automatic edit command only executed on read-only files? Also if undo edit is going to have this somewhat hidden requirement that you must use it in conjunction with edit, then you should at least put a warning message up saying such. Without this (or automatic edit working for all files), the undo edit command is quite misleading.
> Why is the automatic edit command only executed on read-only files? Please read http://www.gnu.org/manual/cvs-1.9/html_chapter/cvs_7.html#SEC46 Execution only on read-only files also ensures, that it's not executed multiple times on every attempt to modify the file.
In the cvs manual, i don't see why you would only automaticly call edit only on readonly files. It looks to me like it can happen on read/write files too. >Execution only on read-only files also ensures, that it's not executed multiple times on every attempt to modify the file. There's got to be a better way to handle this. Isn't there a cvsfile class or something - just add a flag.
> In the cvs manual, i don't see why you would only automaticly call edit only > on readonly files. It looks to me like it can happen on read/write files too. Yes, but it's usually used in conjuction with read-only files, otherwise you can easily forget to run Edit before editing. I would not expect, that anyone would run Edit on r/w file, but if s/he wants, s/he can run Edit manually via CVS->Edit. As for Unedit, I can add a warning that the file is not edited (I mean cvs edit was not called on it). Is this O.K. for you ?
Could the message, allow the user to run the edit at that point?, and then the undo edit? Will that even work? So. User has r/w file. Choose EditUndo. Netbeans prompt saying that the user has not called undo edit and asks if the user wants to call it now, or cancel. If cancel, undoedit would cancel. If yes, netbeans calls cvs edit, and then undo edit, which would then cause the file to be reverted to previous commited. I'm not sure that this will even work with cvs. If it will not, then i guess a simple warning message will have to do.
Well, 'cvs unedit' reconstruct the file to the state when 'cvs edit' was called. Therefore calling 'cvs edit' right before 'cvs unedit' has no sense. All I can do at this point is to pop up a simple message saying, that there is nothing to unedit, since the Edit command was not performed on this file.
ok
Resolved as wontfix. This bug is fixed in vcsgeneric module (issue #14901), which is used instead of vcscvs in NetBeans and Forte4Java builds. vcscvs module is not a part of builds any more.
OK