Lines 277-283
Link Here
|
277 |
* @see FileInformation |
277 |
* @see FileInformation |
278 |
*/ |
278 |
*/ |
279 |
public FileInformation getStatus(File file) { |
279 |
public FileInformation getStatus(File file) { |
280 |
if (file.isDirectory() && (hg.isAdministrative(file) || SharabilityQuery.getSharability(file) == SharabilityQuery.NOT_SHARABLE)) |
280 |
if (file.isDirectory() && (hg.isAdministrative(file) || HgUtils.isIgnored(file))) |
281 |
return FileStatusCache.FILE_INFORMATION_EXCLUDED_DIRECTORY; |
281 |
return FileStatusCache.FILE_INFORMATION_EXCLUDED_DIRECTORY; |
282 |
File dir = file.getParentFile(); |
282 |
File dir = file.getParentFile(); |
283 |
if (dir == null) { |
283 |
if (dir == null) { |
Lines 363-369
Link Here
|
363 |
Mercurial.LOG.log(Level.FINE, "createFileInformation(): {0}", file); // NOI18N |
363 |
Mercurial.LOG.log(Level.FINE, "createFileInformation(): {0}", file); // NOI18N |
364 |
if (file == null) |
364 |
if (file == null) |
365 |
return FILE_INFORMATION_UNKNOWN; |
365 |
return FILE_INFORMATION_UNKNOWN; |
366 |
if (hg.isAdministrative(file) || SharabilityQuery.getSharability(file) == SharabilityQuery.NOT_SHARABLE) |
366 |
if (hg.isAdministrative(file) || HgUtils.isIgnored(file)) |
367 |
return file.isDirectory() ? FILE_INFORMATION_EXCLUDED_DIRECTORY : FILE_INFORMATION_EXCLUDED; // Excluded |
367 |
return file.isDirectory() ? FILE_INFORMATION_EXCLUDED_DIRECTORY : FILE_INFORMATION_EXCLUDED; // Excluded |
368 |
|
368 |
|
369 |
File rootManagedFolder = hg.getTopmostManagedParent(file); |
369 |
File rootManagedFolder = hg.getTopmostManagedParent(file); |
Lines 404-410
Link Here
|
404 |
} |
404 |
} |
405 |
|
405 |
|
406 |
@SuppressWarnings("unchecked") // Need to change turbo module to remove warning at source |
406 |
@SuppressWarnings("unchecked") // Need to change turbo module to remove warning at source |
407 |
private Map<File, FileInformation> getScannedFiles(File dir, Map<File, FileInformation> interestingFiles) { |
407 |
public Map<File, FileInformation> getScannedFiles(File dir, Map<File, FileInformation> interestingFiles) { |
408 |
Map<File, FileInformation> files; |
408 |
Map<File, FileInformation> files; |
409 |
|
409 |
|
410 |
files = (Map<File, FileInformation>) turbo.readEntry(dir, FILE_STATUS_MAP); |
410 |
files = (Map<File, FileInformation>) turbo.readEntry(dir, FILE_STATUS_MAP); |
Lines 682-688
Link Here
|
682 |
// Only interested in looking for Hg managed dirs |
682 |
// Only interested in looking for Hg managed dirs |
683 |
for (File file : files) { |
683 |
for (File file : files) { |
684 |
if (file.isDirectory() && hg.getTopmostManagedParent(file) != null){ |
684 |
if (file.isDirectory() && hg.getTopmostManagedParent(file) != null){ |
685 |
if (hg.isAdministrative(file) || SharabilityQuery.getSharability(file) == SharabilityQuery.NOT_SHARABLE) |
685 |
if (hg.isAdministrative(file) || HgUtils.isIgnored(file)) |
686 |
folderFiles.put(file, FILE_INFORMATION_EXCLUDED_DIRECTORY); // Excluded dir |
686 |
folderFiles.put(file, FILE_INFORMATION_EXCLUDED_DIRECTORY); // Excluded dir |
687 |
else |
687 |
else |
688 |
folderFiles.put(file, FILE_INFORMATION_UPTODATE_DIRECTORY); |
688 |
folderFiles.put(file, FILE_INFORMATION_UPTODATE_DIRECTORY); |
Lines 693-698
Link Here
|
693 |
return folderFiles; |
693 |
return folderFiles; |
694 |
} |
694 |
} |
695 |
|
695 |
|
|
|
696 |
boolean bInIgnoredDir = HgUtils.isIgnored(dir); |
697 |
if(bInIgnoredDir){ |
698 |
for (File file : files) { |
699 |
if (HgUtils.isPartOfMercurialMetadata(file)) continue; |
700 |
|
701 |
if (file.isDirectory()) { |
702 |
folderFiles.put(file, FILE_INFORMATION_EXCLUDED_DIRECTORY); // Excluded dir |
703 |
} else { |
704 |
Mercurial.LOG.log(Level.FINE, "scanFolder exclude: {0}", file); // NOI18N |
705 |
folderFiles.put(file, FILE_INFORMATION_EXCLUDED); |
706 |
} |
707 |
} |
708 |
return folderFiles; |
709 |
} |
710 |
|
696 |
if(interestingFiles == null){ |
711 |
if(interestingFiles == null){ |
697 |
try { |
712 |
try { |
698 |
interestingFiles = HgCommand.getInterestingStatus(rootManagedFolder, dir); |
713 |
interestingFiles = HgCommand.getInterestingStatus(rootManagedFolder, dir); |
Lines 719-748
Link Here
|
719 |
|
734 |
|
720 |
if (interestingFiles == null || interestingFiles.isEmpty()) return folderFiles; |
735 |
if (interestingFiles == null || interestingFiles.isEmpty()) return folderFiles; |
721 |
|
736 |
|
722 |
boolean bInIgnoredDir = SharabilityQuery.getSharability(dir) == SharabilityQuery.NOT_SHARABLE; |
|
|
723 |
if(bInIgnoredDir){ |
724 |
for (File file : files) { |
737 |
for (File file : files) { |
725 |
if (HgUtils.isPartOfMercurialMetadata(file)) continue; |
738 |
if (HgUtils.isPartOfMercurialMetadata(file)) continue; |
726 |
|
739 |
|
727 |
if (file.isDirectory()) { |
740 |
if (file.isDirectory()) { |
|
|
741 |
if (hg.isAdministrative(file) || HgUtils.isIgnored(file)) { |
728 |
folderFiles.put(file, FILE_INFORMATION_EXCLUDED_DIRECTORY); // Excluded dir |
742 |
folderFiles.put(file, FILE_INFORMATION_EXCLUDED_DIRECTORY); // Excluded dir |
729 |
} else { |
743 |
} else { |
730 |
folderFiles.put(file, FILE_INFORMATION_EXCLUDED); |
|
|
731 |
} |
732 |
} |
733 |
return folderFiles; |
734 |
} |
735 |
|
736 |
for (File file : files) { |
737 |
if (HgUtils.isPartOfMercurialMetadata(file)) continue; |
738 |
|
739 |
if (file.isDirectory()) { |
740 |
if (hg.isAdministrative(file) || SharabilityQuery.getSharability(file) == SharabilityQuery.NOT_SHARABLE) |
741 |
folderFiles.put(file, FILE_INFORMATION_EXCLUDED_DIRECTORY); // Excluded dir |
742 |
else |
743 |
folderFiles.put(file, FILE_INFORMATION_UPTODATE_DIRECTORY); |
744 |
folderFiles.put(file, FILE_INFORMATION_UPTODATE_DIRECTORY); |
|
|
745 |
} |
744 |
} else { |
746 |
} else { |
745 |
FileInformation fi = interestingFiles.get(file); |
747 |
FileInformation fi = interestingFiles.get(file); |
|
|
748 |
if (fi == null) { |
749 |
// We have removed -i from HgCommand.getInterestingFiles |
750 |
// so we might have a file we should be ignoring |
751 |
fi = createFileInformation(file); |
752 |
} |
746 |
if (fi != null && fi.getStatus() != FileInformation.STATUS_VERSIONED_UPTODATE) |
753 |
if (fi != null && fi.getStatus() != FileInformation.STATUS_VERSIONED_UPTODATE) |
747 |
folderFiles.put(file, fi); |
754 |
folderFiles.put(file, fi); |
748 |
} |
755 |
} |