@@ -1009,7 +1009,14 @@ public Collection<RepositoryInfo> getRepositories() {
1009
1009
*/
1010
1010
public void storeHistory (File file , History history ) {
1011
1011
Repository repository = getRepository (file );
1012
+ if (Objects .isNull (repository )) {
1013
+ LOGGER .warning (() -> String .format ("failed to get repository for '%s'" , launderLog (file .toString ())));
1014
+ return ;
1015
+ }
1016
+
1012
1017
if (repository .hasHistoryForDirectories ()) {
1018
+ LOGGER .finer (() -> String .format ("repository %s supports history for directories, skipping '%s'" ,
1019
+ repository , launderLog (file .toString ())));
1013
1020
return ;
1014
1021
}
1015
1022
@@ -1064,14 +1071,15 @@ private Map<Repository, Optional<Exception>> createHistoryCacheReal(Collection<R
1064
1071
try {
1065
1072
latestRev = historyCache .getLatestCachedRevision (repo );
1066
1073
repos2process .put (repo , latestRev );
1074
+ LOGGER .finest (() -> String .format ("latest cached revision %s for repository %s" , latestRev , repo ));
1067
1075
} catch (CacheException he ) {
1068
1076
LOGGER .log (Level .WARNING , String .format ("Failed to retrieve latest cached revision for %s" , repo ), he );
1069
1077
}
1070
1078
}
1071
1079
1072
1080
LOGGER .log (Level .INFO , "Creating history cache for {0} repositories" , repos2process .size ());
1073
1081
Map <Repository , Future <Optional <Exception >>> futures = new HashMap <>();
1074
- try (Progress progress = new Progress (LOGGER , "repository invalidation " , repos2process .size ())) {
1082
+ try (Progress progress = new Progress (LOGGER , "history cache " , repos2process .size ())) {
1075
1083
for (final Map .Entry <Repository , String > entry : repos2process .entrySet ()) {
1076
1084
futures .put (entry .getKey (), executor .submit (() -> {
1077
1085
try {
0 commit comments