@@ -780,10 +780,7 @@ private Collection<RepositoryInfo> addRepositories(File[] files, int allowedNest
780
780
continue ;
781
781
}
782
782
783
- String path ;
784
783
try {
785
- path = file .getCanonicalPath ();
786
-
787
784
Repository repository = null ;
788
785
try {
789
786
repository = RepositoryFactory .getRepository (file , CommandTimeoutType .INDEXER , isNested );
@@ -821,8 +818,7 @@ private Collection<RepositoryInfo> addRepositories(File[] files, int allowedNest
821
818
}
822
819
}
823
820
} else {
824
- LOGGER .log (Level .CONFIG , "Adding <{0}> repository for ''{1}''" ,
825
- new Object []{repository .getClass ().getName (), path });
821
+ LOGGER .log (Level .CONFIG , "Adding repository {0}" , repository );
826
822
827
823
repoList .add (new RepositoryInfo (repository ));
828
824
putRepository (repository );
@@ -937,34 +933,28 @@ public void storeHistory(File file, History history) {
937
933
}
938
934
939
935
private void createHistoryCache (Repository repository , String sinceRevision ) {
940
- String path = repository .getDirectoryName ();
941
- String type = repository .getClass ().getSimpleName ();
942
-
943
936
if (!repository .isHistoryEnabled ()) {
944
937
LOGGER .log (Level .INFO ,
945
- "Skipping history cache creation of {0} repository in ''{1}'' and its subdirectories" ,
946
- new Object []{type , path });
938
+ "Skipping history cache creation for {0} and its subdirectories" , repository );
947
939
return ;
948
940
}
949
941
950
942
if (repository .isWorking ()) {
951
943
Statistics elapsed = new Statistics ();
952
944
953
- LOGGER .log (Level .INFO , "Creating history cache for ''{0}'' ({1}) {2} renamed file handling" ,
954
- new Object []{path , type , repository .isHandleRenamedFiles () ? "with" : "without" });
945
+ LOGGER .log (Level .INFO , "Creating history cache for {0}" , repository );
955
946
956
947
try {
957
948
repository .createCache (historyCache , sinceRevision );
958
949
} catch (Exception e ) {
959
950
LOGGER .log (Level .WARNING ,
960
- String .format ("An error occurred while creating cache for '%s' (%s) " , path , type ), e );
951
+ String .format ("An error occurred while creating cache for %s " , repository ), e );
961
952
}
962
953
963
- elapsed .report (LOGGER , String .format ("Done history cache for '%s' " , path ));
954
+ elapsed .report (LOGGER , String .format ("Done history cache for %s " , repository ));
964
955
} else {
965
956
LOGGER .log (Level .WARNING ,
966
- "Skipping creation of history cache of {0} repository in ''{1}'': Missing SCM dependencies?" ,
967
- new Object []{type , path });
957
+ "Skipping creation of history cache for {0}: Missing SCM dependencies?" , repository );
968
958
}
969
959
}
970
960
@@ -993,10 +983,7 @@ private void createHistoryCacheReal(Collection<Repository> repositories) {
993
983
latestRev = historyCache .getLatestCachedRevision (repo );
994
984
repos2process .put (repo , latestRev );
995
985
} catch (CacheException he ) {
996
- LOGGER .log (Level .WARNING ,
997
- String .format (
998
- "Failed to retrieve latest cached revision for %s" ,
999
- repo .getDirectoryName ()), he );
986
+ LOGGER .log (Level .WARNING , String .format ("Failed to retrieve latest cached revision for %s" , repo ), he );
1000
987
}
1001
988
}
1002
989
@@ -1033,8 +1020,7 @@ private void createHistoryCacheReal(Collection<Repository> repositories) {
1033
1020
try {
1034
1021
historyCache .optimize ();
1035
1022
} catch (CacheException he ) {
1036
- LOGGER .log (Level .WARNING ,
1037
- "Failed optimizing the history cache database" , he );
1023
+ LOGGER .log (Level .WARNING , "Failed optimizing the history cache database" , he );
1038
1024
}
1039
1025
elapsed .report (LOGGER , "Done history cache for all repositories" , "indexer.history.cache" );
1040
1026
setHistoryIndexDone ();
0 commit comments