ó
    6°hI  ã                  óŽ   • S SK Jr  SSKJr  SSKJrJr  SSKJrJ	r	J
r
JrJrJr  S rSS jrSS	 jrS
 rSS jrS r SS jrS rg)é    )Úannotationsé   )Ú_)ÚhexÚnullrev)ÚcontextÚ
mergestateÚmetadataÚphasesÚscmutilÚsubrepoutilc                ó‚   • U R                   S:X  a  SnSnX4$ U R                  R                  SS5      nUS:g  nUS;   nX4$ )z¾return a (changelog, filelog) boolean tuple

changelog: copy related information should be stored in the changeset
filelof:   copy related information should be written in the file revision
ó   changeset-sidedataTó   experimentals   copies.write-toó   changeset-only)r   s   compatibility)ÚfilecopiesmodeÚuiÚconfig)ÚrepoÚwritechangesetcopyÚwritefilecopymetaÚwritecopiestos       Ú2/usr/lib/python3/dist-packages/mercurial/commit.pyÚ_write_copy_metar      sh   € ð ×ÑÐ3Ó3Ø!ÐØ Ðð Ð0Ð0ð Ÿ™Ÿ™ Ð8JÓKˆØ)Ð->Ñ>ÐØ*ð /
ñ 
Ðð Ð0Ð0ó    Nc                óÚ  • U R                  5       n UR                  5       UR                  5       pTUR                  5       nU R	                  5          U R                  S5       n[        XqX#S9u  p‰UR                  5       R                  5       n
U
b  S H  nU
R                  US5        M     U R                  R                  S:X  a  [        X
U	5      n
U R                  R                  5       nU R                  R                  [!        S5      5        U R                  R#                  U5        U R                  R%                  UU	UR'                  5       UUR)                  5       UR)                  5       UUR+                  5       U
5	      nX   R-                  5       nXÀR                  R                  5       :w  a*  U R/                  XàR                  R1                  U5      5        UR3                  5       U=(       a    UR3                  5       =(       d    SnnU R5                  SS	[3        U5      UUS
9  [6        R8                  " U R                  U5      nXÀR                  R                  5       :H  =(       a    X   R;                  5       (       + nU(       a   U(       d  [<        R>                  " XUU/5        UsSSS5        sSSS5        $ ! , (       d  f       O= fSSS5        g! , (       d  f       g= f)a[  Add a new revision to the target repository.
Revision information is passed via the context argument.

ctx.files() should list all files involved in this commit, i.e.
modified/added/removed files. On merge, it may be wider than the
ctx.files() to be committed, since any file nodes derived directly
from p1 or p2 are excluded from the committed ctx.files().

origctx is for convert to work around the problem that bug
fixes to the files list in changesets change hashes. For
convert to be the identity, it can pass an origctx and this
function will use the same files list when it makes sense to
do so.
s   commit)ÚerrorÚorigctxN)ó   p1copiesó   p2copiesó
   filesaddedó   filesremoveds   extras   committing changelog
r   s   pretxncommitT)ÚthrowÚnodeÚparent1Úparent2) Ú
unfilteredÚp1Úp2ÚuserÚlockÚtransactionÚ_prepare_filesÚextraÚcopyÚpopÚ	changelogÚ_copiesstorageÚ_extra_with_copiesÚtiprevr   Únoter   ÚdelayupdateÚaddÚdescriptionr$   ÚdateÚrevÚregister_changesetÚchangelogrevisionr   Úhookr   ÚnewcommitphaseÚphaser   Úregisternew)r   Úctxr   r   r(   r)   r*   ÚtrÚmnÚfilesr.   ÚnameÚoldtipÚnr:   Úxp1Úxp2ÚtargetphaseÚ	waspublics                      r   Ú	commitctxrL   +   s*  € ð �?‰?Ó€Dà�V‰V‹X�s—v‘v“xˆØ�8‰8‹:€Dà	�‰��d×&Ñ& yÔ1°RÜ" 2°%ÑI‰	ˆà—	‘	“× Ñ Ó"ˆàÑó�ð —	‘	˜$ Ö%ñð �>‰>×(Ñ(¨HÓ4Ü& t°EÓ:ˆEð —‘×&Ñ&Ó(ˆð 	�‰�‰”QÐ0Ó1Ô2Ø�‰×"Ñ" 2Ô&Ø�N‰N×ÑØØØ�O‰OÓØØ�G‰G‹IØ�G‰G‹IØØ�H‰H‹JØó

ˆð ‰g�k‰k‹mˆØ—^‘^×*Ñ*Ó,Ó,Ø×#Ñ# C¯©×)IÑ)IÈ#Ó)NÔOà—6‘6“8˜RŸ_ B§F¡F£H×3°ˆSˆØ�	‰	ØØÜ�Q“ØØð 	ñ 	
ô "×0Ò0°·±¸#Ó>ˆð Ÿn™n×3Ñ3Ó5Ñ5×O¸d¹i¿o¹oÓ>OÔ:Oˆ	æžyô ×Ò˜t¨°s°eÔ<Ø÷u 2Ð1�‰×1Õ1ú��Žús%   ÁKÁ"IKÊ/	KË
K	ËKË
K*c           	     óD  • UR                  5       nUR                  5       n[        U5      u  pg[        R                  " 5       n[
        R
                  R                  U5      n	[        XIU5      n
U
 H  nUR                  U5        M     0 nUR                  5       R                  5       R                  5       (       dA  U	R                  5       R                  5        H  u  pÞUR                  S5      nUc  M  XüU'   M!     UR                  5       (       a—  U(       d�  UR                  R!                  S5        UR                  5       nUR#                  UR%                  5       5        U(       a>  UR'                  UR)                  5       5        UR+                  UR-                  5       5        OSUR%                  5       (       d3  U(       d,  UR                  R!                  S5        UR                  5       nO[/        XX˜XÂS9nU(       aW  UR                  5       U:X  aC  UR%                  5       nUR0                  R3                  U5      (       d   eUR#                  U5        U(       a>  UR5                  UR7                  5       5        UR9                  UR;                  5       5        UU4$ )Ns   outside-narrow-merge-actions   reusing known manifest
s*   reusing manifest from p1 (no file change)
)r   )r   r(   r   r
   ÚChangingFilesr	   ÚreadÚ_get_salvagedÚmark_salvagedÚnarrowmatchÚalwaysÚ	allextrasÚitemsÚgetÚmanifestnoder   ÚdebugÚupdate_touchedrD   Úupdate_addedÚ
filesaddedÚupdate_removedÚfilesremovedÚ_process_filesÚtouchedÚissubsetÚupdate_copies_from_p1Úp1copiesÚupdate_copies_from_p2Úp2copies)rB   rA   r   r   r   r(   r   r   rD   ÚmsÚsalvagedÚsÚnarrow_filesÚfÚeÚactionrC   Ú	origfiless                     r   r-   r-   |   sô  € Ø�8‰8‹:€DØ	�‰‹€Bä,<¸TÓ,BÑ)ÐÜ×"Ò"Ó$€EÜ	×	Ñ	×	#Ñ	# DÓ	)€BÜ˜T sÓ+€HÛˆØ×Ñ˜AÖñ ð €LØ�8‰8‹:×!Ñ!Ó#×*Ñ*×,Ñ,Ø—L‘L“N×(Ñ(Ö*‰DˆAØ—U‘UÐ9Ó:ˆFØÓ!Ø"(˜Q“ñ +ð ×Ñ×Ñ¦,à�‰�‰Ð1Ô2Ø×ÑÓˆØ×Ñ˜SŸY™Y›[Ô)ÞØ×Ñ˜sŸ~™~Ó/Ô0Ø× Ñ  ×!1Ñ!1Ó!3Ô4øØ�Y‰Y�[‰[¦Ø�‰�‰ÐDÔEØ�_‰_Ó‰ä˜B R°ÑJˆæ�7×'Ñ'Ó)¨RÓ/Ø—M‘M“Oˆ	Ø�}‰}×%Ñ% i×0Ñ0Ð0Ð0Ø×Ñ˜YÔ'æØ×#Ñ# C§L¡L£NÔ3Ø×#Ñ# C§L¡L£NÔ3àˆuˆ9Ðr   c                óv  • / nU R                   S:H  nU(       a   [        UR                  5       5      S:”  aƒ  UR                  5       (       an  [	        UR                  5       R                  5       5       HC  nUR                  U5      R                  S5      nUS:X  d  M+  XR;   d  M2  UR                  U5        ME     U$ )zrreturns a list of salvaged files

returns empty list if config option which process salvaged files are
not enabledr   r   ó   merge-removal-candidateó   yes)
r   ÚlenÚparentsÚactiveÚsortedrT   ÚkeysÚextrasrV   Úappend)r   re   rA   rf   Úcopy_sdÚfnameÚmight_removeds          r   rP   rP   §   s’   € ð
 €HØ×!Ñ!Ð%:Ñ:€GÞ”3�s—{‘{“}Ó%¨Ó)Ø�9‰9�;‰;Ü §¡£× 3Ñ 3Ó 5Ö6�Ø "§	¡	¨%Ó 0× 4Ñ 4Ð5OÓ P�Ø  FÕ*Ø•|Ø Ÿ™¨Ö.ñ	 7ð
 €Or   c                óD	  • UR                  5       nUR                  5       nUR                  5       n[        U5      u  pšUR	                  5       nUR	                  5       nUR                  5       nUR                  5       nUR                  5       nUR                  5       n/ n[        UR                  5       5      n[        U5      nUR                  R                  [        S5      5        [        R                  " U5      nUR                  5       UR!                  5       -   nUR#                  UR%                  5       5        UR'                  5         U GH#  nUR                  R                  U" U5      S-   5        UU;   GaI  UR)                  U5      nU[*        R,                  :X  a#  UR/                  U5        UR1                  U5        OþU[*        R2                  :X  aX  UR5                  U5        UR1                  U5        UU   nUR7                  U5      S   =(       d    SnUR9                  UUU5        O’U[*        R:                  :X  aX  UR=                  U5        UR1                  U5        UU   nUR7                  U5      S   =(       d    SnUR9                  UUU5        O&[        S5      n[        S5      nUR?                  UUS9eGMx   UU   nUc  UR1                  U5        GM•  UR1                  U5        [A        UUUUUX
U5      u  nnU(       aA  US:X  a  UR5                  U5        O)US	:X  a  URC                  U5        OUR=                  U5        UR9                  UUURE                  5       5        GM&     U Vs/ s H  nUU;   d  UU;   d  M  UPM     nn[K        U Vs/ s H  nUU;   d  M  UPM     sn5      nU H  nUU	 M     URM                  5       [N        :X  a  URQ                  U5        OB[R        RT                  " XX�U45      nU H#  nU" U5      (       a  M  UR/                  U5        M%     [W        U UUUUURX                  UU[[        U5      5	      n U $ ! [F         a/    UR                  RI                  [        S
5      U" U5      -  5        e f = fs  snf s  snf )Ns   committing files:
ó   
r   r   s/   corrupted mergestate, unknown narrow action: %bs   restart the merge)ÚhintÚaddedÚmergeds   trouble committing %s!
).r   r(   r)   r   Úmanifestctxr/   rO   ÚlistÚremovedrp   r   r5   r   r   ÚgetuipathfnÚmodifiedr}   Úextendrt   ÚsortrV   r	   ÚCHANGE_REMOVEDÚmark_removedrv   ÚCHANGE_ADDEDÚ
mark_addedÚfindÚsetÚCHANGE_MODIFIEDÚmark_touchedÚAbortÚ_filecommitÚmark_mergedÚflagsÚOSErrorÚwarnrs   r:   r   r\   r
   Úget_removal_filterÚ_commit_manifestr_   Úbool)!rB   rA   re   rD   rh   r   r   r(   r)   r   r   Úm1ctxÚm2ctxÚmctxÚmÚm1Úm2r}   r�   ÚlinkrevÚuipathfnÚ	all_filesri   Únarrow_actionÚfnoder‘   Úmsgr|   ÚfctxÚ
is_touchedÚdropÚrfrC   s!                                    r   r^   r^   ¸   så  € Ø�8‰8‹:€DØ	�‰‹€BØ	�‰‹€Bä,<¸TÓ,BÑ)Ðà�N‰NÓ€EØ�N‰NÓ€EØ�:‰:‹<€Dà�	‰	‹€AØ	�‰‹€BØ	�‰‹€Bð €EÜ�3—;‘;“=Ó!€GÜ�$‹i€GØ‡G�G‡L�L”Ð)Ó*Ô+Ü×"Ò" 4Ó(€HØ—‘“ §¡£Ñ,€IØ×Ñ�\×&Ñ&Ó(Ô)Ø‡N�NÔÜˆØ�‰�‰‘X˜a“[ 5Ñ(Ô)Ø�ÔØ(×,Ñ,¨QÓ/ˆMØ¤
× 9Ñ 9Ó9Ø×"Ñ" 1Ô%Ø—‘˜qÕ!Ø¤*×"9Ñ"9Ó9Ø× Ñ  Ô#Ø—‘˜Q”Ø˜1™�ØŸ
™
 1› aÑ(×/¨C�Ø—‘�a˜ Õ&Ø¤*×"<Ñ"<Ó<Ø×"Ñ" 1Ô%Ø—‘˜Q”Ø˜1™�ØŸ
™
 1› aÑ(×/¨C�Ø—‘�a˜ Õ&äÐJÓK�ÜÐ-Ó.�Ø—k‘k #¨D�kÐ1Ð1Úð	Ø�q‘6ˆDØ‰|Ø—‘˜q×!à—‘˜Q”Ü$/Ø˜$  B¨°Èó%Ñ!��zö Ø! WÓ,Ø×(Ñ(¨Õ+Ø# xÓ/Ø×)Ñ)¨!Õ,à×*Ñ*¨1Ô-Ø—‘�a˜ §
¡
£×-ñQ ñ\ "Ó8š'�Q Q¨"£W°°R±�q™'€GÐ8Ü™gÓ0šg˜¨¨a©—1™gÑ0Ó1€DÛˆØˆaŠDñ à	‡v�vƒx”7ÓØ×Ñ˜WÕ%ä×(Ò(¨°2¸2Ð.>Ó?ˆÛˆAÙ�a—5“5Ø×"Ñ" 1Ö%ñ ô 
Ø
ØØØØ	Ø�‰ØØÜˆ\Óó

€Bð €Iøô; ó 	Ø�G‰G�L‰LœÐ6Ó7¹(À1»+ÑEÔFØð	üò
 9ùÚ0s+   Ë	QË%BQÍ<RÎRÎ!
RÎ/RÑ9Rc                ó  • UR                  5       nUR                  X€R                  5      n	UR                  X€R                  5      n
SnXšs=:X  a  U R                  :X  a  O  OSn[        U[        R
                  5      (       až  UR                  5       nXÉU
4;   a‡  U R                  R                  SU-  5        X�R                  :w  a#  UR                  U5      UR                  5       :w  d2  X R                  :w  a%  UR                  U5      UR                  5       :w  a  SnXË4$ U R                  U5      n0 nUR                  5       nSnU(       a½  Xø:w  a¸  UR                  U5      nU
nU(       a  X R                  :X  d  Uc  Xó;   a  X?   nU	nU(       aQ  U R                  R                  SX�[        U5      4-  5        U(       a  XþS'   [        U5      US'   U R                  Up©GOU R                  R                  [        S5      X�4-  5        OíX�R                  :X  a  X R                  p©OÑX R                  :w  aÂ  UR                  5       (       a1  UR!                  U5      R                  S	5      S
:X  a  X R                  p©O|UR                  5       (       a1  UR!                  U5      R                  S5      S:w  a  X�R                  p©O6UR#                  Xš5      nU	U;   a  X R                  p©OU
U;   a  U R                  n
SnU R                  R%                  SS5      (       a;  UR                  5       (       a&  UR!                  U5      R                  S5      S:X  a  SnUR'                  5       nX R                  :w  d4  X�R                  :X  d%  U(       d  UR)                  U	U5      (       d  U(       a/  Uc  X R                  :X  a  SnOSnUR+                  UXåXIU
5      nUU4$ X‚;   a+  UR                  U5      UR                  5       :w  a  SnU	nUU4$ U	nUU4$ )aß  
commit an individual file as part of a larger transaction

input:

    fctx:       a file context with the content we are trying to commit
    manifest1:  manifest of changeset first parent
    manifest2:  manifest of changeset second parent
    linkrev:    revision number of the changeset being created
    tr:         current transation
    includecopymeta: boolean, set to False to skip storing the copy data
                (only used by the Google specific feature of using
                changeset extra as copy source of truth).
    ms:         mergestate object

output: (filenode, touched)

    filenode: the filenode that should be used by this changeset
    touched:  one of: None (mean untouched), 'added' or 'modified'
Nr}   s   reusing %s filelog entry
rƒ   s    %s: copy %s:%s
s   copys   copyrevs8   warning: can't find ancestor for '%s' copied from '%s'!
s   filenode-sources   others   mergedro   Fr   s   merge-track-salvagedrn   Tr~   )ÚpathrV   ÚnullidÚ
isinstancer   ÚfilectxÚfilenoder   rX   r‘   ÚfileÚ
copysourcer   r“   r   rr   ru   ÚcommonancestorsheadsÚ
configboolÚdataÚcmpr7   )r   r£   Ú	manifest1Ú	manifest2r�   rB   Úincludecopymetare   rx   Úfparent1Úfparent2r_   r$   ÚflogÚmetaÚcfnamer¡   ÚcnodeÚ
newfparentÚfparentancestorsÚforce_new_nodeÚtexts                         r   r�   r�     sc  € ð> �I‰I‹K€EØ�}‰}˜U§K¡KÓ0€HØ�}‰}˜U§K¡KÓ0€HØ€GØÕ*˜tŸ{™{Ö*Øˆä�$œŸ™×(Ñ(ð �}‰}‹ˆØ˜hÐ'Ó'Ø�G‰G�M‰MÐ7¸%Ñ?Ô@àŸK™KÓ'Ø—O‘O EÓ*¨d¯j©j«lÓ:àŸK™KÓ'Ø—O‘O EÓ*¨d¯j©j«lÓ:à$�Ø�=Ð à�9‰9�UÓ€DØ€DØ�_‰_Ó€FØ€Eæ�&“/ð( —‘˜fÓ%ˆØˆ
æàŸK™KÓ'¨5©=àÓ&Ø%Ñ-�EØ!)�Jö Ø�G‰G�M‰MÐ.°%ÄÀUÃÐ1LÑLÔMÞØ &�W‘Ü#& u£:��ZÑ Ø!%§¡¨j’hà�G‰G�L‰LÜð+óð �/ñ	"õð 
—[‘[Ó	 Ø%§{¡{‘(Ø	—[‘[Ó	 Ø�9‰9�;‰;˜2Ÿ9™9 UÓ+×/Ñ/Ð0BÓCÀxÓOØ!)¯;©;‘hØ�Y‰Y�[‰[˜RŸY™Y uÓ-×1Ñ1°)Ó<ÀÓFØ!)¯;©;‘hð  $×8Ñ8¸ÓLÐØÐ+Ó+Ø%-¯{©{™(ØÐ-Ó-ØŸ;™;�à€Nð 	�‰×Ñ˜?Ð,C×DÑDØ�I‰I�K‰KØ�I‰I�eÓ× Ñ Ð!;Ó<ÀÓFàˆà�9‰9‹;€Dà—K‘KÓØ—{‘{Ó"ÞØ�8‰8�H˜d×#Ñ#Þà‰?ØŸ;™;Ó&Ø$‘à"�Ø—‘˜˜t¨¸HÓEˆð �'ˆ>Ðð 
Ó	 	§¡°Ó 6¸$¿*¹*»,Ó FØˆØˆð �'ˆ>Ðð ˆØ�'ˆ>Ðr   c	           
     óÆ  • UR                  5       n	Sn
UR                  5       nUR                  5       nUR                  5       nUR	                  5       nU(       d4  UR                  U[        R                  " X’R                  5       5      5      n
U(       d"  U
(       a  U	R                  R                  S5        U(       d  U
(       aq  U	R                  R                  [        S5      5        U(       a  SnOU	R                  5       nUR                  U UUR                  5       UR                  5       UUUS9nU$ U	R                  R                  S5        UR                  5       nU$ )ac  make a new manifest entry (or reuse a new one)

given an initialised manifest context and precomputed list of
- files: files affected by the commit
- added: new entries in the manifest
- drop:  entries present in parents but absent of this one

Create a new manifest revision, reuse existing ones if possible.

Return the nodeid of the manifest revision.
NsI   not reusing manifest (no file change in changelog, but manifest differs)
s   committing manifest
)Úmatchs;   reusing manifest from p1 (listed files actually unchanged)
)r   r(   r)   r   rO   Údiffr   Ú
matchfilesrD   r   rX   r5   r   rR   ÚwriterW   )rB   r�   rA   r™   ÚmanifestrD   r}   r¥   Úhas_some_narrow_actionr   Úmdr(   r)   r—   r›   rÁ   rC   s                    r   r•   r•   ¾  s  € ð, �8‰8‹:€Dà	€Bð 
�‰‹€BØ	�‰‹€BØ�N‰NÓ€Eà	�‰‹€Bæð �W‰W�Xœw×1Ò1°$¿	¹	»ÓDÓEˆÞ–RØ�‰�‰ð2ô	
ö –Ø�‰�‰”QÐ/Ó0Ô1ö "Ø‰Eà×$Ñ$Ó&ˆEØ�Z‰ZØØØ�O‰OÓØ�O‰OÓØØØð ð 
ˆð €Ið 	�‰�‰ØOô	
ð �_‰_Óˆà€Ir   c                ó6  • UR                   nUR                  nUR                  nUR                  n[	        UR
                  5      n[        U 5      S   (       d,  U=(       d    SnU=(       d    SnU=(       d    SnU=(       d    SnX4XV4nUc  [        S U 5       5      (       a  0 nUb  [        R                  " X#5      nX1S'   Ub  [        R                  " X$5      nXAS'   Ub  [        R                  " X%5      nXQS'   Ub  [        R                  " X&5      nXaS'   U$ )z2encode copy information into a `extra` dictionnaryr   Nc              3  ó(   #   • U  H  oS Lv •  M
     g 7f)N© )Ú.0Úxs     r   Ú	<genexpr>Ú%_extra_with_copies.<locals>.<genexpr>  s   é € ÐB²M¨q d�]²Mùs   ‚r   r    r!   r"   )Úcopied_from_p1Úcopied_from_p2r}   r�   rs   r_   r   Úanyr
   ÚencodecopiesÚencodefileindices)r   r.   rD   rb   rd   r[   r]   Úextrasentriess           r   r3   r3     s  € à×#Ñ#€HØ×#Ñ#€HØ—‘€JØ—=‘=€LÜ�5—=‘=Ó!€EÜ˜DÓ! !×$ð
 ×#˜tˆØ×#˜tˆØ×' 4ˆ
Ø#×+ tˆà¨
Ð@€MØ�}œÑB±MÓB×BÑBØˆØÑÜ×(Ò(¨Ó9ˆØ%ˆkÑØÑÜ×(Ò(¨Ó9ˆØ%ˆkÑØÑÜ×/Ò/°ÓBˆ
Ø)ˆmÑØÑÜ×1Ò1°%ÓFˆØ!-ˆoÑØ€Lr   )FN)NF)F)Ú
__future__r   Úi18nr   r$   r   r   Ú r   r	   r
   r   r   r   r   rL   r-   rP   r^   r�   r•   r3   rÊ   r   r   Ú<module>rØ      sR   ðõ #å ÷÷
÷ ò1ô&Nôb(òVô"^òBbð\ !ôGóT r   