DiffCommit model definition.
- class DiffCommit(*args, **kwargs)¶
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.
A timestamp used for generating HTTP caching headers.
The author’s name and e-mail address.
This is formatted as
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 both
committer_emailare set. Otherwise, it be whichever is defined. If neither are defined, this will be
- property committer_date¶
The committer date in its original timezone.
If the commit has no committer, this will be
The first line of the commit message.
The first line of the commit message, truncated to 80 characters.
Serialize to a dictionary.
A dictionary representing this commit.
- Return type
Return the total line counts of all child FileDiffs.