private static Change createChange(@NotNull Project project,
                                     @NotNull Path patchPath,
                                     @NotNull String beforePath,
                                     @NotNull String afterPath,
                                     @NotNull FileStatus fileStatus) {
    File baseDir = new File(Objects.requireNonNull(project.getBasePath()));

    FilePath beforeFilePath = VcsUtil.getFilePath(getAbsolutePath(baseDir, beforePath), false);
    FilePath afterFilePath = VcsUtil.getFilePath(getAbsolutePath(baseDir, afterPath), false);

    ContentRevision beforeRevision = null;
    if (fileStatus != FileStatus.ADDED) {
      beforeRevision = new CurrentContentRevision(beforeFilePath) {
        @Override
        @NotNull
        public VcsRevisionNumber getRevisionNumber() {
          return new TextRevisionNumber(VcsBundle.message("local.version.title"));
        }
      };
    }
    ContentRevision afterRevision = null;
    if (fileStatus != FileStatus.DELETED) {
      afterRevision = new PatchedContentRevision(project, patchPath, beforePath, beforeFilePath, afterFilePath);
    }
    return new Change(beforeRevision, afterRevision, fileStatus);
  }
private static Change createChange(@NotNull Project project,
                                     @NotNull Path patchPath,
                                     @NotNull String beforePath,
                                     @NotNull String afterPath,
                                     @NotNull FileStatus fileStatus)