I thought I could switch from NB4.1 to quiete stable and improved NB5.0Beta2
which has a lot of "other" nice features. But seems that VCS (especially CVS)
support goes in opposite direction :-/
CVS noted too much simplification which lacks of many useful features IMHO.
For instance Versioning (as it was designed in prev. version). Current
replacement of Versioning IS NOT Verioning BUT rather REMAKE of VCS Groups
(which in this way it's fine).
Other missing features or just possibility is to execute CVS Edit command.
Which is almost blocking for me.
Our CVS server is configured to give you r/o sources when you checkout/update
them or if you commit them. And thus if I wish to edit them using NB first I
have to make them writtable which was easy in NB41 using CVS->edit command.
But now, I have to find these files in a deep dirstructure and using other tool
convert them to be writtable, which is very but very inconvenient:-(
So I'm doing my work in NB41 for now and hope that NB5 won't have such
deficiencies 'because in general I found there lots of useful featers, but also
Eclips have nice ones (and seems that overtook many of them which made NB, the
NetBeans IDE!, but now it's Eclips which has for instance Perspective and NB get
rid of it:-((( and much better CVS support. Shame it!)
For 5.0 it's intention. It could be added in next version.
- There are no Java APIs for ro->rw transition.
- do you use CVS Edit for purpose it was designed for?
>For 5.0 it's intention. It could be added in next version.
No, you're kidding :-/ In next version after 5.0? And when it'll be?
> - There are no Java APIs for ro->rw transition.
maybe, and should I care about it? I didn't care about in neither in NB41.
But for what I care is that when I checkout/commit source it became r/o
OF course I don't use NB for that 'cause it is unrealible for
checkouting/updating large repository of its own size. Also there's no sheduler
for keeping sources just up to date regulary and when you unfortunately do
checkout/update sources from NB you can't edit rest of files in you sources.
So I'm using native cvs client for such work.
> - do you use CVS Edit for purpose it was designed for?
Well, I don't wanna argue about what cvs->edit was designed for.
I just know that it enable me to start edit r/o checkouted source.
Do you know that using CVS support in NB5.0 doesn't convert now writable source
after commit into r/o?
I'm serious, the implemented functionality is based on users' poll results and
internal usability study. Rare commands were stripped out.
> Do you know that using CVS support in NB5.0 doesn't convert now writable source
> after commit into r/o?
C/S Updated response's mode line is ignored. There is no pure Java way to change
ro -> rw. If you do all operations from IDE there should not be any problem. In
5.0 file editing is not blocked for long lasting updates.
>> Do you know that using CVS support in NB5.0 doesn't convert now writable source
> after commit into r/o?
Probably because of you said at the begining:
"- There are no Java APIs for ro->rw transition."
Sorry, but I'm not sure I understand you.
What is "C/S response mode line"?
And what do you mean by "C/S Updated response's mode line is ignored", please?
>....If you do all operations from IDE there should not be any problem.
but from the reason I listed above it's not possible to do it.
Only "small" dir hiearchy is suitable to be updated via NB. But not all sources.
That're my experiencies.
Sorry for the protocole level terminology.
In plain speech it means that NB CVS client never sets the ro file flag.
Happy New Year 2006!
sorry for longer response, but back to work.
Well, in this case I must say that CVS support in NB ide lack of some important
feature (for me, sure! But I must accept rules settled by cvs admins).
It cannot substitue a native cvs client in this case and as a ide's user I'm
forced to use only NB cvs client and nothing else or stop using the ide.
Non of those possibilities are good (for me:)
Can we try find some solution, please? (in this version, waiting to another
release is like stop using NB).
When this gets implemented, it should also automatically check for already
registered editors before actually issuing the CVS edit command
This is a critical ommision and is causing us and our community a lot of grief.
A number of our community members for Project Looking Glass use cvs watch on
files, this causes the files to be check out read-only.
It is impossible to change these files from the ide. The user either has to use
a shell or another IDE to make the files editable.
This needs resolving ASAP.
*** Issue 40809 has been marked as a duplicate of this issue. ***
*** Issue 11891 has been marked as a duplicate of this issue. ***
It would be trivial to use Runtime.getRuntime().exec ("attrib +R foo.file") or
"chmod u+w foo.file" its unix equivalent. Given that the old CVS support
invoked external processes for all of it's operations, I can't believe it would
kill performance to do the equivalent for one particular case - a Java API for
doing this would be nice
In the extreme case where the correct command line may not be something we know
how to hardcode (e.g. VMS or OS/2), it's easy enough to pop up a dialog and ask
the user. That would be a scary dialog, but likely never will be seen except on
non-unix, non-windows platforms, which is close to 0% of users.
(it helps to finish one's sentences)
a Java API for doing this would be nice but not having one is hardly a showstopper.
Things to watch for would be:
- Parsing error output correctly (only a few cases that matter on windows,
probably also true on unix)
- Correctly identify when the command is unrecognized or chmod program not found
- Passing Windows shell line length limit (unlikely since "attrib" on windows
doesn't take multiple arguments)
is this "enhancement" on the todo list? I like NetBeans very much but this is a significant problem. Especially since
CVS update doesn't warn you when the file its updating is read-only. It simply updates the meta-data without changing
the contents of the file.
We do not currently plan active, internal development of CVS here at NetBeans.
I wouldn't say this is just enhancement.
It's broken functionality from my point of view 'cause it used to work in the past.
I've looked through the comments and it's not really clear why the CVS Edit/Undo Edit feature had to disappear after NB
4.x, but I've added my vote to this issue.
There was a comment about being able to change a file from ro -> rw purely in Java. I was amazed, but I did find that
prior to Java SE 6, there was no way to do this. (You could go the other way with File.setReadOnly().) However, Java
SE 6 supports File.setWritable() as well, so perhaps this enhancement can be revisited.
good catch krahe:)
The question is whether the current NB is build and uses jdk 1.6 or not.
Current NB is built on jdk 1.5.
I just thought I'd add my support to this. There seems to be everything on the CVS menu that I could possibly want except for the ability to set CVS Edit. We use that quite a lot here and, in the absence of another way for the IDE to be able to set the file's read only status to read write ( as appears to be being discussed here), it sounds like an important feature to reinstate.
Hello John, are you aware of the "Switch Read/Write File Access" plugin ? It is also available on the Update Center for NetBeans 6.8. Just invoke "Tools > Plugins", switch to "Available Plugins" tab and type "Switch" to "Search" field, then check "Install" checkbox and click "Install" button.
Does this satisfy your need?
(In reply to comment #22)
> Hello John, are you aware of the "Switch Read/Write File Access" plugin ?
Hi - I hadn't noticed that one, but I've now installed it and will check it out. It sounds like it might help, but obviously it doesn't do the job of CVS Edit from the point of view of letting people who are also editing or watching the file know about it.
(In reply to comment #23)
Ooops - forgot to say Thanks!
Yes, I know what you mean. Unfortunately, this was possible with CVS profile in Generic VCS module a long time ago. At least I added this issue to the pool  of NetFIX candidates hoping somebody from NetFIX community developers could implement this. Now let's hope for the best. :-)
Whilst there is an EditCommand class in the CVS client library it seems that this includes a CommandRequest.NOOP request. I'm not currently able to get the cvs edit command to work in NB.
Are we sure that the edit command works in the CVS client library?
> Are we sure that the edit command works in the CVS client library?
as already mentioned in a post before - the cvs/edit wasn't meant to be implemented in the first place and afaik the cvs command isn't fit to be used yet.
one more thing we should mention in this context is that cvs/edit shouldn't be considered as a menu action per se as such would be more or less only a simpleton implementation.
There are also scenarios when files are to be changed in the IDE but not edited by hand by the user - e.g.:
- project metadata when e.g. adding removing dependencies
Not only that we should have a mechanism how to handle such cases, a user should also have a way how to fine tune such "edit on demand" behavior - some options like "Automatically (cvs edit files on demand)" "Disable (manual cvs edit required to modify files)", "Prompt for Action", ...
At the time when this issue was filed there was no infrastructure to handle such cases, but that changed since then and we already have an similar implementation in the ClearCase module. So see there for a possible inspiration, especially o.n.m.clearcase.ClearcaseInterceptor.beforeEdit(...), .doMove(...) and deleteFile(...), to learn how to handle IDE file events.
I'm struggling to get the cvs edit command to work correctly. I keep getting the error:
cvs [edit aborted]: current directory (<remote>) contains an invalid character (+,>;=\t\n)
I don't however see anywhere where I get to set the current directory. The command seems to define the local directory correctly. Any ideas as to where I can look? Where is the command actually executed?
I've finally made some progress. It seems that CvsLiteFileHandler had inverted logic in its setFileReadOnly method. Once I fix that I can see the Edit/Unedit commands working and so now I can continue with the integration.
Created attachment 97122 [details]
Some notes for whoever wishes to complete the attached patch:
The patch includes Edit and Unedit entries for the CVS menu which allows the user to manually declare whether they are editing a given file. The menu options are added in org/netbeans/modules/versioning/system/cvss/Annotator.java. This follows the pattern of other menu actions in that there is an EditAction class which uses an EditExecutor to construct the required EditCommands (from CVS client module). The executor causes the CVS commands to be performed asynchronously, thus freeing the event thread.
Files affected by automatic IDE actions (e.g. refactoring) also need to have cvs edit declared (as indicated by an earlier comment to this issue). This is handled by the beforeEdit(File) method in org/netbeans/modules/versioning/system/cvss/FilesystemHandler.java. beginEdit as currently coded always send cvs edit. This needs to be made configurable as described by comment #27.
Additionally cvs checkout may need to reflect the configuration of cvs edit usage. If cvs edit is to be used then files ought to be checked-out as read-only files which will then only become writable once cvs edit is triggered.
Daniel is no longer working on this issue. Resetting to default assignee.