49
49
import java .util .ListIterator ;
50
50
import java .util .Map ;
51
51
import java .util .concurrent .CountDownLatch ;
52
+ import java .util .concurrent .atomic .AtomicInteger ;
52
53
import java .util .logging .Level ;
53
54
import java .util .logging .Logger ;
54
55
import java .util .zip .GZIPInputStream ;
@@ -381,12 +382,12 @@ private void finishStore(Repository repository, String latestRev) {
381
382
// failure), do not create the CachedRevision file as this would
382
383
// create confusion (once it starts working again).
383
384
LOGGER .log (Level .WARNING ,
384
- "Could not store history for repo {0}" ,
385
+ "Could not store history for repository {0}" ,
385
386
repository .getDirectoryName ());
386
387
} else {
387
388
storeLatestCachedRevision (repository , latestRev );
388
389
LOGGER .log (Level .FINE ,
389
- "Done storing history for repo {0}" ,
390
+ "Done storing history for repository {0}" ,
390
391
repository .getDirectoryName ());
391
392
}
392
393
}
@@ -415,7 +416,7 @@ public void store(History history, Repository repository)
415
416
}
416
417
417
418
LOGGER .log (Level .FINE ,
418
- "Storing history for repo {0}" ,
419
+ "Storing history for repository {0}" ,
419
420
new Object [] {repository .getDirectoryName ()});
420
421
421
422
// Firstly store the history for the top-level directory.
@@ -471,6 +472,7 @@ public void store(History history, Repository repository)
471
472
* which will be handled separately below.
472
473
*/
473
474
final File root = RuntimeEnvironment .getInstance ().getSourceRootFile ();
475
+ int fileHistoryCount = 0 ;
474
476
for (Map .Entry <String , List <HistoryEntry >> map_entry : map .entrySet ()) {
475
477
try {
476
478
if (env .isHandleHistoryOfRenamedFiles () &&
@@ -484,8 +486,11 @@ public void store(History history, Repository repository)
484
486
485
487
doFileHistory (map_entry .getKey (), map_entry .getValue (),
486
488
env , repository , null , root , false );
489
+ fileHistoryCount ++;
487
490
}
488
491
492
+ LOGGER .log (Level .FINE , "Stored history for {0} files" , fileHistoryCount );
493
+
489
494
if (!env .isHandleHistoryOfRenamedFiles ()) {
490
495
finishStore (repository , latestRev );
491
496
return ;
@@ -527,6 +532,7 @@ public void store(History history, Repository repository)
527
532
}
528
533
final Repository repositoryF = repository ;
529
534
final CountDownLatch latch = new CountDownLatch (renamed_map .size ());
535
+ AtomicInteger renamedFileHistoryCount = new AtomicInteger ();
530
536
for (final Map .Entry <String , List <HistoryEntry >> map_entry : renamed_map .entrySet ()) {
531
537
RuntimeEnvironment .getHistoryRenamedExecutor ().submit (new Runnable () {
532
538
@ Override
@@ -536,6 +542,7 @@ public void run() {
536
542
env , repositoryF ,
537
543
new File (env .getSourceRootPath () + map_entry .getKey ()),
538
544
root , true );
545
+ renamedFileHistoryCount .getAndIncrement ();
539
546
} catch (Exception ex ) {
540
547
// We want to catch any exception since we are in thread.
541
548
LOGGER .log (Level .WARNING ,
@@ -554,6 +561,8 @@ public void run() {
554
561
} catch (InterruptedException ex ) {
555
562
LOGGER .log (Level .SEVERE , "latch exception " ,ex );
556
563
}
564
+ LOGGER .log (Level .FINE , "Stored history for {0} renamed files" ,
565
+ renamedFileHistoryCount .intValue ());
557
566
finishStore (repository , latestRev );
558
567
}
559
568
0 commit comments