File: //kunden/lib/python3/dist-packages/dulwich/__pycache__/reflog.cpython-39.pyc
a
�~�_� � @ sL d Z ddlZddlmZmZmZ e�dg d��Zdd� Zdd � Z d
d� Z
dS )z.Utilities for reading and generating reflogs.
� N)�format_timezone�parse_timezone�ZERO_SHA�Entry��old_sha�new_sha� committerZ timestamp�timezone�messagec C sJ | du rt } | d | d | d tt|���d� d t|� d | S )z�Generate a single reflog line.
Args:
old_sha: Old Commit SHA
new_sha: New Commit SHA
committer: Committer name and e-mail
timestamp: Timestamp
timezone: Timezone
message: Message
N� �ascii� )r �str�int�encoder r � r �0/usr/lib/python3/dist-packages/dulwich/reflog.py�format_reflog_line% s �����r c C sR | � dd�\}}|� dd�\}}}|�dd�\}}}t|||t|�t|�d |�S )z�Parse a reflog line.
Args:
line: Line to parse
Returns: Tuple of (old_sha, new_sha, committer, timestamp, timezone,
message)
r � r � r )�split�rsplitr r r ) �lineZbeginr r r �restr Z
timestamp_strZtimezone_strr r r �parse_reflog_line8 s �r c c s | D ]}t |�V qdS )z_Read reflog.
Args:
f: File-like object
Returns: Iterator over Entry objects
N)r )�fr r r r �read_reflogG s r )�__doc__�collectionsZdulwich.objectsr r r �
namedtupler r r r r r r r �<module> s �