§
    	^µcW  ã                   óŒ  — d Z ddlZddlZddlmZ ddlmZ ddlmZ ddl	m
Z
mZmZmZmZmZmZmZ ddlmZmZ i Z ej        e¦  «        Z	 ddlZ ej        ¦   «         5   ej        dd	ed
¬¦  «         ddlmZ ej         ddd¦  «         n# 1 swxY w Y   n# e$ r dZY nw xY wdZd ed¦  «        fd ed¦  «        fd ed¦  «        fd ed¦  «        fd ed¦  «        fgZ  ej!        dej"        ¦  «        Z#dZ$ ed¦  «        Z% G d„ d¦  «        Z& G d„ d¦  «        Z'd„ Z(d„ Z)d „ Z*d!„ Z+d"„ Z,d#„ Z-d$„ Z.d%„ Z/d&„ Z0d'„ Z1d(„ Z2d)„ Z3 ed*d+d,d- ed.¦  «         ed/¦  «        fd0d1d2 ed3¦  «         ed/¦  «        fd4d5d2 ed6¦  «        dfg ed7¦  «        ej4        ¬8¦  «        d>d9„¦   «         Z5 ed:d;¬<¦  «        d>d=„¦   «         Z6dS )?a/  generate release notes from commit messages (EXPERIMENTAL)

It is common to maintain files detailing changes in a project between
releases. Maintaining these files can be difficult and time consuming.
The :hg:`releasenotes` command provided by this extension makes the
process simpler by automating it.
é    N)Ú_)Úopen)Úhex)ÚcmdutilÚconfigÚerrorÚ
logcmdutilÚminirstÚpycompatÚ	registrarÚutil)ÚprocutilÚ
stringutilÚignorez.*python-Levenshtein.*zfuzzywuzzy.fuzz)ÚactionÚmessageÚcategoryÚmodules   ships-with-hg-cores   features   New Featuress   bcs   Backwards Compatibility Changesó   fixs	   Bug Fixess   perfs   Performance Improvementss   apis   API Changess#   ^\.\. ([a-zA-Z0-9_]+)::\s*([^$]+)?$s   \bissue ?[0-9]{4,6}(?![0-9])\bs   Other Changesc                   óD   — e Zd Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
S )Úparsedreleasenotesc                 ó   — i | _         d S ©N©Úsections©Úselfs    ú4/usr/lib/python3/dist-packages/hgext/releasenotes.pyÚ__init__zparsedreleasenotes.__init__P   s   € ØˆŒˆˆó    c                 ó   — || j         v S r   r   ©r   Úsections     r   Ú__contains__zparsedreleasenotes.__contains__S   s   € Ø˜$œ-Ð'Ð'r    c                 óD   — t          t          | j        ¦  «        ¦  «        S r   )ÚiterÚsortedr   r   s    r   Ú__iter__zparsedreleasenotes.__iter__V   s   € Ý•F˜4œ=Ñ)Ô)Ñ*Ô*Ð*r    c                 ó�   — | j                              |g g f¦  «         | j         |         d                              ||f¦  «         dS )z Add a titled release note entry.r   N©r   Ú
setdefaultÚappend)r   r#   ÚtitleÚ
paragraphss       r   Úaddtitleditemz parsedreleasenotes.addtitleditemY   sI   € àŒ× Ò  ¨2¨r¨(Ñ3Ô3Ð3ØŒ�gÔ˜qÔ!×(Ò(¨%°Ð)<Ñ=Ô=Ð=Ð=Ð=r    c                 óŒ   — | j                              |g g f¦  «         | j         |         d                              |¦  «         dS )z[Adds a non-titled release note entry.

        Will be rendered as a bullet point.
        é   Nr*   )r   r#   r.   s      r   Úaddnontitleditemz#parsedreleasenotes.addnontitleditem^   sF   € ð
 	Œ× Ò  ¨2¨r¨(Ñ3Ô3Ð3ØŒ�gÔ˜qÔ!×(Ò(¨Ñ4Ô4Ð4Ð4Ð4r    c                 óH   — | j                              |g g f¦  «        d         S )z|Returns titled entries in a section.

        Returns a list of (title, paragraphs) tuples describing sub-sections.
        r   ©r   Úgetr"   s     r   Útitledforsectionz#parsedreleasenotes.titledforsectionf   s%   € ð
 Œ}× Ò  ¨2¨r¨(Ñ3Ô3°AÔ6Ð6r    c                 óH   — | j                              |g g f¦  «        d         S )z5Returns non-titled, bulleted paragraphs in a section.r1   r4   r"   s     r   Únontitledforsectionz&parsedreleasenotes.nontitledforsectionm   s#   € àŒ}× Ò  ¨2¨r¨(Ñ3Ô3°AÔ6Ð6r    c                 ó`   ‡— t          ˆfd„|                      |¦  «        D ¦   «         ¦  «        S )Nc              3   ó0   •K  — | ]}|d          ‰k    V — ŒdS )r   N© )Ú.0Útr-   s     €r   ú	<genexpr>z8parsedreleasenotes.hastitledinsection.<locals>.<genexpr>r   s+   øè è € ÐIÐI Q�1�Q”4˜5’=ÐIÐIÐIÐIÐIÐIr    )Úanyr6   )r   r#   r-   s     `r   Úhastitledinsectionz%parsedreleasenotes.hastitledinsectionq   s4   ø€ ÝÐIÐIÐIÐI¨$×*?Ò*?ÀÑ*HÔ*HÐIÑIÔIÑIÔIÐIr    c                 ó¤  — t           s"|                     t          d¦  «        ¦  «         |D �]¢}t          |                      |¦  «        ¦  «        t          |                      |¦  «        ¦  «        z   }|                     |¦  «        D ]­\  }}|                      ||¦  «        r(|                     t          d¦  «        ||fz  ¦  «         ŒCt          ||fg¦  «        d         }|dk    r#t          |¦  «        }|rt          |||¦  «        rŒ„t          |||¦  «        rŒ–|                      |||¦  «         Œ®|                     |¦  «        D ]�}||                      |¦  «        v rŒt          |g¦  «        d         }|dk    r#t          |¦  «        }|rt          |||¦  «        rŒYt          |||¦  «        rŒk|                      ||¦  «         Œ‚�Œ¤dS )z{Merge another instance into this one.

        This is used to combine multiple sources of release notes together.
        sK   module 'fuzzywuzzy' not found, merging of similar releasenotes is disabled
s*   %s already exists in %s section; ignoring
r   r   N)ÚfuzzÚwarnr   Úconverttitledr6   Úconvertnontitledr8   r@   ÚwriteÚgetissuenumÚ	findissueÚsimilarr/   r2   )	r   ÚuiÚotherr#   Úexistingnotesr-   r.   Úincoming_strÚissues	            r   Úmergezparsedreleasenotes.merget   s<  € õ
 ð 	Ø�GŠGÝð2ñô ñô ð ð ð (	;ñ (	;ˆGÝ)Ø×%Ò% gÑ.Ô.ñô å  ×!9Ò!9¸'Ñ!BÔ!BÑCÔCñDˆMð &+×%;Ò%;¸GÑ%DÔ%Dð ?ð ?Ñ!��zØ×*Ò*¨7°EÑ:Ô:ð ð —H’HÝÐHÑIÔIØ  'Ð*ñ+ñô ð ð å,¨u°jÐ.AÐ-BÑCÔCÀAÔF�Ø˜fÒ$Ð$Ý'¨Ñ5Ô5�EØð %Ý$ R¨¸Ñ>Ô>ð %Ø$å˜2˜}¨lÑ;Ô;ð Øà×"Ò" 7¨E°:Ñ>Ô>Ð>Ð>à#×7Ò7¸Ñ@Ô@ð ;ð ;�
Ø ×!9Ò!9¸'Ñ!BÔ!BÐBÐBØå/°°Ñ=Ô=¸aÔ@�Ø˜fÒ$Ð$Ý'¨Ñ5Ô5�EØð %Ý$ R¨¸Ñ>Ô>ð %Ø$å˜2˜}¨lÑ;Ô;ð Øà×%Ò% g¨zÑ:Ô:Ð:Ð:ñ;ð5(	;ð (	;r    N)Ú__name__Ú
__module__Ú__qualname__r   r$   r(   r/   r2   r6   r8   r@   rO   r;   r    r   r   r   O   sž   € € € € € ðð ð ð(ð (ð (ð+ð +ð +ð>ð >ð >ð
5ð 5ð 5ð7ð 7ð 7ð7ð 7ð 7ðJð Jð Jð5;ð 5;ð 5;ð 5;ð 5;r    r   c                   ó(   — e Zd Zdd„Zd„ Zd„ Zd„ ZdS )ÚreleasenotessectionsNc                 ó
  — |rgt          j        t          ¦  «        }t          |¦  «        }|r|                     |¦  «         t          |                     ¦   «         ¦  «        | _        d S t          t          ¦  «        | _        d S r   )r   ÚsortdictÚDEFAULT_SECTIONSÚgetcustomadmonitionsÚupdateÚlistÚitemsÚ	_sections)r   rJ   Úrepor   Úcustom_sectionss        r   r   zreleasenotessections.__init__­   sr   € Øð 	4Ý”}Õ%5Ñ6Ô6ˆHÝ2°4Ñ8Ô8ˆOØð 1Ø—’ Ñ0Ô0Ð0Ý! (§.¢.Ñ"2Ô"2Ñ3Ô3ˆDŒNˆNˆNå!Õ"2Ñ3Ô3ˆDŒNˆNˆNr    c                 ó*   — t          | j        ¦  «        S r   )r&   r\   r   s    r   r(   zreleasenotessections.__iter__·   s   € Ý�D”NÑ#Ô#Ð#r    c                 ó$   — d„ | j         D ¦   «         S )Nc                 ó   — g | ]
}|d          ‘ŒS )r   r;   )r<   r=   s     r   ú
<listcomp>z.releasenotessections.names.<locals>.<listcomp>»   s   € Ð-Ð-Ð-˜��!”Ð-Ð-Ð-r    ©r\   r   s    r   Únameszreleasenotessections.namesº   s   € Ø-Ð-˜dœnÐ-Ñ-Ô-Ð-r    c                 ó4   — | j         D ]\  }}||k    r|c S Œd S r   rc   )r   r-   ÚnameÚvalues       r   Úsectionfromtitlez%releasenotessections.sectionfromtitle½   s5   € Øœ>ð 	ð 	‰KˆD�%Ø˜Š~ˆ~Ø���ð ð ˆtr    r   )rP   rQ   rR   r   r(   rd   rh   r;   r    r   rT   rT   ¬   sU   € € € € € ð4ð 4ð 4ð 4ð$ð $ð $ð.ð .ð .ðð ð ð ð r    rT   c                 ó¢   — g }| D ]I\  }}g }|D ]}|                      |¦  «         Œ|                     d                     |¦  «        ¦  «         ŒJ|S )z.
    Convert titled paragraphs to strings
    ó    ©Úextendr,   Újoin)ÚtitledparagraphsÚstring_listr-   r.   ÚlinesÚparas         r   rD   rD   Å   so   € ð €KØ-ð -ð -ÑˆˆzØˆØð 	ð 	ˆDØ�LŠL˜ÑÔÐÐØ×Ò˜4Ÿ9š9 UÑ+Ô+Ñ,Ô,Ð,Ð,ØÐr    c                 óœ   — g }| D ]F}g }|D ]}|                      |¦  «         Œ|                     d                     |¦  «        ¦  «         ŒG|S )z/
    Convert non-titled bullets to strings
    rj   rk   )Únontitledparagraphsro   r.   rp   rq   s        r   rE   rE   Ò   sj   € ð €KØ)ð -ð -ˆ
ØˆØð 	ð 	ˆDØ�LŠL˜ÑÔÐÐØ×Ò˜4Ÿ9š9 UÑ+Ô+Ñ,Ô,Ð,Ð,ØÐr    c                 ó|   — t          j        t          | t           j        ¦  «        }|r|                     ¦   «         }|S )zD
    Returns issue number from the incoming string if it exists
    )ÚreÚsearchÚRE_ISSUEÚ
IGNORECASEÚgroup)rM   rN   s     r   rG   rG   ß   s3   € õ ŒI•h ­b¬mÑ<Ô<€EØð Ø—’‘”ˆØ€Lr    c                 óŒ   ‡— t          ˆfd„|D ¦   «         ¦  «        r'|                      t          d¦  «        ‰z  ¦  «         dS dS )z?
    Returns true if issue number already exists in notes.
    c              3   ó    •K  — | ]}‰|v V — Œ	d S r   r;   )r<   ÚsrN   s     €r   r>   zfindissue.<locals>.<genexpr>í   s'   øè è € Ð
(Ð
(˜!ˆ5�Aˆ:Ð
(Ð
(Ð
(Ð
(Ð
(Ð
(r    s'   "%s" already exists in notes; ignoring
TF)r?   rF   r   )rJ   ÚexistingrN   s     `r   rH   rH   é   sT   ø€ õ Ð
(Ð
(Ð
(Ð
(˜xÐ
(Ñ
(Ô
(Ñ(Ô(ð Ø
�Š•Ð>Ñ?Ô?À%ÑGÑHÔHÐHØˆtàˆur    c                 óÆ   — t          |                     ¦   «         ¦  «        dk    r;t          ||¦  «        }|s'|                      t	          d¦  «        |z  ¦  «         dS dS dS )z?
    Returns true if similar note found in existing notes.
    é
   s,   "%s" already exists in notes file; ignoring
TF)ÚlenÚsplitÚsimilaritycheckrF   r   )rJ   r}   rM   rO   s       r   rI   rI   ô   su   € õ ˆ<×ÒÑÔÑ Ô  2Ò%Ð%Ý ¨hÑ7Ô7ˆØð 	Ø�HŠHÝÐBÑCÔCØññô ð ð �4à�5àˆur    c                 ód   — t           sdS d}|D ]!}t          j        | |¦  «        }|dk    rd} nŒ"|S )zK
    Returns false when note fragment can be merged to existing notes.
    TéK   F)rB   Útoken_set_ratio)rM   rL   rO   ÚbulletÚscores        r   r‚   r‚     sV   € õ
 ð Øˆtà€EØð ð ˆÝÔ$ \°6Ñ:Ô:ˆØ�2Š:ˆ:ØˆEØˆEð ð €Lr    c                 óš   ‡ ‡‡‡— ‰ d         Št          j         ¦   «         Šdˆˆˆˆ fd„	Šd‰v r ‰d¦  «         ‰                     d¦  «        S )Nó   .c                 óä   •— | ‰v r5‰|                                ¦   «         }‰                     | |||‰¦  «         d S t          j        t	          d¦  «        ‰                     | ¦  «        z  ¦  «        ‚)Ns#   .hgreleasenotes file '%s' not found)ÚdataÚparser   ÚAbortr   Úpathto)Úfr   Úremapr‹   ÚctxÚpÚreadr]   s       €€€€r   r“   z"getcustomadmonitions.<locals>.read  sl   ø€ Ø�ˆ8ˆ8Ø�q”6—;’;‘=”=ˆDØ�GŠG�A�t˜X u¨dÑ3Ô3Ð3Ð3Ð3å”+ÝÐ:Ñ;Ô;¸d¿kºkÈ!¹n¼nÑLñô ð r    s   .hgreleasenotess   sections)NN)r   r[   )r]   r‘   r’   r“   s   `@@@r   rX   rX     sw   øøøø€ Ø
ˆtŒ*€CÝŒ‰Œ€Aðð ð ð ð ð ð ð ð ð ˜SÐ Ð ØˆÐÑ Ô Ð Ø�7Š7�;ÑÔÐr    c                 ó”  ‡‡	— |D �]A}||         }t          j        t          |                     ¦   «         ¦  «        Š‰�r‰                     d¦  «        |v rŒR|                      t          d¦  «        ‰                     d¦  «        |                     ¦   «         dd…         fz  ¦  «         ˆfd„Š	ˆ	fd„|D ¦   «         }t          |¦  «        dk    r,|                      t          d¦  «        |d         z  ¦  «         Œø|rGd	 	                    t          |¦  «        ¦  «        }|                      t          d
¦  «        |z  ¦  «         �ŒCdS )a`  
    Checks the commit messages for admonitions and their validity.

    .. abcd::

       First paragraph under this admonition

    For this commit message, using `hg releasenotes -r . --check`
    returns: Invalid admonition 'abcd' present in changeset 3ea92981e103

    As admonition 'abcd' is neither present in default nor custom admonitions
    r1   s0   Invalid admonition '%s' present in changeset %s
Né   c                 óz   •— t          j        d ‰                     d¦  «        | ¦  «                             ¦   «         S )Nr1   )ÚdifflibÚSequenceMatcherry   Úratio)ÚxÚ
admonitions    €r   ú<lambda>z"checkadmonitions.<locals>.<lambda>A  s5   ø€ ¥Ô 7Ø˜*×*Ò*¨1Ñ-Ô-¨qñ!ô !ç’%‘'”'ð r    c                 ó2   •— g | ]} ‰|¦  «        d k    ¯|‘ŒS )g333333ã?r;   )r<   r|   Úsims     €r   rb   z$checkadmonitions.<locals>.<listcomp>E  s&   ø€ ÐAÐAÐA °C°C¸±F´F¸S²L°L˜1°L°L°Lr    s   (did you mean %s?)
r   s   , s   (did you mean one of %s?)
)ru   rv   ÚRE_DIRECTIVEÚdescriptionry   rF   r   r   r€   rm   r'   )
rJ   r]   Ú
directivesÚrevsÚrevr‘   rI   Ússr›   rž   s
           @@r   Úcheckadmonitionsr¥   )  sd  øø€ ð ð Eñ EˆØ�3ŒiˆÝ”Y�|¨S¯_ª_Ñ->Ô->Ñ?Ô?ˆ
Øñ 	EØ×Ò Ñ"Ô" jÐ0Ð0Øà—’ÝÐJÑKÔKØ!×'Ò'¨Ñ*Ô*¨C¯GªG©I¬I°c°r°c¬NÐ;ñ<ñô ð ðð ð ð �ð BÐAÐAÐA jÐAÑAÔA�Ý�w‘<”< 1Ò$Ð$Ø—H’H�QÐ6Ñ7Ô7¸'À!¼*ÑDÑEÔEÐEÐEØð EØŸš¥F¨7¡O¤OÑ4Ô4�BØ—H’H�QÐ=Ñ>Ô>ÀÑCÑDÔDÐDùð)Eð Er    c                 ó\   — |D ](}|                       d|d         |d         fz  ¦  «         Œ)d S )Ns   %s: %s
r   r1   )rF   )rJ   r   r#   s      r   Ú_getadmonitionlistr§   M  sB   € Øð 9ð 9ˆØ
�Š� ¨¤
¨G°A¬JÐ7Ñ7Ñ8Ô8Ð8Ð8ð9ð 9r    c           	      ó  — t          ¦   «         }|D �]ì}| |         }t          j        |                     ¦   «         |¬¦  «        \  }}t	          |¦  «        D �]¥\  }}	|	d         dk    rŒ|	d         }
|	d         r |	d         d                              ¦   «         nd }|dz   t          |¦  «        k    r&t          j        t          d¦  «        ||
fz  ¦  «        ‚g }t          |dz   t          |¦  «        ¦  «        D ]…}||         }|d         d	k    rŒ|d         dk    r na|d         d
k    r,| j                             t          d¦  «        ||
fz  ¦  «         |d         dk    r|                     |d         ¦  «         Œ… |sI| j                             t          d¦  «        t          |                     ¦   «         ¦  «        z  ¦  «         |r|                     |
||¦  «         �Œ�|                     |
|¦  «         �Œ§�Œî|S )N)Úadmonitionsó   types
   admonitions   admonitiontitleó   linesr   r1   s6   changeset %s: release notes directive %s lacks contentó   marginó	   paragraphs=   changeset %s: unexpected block in release notes directive %s
ó   indents.   error parsing releasenotes for revision: '%s'
)r   r
   rŒ   r    Ú	enumerateÚstripr€   r   r�   r   ÚrangerJ   rC   r,   r   Únoder/   r2   )r]   r¡   r¢   Únotesr£   r‘   ÚblocksÚprunedÚiÚblockÚ	directiver-   r.   ÚjÚpblocks                  r   Úparsenotesfromrevisionsr»   R  s^  € ÝÑ Ô €Eàð ;>ñ ;>ˆØ�3Œiˆå œØ�OŠOÑÔ¨:ð
ñ 
ô 
‰ˆ�õ " &Ñ)Ô)ð 4	>ñ 4	>‰HˆAˆuØ�WŒ~ Ò.Ð.ØàÐ0Ô1ˆIØ27¸´/ÐK�E˜(”O AÔ&×,Ò,Ñ.Ô.Ð.ÀtˆEà�1‰u�˜F™œÒ#Ð#Ý”kÝð)ñô ð ˜IÐ&ñ	'ñô ð ð ˆJÝ˜1˜q™5¥# f¡+¤+Ñ.Ô.ð ð �Ø œ�ð ˜'”? iÒ/Ð/Øà˜'”? mÒ3Ð3Ø�Eà˜'”? lÒ2Ð2Ø”G—L’LÝð4ñô ð  	Ð*ñ	+ñô ð ð ˜)Ô$ qÒ(Ð(Ø×%Ò% f¨XÔ&6Ñ7Ô7Ð7Ð7àð ð Ø”—’ÝÐHÑIÔIÝ˜#Ÿ(š(™*œ*‘o”oñ&ñô ð ð ð >Ø×#Ò# I¨u°jÑAÔAÐAÑAà×&Ò& y°*Ñ=Ô=Ð=Ñ=ñi4	>ðl €Lr    c                 ó¸  ‡— t          ¦   «         }t          j        |¦  «        d         Šdˆfd„	}d}t          ‰¦  «        D �]\  }}|d         dk    rŒ|d         d         }|d         d	k    rf|                      |¦  «        }|s$t          j        t          d
¦  «        |z  ¦  «        ‚|} ||¦  «        }	|	r|	D ]}
|                     ||
¦  «         ŒŒ“|d         dk    rV|t          k    r' ||¦  «        }	|	D ]}
|                     ||
¦  «         ŒŒÑ ||d¦  «        }| 
                    |||¦  «         Œõt          j        t          d¦  «        |z  ¦  «        ‚|S )z6Parse text content containing generated release notes.r   Fc                 óâ  •— g }t          | dz   t          ‰¦  «        ¦  «        D �]I}‰|         }|d         dk    rŒ|d         dk    r �n$|d         dk    rÃ|d         dk    r!t          j        t	          d¦  «        ¦  «        ‚|r(d	„ |d
         D ¦   «         }|                     |¦  «         ŒŠd„ |d
         D ¦   «         g}‰|dz   d …         D ]5}|d         dv r n(|d         dk    r|                     |d
         ¦  «         Œ6|                     |¦  «         Œö|d         dk    r*t          j        t	          d¦  «        |d         z  ¦  «        ‚|r|                     |d
         ¦  «         �ŒK|S )Nr1   rª   r¬   ó   sectionó   bulletr®   r   s#   indented bullet lists not supportedc                 óF   — g | ]}|d d…                               ¦   «         ‘ŒS ©r1   N©r°   ©r<   Úls     r   rb   zJparsereleasenotesfile.<locals>.gatherparagraphsbullets.<locals>.<listcomp>©  s(   € ÐDÐDÐD¨q˜Q˜q˜r˜rœUŸ[š[™]œ]ÐDÐDÐDr    r«   c                 óF   — g | ]}|d d…                               ¦   «         ‘ŒS rÁ   rÂ   rÃ   s     r   rb   zJparsereleasenotesfile.<locals>.gatherparagraphsbullets.<locals>.<listcomp>­  s(   € ÐEÐEÐE°˜a   œeŸkšk™mœmÐEÐEÐEr    )r¿   r¾   r­   s*   unexpected block type in release notes: %s)r±   r€   r   r�   r   r,   )Úoffsetr-   Únotefragmentr¶   r·   rp   r´   s         €r   Úgatherparagraphsbulletsz6parsereleasenotesfile.<locals>.gatherparagraphsbullets›  s³  ø€ Øˆå�v ‘z¥3 v¡;¤;Ñ/Ô/ð 	5ñ 	5ˆAØ˜1”IˆEà�WŒ~ Ò*Ð*ØØ�w” :Ò-Ð-Ø‘Ø�w” 9Ò,Ð,Ø˜Ô# qÒ(Ð(Ýœ+¥aÐ(NÑ&OÔ&OÑPÔPÐPØð ØDÐD°E¸(´OÐDÑDÔD�EØ ×'Ò'¨Ñ.Ô.Ð.ØàEÐE°U¸8´_ÐEÑEÔEÐF�Eà!'¨¨A©¨¨¤ð :ð :˜Ø  œ>Ð-DÐDÐDØ!˜EØ  œ>¨\Ò9Ð9Ø!ŸLšL¨¨x¬Ñ9Ô9Ð9øØ ×'Ò'¨Ñ.Ô.Ð.ØØ�w” <Ò/Ð/Ý”kÝÐCÑDÔDØ˜G”nñ%ñô ð ð ð 5Ø×#Ò# E¨(¤OÑ4Ô4Ð4ùàÐr    Nrª   r¾   r«   s	   underlineó   =s!   unknown release notes section: %só   -Ts   unsupported section type for %s)F)r   r
   rŒ   r¯   rh   r   r�   r   r2   ÚBULLET_SECTIONr/   )r   Útextr³   rÈ   Úcurrentsectionr¶   r·   r-   rf   Úbullet_pointsrq   r.   r´   s               @r   ÚparsereleasenotesfilerÏ   •  sÏ  ø€ åÑ Ô €EåŒ]˜4Ñ Ô  Ô#€Fð#ð #ð #ð #ð #ð #ðJ €NÝ˜fÑ%Ô%ð Mñ M‰ˆˆ5Ø�Œ>˜ZÒ'Ð'Øà�h” Ô"ˆð �Ô $Ò&Ð&Ø×,Ò,¨UÑ3Ô3ˆDØð Ý”kÝÐ:Ñ;Ô;¸eÑCñô ð ð "ˆNØ3Ð3°AÑ6Ô6ˆMØð AØ)ð Að A�DØ×*Ò*¨>¸4Ñ@Ô@Ð@Ð@øà�<Ô  DÒ(Ð(Ø�Ò&Ð&Ø 7Ð 7¸Ñ :Ô :�Ø)ð Að A�DØ×*Ò*¨>¸4Ñ@Ô@Ð@Ð@ðAð 5Ð4°Q¸Ñ=Ô=�
Ø×#Ò# N°E¸:ÑFÔFÐFÐFå”+�aÐ BÑCÔCÀeÑKÑLÔLÐLà€Lr    c                 óê  — g }| D �]º\  }}||vrŒ|                      |¦  «         |                      dt          |¦  «        z  ¦  «         |                      d¦  «         |                     |¦  «        D ]ã\  }}|                      |¦  «         |                      dt          |¦  «        z  ¦  «         |                      d¦  «         t          |¦  «        D ]j\  }}|r|                      d¦  «         |                     t          j        d                     |¦  «        d¬¦  «                             ¦   «         ¦  «         Œk|                      d¦  «         Œä| 	                    |¦  «        }	|                     |¦  «        r[|	rY|                      t          ¦  «         |                      dt          t          ¦  «        z  ¦  «         |                      d¦  «         |	D ]ß}|                     t          j        d                     |d         ¦  «        ddd	¬
¦  «                             ¦   «         ¦  «         |dd…         D ]g}|                      d¦  «         |                     t          j        d                     |¦  «        dd	d	¬
¦  «                             ¦   «         ¦  «         Œh|                      d¦  «         Œà�Œ¼|r|d         r|                      d¦  «         d                     |¦  «        S )zÓSerialize release notes from parsed fragments and notes.

    This function essentially takes the output of ``parsenotesfromrevisions()``
    and ``parserelnotesfile()`` and produces output combining the 2.
    rÉ   r    rÊ   rj   éN   )Úwidthr   s   * s     )rÒ   Ú
initindentÚ
hangindentr1   Néÿÿÿÿó   
)r,   r€   r6   r¯   rl   r   Úwraprm   Ú
splitlinesr8   rË   )
r   r³   rp   ÚsectionnameÚsectiontitler-   r.   r¶   rq   Ú	nontitleds
             r   ÚserializenotesrÜ   ä  s  € ð €Eà%-ð 9ñ 9Ñ!ˆ�\Ø˜eÐ#Ð#Øà�Š�\Ñ"Ô"Ð"Ø�Š�T�C Ñ-Ô-Ñ-Ñ.Ô.Ð.Ø�Š�SÑÔÐð "'×!7Ò!7¸Ñ!DÔ!Dð 	ð 	ÑˆE�:Ø�LŠL˜ÑÔÐØ�LŠL˜¥ E¡
¤
Ñ*Ñ+Ô+Ð+Ø�LŠL˜ÑÔÐå$ ZÑ0Ô0ð ð ‘��4Øð &Ø—L’L Ñ%Ô%Ð%Ø—’Ý”O D§I¢I¨d¡O¤O¸2Ð>Ñ>Ô>×IÒIÑKÔKñô ð ð ð �LŠL˜ÑÔÐÐð ×-Ò-¨kÑ:Ô:ˆ	Ø×!Ò! +Ñ.Ô.ð 	°9ð 	à�LŠL�Ñ(Ô(Ð(Ø�LŠL˜¥¥NÑ 3Ô 3Ñ3Ñ4Ô4Ð4Ø�LŠL˜ÑÔÐà#ð 	ð 	ˆJØ�LŠLÝ”Ø—I’I˜j¨œmÑ,Ô,ØØ$Ø$ð	ñ ô ÷
 ’*‘,”,ñô ð ð # 1 2 2œð 	ð 	�Ø—’˜SÑ!Ô!Ð!Ø—’Ý”OØŸ	š	 $™œØ Ø#(Ø#(ð	ñ ô ÷
 !’j‘l”lñô ð ð ð �LŠL˜ÑÔÐÐñ+	ð. ð ��r”ð Ø�Š�SÑÔÐà�:Š:�eÑÔÐr    ó   releasenotesó   ró   revr    s&   revisions to process for release notess   REVó   có   checkFs+   checks for validity of admonitions (if any)ó   ló   lists/   list the available admonitions with their titles"   hg releasenotes [-r REV] [-c] FILE)Úhelpcategoryc                 óæ  — t          j        |¦  «        }t          | |¦  «        }t          j        |dddg¦  «         |                     d¦  «        rt          | |¦  «        S |                     d¦  «        }t          j        ||pdg¦  «        }|                     d¦  «        r$t          | || 
                    ¦   «         |¦  «        S t          || 
                    ¦   «         |¦  «        }|€8|                      d¦  «         |                      t          ||¦  «        ¦  «        S 	 t          |d¦  «        5 }t!          ||                     ¦   «         ¦  «        }	ddd¦  «         n# 1 swxY w Y   n# t$          $ r t'          ¦   «         }	Y nw xY w|	                     | |¦  «         t          |d¦  «        5 }|                     t          ||	¦  «        ¦  «         ddd¦  «         dS # 1 swxY w Y   dS )	aé	  parse release notes from commit messages into an output file

    Given an output file and set of revisions, this command will parse commit
    messages for release notes then add them to the output file.

    Release notes are defined in commit messages as ReStructuredText
    directives. These have the form::

       .. directive:: title

          content

    Each ``directive`` maps to an output section in a generated release notes
    file, which itself is ReStructuredText. For example, the ``.. feature::``
    directive would map to a ``New Features`` section.

    Release note directives can be either short-form or long-form. In short-
    form, ``title`` is omitted and the release note is rendered as a bullet
    list. In long form, a sub-section with the title ``title`` is added to the
    section.

    The ``FILE`` argument controls the output file to write gathered release
    notes to. The format of the file is::

       Section 1
       =========

       ...

       Section 2
       =========

       ...

    Only sections with defined release notes are emitted.

    If a section only has short-form notes, it will consist of bullet list::

       Section
       =======

       * Release note 1
       * Release note 2

    If a section has long-form notes, sub-sections will be emitted::

       Section
       =======

       Note 1 Title
       ------------

       Description of the first long-form note.

       Note 2 Title
       ------------

       Description of the second long-form note.

    If the ``FILE`` argument points to an existing file, that file will be
    parsed for release notes having the format that would be generated by this
    command. The notes from the processed commit messages will be *merged*
    into this parsed set.

    During release notes merging:

    * Duplicate items are automatically ignored
    * Items that are different are automatically ignored if the similarity is
      greater than a threshold.

    This means that the release notes file can be updated independently from
    this command and changes should not be lost when running this command on
    that file. A particular use case for this is to tweak the wording of a
    release note after it has been added to the release notes file.

    The -c/--check option checks the commit message for invalid admonitions.

    The -l/--list option, presents the user with a list of existing available
    admonitions along with their title. This also includes the custom
    admonitions (if any).
    rã   rß   rá   s   not public()NrÝ   ó   rbs   wb)r   ÚbyteskwargsrT   r   Úcheck_incompatible_argumentsr5   r§   r	   Úrevranger¥   rd   r»   ÚpagerrF   rÜ   r   rÏ   r“   ÚFileNotFoundErrorr   rO   )
rJ   r]   Úfile_Úoptsr   r£   r¢   ÚincomingÚfhr³   s
             r   Úreleasenotesrð   -  sZ  € õ^ Ô Ñ%Ô%€DÝ# B¨Ñ-Ô-€HåÔ(¨¨w¸ÀÐ8JÑKÔKÐKà‡x‚x�ÑÔð 0Ý! " hÑ/Ô/Ð/à
�(Š(�6Ñ
Ô
€CÝÔ˜t cÐ&<¨_Ð%=Ñ>Ô>€DØ‡x‚x�ÑÔð BÝ  D¨(¯.ª.Ñ*:Ô*:¸DÑAÔAÐAå& t¨X¯^ª^Ñ-=Ô-=¸tÑDÔD€Hà€}Ø
�Š�Ñ!Ô!Ð!Ø�xŠx� x°Ñ:Ô:Ñ;Ô;Ð;ð%Ý�%˜ÑÔð 	? 2Ý)¨(°B·G²G±I´IÑ>Ô>ˆEð	?ð 	?ð 	?ñ 	?ô 	?ð 	?ð 	?ð 	?ð 	?ð 	?ð 	?øøøð 	?ð 	?ð 	?ð 	?øøåð %ð %ð %Ý"Ñ$Ô$ˆˆˆð%øøøð 
‡K‚K��HÑÔÐå	ˆe�UÑ	Ô	ð 2˜rØ
�Š• ¨%Ñ0Ô0Ñ1Ô1Ð1ð2ð 2ð 2ñ 2ô 2ð 2ð 2ð 2ð 2ð 2ð 2ð 2øøøð 2ð 2ð 2ð 2ð 2ð 2sH   Ä&E1 Ä6#E%ÅE1 Å%E)Å)E1 Å,E)Å-E1 Å1FÆFÆ5$G&Ç&G*Ç-G*s   debugparsereleasenotesT)Únorepoc           	      óH  — |dk    rt           j                             ¦   «         }n<t          |d¦  «        5 }|                     ¦   «         }ddd¦  «         n# 1 swxY w Y   t	          | |¦  «        }t          ||¦  «        }|D �]}|                      t          d¦  «        |z  ¦  «         |                     |¦  «        D ]g\  }}	|                      t          d¦  «        |z  ¦  «         |	D ]:}
|                      t          d¦  «        d 	                    |
¦  «        z  ¦  «         Œ;Œh| 
                    |¦  «        D ]a}	|                      t          d¦  «        ¦  «         |	D ]:}
|                      t          d¦  «        d 	                    |
¦  «        z  ¦  «         Œ;Œb�ŒdS )	z6parse release notes and print resulting data structurerÊ   ræ   Ns   section: %s
s     subsection: %s
s       paragraph: %s
rj   s     bullet point:
)r   Ústdinr“   r   rT   rÏ   rF   r   r6   rm   r8   )rJ   Úpathr]   rÌ   rï   r   r³   r#   r-   r.   rq   s              r   Údebugparsereleasenotesrõ   »  sü  € ð ˆt‚|€|ÝŒ~×"Ò"Ñ$Ô$ˆˆå�$˜ÑÔð 	 "Ø—7’7‘9”9ˆDð	ð 	ð 	ñ 	ô 	ð 	ð 	ð 	ð 	ð 	ð 	øøøð 	ð 	ð 	ð 	õ $ B¨Ñ-Ô-€Hå! (¨DÑ1Ô1€Eàð 
Fñ 
FˆØ
�Š•Ð#Ñ$Ô$ wÑ.Ñ/Ô/Ð/Ø!&×!7Ò!7¸Ñ!@Ô!@ð 	Fð 	FÑˆE�:Ø�HŠH•QÐ,Ñ-Ô-°Ñ5Ñ6Ô6Ð6Ø"ð Fð F�Ø—’�Ð1Ñ2Ô2°T·Y²Y¸t±_´_ÑDÑEÔEÐEÐEðFð  ×3Ò3°GÑ<Ô<ð 	Fð 	FˆJØ�HŠH•QÐ+Ñ,Ô,Ñ-Ô-Ð-Ø"ð Fð F�Ø—’�Ð1Ñ2Ô2°T·Y²Y¸t±_´_ÑDÑEÔEÐEÐEðFñ	Fð
Fð 
Fs   ¶AÁAÁAr   )7Ú__doc__r—   ru   Úmercurial.i18nr   Úmercurial.pycompatr   Úmercurial.noder   Ú	mercurialr   r   r   r	   r
   r   r   r   Úmercurial.utilsr   r   ÚcmdtableÚcommandÚwarningsÚcatch_warningsÚfilterwarningsÚUserWarningÚfuzzywuzzy.fuzzrB   r…   ÚImportErrorÚ
testedwithrW   ÚcompileÚ	MULTILINErŸ   rw   rË   r   rT   rD   rE   rG   rH   rI   r‚   rX   r¥   r§   r»   rÏ   rÜ   ÚCATEGORY_CHANGE_NAVIGATIONrð   rõ   r;   r    r   ú<module>r     s   ððð ð €€€Ø 	€	€	€	à Ð Ð Ð Ð Ð Ø #Ð #Ð #Ð #Ð #Ð #Ø Ð Ð Ð Ð Ð ð	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ðð ð ð ð ð ð ð ð
 €Ø
ˆ)Ô
˜HÑ
%Ô
%€ðð €O€O€Oà	 ˆÔ	 Ñ	"Ô	"ð 
ð 
ØˆÔØØ,Ø Ø$ð		
ñ 	
ô 	
ð 	
ð 	'Ð&Ð&Ð&Ð&Ð&àÔÐð
ð 
ð 
ñ 
ô 
ð 
ð 
ð 
ð 
ð 
ð 
øøøð 
ð 
ð 
ð 
øøð ð ð ð Ø€D€D€Dðøøøð #€
ð ���?Ñ#Ô#Ð$Ø
ˆAˆAÐ0Ñ1Ô1Ð2ØˆQˆQˆ|‰_Œ_ÐØˆaˆaÐ+Ñ,Ô,Ð-ØˆQˆQˆ~ÑÔÐðÐ ð ˆrŒzÐAÀ2Ä<ÑPÔP€Ø-€à�Ð#Ñ$Ô$€ðZ;ð Z;ð Z;ð Z;ð Z;ñ Z;ô Z;ð Z;ðzð ð ð ð ñ ô ð ð2
ð 
ð 
ð
ð 
ð 
ðð ð ðð ð ðð ð ð$ð ð ð" ð  ð  ð$!Eð !Eð !EðH9ð 9ð 9ð
@ð @ð @ðFLð Lð Lð^Fð Fð FðR 	€Øð ØØØˆAÐ7Ñ8Ô8ØˆAˆf‰IŒIð	
ð ØØØˆAÐ<Ñ=Ô=ØˆAˆf‰IŒIð	
ð ØØØˆAÐ@ÑAÔAØð	
ðð. €AÐ+Ñ,Ô,ØÔ3ð5ñ ô ð8o2ð o2ð o2ñ9ô ð8o2ðd 	€Ð	"¨4Ð0Ñ0Ô0ðFð Fð Fñ 1Ô0ðFð Fð Fs6   ÁB Á"BÂB ÂBÂB ÂBÂB ÂB#Â"B#