public void acceptOneVersion(@NotNull Collection<? extends GitConflict> conflicts,
                               @NotNull Collection<? extends VirtualFile> reversedRoots,
                               boolean takeTheirs) throws VcsException {
    try {
      MultiMap<VirtualFile, GitConflict> byRoot = groupConflictsByRoot(conflicts);

      for (VirtualFile root : byRoot.keySet()) {
        Collection<GitConflict> rootConflicts = byRoot.get(root);
        boolean isReversed = reversedRoots.contains(root);
        ConflictSide side = isReversed == takeTheirs ? ConflictSide.OURS : ConflictSide.THEIRS;

        GitMergeUtil.acceptOneVersion(myProject, root, rootConflicts, side);
        GitMergeUtil.markConflictResolved(myProject, root, rootConflicts, side);
      }
    }
    finally {
      List<FilePath> filePaths = ContainerUtil.map(conflicts, GitConflict::getFilePath);
      VcsDirtyScopeManager.getInstance(myProject).filePathsDirty(filePaths, null);

      List<VirtualFile> virtualFiles = ContainerUtil.mapNotNull(filePaths, GitMergeHandler::getExistingFileOrParent);
      VfsUtil.markDirtyAndRefresh(true, false, true, VfsUtilCore.toVirtualFileArray(virtualFiles));
    }
  }
public void acceptOneVersion(@NotNull Collection<? extends GitConflict> conflicts,
                               @NotNull Collection<? extends VirtualFile> reversedRoots,
                               boolean takeTheirs)