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 - Cannot change filename casing
Summary: Cannot change filename casing
Status: NEW
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Subversion (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@versioncontrol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-22 21:33 UTC by _ gtzabari
Modified: 2009-12-08 08:54 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.