§
    	^µcV  ã                   ó|   — d dl Z d dlZd dlZddlmZ dZe j         G d„ de¦  «        ¦   «         Zd„ Z	d„ Z
d	„ Zd
„ ZdS )é    Né   )Úerroriÿÿÿc                   ó.   ‡ — e Zd ZdZˆ fd„Zd„ Zd„ Zˆ xZS )Ú	timestampaì  
    A Unix timestamp with optional nanoseconds precision,
    modulo 2**31 seconds.

    A 3-tuple containing:

    `truncated_seconds`: seconds since the Unix epoch,
    truncated to its lower 31 bits

    `subsecond_nanoseconds`: number of nanoseconds since `truncated_seconds`.
    When this is zero, the sub-second precision is considered unknown.

    `second_ambiguous`: whether this timestamp is still "reliable"
    (see `reliable_mtime_of`) if we drop its sub-second component.
    c                 ó|   •— |\  }}}|t           z  ||f}t          t          | ¦  «                             | |¦  «        S )N)Ú	rangemaskÚsuperr   Ú__new__)ÚclsÚvalueÚtruncated_secondsÚsubsec_nanosÚsecond_ambiguousÚ	__class__s        €úC/usr/lib/python3/dist-packages/mercurial/dirstateutils/timestamp.pyr
   ztimestamp.__new__#   sC   ø€ Ø<AÑ9Ð˜<Ð)9Ø"¥YÑ.°Ð>NÐOˆÝ•Y Ñ$Ô$×,Ò,¨S°%Ñ8Ô8Ð8ó    c                 ó*   — t          j        d¦  «        ‚©Nz+timestamp should never be compared directly©r   ÚProgrammingError©ÚselfÚothers     r   Ú__eq__ztimestamp.__eq__(   ó   € ÝÔ$Ø9ñ
ô 
ð 	
r   c                 ó*   — t          j        d¦  «        ‚r   r   r   s     r   Ú__gt__ztimestamp.__gt__-   r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r
   r   r   Ú__classcell__)r   s   @r   r   r      s`   ø€ € € € € ðð ð 9ð 9ð 9ð 9ð 9ð

ð 
ð 
ð

ð 
ð 
ð 
ð 
ð 
ð 
r   r   c                 ó"  — |                       ¦   «         \  }}	 t          t          j        |¦  «        ¦  «        t          j        |¦  «         |                      |¦  «         S # t          j        |¦  «         |                      |¦  «         w xY w)z~return a timestamp for "now" in the current vfs

    This will raise an exception if no temporary files could be created.
    )ÚmkstempÚmtime_ofÚosÚfstatÚcloseÚunlink)ÚvfsÚtmpfdÚtmpnames      r   Ú
get_fs_nowr-   3   sw   € ð
 —[’[‘]”]�N€Eˆ7ðÝ�œ ™œÑ(Ô(å
Œ�‰ŒˆØ�
Š
�7ÑÔÐÐøõ 	Œ�‰ŒˆØ�
Š
�7ÑÔÐÐøøøs   ™ A# Á#+Bc                  óB   — t                                t          d¦  «        S )z4
    Returns the `timestamp` at the Unix epoch.
    )r   r   )Útupler
   r   © r   r   Úzeror1   @   s   € õ �=Š=� FÑ+Ô+Ð+r   c                 ó²   — 	 | j         }t          d¦  «        }||z  }||z  }n$# t          $ r | t          j                 }d}Y nw xY wt          ||df¦  «        S )zo
    Takes an `os.stat_result`-like object and returns a `timestamp` object
    for its modification time.
    g    eÍÍAr   F)Úst_mtime_nsÚintÚAttributeErrorÚstatÚST_MTIMEr   )Ústat_resultÚnanosÚbillionÚsecsr   s        r   r%   r%   G   s~   € ð
'ð
 Ô'ˆõ �c‘(”(ˆØ˜ÑˆØ˜w‘ˆˆøõ ð ð ð ð �4œ=Ô)ˆàˆˆˆðøøøõ �d˜L¨%Ð0Ñ1Ô1Ð1s   ‚# £AÁAc                 óÖ   — t          | ¦  «        }|d         }|d         }|d         }|d         }||k    r|r|r||k     rt          ||df¦  «        S dS ||cxk     r	d|z   k     rn ndS |S )a4  Same as `mtime_of`, but return `None` or a `Timestamp` with
    `second_ambiguous` set if the date might be ambiguous.

    A modification time is reliable if it is older than "present_time" (or
    sufficiently in the future).

    Otherwise a concurrent modification might happens with the same mtime.
    r   é   TNi€Q )r%   r   )r8   Úpresent_mtimeÚ
file_mtimeÚfile_secondÚfile_nsÚboundary_secondÚboundary_nss          r   Úreliable_mtime_ofrD   a   sª   € õ ˜+Ñ&Ô&€JØ˜Q”-€KØ˜Œm€GØ# AÔ&€OØ Ô"€Kð ˜+Ò%Ð%Øð 	?�{ð 	?Ø˜Ò$Ð$Ý  +¨w¸Ð!=Ñ>Ô>Ð>ØˆtØ	˜;Ð	FÐ	FÒ	FÐ	F¨)°oÑ*EÒ	FÐ	FÐ	FÐ	FÐ	FØˆtàÐr   )Ú	functoolsr&   r6   Ú r   r   Útotal_orderingr/   r   r-   r1   r%   rD   r0   r   r   ú<module>rH      s¿   ðð Ð Ð Ð Ø 	€	€	€	Ø €€€à Ð Ð Ð Ð Ð ð €	ð Ôð
ð 
ð 
ð 
ð 
�ñ 
ô 
ñ Ôð
ðB
ð 
ð 
ð,ð ,ð ,ð2ð 2ð 2ð4ð ð ð ð r   