§
    cÌc  ã                   ó¬   — d Z ddlmZ  e e¦   «         d¦  «         ddlmZ  ej        d¦  «        Z ej        d¦  «        Zdada	d	„ Z
d
„ Zd„ Zdd„ZdS )z0Common code for generating file or revision ids.é   )Úlazy_importzB
import time

from breezy import (
    config,
    osutils,
    )
)Ú
lazy_regexs   [^\w.]s	   [^-\w.+@]Né    c                  ó&  — t           €pd                     t                               t                               ¦   «         ¦  «        t                               d¦  «        ¦  «                             d¦  «        a t          dz  adt           t          fz  S )a   Create a new file id suffix that is reasonably unique.

    On the first call we combine the current time with 64 bits of randomness to
    give a highly probably globally unique number. Then each call in the same
    process adds 1 to a serial number we append to that unique value.
    Nz-{}-{}-é   Úasciié   s   %s%d)Ú_gen_file_id_suffixÚformatÚosutilsÚcompact_dateÚtimeÚ
rand_charsÚencodeÚ_gen_file_id_serial© ó    ú9/usr/lib/python3/dist-packages/breezy/bzr/generate_ids.pyÚ_next_id_suffixr   )   sw   € õ" Ð"Ø(×/Ò/Ý× Ò ¥§¢¡¤Ñ-Ô-­w×/AÒ/AÀ"Ñ/EÔ/Eñ Gô  GçŠf�W‰oŒoð 	õ ˜1ÑÐØÕ)Õ+>Ð?Ñ?Ð?r   c                 ó  — t          | t          ¦  «        r|                      dd¦  «        } t                               d|                      ¦   «         ¦  «        }|                     d¦  «        dd…         }|t          ¦   «         z   S )zfReturn new file id for the basename 'name'.

    The uniqueness is supplied from _next_id_suffix.
    r   Úreplacer   ó   .Né   )Ú
isinstanceÚstrr   Ú_file_id_chars_reÚsubÚlowerÚlstripr   )ÚnameÚascii_word_onlyÚshort_no_dotss      r   Úgen_file_idr#   B   su   € õ
 �$�ÑÔð /Ø�{Š{˜7 IÑ.Ô.ˆõ (×+Ò+¨C°·²±´Ñ>Ô>€OØ#×*Ò*¨4Ñ0Ô0°°"°Ô5€MØ�?Ñ,Ô,Ñ,Ð,r   c                  ó    — t          d¦  «        S )zReturn a new tree-root file id.Ú	tree_root)r#   r   r   r   Úgen_root_idr&   Y   s   € å�{Ñ#Ô#Ð#r   c                 ó2  — 	 t                                | ¦  «        }n# t           j        $ r | }Y nw xY w|                     ¦   «         }|                     dd¦  «        }t
                               d|                     d¦  «        ¦  «        }t           	                    d¦  «                             d¦  «        }|€t           
                    ¦   «         }d                     |t                               |¦  «                             d¦  «        |f¦  «        }|S )a\  Return new revision-id.

    :param username: The username of the committer, in the format returned by
        config.username().  This is typically a real name, followed by an
        email address. If found, we will use just the email address portion.
        Otherwise we flatten the real name, and use that.
    :return: A new revision id.
    ú Ú_r   zutf-8r   Nó   -)ÚconfigÚextract_email_addressÚNoEmailInUsernamer   r   Ú_rev_id_chars_rer   r   r   r   r   Újoinr   )ÚusernameÚ	timestampÚuser_or_emailÚunique_chunkÚrev_ids        r   Úgen_revision_idr5   ^   s  € ð!Ý×4Ò4°XÑ>Ô>ˆˆøÝÔ#ð !ð !ð !Ø ˆˆˆð!øøøð "×'Ò'Ñ)Ô)€MØ!×)Ò)¨#¨sÑ3Ô3€MÝ$×(Ò(¨¨m×.BÒ.BÀ7Ñ.KÔ.KÑLÔL€Mõ ×%Ò% bÑ)Ô)×0Ò0°Ñ9Ô9€LàÐÝ—I’I‘K”Kˆ	à�YŠY˜Ý×,Ò,¨YÑ7Ô7×>Ò>¸wÑGÔGØ$ð&ñ 'ô '€Fð €Ms   ‚ �1°1)N)Ú__doc__r   ÚglobalsÚ r   Úlazy_compiler   r.   r
   r   r   r#   r&   r5   r   r   r   ú<module>r:      sà   ðð" 7Ð 6à %Ð %Ð %Ð %Ð %Ð %Ø €ˆGˆG‰IŒIð ñ ô ð ðð ð ð ð ð ð ,�JÔ+¨JÑ7Ô7Ð Ø*�:Ô*¨=Ñ9Ô9Ð ØÐ ØÐ ð@ð @ð @ð2-ð -ð -ð.$ð $ð $ð
ð ð ð ð ð r   