@@ -512,23 +512,6 @@ private void checkIndexDown(boolean historyBased, IndexDatabase idb) throws IOEx
512
512
}
513
513
}
514
514
515
- private static void copyDirectory (Path src , Path dest ) throws IOException {
516
- Files .walk (src ).forEach (srcPath -> {
517
- try {
518
- Path destPath = dest .resolve (src .relativize (srcPath ));
519
- if (Files .isDirectory (srcPath )) {
520
- if (!Files .exists (destPath )) {
521
- Files .createDirectory (destPath );
522
- }
523
- return ;
524
- }
525
- Files .copy (srcPath , destPath );
526
- } catch (Exception e ) {
527
- e .printStackTrace ();
528
- }
529
- });
530
- }
531
-
532
515
/**
533
516
* Make sure that history based reindex is not performed for projects
534
517
* where some repositories are not instances of {@code RepositoryWithHistoryTraversal}
@@ -556,7 +539,7 @@ void testHistoryBasedReindexVsProjectWithDiverseRepos(boolean useCvs) throws Exc
556
539
Path destinationPath = Path .of (repository .getSourceRoot (), projectName , subrepoName );
557
540
Path sourcePath = Path .of (repository .getSourceRoot (), "cvs_test" , "cvsrepo" );
558
541
assertTrue (sourcePath .toFile ().exists ());
559
- copyDirectory (sourcePath , destinationPath );
542
+ repository . copyDirectory (sourcePath , destinationPath );
560
543
assertTrue (destinationPath .toFile ().exists ());
561
544
562
545
Repository subRepo = RepositoryFactory .getRepository (destinationPath .toFile ());
0 commit comments