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.

Bug 19790 - Add a separate popupmenu enty for 'cvs update -C'
Summary: Add a separate popupmenu enty for 'cvs update -C'
Status: RESOLVED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: CVS (show other bugs)
Version: 3.x
Hardware: PC All
: P3 blocker (vote)
Assignee: issues@www
URL:
Keywords: UI
Depends on:
Blocks: 35640
  Show dependency tree
 
Reported: 2002-01-25 15:06 UTC by Kurt Huwig
Modified: 2008-09-24 10:44 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
After the failed 'Refetch' (8.80 KB, image/png)
2002-02-05 12:39 UTC, Kurt Huwig
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kurt Huwig 2002-01-25 15:06:11 UTC
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.
Comment 1 Milos Kleint 2002-01-25 16:04:51 UTC
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?
Comment 2 kurti 2002-01-25 16:21:16 UTC
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?'.
Comment 3 Milos Kleint 2002-01-25 18:42:50 UTC
isn't refetch the normal update? that's actually how I understand it.
It keeps the local changes and updates from the repository..
Comment 4 kurti 2002-01-25 18:53:51 UTC
You mean that the name is confusing? Then choose another one.
Comment 5 Milos Kleint 2002-01-26 00:05:44 UTC
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..
Comment 6 Milos Kleint 2002-01-26 00:24:38 UTC
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.

Comment 7 kurti 2002-01-26 09:43:14 UTC
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'.
Comment 8 Milos Kleint 2002-01-26 12:06:06 UTC
> 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?
Comment 9 kurti 2002-01-26 12:26:15 UTC
<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.
Comment 10 Milos Kleint 2002-01-26 13:15:00 UTC
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.. :)
Comment 11 Milos Kleint 2002-01-31 07:43:36 UTC
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.
Comment 12 Milos Kleint 2002-01-31 08:49:55 UTC
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.
Comment 13 Jiri Kovalsky 2002-02-04 11:01:04 UTC
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 ?
Comment 14 Kurt Huwig 2002-02-05 11:17:14 UTC
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.
Comment 15 Milos Kleint 2002-02-05 12:09:42 UTC
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..
Comment 16 Kurt Huwig 2002-02-05 12:38:05 UTC
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 
Comment 17 Kurt Huwig 2002-02-05 12:39:20 UTC
Created attachment 4566 [details]
After the failed 'Refetch'
Comment 18 Kurt Huwig 2002-02-05 12:45:17 UTC
Filename for refetch was 'CustomerConfigEditor'; the dialog showed 'init'.
Comment 19 Milos Kleint 2002-02-05 12:53:13 UTC
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?

Comment 20 Kurt Huwig 2002-02-05 13:32:27 UTC
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.
Comment 21 Kurt Huwig 2002-02-05 13:37:11 UTC
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.
Comment 22 Kurt Huwig 2002-02-05 13:45:49 UTC
Created issue 20159 for the duplicate explorer entry.
Comment 23 Milos Kleint 2002-02-05 15:08:56 UTC
ok, I'll fix the init stuff. I didn't run the action from the editor..
that's why it was working for me..
Comment 24 Milos Kleint 2002-02-06 08:35:18 UTC
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.
Comment 25 dmladek 2002-02-07 09:59:59 UTC
on NetBeans IDE Development Version (Build 200202070100) it is "OK".
From the functional point of view....the UI is horrible:-(
Comment 26 dmladek 2002-02-07 10:13:49 UTC
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






Comment 27 dmladek 2002-02-07 10:15:22 UTC
reasigning to UI team
Comment 28 dmladek 2002-02-07 10:18:50 UTC
sorry, reassigning again to UI.
Also changing issue type (if disagree set enhancement back)
Comment 29 Milos Kleint 2002-02-07 10:27:38 UTC
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..
Comment 30 Milos Kleint 2002-02-22 10:50:09 UTC
changing back to enhancement since the only problem now is the adding
popup menu which is not supported yet.
Comment 31 Filip Rachunek 2002-04-30 15:50:25 UTC
UI keyword added.
Comment 32 Marek Grummich 2002-07-22 10:40:08 UTC
Set target milestone to TBD
Comment 33 Marek Grummich 2002-07-22 10:41:26 UTC
Set target milestone to TBD
Comment 34 Peter Pis 2008-09-24 10:44:15 UTC
For new CVS support there is "CVS | Revert Modifications" action that should handle this requirement. Closing as FIXED.