Interface FileInfoJson

All Known Implementing Classes:
FileInfoJsonImpl

public interface FileInfoJson
Compute and return the list of modified files between two commits.
  • Method Summary

    Modifier and Type
    Method
    Description
    getFileInfoMap(Change change, PatchSet patchSet)
    Computes the list of modified files for a given change and patchset against the parent commit.
    getFileInfoMap(Change change, org.eclipse.jgit.lib.ObjectId objectId, int parentNum)
    Computes the list of modified files for a given change and patchset against its parent.
    getFileInfoMap(Change change, org.eclipse.jgit.lib.ObjectId objectId, PatchSet base)
    Computes the list of modified files for a given change and patchset identified by its objectId against a specified base patchset.
    getFileInfoMap(Project.NameKey project, org.eclipse.jgit.lib.ObjectId objectId, int parentNum)
    Computes the list of modified files for a given project and commit against its parent.
  • Method Details

    • getFileInfoMap

      default Map<String,FileInfo> getFileInfoMap(Change change, PatchSet patchSet) throws ResourceConflictException, PatchListNotAvailableException
      Computes the list of modified files for a given change and patchset against the parent commit.
      Parameters:
      change - a Gerrit change.
      patchSet - a single revision of the change.
      Returns:
      a mapping of the file paths to their related diff information.
      Throws:
      ResourceConflictException
      PatchListNotAvailableException
    • getFileInfoMap

      default Map<String,FileInfo> getFileInfoMap(Change change, org.eclipse.jgit.lib.ObjectId objectId, int parentNum) throws ResourceConflictException, PatchListNotAvailableException
      Computes the list of modified files for a given change and patchset against its parent. For merge commits, callers can use 0, 1, 2, etc... to choose a specific parent. The first parent is 0.
      Parameters:
      change - a Gerrit change.
      objectId - a commit SHA-1 identifying a patchset commit.
      parentNum - 1-based integer identifying the parent number used for comparison. If zero, the only parent will be used or the auto-merge if newCommit is a merge commit.
      Returns:
      a mapping of the file paths to their related diff information.
      Throws:
      ResourceConflictException
      PatchListNotAvailableException
    • getFileInfoMap

      Map<String,FileInfo> getFileInfoMap(Change change, org.eclipse.jgit.lib.ObjectId objectId, PatchSet base) throws ResourceConflictException, PatchListNotAvailableException
      Computes the list of modified files for a given change and patchset identified by its objectId against a specified base patchset.
      Parameters:
      change - a Gerrit change.
      objectId - a commit SHA-1 identifying a patchset commit.
      base - a base patchset to compare the commit identified by objectId against.
      Returns:
      a mapping of the file paths to their related diff information.
      Throws:
      ResourceConflictException
      PatchListNotAvailableException
    • getFileInfoMap

      Map<String,FileInfo> getFileInfoMap(Project.NameKey project, org.eclipse.jgit.lib.ObjectId objectId, int parentNum) throws ResourceConflictException, PatchListNotAvailableException
      Computes the list of modified files for a given project and commit against its parent. For merge commits, callers can use 0, 1, 2, etc... to choose a specific parent. The first parent is 0. A value of -1 for parent can be passed to use the default base commit, which is the only parent for commits having only one parent, or the auto-merge otherwise.
      Parameters:
      project - a project identifying a repository.
      objectId - a commit SHA-1 identifying a patchset commit.
      parentNum - 1-based integer identifying the parent number used for comparison. If zero, the only parent will be used or the auto-merge if newCommit is a merge commit.
      Returns:
      a mapping of the file paths to their related diff information.
      Throws:
      ResourceConflictException
      PatchListNotAvailableException