public interface

CompareService

com.atlassian.bitbucket.compare.CompareService

Class Overview

Compares two commits. Commits can be specified by ID or by branch or tag name. For SCMs which have a concept of a short name, such as Git with its shortened SHA-1s and unqualified ref names, the fully-qualified version should be used wherever possible to avoid ambiguity.

Summary

Public Methods
void streamChanges(CompareRequest request, ChangeCallback callback)
Streams changes contained on the from ref but not on the to ref.
void streamCommits(CompareRequest request, CommitCallback callback)
Streams commits reachable from the from ref but not reachable from the to ref.
void streamDiff(CompareDiffRequest request, DiffContentCallback callback)
Streams the diff of the changes contained on the from ref but not on the to ref.

Public Methods

public void streamChanges (CompareRequest request, ChangeCallback callback)

Streams changes contained on the from ref but not on the to ref.

Note: Change information is not paged. Instead, it is bounded by a hard cap specified by the property page.max.changes. See the configuration documentation for more information.

Parameters
request describes the refs to compare
callback a callback for receiving the changes

public void streamCommits (CompareRequest request, CommitCallback callback)

Streams commits reachable from the from ref but not reachable from the to ref.

Parameters
request describes the refs to compare
callback a callback for receiving the commits

public void streamDiff (CompareDiffRequest request, DiffContentCallback callback)

Streams the diff of the changes contained on the from ref but not on the to ref.

Note: Diff output is not paged. Instead, it is bounded by hard caps specified by the following properties:

  • page.max.diff.lines, specifying the max number of diff lines to output
  • page.max.source.length, specifying the max length of each diff line
See the configuration documentation for more information.

Parameters
request describes the refs to compare
callback a callback for receiving the diff output