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 151071

Summary: Cannot change filename casing
Product: versioncontrol Reporter: _ gtzabari <gtzabari>
Component: SubversionAssignee: issues@versioncontrol <issues>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description _ gtzabari 2008-10-22 21:33:09 UTC
dev build 200810221401

I used the "rename" refactoring on a Java class. Netbeans invokes SVN under the hood and it, in turn, has problems
renaming files under Windows so the operation fails with the following error:

"Subversion failed to rename FooList.java to: Foolist.java
svn: Cannot move path 'FooList.java' into itself"

You should look into handling this more gracefully. There should be a way to rename Classes without triggering this error.
Comment 1 Tomas Stupka 2008-10-24 08:06:53 UTC
the only thing i can think of is not to call the svn command and simply rename the file if on windows and filenames
equals (case insensitively) and see how svn can deal with...
Comment 2 _ gtzabari 2008-10-24 15:10:30 UTC
SVN lets you rename filename casing directly on the server. I can think of workarounds involving this approach but on
second thought I think the best approach is the existing behavior. The only thing I would change is the error message
users see. I would either:

1) Tell the user filename casing cannot be renamed due to a SVN limitation. Or,
2) Explain to the user renaming casing must go in its own commit due to a SVN limitation. Ask him if he'd like to do
this now. If he says yes you:

a) rename the file on the server.
b) rename the local file to a temporary file.
c) issue SVN update against the file, causing the local SVN structures to update.
d) copy the temporary file over the local file that has just been checked out.