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 217184 - Changing file name case causes IDE to only add the new fle and not to remove the previous one
Summary: Changing file name case causes IDE to only add the new fle and not to remove ...
Status: NEW
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Git (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P4 normal with 2 votes (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
: 224507 225717 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-08-21 21:48 UTC by misterm
Modified: 2013-02-04 18:15 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
messages.log (199.22 KB, application/octet-stream)
2012-08-21 21:48 UTC, misterm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description misterm 2012-08-21 21:48:22 UTC
Created attachment 123361 [details]
messages.log

I had checked out a project which contained an enum named in upper case. I renamed it to follow the proper conventions, commited the file and pushed it to the repository.

Now, nearly 1 month later, another developer who uses SmartGit to interact with Git and Eclipse to work on the project reports to me his project fails to compile. The file was left there and checkout on Windows can only have one copy because it is case insensitive. So this shows how serious the problem is and how long it can go undetected.

Product Version = NetBeans IDE Dev (Build 20120819-e6bbc5b6057a)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_01
Runtime = Java HotSpot(TM) 64-Bit Server VM 21.1-b02
Comment 1 Ondrej Vrabec 2012-08-22 05:29:57 UTC
2 files with the same name except for the case are the same for java on windows, it can not handle the two files at the same time. You have to solve this case in commandline and then switch to NetBeans. That's a limitation we have to live with.
Comment 2 misterm 2012-08-22 12:46:07 UTC
I respectfully disagree with your evaluation, ovrabec, since this issue can cause silent problems that might persist for a long time. Since the code is able to capture the rename operation and to identify it will cause a problem in such cases, in my understanding the IDE should either make the operation fail (which for me is better than pretending it works) or at least warn the user about the side-effects of such a rename operation.
Comment 3 Ondrej Vrabec 2012-08-23 06:57:50 UTC
i won't make anything fail, instead i'll try to find a way to notify and warn user somehow
Comment 4 Ondrej Vrabec 2012-09-14 10:46:35 UTC
fix: http://hg.netbeans.org/core-main/rev/836a5d53394e
Comment 5 Ondrej Vrabec 2012-09-14 11:03:23 UTC
i added at least a warning to the commit dialog. Now you are notified about a rename by case-change and instructed to commit via commandline.
The proper fix would be to move from java.io.File-based cache to String(absolute path)-based cache. However i don't know if it is worth the effort.
Comment 6 misterm 2012-09-14 12:09:09 UTC
Well, I don't even have command-line installed, so I would certainly appreciate it if the IDE did the hard work for me :-)
Comment 7 Quality Engineering 2012-09-15 02:12:23 UTC
Integrated into 'main-golden', will be available in build *201209150001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/836a5d53394e
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: #217184 - Changing file name case causes IDE to only add the new fle and not to remove the previous one
warn user in the commit dialog about changed case in file names on Windows and Mac
Comment 8 Ondrej Vrabec 2013-01-04 19:54:30 UTC
*** Bug 224507 has been marked as a duplicate of this bug. ***
Comment 9 Ondrej Vrabec 2013-02-04 18:15:07 UTC
*** Bug 225717 has been marked as a duplicate of this bug. ***