Class PureRevertCache

java.lang.Object
com.google.gerrit.server.git.PureRevertCache

public class PureRevertCache extends Object
Computes and caches if a change is a pure revert of another change.
  • Method Details

    • module

      public static com.google.inject.Module module()
    • isPureRevert

      public boolean isPureRevert(ChangeNotes claimedRevert) throws IOException, BadRequestException
      Returns true if claimedRevert is a pure (clean) revert of the change that is referenced in Change.getRevertOf().
      Returns:
      true if claimedRevert is a pure (clean) revert.
      Throws:
      IOException - if there was a problem with the storage layer
      BadRequestException - if there is a problem with the provided ChangeNotes
    • isPureRevert

      public boolean isPureRevert(Project.NameKey project, org.eclipse.jgit.lib.ObjectId claimedRevert, org.eclipse.jgit.lib.ObjectId claimedOriginal) throws IOException, BadRequestException
      Returns true if claimedRevert is a pure (clean) revert of claimedOriginal.
      Returns:
      true if claimedRevert is a pure (clean) revert of claimedOriginal.
      Throws:
      IOException - if there was a problem with the storage layer
      BadRequestException - if there is a problem with the provided ObjectIds