Class DiffResultCommandBuilder

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

public class DiffResultCommandBuilder extends Object
  • Method Details

    • setOffset

      public DiffResultCommandBuilder setOffset(Integer offset)
      Sets an offset for the first file diff entry that will be created in the result. If there are fewer entries than the given offset, an empty result will be created.
      Parameters:
      offset - The number of the first diff file entry that will be added to the result.
      Returns:
      This builder instance.
      Since:
      2.15.0
    • setLimit

      public DiffResultCommandBuilder setLimit(Integer limit)
      Sets a limit for the file diff entries that will be created.
      Parameters:
      limit - The maximum number of file diff entries that will be created in the result.
      Returns:
      This builder instance.
      Since:
      2.15.0
    • getDiffResult

      public DiffResult getDiffResult() throws IOException
      Returns the content of the difference as parsed objects.
      Throws:
      IOException
    • setAncestorChangeset

      public DiffResultCommandBuilder setAncestorChangeset(String revision)
      Compute the incoming changes of the branch set with setRevision(String) in respect to the changeset given here. In other words: What changes would be new to the ancestor changeset given here when the branch would be merged into it. Requires feature Feature.INCOMING_REVISION!
      Returns:
      this
    • setPath

      public DiffResultCommandBuilder setPath(String path)
      Show the difference only for the given path.
      Parameters:
      path - path for difference
      Returns:
      this
    • setRevision

      public DiffResultCommandBuilder setRevision(String revision)
      Show the difference only for the given revision or (using setAncestorChangeset(String)) between this and another revision.
      Parameters:
      revision - revision for difference
      Returns:
      this
    • setIgnoreWhitespace

      public DiffResultCommandBuilder setIgnoreWhitespace(IgnoreWhitespaceLevel ignoreWhitespace)