public interface

ScmCompareCommandFactory

com.atlassian.stash.scm.compare.ScmCompareCommandFactory

Class Overview

Creates commands which allow comparing arbitrary refs or commits. Each method accepts a set of CommandParameters which are used to control the command's behaviour and output.

Plugin developers: This is probably not the interface you want to use. CompareService automatically chooses the correct SCM based on the repository, and provides a more stable, compatible API. The documentation for each method on this interface includes a link to the API service method or methods which expose it.

Summary

Public Methods
@Nonnull Command<Void> changes(CompareChangeCommandParameters parameters, ChangeCallback callback)
@Deprecated @Nonnull Command<Void> commits(ChangesetCallback callback)
This method is deprecated. in 3.7 for removal in 4.0. All things "changeset" are being renamed to "commit", the more common term for the data they represent. This method will be replaced by commits(CommitCallback) in 4.0.
@Nonnull Command<Void> commits(CommitCallback callback)
@Nonnull Command<Void> diff(CompareDiffCommandParameters parameters, DiffContentCallback callback)

Public Methods

@Nonnull public Command<Void> changes (CompareChangeCommandParameters parameters, ChangeCallback callback)

Parameters
parameters parameters describing how many changes to stream, and potentially for which paths
callback a callback to receive changes
Returns
  • a command which, when executed, will stream the changes between the from ref and the to ref

@Deprecated @Nonnull public Command<Void> commits (ChangesetCallback callback)

This method is deprecated.
in 3.7 for removal in 4.0. All things "changeset" are being renamed to "commit", the more common term for the data they represent. This method will be replaced by commits(CommitCallback) in 4.0.

Parameters
callback a callback to receive commits
Returns
  • a command which, when executed, will stream the commits that are reachable from the from ref and not reachable from the to ref

@Nonnull public Command<Void> commits (CommitCallback callback)

Parameters
callback a callback to receive commits
Returns
  • a command which, when executed, will stream the commits that are reachable from the from ref and not reachable from the to ref

@Nonnull public Command<Void> diff (CompareDiffCommandParameters parameters, DiffContentCallback callback)

Parameters
parameters parameters describing the paths to diff and what should be included in the diffs generated
callback a callback to receive the diff
Returns
  • a command which, when executed, will stream the diff between the from ref and the to ref for the specified paths