# HG changeset patch # User padraigob@netbeans.org # Date 1202894877 0 # Node ID 60bd6c6e71c7aa665642a588b04b1caf5fe7d341 # Parent 740a0317a114d42d4a5eef27eb9eabfbd9e18e27 126414: Do not report managed files as ignored. Change createFileInformation to only call HgUtils.isIgnored if hg status is not being called. Undo change for #124323 in HgCommand.getSingleStatus diff -r 740a0317a114 -r 60bd6c6e71c7 mercurial/src/org/netbeans/modules/mercurial/FileStatusCache.java --- a/mercurial/src/org/netbeans/modules/mercurial/FileStatusCache.java Tue Feb 12 15:57:50 2008 +0000 +++ b/mercurial/src/org/netbeans/modules/mercurial/FileStatusCache.java Wed Feb 13 09:27:57 2008 +0000 @@ -373,20 +373,28 @@ public class FileStatusCache { } private FileInformation createFileInformation(File file, Boolean callStatus) { - Mercurial.LOG.log(Level.FINE, "createFileInformation(): {0}", file); // NOI18N + Mercurial.LOG.log(Level.FINE, "createFileInformation(): {0} {1}", new Object[] {file, callStatus}); // NOI18N if (file == null) return FILE_INFORMATION_UNKNOWN; - if (hg.isAdministrative(file) || HgUtils.isIgnored(file)) - return file.isDirectory() ? FILE_INFORMATION_EXCLUDED_DIRECTORY : FILE_INFORMATION_EXCLUDED; // Excluded + if (hg.isAdministrative(file)) + return FILE_INFORMATION_EXCLUDED_DIRECTORY; // Excluded File rootManagedFolder = hg.getTopmostManagedParent(file); if (rootManagedFolder == null) return FILE_INFORMATION_UNKNOWN; // Avoiding returning NOT_MANAGED dir or file - if (file.isDirectory()) - return FILE_INFORMATION_UPTODATE_DIRECTORY; // Managed dir + if (file.isDirectory()) { + if (HgUtils.isIgnored(file)) { + return FILE_INFORMATION_EXCLUDED_DIRECTORY; // Excluded + } else { + return FILE_INFORMATION_UPTODATE_DIRECTORY; // Managed dir + } + } if (callStatus == false) { + if (HgUtils.isIgnored(file)) { + return FILE_INFORMATION_EXCLUDED; // Excluded + } return null; } @@ -791,6 +799,7 @@ public class FileStatusCache { } private void fireFileStatusChanged(File file, FileInformation oldInfo, FileInformation newInfo) { + System.err.println("fireFileStatusChanged " + file + " " + oldInfo + " " + newInfo); listenerSupport.firePropertyChange(PROP_FILE_STATUS_CHANGED, null, new ChangedEvent(file, oldInfo, newInfo)); } diff -r 740a0317a114 -r 60bd6c6e71c7 mercurial/src/org/netbeans/modules/mercurial/util/HgCommand.java --- a/mercurial/src/org/netbeans/modules/mercurial/util/HgCommand.java Tue Feb 12 15:57:50 2008 +0000 +++ b/mercurial/src/org/netbeans/modules/mercurial/util/HgCommand.java Wed Feb 13 09:27:57 2008 +0000 @@ -1978,10 +1978,6 @@ public class HgCommand { * @throws org.netbeans.modules.mercurial.HgException */ public static FileInformation getSingleStatus(File repository, String cwd, String filename) throws HgException{ - if(HgUtils.isIgnored(new File(cwd))){ - return new FileInformation(FileInformation.STATUS_NOTVERSIONED_EXCLUDED,null, false); - } - FileInformation info = null; List list = doSingleStatusCmd(repository, cwd, filename); if(list == null || list.isEmpty())