Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 124325 - Status of ignored files not reported correctly
Status of ignored files not reported correctly
Status: RESOLVED FIXED
Product: versioncontrol
Classification: Unclassified
Component: Mercurial
6.x
Sun All
: P3 (vote)
: 6.x
Assigned To: issues@versioncontrol
issues@versioncontrol
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-20 14:47 UTC by Padraig Obriain
Modified: 2008-01-08 14:53 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments
proposed patch (2.02 KB, patch)
2007-12-20 15:05 UTC, Padraig Obriain
Details | Diff
updated patch after review (2.07 KB, patch)
2008-01-08 14:50 UTC, Padraig Obriain
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Padraig Obriain 2007-12-20 14:47:13 UTC
If a directory does not contain any interesting files then the status of ignored files is not reported correctly.
Comment 1 Padraig Obriain 2007-12-20 15:04:37 UTC
The reason that this is happening is line 743 of FileStatusCache.java

        if (interestingFiles == null || interestingFiles.isEmpty()) return folderFiles;

If we omit this line then the user-observed behavior is correct.

However we are calling createFileInformation for each file in the directory. For each file for which Hgutils.isIgnored
returns false we are calling HgCommand.getSingleStatus.

For the normal case this means that we are incurring an exec call for every file in the directory.
Comment 2 Padraig Obriain 2007-12-20 15:05:49 UTC
Created attachment 54415 [details]
proposed patch
Comment 3 Padraig Obriain 2007-12-20 15:11:29 UTC
An effect of this patch is to remove the fallback of calling HgCommand.getSingleStatus on a file if HgUtgils.isIgnored
returns false.

This means that HgUtils.isIgnored must return the correct value or else a file which should be ignored will not be
handled correctly. Currently we do not handle glob style patterns correctly.
Comment 4 Padraig Obriain 2008-01-08 14:50:40 UTC
Created attachment 54819 [details]
updated patch after review
Comment 5 Padraig Obriain 2008-01-08 14:53:07 UTC
IDE:-------------------------------------------------
IDE: [1/8/08 2:50 PM] Committing "FileStatusCache.java" started
Checking in FileStatusCache.java;
/shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/FileStatusCache.java,v  <-- 
FileStatusCache.java
new revision: 1.22; previous revision: 1.21
done
IDE: [1/8/08 2:50 PM] Committing "FileStatusCache.java" finished


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo