Community
Participate
Working Groups
Due to the (unfortunate?) placement in the Team menu, adjacent to Team->Add to .cvsignore..., this action (Team->Add to Source Control) can be invoked accidentally when the intended action was to add to .cvsignore. This has now happened to me a couple times. Since Add to Source Control does not have an Undo operation, and since it does not use a confirmation dialog (thus no way to cancel if you see that you selected it accidentally), you are left to manually fix this problem by manually editing the CVS control files. This can be tricky if you had several files selected. Of course, once you add the file to Version Control (even before committing it), you can no longer add the file to .cvsignore. This is the double whammy. Any guidance on how to Undo this operation? I found entries in the CVS/Entries file that had a "/dummy timestamp". I closed my Eclipse project, edited CVS/Entries, then opened the project. This appears to work, although I loath editing CVS metadata files... In addition to suppporting Undo, I think a UI review of this action (or at least its placement in the Team menu) is merited. It is simple enough to do this in Team->Commit if the file has not already been added to Source Control. It seems undo-able operations should not be placed adjacent to operations that have the opposite meaning where they can be clicked by accident.
I don't really like the idea of adding a custom command to remove the file from version control. I do like the idea of having an Undo but the current CVS command infrastructure doesn't support it. If, in the future it does, this is one we should consider supporting. We could add an Remove from Version Control to the properties dialog as we've done for folders. Just for your information, I and many pther people don't use Add to Version Control at all. Instead, we either ignore resources explicitly or let the commit in the synchronize view add them automatically. Both of the later actions have prompts which allow the user a chance to ensure that the proper operation is taking place on the proper selection.
Michael, it makes sense to be able to undo a mistaken Team > Add/Commit. The only concern I would have is the placement of such a command (e.g. in the ctx menu or in the properties page for a file).
I agree with your comments; I too normally just add to version control only during a commit. Perhaps this command can be removed from this menu (Hmm, can a custom plugin remove things from menus? not sure...) since it does not have much (if any) utility, or add a confirmation, so that it is hard to execute it (to completion) accidentally.
Regarding comment #2, I think using the Undo command makes the most sense since that is what your doing. If this is not possible, then my second choice would be a button on the properties dialog for a file. We can detect the case where the selected file is added but not committed. Also, we should probably prompt on Add to Version Control since it is an infrequent operation (as suggested in comment #3).
Created attachment 67036 [details] Confirmation added And maybe it is possible to made 'Add to .cvsignore' action mirror reflection of 'Add to Version Control'? I mean ignoring could be enabled even for shared resources, and ask message like 'You have choosen explicity to ignore shared resource. Do you want to continue, remove it from Version Control and ignore it?' In this case we do not add new action, ignoring and adding to CVS allows have opposite effects. Disadvantage of this solution is fact, that resource cannot be simply unshared. But I do not see any purpose of having unshared resource - in the end it should be or shared or ignored.
This is not critical for 3.3. We can investigate possible solutions in 3.4.
Patch released to HEAD
Verified in I20070806-1800. The prompting dialog pops up when when needed and works as expected. On the other hand, it looks like the "undo" feature still remains questionable. Do you think we should open a separate bug for it?
I would prefer not to add an addition context menu item for an action that would rarely (if ever) be used). I think we should wait and see if the confirmation dialog is enough to solve the problem. If it is not adequate, we can revisit the issue.