public interface

ScmCompareCommandFactory

com.atlassian.bitbucket.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)
@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

@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