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.
If you have some file with status Locally New and ignore it, then in Status Window .hgignore appears instead of that file with status Locally New. But if you invoke Refresh Status, the .hgignore disappears from Status Window although it is still present on the disk (with right content). Same situation repeats if you unignore that file - .hgignore appears in Status Window, but disappears again after Refresh Status. Mercurial client 0.9.5 Product Version: NetBeans IDE 6.0 (Build 200711261600) Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-b05 System: Windows Vista version 6.0 running on x86; Cp1252; en_GB (nb)
Can see in: HgUtils.isIgnored(File file) : if (FILENAME_HGIGNORE.equals(name)) return false; <-- true if we want .hgignore not displayed in Status Window We should be returning true if we want .hgignore to be ignored and so not displayed in the Status Window. The problem is what if we clone a project that has already got a .hgignore
Well I am not sure how should it behave, but definitely not the way it is now. Either the .hgignore shouldn't be displayed in status at all, or all the time. I've checked how it behaves in CVS and it is displayed all the time, so it should be probably that way too. Another thing is that it can cause some problems if you commit the .cvsignore and someone updates his project while having new file with the same name as that one ignored. I guess it would be the same in mercurial... I'll try to test it.
Created attachment 54172 [details] Proposed patch - always display .hgignore in status if it's new or modified
IDE:------------------------------------------------- IDE: [11/12/07 23:01] Committing started Checking in FileStatusCache.java; /cvs/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/FileStatusCache.java,v <-- FileStatusCache.java new revision: 1.20; previous revision: 1.19 done Checking in util/HgCommand.java; /cvs/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/util/HgCommand.java,v <-- HgCommand.java new revision: 1.63; previous revision: 1.62 done IDE: [11/12/07 23:02] Committing finished
Reopening as .hgignore does not appear after ignoring Locally New file. Not ever after invoking Refresh Status manually. 1) Create new project 2) Initialize hg repo 3) Commit 4) Create new file 5) Ignore it result: No .hgignore after invoking Mercurial | Status even it is on the harddrive and has right content. hg plugin version 1.4.3.42.1 (at least that is number from plugin manager), probably from 3.1.2008 Product Version: NetBeans IDE 6.0 (Build 200711261600) Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05 System: Windows Vista version 6.0 running on x86; Cp1252; en_GB (nb)
It looks like http://hg.netbeans.org/main/rev/27ce658ce8ea caused the regression.
Created attachment 56227 [details] proposed patch
changeset: 66277:e66c0a6995fc tag: tip user: padraigob@netbeans.org date: Thu Feb 07 11:46:32 2008 +0000 files: mercurial/src/org/netbeans/modules/mercurial/util/HgUtils.java description: 123735: Correct isIgnored for .hgignore
Verified. The only minor issue I see now is that lines in .hgignore are swapped. After ignoring and unignoring the file, the .hgignore is modified although the meaning of the content is the same. Before ignore: \.orig$ \.orig\..*$ \.chg\..*$ \.rej$ after ignore and unignore: \.chg\..*$ \.rej$ \.orig$ \.orig\..*$