Disposable (final @NotNull Collection<? extends VirtualFile> roots, final @NotNull VcsLogRefresher refresher) { MessageBusConnection connection = myProject.getMessageBus().connect(); connection.subscribe(HgVcs.STATUS_TOPIC, new HgUpdater() { @Override public void update(Project project, @Nullable VirtualFile root) { if (root != null && roots.contains(root)) { refresher.refresh(root); } } }); return connection; }