void (VirtualFile repo, Collection<? extends VirtualFile> files, @Nullable ProgressIndicator indicator) { final List<List<String>> chunks = VcsFileUtil.chunkFiles(repo, files); int currentChunk = 0; for (List<String> paths : chunks) { if (indicator != null) { if (indicator.isCanceled()) return; indicator.setFraction((double)currentChunk / chunks.size()); currentChunk++; } new HgCommandExecutor(myProject).executeInCurrentThread(repo, "add", paths); } }