File: //usr/lib/python3/dist-packages/mercurial/utils/__pycache__/storageutil.cpython-310.pyc
o
�]Lb�C � @ s d dl mZ d dlZd dlZddlmZ ddlmZmZm Z ddl
mZmZm
Z
mZ ddlmZ ddlmZ dd lmZ e�e j�Zd
Zdd� Ze�d
�Zdd� Zdd� Zdd� Zdd� Z dd� Z!dd� Z"d%dd�Z#dd� Z$dd� Z%dddddej&d d df d!d"�Z'd#d$� Z(dS )&� )�absolute_importN� )�_)�bin�nullrev�sha1nodeconstants)�dagop�error�mdiff�pycompat)�
repository)�sidedata)�hashutil� c C s^ |t jkrt�� }|�|� n||k r|}|}n|}|}t�|�}|�|� |�| � |�� S )z�Compute the SHA-1 for revision data and its parents.
This hash combines both the current file contents and its history
in a manner that makes it easy to distinguish nodes with the same
content in the revision graph.
)r �nullid� _nullhash�copy�updater �sha1�digest)�text�p1�p2�s�a�b� r �=/usr/lib/python3/dist-packages/mercurial/utils/storageutil.py�hashrevisionsha1$ s
r �
c C sf | dd� dkr
dS t �| d��� }| d|� }i }|�� D ]}|�dd�\}}|||<