CodeCommit / Paginator / GetBlobDifferences
GetBlobDifferences¶
- class CodeCommit.Paginator.GetBlobDifferences¶
paginator = client.get_paginator('get_blob_differences')
- paginate(**kwargs)¶
Creates an iterator that will paginate through responses from
CodeCommit.Client.get_blob_differences().See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate( repositoryName='string', afterBlobId='string', beforeBlobId='string', contextLines=123, ignoreWhitespace=True|False, PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } )
- Parameters:
repositoryName (string) –
[REQUIRED]
The name of the repository that contains the blobs to compare.
afterBlobId (string) –
[REQUIRED]
The ID of the “after” (destination) blob in the diff. Typically the value of
afterBlob.blobIdfrom aDifferenceobject returned by GetDifferences.beforeBlobId (string) –
The ID of the “before” (source) blob in the diff. Typically the value of
beforeBlob.blobIdfrom aDifferenceobject returned by GetDifferences.If you do not specify a value, the operation returns a diff against an empty before-state. This is equivalent to treating the file as newly added.
contextLines (integer) – The number of unchanged lines of context to include before and after each block of changes in a hunk. Valid values are 0 through 20. Defaults to
3.ignoreWhitespace (boolean) – Specifies whether to ignore whitespace-only changes when computing the diff. When
true, the operation treats lines that differ only in whitespace as unchanged. Defaults tofalse.PaginationConfig (dict) –
A dictionary that provides parameters to control pagination.
MaxItems (integer) –
The total number of items to return. If the total number of items available is more than the value specified in max-items then a
NextTokenwill be provided in the output that you can use to resume pagination.PageSize (integer) –
The size of each page.
StartingToken (string) –
A token to specify where to start paginating. This is the
NextTokenfrom a previous response.
- Return type:
dict
- Returns:
Response Syntax
{ 'hunks': [ { 'beforeStartLine': 123, 'beforeLineCount': 123, 'afterStartLine': 123, 'afterLineCount': 123, 'changes': [ { 'type': 'CONTEXT'|'ADD'|'DELETE', 'beforeLineNumber': 123, 'afterLineNumber': 123, 'content': 'string' }, ] }, ], 'isBinary': True|False, 'beforeBlobSize': 123, 'afterBlobSize': 123, }
Response Structure
(dict) –
hunks (list) –
An ordered list of diff hunks. Each hunk represents a contiguous run of changed and adjacent context lines. The list is empty when the blobs are identical or when the content is binary. The list is also empty when a paginated request has already returned all hunks in earlier pages, in which case
NextTokenis alsonull.(dict) –
A contiguous run of changed lines from a blob diff, together with any surrounding unchanged context lines. Hunks are returned in order from the start of the file to the end. Adjacent or overlapping hunks are merged into a single hunk in the response.
beforeStartLine (integer) –
The 1-based line number in the before blob where this hunk begins. When the hunk consists entirely of additions,
beforeLineCountis0.beforeLineCount (integer) –
The number of lines from the before blob covered by this hunk, including any context lines.
afterStartLine (integer) –
The 1-based line number in the after blob where this hunk begins. When the hunk consists entirely of deletions,
afterLineCountis0.afterLineCount (integer) –
The number of lines from the after blob covered by this hunk, including any context lines.
changes (list) –
An ordered list of line-level changes that make up this hunk. Each entry indicates whether the line is unchanged context, an addition, or a deletion.
(dict) –
A single line-level entry in a diff hunk. Each
DiffChangedescribes one line and its change type: unchanged context, an addition in the after blob, or a deletion from the before blob.type (string) –
The type of change for this line. Possible values:
CONTEXT– Unchanged line included for surrounding context.ADD– Line added in the after blob.DELETE– Line removed from the before blob.
beforeLineNumber (integer) –
The 1-based line number in the before blob. This field is omitted for
ADDlines.afterLineNumber (integer) –
The 1-based line number in the after blob. This field is omitted for
DELETElines.content (string) –
The text content of the line, without the trailing newline.
isBinary (boolean) –
Specifies whether the operation treated the diff content as binary. When
true, the operation does not compute a line-level diff andhunksis empty.beforeBlobSize (integer) –
The size, in bytes, of the blob identified by
beforeBlobId. Returns0when you do not specifybeforeBlobId.afterBlobSize (integer) –
The size, in bytes, of the blob identified by
afterBlobId.