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.

View | Details | Raw Unified | Return to bug 126414
Collapse All | Expand All

(-)a/mercurial/src/org/netbeans/modules/mercurial/FileStatusCache.java (-5 / +14 lines)
Lines 373-392 public class FileStatusCache { Link Here
373
    }
373
    }
374
374
375
    private FileInformation createFileInformation(File file, Boolean callStatus) {        
375
    private FileInformation createFileInformation(File file, Boolean callStatus) {        
376
        Mercurial.LOG.log(Level.FINE, "createFileInformation(): {0}", file); // NOI18N
376
        Mercurial.LOG.log(Level.FINE, "createFileInformation(): {0} {1}", new Object[] {file, callStatus}); // NOI18N
377
        if (file == null)
377
        if (file == null)
378
            return FILE_INFORMATION_UNKNOWN;
378
            return FILE_INFORMATION_UNKNOWN;
379
        if (hg.isAdministrative(file) || HgUtils.isIgnored(file))
379
        if (hg.isAdministrative(file))
380
            return file.isDirectory() ? FILE_INFORMATION_EXCLUDED_DIRECTORY : FILE_INFORMATION_EXCLUDED; // Excluded
380
            return FILE_INFORMATION_EXCLUDED_DIRECTORY; // Excluded
381
381
382
        File rootManagedFolder = hg.getTopmostManagedParent(file);        
382
        File rootManagedFolder = hg.getTopmostManagedParent(file);        
383
        if (rootManagedFolder == null)
383
        if (rootManagedFolder == null)
384
            return FILE_INFORMATION_UNKNOWN; // Avoiding returning NOT_MANAGED dir or file
384
            return FILE_INFORMATION_UNKNOWN; // Avoiding returning NOT_MANAGED dir or file
385
        
385
        
386
        if (file.isDirectory())
386
        if (file.isDirectory()) {
387
            return FILE_INFORMATION_UPTODATE_DIRECTORY; // Managed dir
387
            if (HgUtils.isIgnored(file)) {
388
                return FILE_INFORMATION_EXCLUDED_DIRECTORY; // Excluded
389
            } else {
390
                return FILE_INFORMATION_UPTODATE_DIRECTORY; // Managed dir
391
            }
392
        }
388
        
393
        
389
        if (callStatus == false) {
394
        if (callStatus == false) {
395
            if (HgUtils.isIgnored(file)) {
396
                return FILE_INFORMATION_EXCLUDED; // Excluded
397
            } 
390
            return null;
398
            return null;
391
        }
399
        }
392
400
Lines 791-796 public class FileStatusCache { Link Here
791
    }
799
    }
792
    
800
    
793
    private void fireFileStatusChanged(File file, FileInformation oldInfo, FileInformation newInfo) {
801
    private void fireFileStatusChanged(File file, FileInformation oldInfo, FileInformation newInfo) {
802
        System.err.println("fireFileStatusChanged " + file + " " + oldInfo + " " + newInfo);
794
        listenerSupport.firePropertyChange(PROP_FILE_STATUS_CHANGED, null, new ChangedEvent(file, oldInfo, newInfo));
803
        listenerSupport.firePropertyChange(PROP_FILE_STATUS_CHANGED, null, new ChangedEvent(file, oldInfo, newInfo));
795
    }
804
    }
796
    
805
    
(-)a/mercurial/src/org/netbeans/modules/mercurial/util/HgCommand.java (-4 lines)
Lines 1978-1987 public class HgCommand { Link Here
1978
     * @throws org.netbeans.modules.mercurial.HgException
1978
     * @throws org.netbeans.modules.mercurial.HgException
1979
     */
1979
     */
1980
    public static FileInformation getSingleStatus(File repository, String cwd, String filename)  throws HgException{
1980
    public static FileInformation getSingleStatus(File repository, String cwd, String filename)  throws HgException{
1981
        if(HgUtils.isIgnored(new File(cwd))){
1982
            return new FileInformation(FileInformation.STATUS_NOTVERSIONED_EXCLUDED,null, false);
1983
        }
1984
 
1985
        FileInformation info = null;
1981
        FileInformation info = null;
1986
        List<String> list = doSingleStatusCmd(repository, cwd, filename);
1982
        List<String> list = doSingleStatusCmd(repository, cwd, filename);
1987
        if(list == null || list.isEmpty())
1983
        if(list == null || list.isEmpty())

Return to bug 126414