void (@NotNull final Project project, @NotNull final Collection<HgRepository> repositories, @Nullable HgRepository selectedRepo, @NotNull DataContext dataContext) { final HgUpdateToDialog dialog = new HgUpdateToDialog(project, repositories, selectedRepo); if (dialog.showAndGet()) { FileDocumentManager.getInstance().saveAllDocuments(); final String updateToValue = StringUtil.escapeBackSlashes(dialog.getTargetValue()); final boolean clean = dialog.isRemoveLocalChanges(); final VirtualFile root = dialog.getRepository().getRoot(); HgUpdateCommand.updateRepoTo(project, root, updateToValue, clean, null); } }