dulwich.reflog module¶
Utilities for reading and generating reflogs.
-
class
dulwich.reflog.Entry(old_sha, new_sha, committer, timestamp, timezone, message)¶ Bases:
tupleCreate new instance of Entry(old_sha, new_sha, committer, timestamp, timezone, message)
-
property
committer¶ Alias for field number 2
-
property
message¶ Alias for field number 5
-
property
new_sha¶ Alias for field number 1
-
property
old_sha¶ Alias for field number 0
-
property
timestamp¶ Alias for field number 3
-
property
timezone¶ Alias for field number 4
-
property
-
dulwich.reflog.format_reflog_line(old_sha, new_sha, committer, timestamp, timezone, message)¶ Generate a single reflog line.
- Parameters
old_sha – Old Commit SHA
new_sha – New Commit SHA
committer – Committer name and e-mail
timestamp – Timestamp
timezone – Timezone
message – Message
-
dulwich.reflog.parse_reflog_line(line)¶ Parse a reflog line.
- Parameters
line – Line to parse
- Returns: Tuple of (old_sha, new_sha, committer, timestamp, timezone,
message)
-
dulwich.reflog.read_reflog(f)¶ Read reflog.
- Parameters
f – File-like object
Returns: Iterator over Entry objects