tags:

views:

823

answers:

4

When I change some interface things in Java, like the contents of a menu item, and save them, the commit option does not enable. NetBeans does not know that changes have been produced so I cannot commit them. How can I commit them?

+1  A: 

Can you commit from the console?

try svn stat in the root directory of your project, that should show you the files that have been modified with an M near the name of the file. if you can see them, run svn ci to commit all changes.

Maybe (and just maybe), svn is ignoring those files on purpose, to check if this is true, run from the console svn propedit svn:ignore .(<- this dot is necesary) in your project root to check if that directory/file/file extension is being ignored.

Good luck!

Pablo Fernandez
A: 

If for whatever reason netbeans isn't allowing you to commit, I would suggest either doing it from the commandline, or using a program like TortoiseSVN

kgrad
A: 

It is Subversion's responsibility to know what has changed since the last commit/update. If NetBeans' Subversion interface doesn't allow to commit, then it may be a bug in Netbeans. Technically, there should be no reason to disable commit button - Subversion doesn't prevent you from committing even if nothing has been changed.

Joonas Pulakka
+1  A: 
  1. Are you using Netbeans 6 or higher? If not, you need to tell Netbeans where the svn executable is (see the link and the associated FAQ).

  2. Are you sure that your subversion repository is running on a machine that is in sync with your workstation's view of the current time (e.g., synch-ed via ntp)? If the time is enough out of sync, it's possible that the subversion module is missing the update and, therefore, not flagging the change.

  3. Also, you should check to make sure that you have an active valid connection to the subversion repository. You can easily do this for the file you just edited: right click on the editor tab for that file and choose Subversion -> Diff or Show Changes or Search History. If any of those fail, your IDE has lost its connection to SVN for some reason.

  4. Another possibility is that you didn't succeed with a real checkout: if the .svn subdirectories aren't properly configured, the menu item will definitely be disabled. I would recommend that you right click on the project (under Projects) and try Show Changes. If that doesn't succeed, you don't have a valid Subversion checkout and the Netbeans options definitely won't work.

Bob Cross
Yeah, NetBeans' handling of svn connection problems is non-existent, at least with svn+ssh. It just freezes, if there's a problem with the connection.
Joonas Pulakka
@Pablo, I know that. I just commented the answer this time, since I don't think that the reason for Netbeans' commit option being disabled could possibly be any connection problem, since SVN doesn't actively maintain connection; instead it tries to connect, when told so.
Joonas Pulakka