reviewboard.diffviewer.models¶
Model re-exports for reviewboard.diffviewer.*.
- class DiffCommit(*args, **kwargs)¶
Bases:
Model
A representation of a commit from a version control system.
A DiffSet on a Review Request that represents a commit history will have one or more DiffCommits. Each DiffCommit will have one or more associated FileDiffs (which also belong to the parent DiffSet).
The information stored herein is intended to fully represent the state of a single commit in that history. The series of DiffCommits can be used to re-create the original series of commits posted for review.
- NAME_MAX_LENGTH = 256¶
The maximum length of the author_name and committer_name fields.
- EMAIL_MAX_LENGTH = 256¶
The maximum length of the author_email and committer_email fields.
- ISO_DATE_FORMAT = '%Y-%m-%d %H:%M:%S%z'¶
The date format that this model uses.
- filename¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- diffset¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- author_name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- author_email¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- author_date_utc¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- author_date_offset¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- committer_name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- committer_email¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- committer_date_utc¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- committer_date_offset¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- commit_message¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- commit_id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- parent_id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- last_modified¶
A timestamp used for generating HTTP caching headers.
- extra_data¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <reviewboard.diffviewer.managers.DiffCommitManager object>¶
- property author¶
The author’s name and e-mail address.
This is formatted as
author_name <author_email>
.
- property author_date¶
The author date in its original timezone.
- property committer¶
The committer’s name and e-mail address (if applicable).
This will be formatted as
committer_name <committer_email>
if bothcommitter_name
andcommitter_email
are set. Otherwise, it be whichever is defined. If neither are defined, this will beNone
.
- property committer_date¶
The committer date in its original timezone.
If the commit has no committer, this will be
None
.
- summary¶
The first line of the commit message.
- commit_message_body¶
The body of a commit message.
This will contain the content following a commit summary, if any.
New in version 6.0.
- Type:
- summary_truncated¶
The first line of the commit message, truncated to 80 characters.
- serialize()¶
Serialize to a dictionary.
- Returns:
A dictionary representing this commit.
- Return type:
- get_total_line_counts()¶
Return the total line counts of all child FileDiffs.
- __str__()¶
Return a human-readable representation of the commit.
- Returns:
The commit ID and its summary (if available).
- Return type:
- __annotations__ = {}¶
- diffset_id¶
- files¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- get_extra_data_json()¶
- get_next_by_author_date_utc(*, field=<django.db.models.fields.DateTimeField: author_date_utc>, is_next=True, **kwargs)¶
- get_next_by_last_modified(*, field=<django.db.models.fields.DateTimeField: last_modified>, is_next=True, **kwargs)¶
- get_previous_by_author_date_utc(*, field=<django.db.models.fields.DateTimeField: author_date_utc>, is_next=False, **kwargs)¶
- get_previous_by_last_modified(*, field=<django.db.models.fields.DateTimeField: last_modified>, is_next=False, **kwargs)¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- set_extra_data_json(json)¶
- class DiffSet(*args, **kwargs)¶
Bases:
Model
A revisioned collection of FileDiffs.
- name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- revision¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- timestamp¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- basedir¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- repository¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- diffcompat¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- base_commit_id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- commit_count = <djblets.db.fields.relation_counter_field.RelationCounterField: commit_count>¶
- extra_data¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <reviewboard.diffviewer.managers.DiffSetManager object>¶
- property is_commit_series_finalized¶
Whether the commit series represented by this DiffSet is finalized.
When a commit series is finalized, no more
DiffCommits
can be added to it.
- finalize_commit_series(cumulative_diff, validation_info, parent_diff=None, request=None, validate=True, save=False)¶
Finalize the commit series represented by this DiffSet.
- Parameters:
cumulative_diff (
bytes
) – The cumulative diff of the entire commit series.validation_info (
dict
) – The parsed validation information.parent_diff (
bytes
, optional) – The parent diff of the cumulative diff, if any.request (
django.http.HttpRequest
, optional) – The HTTP request from the client, if any.validate (
bool
, optional) – Whether or not the cumulative diff (and optional parent diff) should be validated, up to and including file existence checks.save (
bool
, optional) –Whether to save the model after finalization. Defaults to
False
.If
True
, only theextra_data
field will be updated.If
False
, the caller must save this model.
- Returns:
The list of created FileDiffs.
- Return type:
- Raises:
django.core.exceptions.ValidationError – The commit series failed validation.
- get_total_line_counts()¶
Return the total line counts of all child FileDiffs.
- property per_commit_files¶
The files limited to per-commit diffs.
This will cache the results for future lookups. If the set of all files has already been fetched with
prefetch_related()
, no queries will be performed.
- property cumulative_files¶
The files limited to the cumulative diff.
This will cache the results for future lookups. If the set of all files has been already been fetched with
prefetch_related()
, no queries will be incurred.
- update_revision_from_history(diffset_history)¶
Update the revision of this diffset based on a diffset history.
This will determine the appropriate revision to use for the diffset, based on how many other diffsets there are in the history. If there aren’t any, the revision will be set to 1.
- Parameters:
diffset_history (
reviewboard.diffviewer.models.diffset_history.DiffSetHistory
) – The diffset history used to compute the new revision.- Raises:
ValueError – The revision already has a valid value set, and cannot be updated.
- save(**kwargs)¶
Save this diffset.
This will set an initial revision of 1 if this is the first diffset in the history, and will set it to on more than the most recent diffset otherwise.
- Parameters:
**kwargs (
dict
) – Extra arguments for the save call.
- __str__()¶
Return a human-readable representation of the DiffSet.
- Returns:
A human-readable representation of the DiffSet.
- Return type:
- __annotations__ = {}¶
- commits¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- decrement_commit_count(*args, **kwargs)¶
- files¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- get_extra_data_json()¶
- get_next_by_timestamp(*, field=<django.db.models.fields.DateTimeField: timestamp>, is_next=True, **kwargs)¶
- get_previous_by_timestamp(*, field=<django.db.models.fields.DateTimeField: timestamp>, is_next=False, **kwargs)¶
- history_id¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- increment_commit_count(*args, **kwargs)¶
- reinit_commit_count()¶
- reload_commit_count()¶
- repository_id¶
- review_request_draft¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- review_set¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- set_extra_data_json(json)¶
- class DiffSetHistory(*args, **kwargs)¶
Bases:
Model
A collection of diffsets.
This gives us a way to store and keep track of multiple revisions of diffsets belonging to an object.
- name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- timestamp¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- last_diff_updated¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- extra_data¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- __str__()¶
Return a human-readable representation of the model.
- Returns:
A human-readable representation of the model.
- Return type:
- __annotations__ = {}¶
- diffsets¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- get_extra_data_json()¶
- get_next_by_timestamp(*, field=<django.db.models.fields.DateTimeField: timestamp>, is_next=True, **kwargs)¶
- get_previous_by_timestamp(*, field=<django.db.models.fields.DateTimeField: timestamp>, is_next=False, **kwargs)¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- review_request¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- set_extra_data_json(json)¶
- class FileDiff(*args, **kwargs)¶
Bases:
Model
A diff of a single file.
This contains the patch and information needed to produce original and patched versions of a single file in a repository.
- COPIED = 'C'¶
- DELETED = 'D'¶
- MODIFIED = 'M'¶
- MOVED = 'V'¶
- STATUSES = (('C', 'Copied'), ('D', 'Deleted'), ('M', 'Modified'), ('V', 'Moved'))¶
- diffset¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- commit¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- source_file¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- dest_file¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- source_revision¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- dest_detail¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- binary¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- status¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- diff64¶
Property-like class used to store/retrieve Base64 values.
This works much like a property, and takes care of encoding strings for storage and decoding them on retrieval. It’s set internally by
Base64Field
in place of the normal field attribute.
- legacy_diff_hash¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- diff_hash¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- parent_diff64¶
Property-like class used to store/retrieve Base64 values.
This works much like a property, and takes care of encoding strings for storage and decoding them on retrieval. It’s set internally by
Base64Field
in place of the normal field attribute.
- legacy_parent_diff_hash¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- parent_diff_hash¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- extra_data¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <reviewboard.diffviewer.managers.FileDiffManager object>¶
- property source_file_display¶
The displayed filename for the source/original file.
This may be different than
source_file
, as the associatedSCMTool
may normalize it for display.- Type:
- property dest_file_display¶
The displayed filename for the destination/modified file.
This may be different than
dest_file
, as the associatedSCMTool
may normalize it for display.- Type:
- property deleted¶
- property copied¶
- property moved¶
- property modified¶
Whether this file is a modification to an existing file.
- property is_new¶
- property is_symlink¶
Whether this file represents a symlink.
This represents the value of the
is_symlink
key inextra_data
.New in version 4.0.6.
- Type:
- property old_symlink_target¶
The old target for the symlink.
This represents the value of the
old_symlink_target
key inextra_data
.New in version 4.0.6.
- Type:
- property new_symlink_target¶
The new target for the symlink.
This represents the value of the
new_symlink_target
key inextra_data
.New in version 4.0.6.
- Type:
- property old_unix_mode¶
The old UNIX permissions mode for the file.
This represents the value of the
old_unix_mode
key inextra_data
. It is stored as a string representing an octal.New in version 4.0.6.
- Type:
- property new_unix_mode¶
The new UNIX permissions mode for the file.
This represents the value of the
new_unix_mode
key inextra_data
. It is stored as a string representing an octal.New in version 4.0.6.
- Type:
- property status_string¶
The FileDiff’s status as a human-readable string.
- property diff¶
- property is_diff_empty¶
Whether or not the diff is empty.
- property parent_diff¶
- is_parent_diff_empty(cache_only=False)¶
Return whether or not the parent diff is empty.
- property orig_sha1¶
The computed SHA1 hash of the original file.
This may be
None
, in which case it will be populated when the diff is next viewed.
- property patched_sha1¶
The computed SHA1 hash of the patched file.
This may be
None
, in which case it will be populated when the diff is next viewed.
- property orig_sha256¶
The computed SHA256 hash of the original file.
This may be
None
, in which case it will be populated when the diff is next viewed.New in version 4.0.
- property patched_sha256¶
The computed SHA256 hash of the patched file.
This may be
None
, in which case it will be populated when the diff is next viewed.New in version 4.0.
- property encoding¶
The encoding of the source and patched file.
This will check the
encoding
key inextra_data
. If not available, then this will beNone
.New in version 4.0.
- get_line_counts()¶
Return the stored line counts for the diff.
This will return all the types of line counts that can be set.
- Returns:
A dictionary with the following keys:
raw_insert_count
raw_delete_count
insert_count
delete_count
replace_count
equal_count
total_line_count
These are not all guaranteed to have values set, and may instead be
None
. Onlyraw_insert_count
,raw_delete_count
insert_count
, anddelete_count
are guaranteed to have values set.If there isn’t a processed number of inserts or deletes stored, then
insert_count
anddelete_count
will be equal to the raw versions.- Return type:
- set_line_counts(raw_insert_count=None, raw_delete_count=None, insert_count=None, delete_count=None, replace_count=None, equal_count=None, total_line_count=None)¶
Set the line counts on the FileDiff.
There are many types of useful line counts that can be set.
- Parameters:
raw_insert_count (
int
, optional) –The insert count on the original patch.
This will be set on the
reviewboard.diffviewer.models.raw_file_diff_data.RawFileDiffData
as well.raw_delete_count (
int
, optional) –The delete count in the original patch.
This will be set on the
reviewboard.diffviewer.models.raw_file_diff_data.RawFileDiffData
as well.insert_count (
int
, optional) – The number of lines that were inserted in the diff.delete_count (
int
, optional) – The number of lines that were deleted in the diff.replace_count (
int
, optional) – The number of lines that were replaced in the diff.equal_count (
int
, optional) – The number of lines that were identical in the diff.total_line_count (
int
, optional) – The total line count.
- get_ancestors(minimal, filediffs=None, update=True)¶
Return the ancestors of this FileDiff.
This will update the ancestors of this
FileDiff
and all its ancestors if they are not already cached.- Parameters:
minimal (
bool
) –Whether or not the minimal set of ancestors are returned.
The minimal set of ancestors does not include ancestors where the file was deleted. In other words, if a file is deleted and then re-created, the deletion will not appear in the re-created file’s ancestor list.
filediffs (
iterable
ofFileDiff
, optional) – An optional list of FileDiffs to check for ancestors so that a query does not have to be performed.update (
bool
, optional) –Whether or not to cache the results in the database.
If
True
and the results have not already been cached, this FileDiff and its ancestors will all be updated.
- Returns:
The ancestor
FileDiffs
, in application order.- Return type:
- get_repository()¶
Return the repository this diff applies to.
New in version 4.0.
- Returns:
The repository used for any operations for this FileDiff.
- Return type:
- get_base_filediff(base_commit, ancestors=None)¶
Return the base FileDiff within a commit range.
This looks through the FileDiff’s ancestors, looking for the most recent one that equals or precedes
base_commit
.- Parameters:
base_commit (
reviewboard.diffviewer.models.diffcommit.DiffCommit
) – The newest commit that the resulting base FileDiff can be associated with.ancestors (
list
ofFileDiff
, optional) – A pre-fetched list of FileDiff ancestors. If not provided, a list will be fetched.
- Returns:
The base FileDiff, if one could be found.
None
will be returned if no base could be found.- Return type:
- __str__()¶
Return a human-readable representation of the model.
- Returns:
A human-readable representation of the model.
- Return type:
- __annotations__ = {}¶
- added_attachments¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- comments¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- commit_id¶
- diff_hash_id¶
- diffset_id¶
- get_diff64_base64()¶
- get_extra_data_json()¶
- get_parent_diff64_base64()¶
- get_status_display(*, field=<django.db.models.fields.CharField: status>)¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- interdiff_comments¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- legacy_diff_hash_id¶
- legacy_parent_diff_hash_id¶
- parent_diff_hash_id¶
- set_extra_data_json(json)¶
- class LegacyFileDiffData(*args, **kwargs)¶
Bases:
Model
Deprecated, legacy class for base64-encoded diff data.
This is no longer populated, and exists solely to store legacy data that has not been migrated to
RawFileDiffData
.- binary_hash¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- binary¶
Property-like class used to store/retrieve Base64 values.
This works much like a property, and takes care of encoding strings for storage and decoding them on retrieval. It’s set internally by
Base64Field
in place of the normal field attribute.
- extra_data¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- __annotations__ = {}¶
- filediffs¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- get_binary_base64()¶
- get_extra_data_json()¶
- objects = <django.db.models.manager.Manager object>¶
- parent_filediffs¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- set_extra_data_json(json)¶
- class RawFileDiffData(*args, **kwargs)¶
Bases:
Model
Stores raw diff data as binary content in the database.
This is the class used in Review Board 2.5+ to store diff content. Unlike in previous versions, the content is not base64-encoded. Instead, it is stored either as bzip2-compressed data (if the resulting compressed data is smaller than the raw data), or as the raw data itself.
- COMPRESSION_BZIP2 = 'B'¶
- COMPRESSION_CHOICES = (('B', 'BZip2-compressed'),)¶
- binary_hash¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- binary¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- compression¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- extra_data¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <reviewboard.diffviewer.managers.RawFileDiffDataManager object>¶
- property content¶
Return the content of the diff.
The content will be uncompressed (if necessary) and returned as the raw set of bytes originally uploaded.
- property insert_count¶
- property delete_count¶
- recalculate_line_counts(tool)¶
Recalculates the insert_count and delete_count values.
This will attempt to re-parse the stored diff and fetch the line counts through the parser.
- __annotations__ = {}¶
- filediffs¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- get_compression_display(*, field=<django.db.models.fields.CharField: compression>)¶
- get_extra_data_json()¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- parent_filediffs¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- set_extra_data_json(json)¶