Package com.atlassian.bitbucket.compare
Interface CompareService
public interface CompareService
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.-
Method Summary
Modifier and TypeMethodDescriptionvoid
streamChanges
(CompareRequest request, ChangeCallback callback) void
streamCommits
(CompareRequest request, CommitCallback callback) void
streamDiff
(CompareDiffRequest request, DiffContentCallback callback)
-
Method Details
-
getDiffStatsSummary
Retrieve the diff stats summary for changes specified byfrom ref
, but not on theto ref
.The stats summary include the total number of modified files, added lines, and deleted lines.
- Parameters:
request
- can include the repository, starting and terminating commits, paths to filter by and other properties describing the diff- Returns:
- a
DiffStatsSummary
for the specified request - Since:
- 9.1
-
streamChanges
Streams changes contained on thefrom ref
but not on theto 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 comparecallback
- a callback for receiving the changes
-
streamCommits
- Parameters:
request
- describes the refs to comparecallback
- a callback for receiving the commits
-
streamDiff
Streams the diff of the changes contained on thefrom ref
but not on theto 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 outputpage.max.source.length
, specifying the max length of each diff line
- Parameters:
request
- describes the refs to comparecallback
- a callback for receiving the diff output
-