reviewboard.diffviewer.models.raw_file_diff_data¶
RawFileDiffData model definition.
- class RawFileDiffData(*args, **kwargs)[source]¶
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.
- binary_hash[source]¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- binary[source]¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- compression[source]¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- extra_data[source]¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property content[source]¶
Return the content of the diff.
The content will be uncompressed (if necessary) and returned as the raw set of bytes originally uploaded.
- recalculate_line_counts(tool)[source]¶
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)¶