§
    cÌc   ã                   óØ   — U d Z ddlZddlmZ ddlZddlmZ ddlZddlmZ  e e	¦   «         d¦  «         ddl
mZ g d	¢Zd
„ Zd„ Zd„ Zd„ Z e¦   «         aee         ed<   d„ Zd„ Zd„ ZdS )zLists of ignore files, etc.é    N)ÚBytesIO)ÚSeté   )Úlazy_importzE
from breezy import (
    atomicfile,
    globbing,
    trace,
    )
)Úbedding)
z*.az*.oz*.py[co]z*.soz	*.sw[nop]z*~z.#*z[#]*#Ú__pycache__zbzr-orphansc                 ó†  — t          ¦   «         }|                      ¦   «         }	 |                     d¦  «                             d¦  «        }n•# t          $ rˆ |                     d¦  «        }g }t          |¦  «        D ]^\  }}	 |                     |                     d¦  «        ¦  «         Œ/# t          $ r# t                               d|dz   z  ¦  «         Y Œ[w xY wY nw xY w|D ]\}| 	                    d¦  «        }|r| 
                    d¦  «        rŒ/|                     t                               |¦  «        ¦  «         Œ]|S )	zéRead in all of the lines in the file and turn it into an ignore list

    Continue in the case of utf8 decoding errors, and emit a warning when
    such and error is found. Optimise for the common case -- no decoding
    errors.
    Úutf8ú
ó   
úutf-8zA.bzrignore: On Line #%d, malformed utf8 character. Ignoring line.r   z
ú#)ÚsetÚreadÚdecodeÚsplitÚUnicodeDecodeErrorÚ	enumerateÚappendÚtraceÚwarningÚrstripÚ
startswithÚaddÚglobbingÚnormalize_pattern)ÚfÚignoredÚignore_fileÚunicode_linesÚlinesÚline_numberÚlines          ú0/usr/lib/python3/dist-packages/breezy/ignores.pyÚparse_ignore_filer%   6   sy  € õ ‰eŒe€GØ—&’&‘(”(€Kð:à#×*Ò*¨6Ñ2Ô2×8Ò8¸Ñ>Ô>ˆˆøÝð :ð :ð :ð ×!Ò! %Ñ(Ô(ˆØˆÝ!*¨5Ñ!1Ô!1ð 	:ð 	:ÑˆK˜ð:Ø×$Ò$ T§[¢[°Ñ%9Ô%9Ñ:Ô:Ð:Ð:øÝ%ð :ð :ð :å—’ð%Ø(3°a©ñ9ñ:ô :ð :ð :ð :ð:øøøð	:ð 	:ð:øøøð ð 6ð 6ˆØ�{Š{˜6Ñ"Ô"ˆØð 	�t—’ sÑ+Ô+ð 	ØØ�Š•H×.Ò.¨tÑ4Ô4Ñ5Ô5Ð5Ð5Ø€Ns5   ¤(A Á5CÂ(B,Â+CÂ,*CÃCÃCÃCÃCc                  óü  — t          j        ¦   «         } t          t          ¦  «        }	 t	          | d¦  «        }n‡# t
          $ rz}t          |dd¦  «        }|t          j        fvr‚ 	 t          t          ¦  «         n7# t
          $ r*}|j        t          j
        t          j        fvr‚ Y d}~nd}~ww xY w|cY d}~S d}~ww xY w	 t          |¦  «        |                     ¦   «          S # |                     ¦   «          w xY w)z9Get the list of user ignored files, possibly creating it.ÚrbÚerrnoN)r   Úuser_ignore_config_pathr   ÚUSER_DEFAULTSÚopenÚOSErrorÚgetattrr(   ÚENOENTÚ_set_user_ignoresÚEPERMr%   Úclose)ÚpathÚpatternsr   ÚeÚerrs        r$   Úget_user_ignoresr6   Y   s  € åÔ*Ñ,Ô,€DÝ•=Ñ!Ô!€HðÝ��tÑÔˆˆøÝð ð ð å�a˜ $Ñ'Ô'ˆØ•u”|�oÐ%Ð%Øð	Ý�mÑ,Ô,Ð,Ð,øÝð 	ð 	ð 	ØŒw�uœ{­E¬LÐ9Ð9Ð9Øð :Ð9Ð9Ð9Ð9øøøøð	øøøð ˆˆˆˆˆˆøøøøðøøøðÝ  Ñ#Ô#à	�Š‰	Œ	ˆ	ˆ	øˆ�Š‰	Œ	ˆ	ˆ	øøøsQ   ©: º
B>Á!B9Á&A;Á:B9Á;
B/Â B*Â%B9Â*B/Â/B9Â3B>Â9B>ÃC% Ã%C;c                 ó  — t          j        ¦   «         }t          j        ¦   «          t          |d¦  «        5 }| D ]-}|                     |                     d¦  «        dz   ¦  «         Œ.	 ddd¦  «         dS # 1 swxY w Y   dS )a7  Fill out the user ignore file with the given patterns

    This may raise an error if it doesn't have permission to
    write to the user ignore file.
    This is mostly used for testing, since it would be
    bad form to rewrite a user's ignore list.
    breezy only writes this file if it does not exist.
    Úwbr
   r   N)r   r)   Úensure_config_dir_existsr+   ÚwriteÚencode)r3   Úignore_pathr   Úpatterns       r$   r/   r/   t   sÎ   € õ Ô1Ñ3Ô3€KÝÔ$Ñ&Ô&Ð&õ 
ˆk˜4Ñ	 Ô	 ð 4 AØð 	4ð 	4ˆGØ�GŠG�G—N’N 6Ñ*Ô*¨UÑ2Ñ3Ô3Ð3Ð3ð	4ð4ð 4ð 4ñ 4ô 4ð 4ð 4ð 4ð 4ð 4ð 4ð 4øøøð 4ð 4ð 4ð 4ð 4ð 4s   ·1A6Á6A:Á=A:c                 óœ  — t          ¦   «         }g }| D ]J}t                               |¦  «        }||vr*|                     |¦  «         |                     |¦  «         ŒK|sg S t          t          j        ¦   «         d¦  «        5 }|D ]-}|                     | 	                    d¦  «        dz   ¦  «         Œ.	 ddd¦  «         n# 1 swxY w Y   |S )zžAdd entries to the user's ignore list if not present.

    :param new_ignores: A list of ignore patterns
    :return: The list of ignores that were added
    Úabr
   r   N)
r6   r   r   r   r   r+   r   r)   r:   r;   )Únew_ignoresr   Úto_addÚignorer   r=   s         r$   Úadd_unique_user_ignoresrC   †   s  € õ Ñ Ô €GØ€FØð "ð "ˆÝ×+Ò+¨FÑ3Ô3ˆØ˜Ð Ð Ø�KŠK˜ÑÔÐØ�MŠM˜&Ñ!Ô!Ð!øàð Øˆ	å	�gÔ-Ñ/Ô/°Ñ	6Ô	6ð 4¸!Øð 	4ð 	4ˆGØ�GŠG�G—N’N 6Ñ*Ô*¨UÑ2Ñ3Ô3Ð3Ð3ð	4ð4ð 4ð 4ñ 4ô 4ð 4ð 4ð 4ð 4ð 4ð 4øøøð 4ð 4ð 4ð 4ð €Ms   Â1CÃCÃCÚ_runtime_ignoresc                 óT   — t                                t          | ¦  «        ¦  «         dS )a~  Add some ignore patterns that only exists in memory.

    This is used by some plugins that want bzr to ignore files,
    but don't want to change a users ignore list.
    (Such as a conversion script that needs to ignore temporary files,
    but does not want to modify the project's ignore list.)

    :param ignores: A list or generator of ignore patterns.
    :return: None
    N)rD   Úupdater   )Úignoress    r$   Úadd_runtime_ignoresrH   ¡   s$   € õ ×Ò�C ™LœLÑ)Ô)Ð)Ð)Ð)ó    c                  ó   — t           S )z'Get the current set of runtime ignores.)rD   © rI   r$   Úget_runtime_ignoresrL   °   s   € åÐrI   c                 óê  — |                       | j        j        ¦  «        }|                      |¦  «        r[t	          |d¦  «        5 }|                     ¦   «         }|                     d¦  «        dk    rd}nd}ddd¦  «         n# 1 swxY w Y   n d}t          j         	                    ¦   «         }t          |¦  «        5 }t          |¦  «        }ddd¦  «         n# 1 swxY w Y   t                               |d¦  «        5 }|                     |¦  «         t          |¦  «        dk    r*|                     d¦  «        s|                     |¦  «         |D ]C}||vr=|                     | 	                    d	¦  «        ¦  «         |                     |¦  «         ŒD	 ddd¦  «         n# 1 swxY w Y   |                      | j        j        ¦  «        s"|                      | j        j        g¦  «         dS dS )
a@  Add more ignore patterns to the ignore file in a tree.
    If ignore file does not exist then it will be created.
    The ignore file will be automatically added under version control.

    :param tree: Working tree to update the ignore list.
    :param name_pattern_list: List of ignore patterns.
    :return: None
    r'   s   
éÿÿÿÿr   NrI   r8   r   r   )ÚabspathÚ_formatÚignore_filenameÚhas_filenamer+   r   ÚfindÚosÚlinesepr;   r   r%   Ú
atomicfileÚ
AtomicFiler:   ÚlenÚendswithÚis_versionedr   )	ÚtreeÚname_pattern_listÚifnr   Úfile_contentsÚnewlineÚsiorG   r=   s	            r$   Útree_ignores_add_patternsra   µ   s•  € ð �,Š,�t”|Ô3Ñ
4Ô
4€CØ×Ò˜ÑÔð 	&Ý�#�t‰_Œ_ð 	  ØŸFšF™HœHˆMØ×!Ò! 'Ñ*Ô*¨bÒ0Ð0Ø!��à�ð	 ð 	 ð 	 ñ 	 ô 	 ð 	 ð 	 ð 	 ð 	 ð 	 ð 	 øøøð 	 ð 	 ð 	 ð 	 øð ˆÝ”*×#Ò#Ñ%Ô%ˆå	�Ñ	Ô	ð ) 3Ý# CÑ(Ô(ˆð)ð )ð )ñ )ô )ð )ð )ð )ð )ð )ð )øøøð )ð )ð )ð )õ 
×	Ò	˜s DÑ	)Ô	)ð !¨Qà	�Š�ÑÔÐÝˆ}ÑÔ Ò!Ð!¨-×*@Ò*@ÀÑ*GÔ*GÐ!Ø�GŠG�GÑÔÐØ(ð 	!ð 	!ˆGØ˜gÐ%Ð%Ø—’˜Ÿš wÑ/Ô/Ñ0Ô0Ð0Ø—’˜Ñ Ô Ð øð	!ð!ð !ð !ñ !ô !ð !ð !ð !ð !ð !ð !øøøð !ð !ð !ð !ð ×Ò˜Tœ\Ô9Ñ:Ô:ð 1Ø�Š�$”,Ô.Ð/Ñ0Ô0Ð0Ð0Ð0ð1ð 1s7   Á3BÂBÂBÂ?CÃCÃ"CÄBF'Æ'F+Æ.F+)Ú__doc__r(   Úior   rT   Útypingr   Úbreezyr   ÚglobalsÚ r   r*   r%   r6   r/   rC   r   rD   ÚstrÚ__annotations__rH   rL   ra   rK   rI   r$   ú<module>rj      sB  ðð" "Ð !Ð !à €€€Ø Ð Ð Ð Ð Ð Ø 	€	€	€	Ø Ð Ð Ð Ð Ð à €€€Ø $Ð $Ð $Ð $Ð $Ð $Ø €ˆGˆG‰IŒIð ñ ô ð ðð ð ð ð ð ðð ð €ð ð  ð  ðFð ð ð64ð 4ð 4ð$ð ð ð0 !˜S™UœUÐ �#�c”(Ð "Ð "Ñ "ð*ð *ð *ðð ð ð
%1ð %1ð %1ð %1ð %1rI   