HgRepository (@NotNull VirtualFile root, @NotNull Project project, @NotNull Disposable parentDisposable) { ProgressManager.checkCanceled(); HgVcs vcs = HgVcs.getInstance(project); if (vcs == null) { throw new IllegalArgumentException("Vcs not found for project " + project); } HgRepositoryImpl repository = new HgRepositoryImpl(root, vcs, parentDisposable); repository.setupUpdater(); return repository; }