UpdateSession (FilePath @NotNull [] contentRoots, UpdatedFiles updatedFiles, ProgressIndicator indicator, @NotNull Ref<SequentialUpdatesContext> context) { List<VcsException> exceptions = new LinkedList<>(); boolean result = true; for (FilePath contentRoot : contentRoots) { if (indicator != null) { indicator.checkCanceled(); } VirtualFile repository = ProjectLevelVcsManager.getInstance(project).getVcsRootFor(contentRoot); if (repository == null) { continue; } try { result &= ProgressManager.getInstance().computeInNonCancelableSection(() -> { HgUpdateConfigurationSettings updateConfiguration = project.getService(HgUpdateConfigurationSettings.class); HgUpdater updater = new HgRegularUpdater(project, repository, updateConfiguration); return updater.update(updatedFiles, indicator, exceptions); }); } catch (VcsException e) { //TODO include module name where exception occurred exceptions.add(e); } } return new UpdateSessionAdapter(exceptions, !result); }