Class RevertCommandResult

java.lang.Object
sonia.scm.repository.api.RevertCommandResult

public class RevertCommandResult extends Object
Contains the result of an executed revert command.
Since:
3.8
  • Constructor Details

    • RevertCommandResult

      public RevertCommandResult(String revision, Collection<String> filesWithConflict)
      Parameters:
      revision - revision identifier
      filesWithConflict - a collection of files where conflicts occur
  • Method Details

    • success

      public static RevertCommandResult success(String newHeadRevision)
      Used to indicate a successful revert.
      Parameters:
      newHeadRevision - id of the newly created revert
      Returns:
      RevertCommandResult
    • failure

      public static RevertCommandResult failure(Collection<String> filesWithConflict)
      Used to indicate a failed revert.
      Parameters:
      filesWithConflict - collection of conflicting files
      Returns:
      RevertCommandResult
    • isSuccessful

      public boolean isSuccessful()
      If this returns true, the revert was successful. If this returns false, there may have been problems like a merge conflict after the revert.