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.
When I am fixing things, I often add some debugging code. After I am finished, I just delete the files by hitting the 'Del'-key and do a CVS update. It would be nice, if there was a menuitem that does this in one step. It could be named - refetch from CVS - overwrite from CVS or so and needs a 'are you sure?' requester, just like file delete.
ok, Sounds good.. - refetch from CVS would do cvs update and overwrite from CVS would do cvs update -C right? That's currently possible to run cvs update -C from the switches dialog, however I admit that it's definitely not one step :) regular update already does the "refetch from CVS", so I think it should be only matter of adding another action. some issues are open however: Wheater this should be placed in the popup menu, menu, toolbar? or configurable? should it be default action of only user-configurable?
IMHO, this should be at least in the popup menu. I do not use anything else. I do need the "normal" update, too, so it has to be a separate option. Maybe 'Refetch' with requester 'This will delete the local file. Are you sure?'.
isn't refetch the normal update? that's actually how I understand it. It keeps the local changes and updates from the repository..
You mean that the name is confusing? Then choose another one.
no i mean that the update with on switches (except of the -d -P ones) idoes refetch and that it's no nessesary to run create a new menu item for it..
too many typos, I need to rephrase: :) no I mean that the update with no switches on (except of the -d -P ones) does "refetch" and that it's no nessesary to create a new menu item for it.. or did I misunderstand the meaning of "refetch"? can you please specify the cvs-command equivalent of the "refetch" action? thanks.
Currently there is the 'update' item, that does get the file from the cvs repository if - it does not exist locally - it has not been changed locally and is changed in the repository and it is merged if - it has been changed locally and in the repository This is a functionality, that everyone needs, so it cannot be replaced or changed by setting some switches. I need a functionality, that fetches the file from the cvs - in any case and does not merge, i.e. overwriting the file with the one from the repository You are right, one could change the options for 'update', but this would result in replacing the file for *every* update and this is *not* what I want. Example: I have 5 files, 1 of them is to be checked into the repository, the other 4 contain debugging code which should not go into the repository. Now I want to mark the 4 files, do a 'diff' on them, just to make sure, that I did not miss anything, and then do an 'overwrite from repository'. After that, I check in the 1 file and realize 'needs update first'. So I click on 'update' and then on 'commit' (after testing first ;-) ). In the current version, I have to select the 4 files, hit the 'delete'-button (not cvs-delete!), wait a second for the files to reappear with 'needs checkout', then mark them *again* and do an 'update'.
> You are right, one could change the options for 'update', but this > would result in replacing the file for *every* update and this is >*not* what I want. Here you probably mean the "Default" switches. However you can run a single command with switches different from the default. When you select the CVS popup submenu and press CTRL key, you'll be presented with with the list of commands and 3 dots will be appended to those which have an additional switches dialog. Selecting update, you'll get a rather big list of available switches to use. The default ones are filled in automatically. In your example just enable the "Get Clean Copy" checkbox and you'll get the results you are calling for, a clean update from repository, that will not include any local modifications. your example shows that the "refetch for CVS" means that no local changes are accepted. What does the "overwrite from CVS" mean? are the changes merged?
<sarcasm>If I get your argumentation right, why bother with different menu items at all? Why not use one item 'cvs' and let the user select what he wants to do: update, commit, add etc...</sarcasm> I want to use this feature very often each day and if I have to press CTRL, select some checkboxes etc. then it is faster for me to just hit the Del key, wait and then select update. I do not want to use any switches, I just want to select one menuitem, just like with add, update, commit, delete etc. What I suggest is a menuitem, that behaves just like 1. hit the 'Del' key 2. wait until the file reappears 3. run 'cvs update' without any options on it That means: The file is overwritten with the version that is currently in the CVS and no local changes are accepted. All what you have done locally is lost, gone away, never to be heard of again. Let me make myself perfectly clear: Please add a separate menuitem for 'cvs update -C' besides 'cvs update'. I changed the subject of the bug to reflect this.
well, I already accepted the new menuitem as reasonable and useful, however I was not sure you are aware of the current possibility. I also misread the initial text and thought the "refetch" and "overwrite" are two differet items.. never mind, now it's clear.. :)
ok, I've implemented the command and added the action to the action's pool. (in main trunk.) it should be fairly easy now to add the command to toolbar/menu. (Via the Tools/Options/IDE Configuration/Look&Feel item. Just copy the "Refetch for Repository" action and paste it where you want. It's also possible to attach a key shortcut to the action. It's also possible to add the action to the popup menu, however that needs a bit more of hacking. The popup menu has the possibility to change the commands displayed, however there's no UI for that yet. If you want to experiment to to find the vcs/CvsClient/PopupMenu folder in the Default filesystem (fs hidden by default) I consider the issue fixed. (even when it's not yet fully accessible from popup menu), please reopen if you disagree.
please don't try build from 31/Jan/2001. There was a bug that ignored the No response to the Overwrite question.. BTW: I wonder if it makes sense to run cvs add command on Locally removed files to get the uptodate content as well.
Fine. Verified in development build #200202040100 of NetBeans 3.4. As for adding [LRemoved] files I think it's a good idea. "Refetch" means something like: "Oh, I did it wrong, I need it back from repository." What do you think, Kurt ?
Some points: I first got 'Do you want to overwrite init from the repository?' what is 'init'? When I clicked on 'Yes', I got: cvs server: illegal option -- C Usage: cvs server [-APdflRp] [-k kopt] [-r rev|-D date] [-j rev] [-I ign] [-W spec] [files...] -A Reset any sticky tags/date/kopts. -P Prune empty directories. -d Build directories, like checkout does. -f Force a head revision match if tag/date not found. -l Local directory only, no recursion. -R Process directories recursively. -p Send updates to standard output (avoids stickiness). -k kopt Use RCS kopt -k option on checkout. -r rev Update using specified revision/tag (is sticky). -D date Set date to update from (is sticky). -j rev Merge in changes made between current revision and rev. -I ign More files to ignore (! to reset). -W spec Wrappers specification line. (Specify the --help global option for a list of other help options) khuwig@rio:~ > cvs --version Concurrent Versions System (CVS) 1.10 `Halibut' (client/server) I get the same if I set the '-C' option in the dialog I get when CTRL-clicking on 'Update'. Then I had 2 entries for the file in the explorer (will attach screenshot). 'cvs update' on the file helped.
well, 1.10 is quite old. What's the reason for using it? I certainly could do delete on the file and afterwards do plain update, however I'd prefer not to do that for directories. For performance reasons. The cvs update -C has also the advantage that it creates a .#<filename>.<revision> backup copy of the file.. to the first question: the init there means the name of the file/directory maybe? The text has two variations now. If one object is selected , then it's name is used in the question, otherwise the number of items is used.. just like in the Delete question I think..
1.10 is used, because it is there since the beginning of the project I work on...we really should update this thing. 'init' is not the name of the file! The name was JC...Frame something. Look on the screenshot...upps, I forgot to upload it... NB version was NetBeansIDE-dev-200202050100.tar.gz
Created attachment 4566 [details] After the failed 'Refetch'
Filename for refetch was 'CustomerConfigEditor'; the dialog showed 'init'.
strange. I just checked again the code and the item that is displayed is taken from the activated node's display name.. in your case it should be "CustomerConfigEditor". Are you positively sure you have no directory/file with the name init? Can you reproduce the behaviour each time?
OK, I figured it out how to reproduce it: There is a method 'init' within the CustomerConfigEditor.java. The cursor was within this method, when I selected 'Refresh' from the context menu of the editor (I did not have it in the menu yet). I can reproduce this every time. BTW: I have the 'Show Editor Toolbar'-Option in Editing - JavaSources set to 'true'. The cursor is in this method, i.e. the Combobox in the editor displays 'init'. Besides this, I saw, that the duplicate entry in the tree does also appear, if I select 'cvs remove' from the context menu, so this looks like another bug.
The duplicate entries appear with 3.3.1 final, too, if I do a 'cvs remove', even from the context menu of the explorer. This looks like a more serious bug.
Created issue 20159 for the duplicate explorer entry.
ok, I'll fix the init stuff. I didn't run the action from the editor.. that's why it was working for me..
for the duplicate explorer entries, please see bug #16395 http://javacvs.netbeans.org/issues/show_bug.cgi?id=16395 I wonder if these are duplicates. I've fixed the init problem. Now the action should return the right node name even when in explorer.
on NetBeans IDE Development Version (Build 200202070100) it is "OK". From the functional point of view....the UI is horrible:-(
I decide reopen and assigne to UI team with description what is "horrible": ================================================================ Well, the new (command) action "Refetch for Repository" was created. See the Tools/Options/IDE Configuration/Look&Feel/Action/Versioning/CVSClient item. What I don't like is: --------------------- 1) The created copy/link in menu/toolbar/submenu can't be renamed 2) The way how to put it into CVS submenu (in popup menu or Versioning menu). 3) can't be set order of this command in CVS submenu 4) in toolbar it is representated by TEXT....realy ugly... if no icon exist...should be the way to assigne some "default" icon
reasigning to UI team
sorry, reassigning again to UI. Also changing issue type (if disagree set enhancement back)
numbers 3 and 4 will be addressed later when we enable user customization of the popup menu.. The current way of doing it (within the Default filesystem) is not supported..
changing back to enhancement since the only problem now is the adding popup menu which is not supported yet.
UI keyword added.
Set target milestone to TBD
For new CVS support there is "CVS | Revert Modifications" action that should handle this requirement. Closing as FIXED.