CommitHeader

class dsviper.CommitHeader

Bases: object

What identifies a commit, without its content.

Its id and parent, timestamp, label, type, and - for a merge - the commit it targets.

Note: Not directly instantiable.

commit_id() → ValueCommitId

Return the commit_id of the commit.

commit_type() → str

Return the type (‘Mutations’, ‘Disable’, ‘Enable’ or ‘Merge’).

label() → str

Return the label the commit was created under.

parent_commit_id() → ValueCommitId

Return the commit_id of the parent commit.

target_commit_id() → ValueCommitId

Return the commit_id of the target commit.

timestamp() → float

Return when the commit was created, in seconds since the epoch.

It does not order commits. It is written to the millisecond, and a burst (a dispatch and the undo that follows it) shares one value, so sorting on it leaves the order to whatever the sort falls back on. Walk CommitNode.build for the order, or take first_commit_id and last_commit_id for the ends.