private List<Change> collectDetails(@NotNull List<Change> changes, @NotNull Set<Pair<Boolean, String>> duplicates)
      throws VcsException {
      List<Change> result = new ArrayList<>();

      for (Change change : changes) {
        // directory statuses are already uploaded
        if ((change.getAfterRevision() == null) && (change.getBeforeRevision().getFile().isDirectory())) {
          result.addAll(getChildrenAsChanges(change.getBeforeRevision(), true, duplicates));
        } else if ((change.getBeforeRevision() == null) && (change.getAfterRevision().getFile().isDirectory())) {
          // look for renamed folders contents
          if (myCopiedAddedPaths.containsKey(getRelativePath(change.getAfterRevision()))) {
            result.addAll(getChildrenAsChanges(change.getAfterRevision(), false, duplicates));
          }
        } else if ((change.isIsReplaced() || change.isMoved() || change.isRenamed()) && change.getAfterRevision().getFile().isDirectory()) {
          result.addAll(getChildrenAsChanges(change.getBeforeRevision(), true, duplicates));
          result.addAll(getChildrenAsChanges(change.getAfterRevision(), false, duplicates));
        }
      }

      return result;
    }
private List<Change> collectDetails(@NotNull List<Change> changes, @NotNull Set<Pair<Boolean, String>> duplicates)