reviewboard.diffviewer.models.diffcommit¶
DiffCommit model definition.
- class DiffCommit(*args, **kwargs)[source]¶
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.
- filename[source]¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- diffset[source]¶
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[source]¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- author_email[source]¶
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[source]¶
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[source]¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- committer_name[source]¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- committer_email[source]¶
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[source]¶
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[source]¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- commit_message[source]¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- commit_id[source]¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- parent_id[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 author[source]¶
The author’s name and e-mail address.
This is formatted as
author_name <author_email>
.
- property committer[source]¶
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[source]¶
The committer date in its original timezone.
If the commit has no committer, this will be
None
.
- commit_message_body[source]¶
The body of a commit message.
This will contain the content following a commit summary, if any.
New in version 6.0.
- Type:
- serialize()[source]¶
Serialize to a dictionary.
- Returns:
A dictionary representing this commit.
- Return type:
- __str__()[source]¶
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)¶