§
    cÌcÒ›  ã                   óÞ  — d Z ddlmZ ddlmZmZmZ ddlmZm	Z	m
Z
mZmZ ddlmZmZ ddlmZ ddlmZmZmZ dd	lmZ  e e¦   «         d
¦  «          G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ de	¦  «        Z G d„ de	¦  «        Z G d„ de	¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z  G d„ de¦  «        Z! G d„ d e¦  «        Z"d!S )"zWeave-era BzrDir formats.é    )ÚBytesIOé   )ÚBzrDirÚBzrDirFormatÚBzrDirMetaFormat1)Ú
ControlDirÚ	ConverterÚMustHaveWorkingTreeÚNoColocatedBranchSupportÚformat_registry)ÚerrorsÚlockable_files)Úgettext)Úget_transportÚlocalÚ
NoSuchFile)Úlazy_importa’  
import os

from breezy import (
    branch as _mod_branch,,
    graph,
    lockdir,
    osutils,
    revision as _mod_revision,
    trace,
    ui,
    urlutils,
    )
from breezy.bzr import (
    versionedfile,
    weave,
    xml5,
    )
from breezy.plugins.weave_fmt.store.versioned import VersionedFileStore
from breezy.transactions import WriteTransaction
from breezy.plugins.weave_fmt import xml4
c                   ó<   — e Zd ZdZdZ	 	 	 	 dd„Zed„ ¦   «         ZdS )ÚBzrDirFormatAllInOnez*Common class for formats before meta-dirs.TFNc
                 ó¢   — |du}
|
r,t          ¦   «         }|                     |||||||||	¬¦	  «	        S t          j        | |||||||||	¬¦
  «
        S )z*See ControlDir.initialize_on_transport_ex.N)Úuse_existing_dirÚcreate_prefixÚforce_new_repoÚ
stacked_onÚstack_on_pwdÚrepo_format_nameÚmake_working_treesÚshared_repo)r   Úinitialize_on_transport_exr   )ÚselfÚ	transportr   r   r   r   r   r   r   r   Úrequire_stackingÚformats               úA/usr/lib/python3/dist-packages/breezy/plugins/weave_fmt/bzrdir.pyr   z/BzrDirFormatAllInOne.initialize_on_transport_exI   s›   € ð
 '¨dÐ2Ðð ð 	uÝ&Ñ(Ô(ˆFØ×4Ò4°YØFVÐfsØDRÐ_iØBNÐaqØHZÐhsð	 5ñ uô uð uõ
 Ô6°t¸YØHXÐhuØFTÐakØDPÐcsØJ\Ðjuð	wñ wô wð 	wó    c                 ój   — ||                       ¦   «         k    rt          d|z  ¦  «        ‚ | ¦   «         S ©Nzunexpected format string %r©Úget_format_stringÚAssertionError©ÚclsÚformat_strings     r$   Úfrom_stringz BzrDirFormatAllInOne.from_string^   ó8   € à˜C×1Ò1Ñ3Ô3Ò3Ð3Ý Ð!>ÀÑ!NÑOÔOÐOØˆs‰uŒuˆr%   )FFFNNNNF)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úfixed_componentsr   Úclassmethodr.   © r%   r$   r   r   D   s_   € € € € € Ø4Ð4àÐàEJØY]Ø`dØ/4ðwð wð wð wð* ðð ñ „[ðð ð r%   r   c                   ó�   ‡ — e Zd ZdZej        Zd„ Zed„ ¦   «         Z	d„ Z
d„ Zdd„Zd„ Zdˆ fd
„	Zd„ Zd„ Zd„ Z ee¦  «        Zˆ xZS )ÚBzrDirFormat5a  Bzr control format 5.

    This format is a combined format for working tree, branch and repository.
    It has:
     - Format 2 working trees [always]
     - Format 4 branches [always]
     - Format 5 repositories [always]
       Unhashed stores in the repository.
    c                 ó<   — t          | t          |¦  «        ¦  «        S ©N©Ú
isinstanceÚtype©r    Úothers     r$   Ú__eq__zBzrDirFormat5.__eq__r   ó   € Ý˜$¥ U¡¤Ñ,Ô,Ð,r%   c                 ó   — dS )ú%See BzrDirFormat.get_format_string().s   Bazaar-NG branch, format 5
r6   ©r,   s    r$   r)   zBzrDirFormat5.get_format_stringu   ó
   € ð /Ð.r%   c                 ó"   — ddl m}  |¦   «         S ©Né   ©ÚBzrBranchFormat4©ÚbranchrJ   ©r    rJ   s     r$   Úget_branch_formatzBzrDirFormat5.get_branch_formatz   ó#   € Ø,Ð,Ð,Ð,Ð,Ð,ØÐÑ!Ô!Ð!r%   c                 ó   — dS )ú.See ControlDirFormat.get_format_description().zAll-in-one format 5r6   ©r    s    r$   Úget_format_descriptionz$BzrDirFormat5.get_format_description~   ó   € à$Ð$r%   Nc                 ó   — t          ¦   «         S ©z%See ControlDirFormat.get_converter().)ÚConvertBzrDir5To6©r    r#   s     r$   Úget_converterzBzrDirFormat5.get_converter‚   ó   € õ !Ñ"Ô"Ð"r%   c                 óJ   — |                       t          |¦  «        d¬¦  «        S ©NT)Ú_cloning©Úinitialize_on_transportr   ©r    Úurls     r$   Ú_initialize_for_clonez#BzrDirFormat5._initialize_for_clone‡   ó#   € Ø×+Ò+­M¸#Ñ,>Ô,>ÈÐ+ÑNÔNÐNr%   Fc                 ó  •— ddl m} ddlm} t	          ¦   «                              |¦  «        } |¦   «                              |d¬¦  «         |s1 |¦   «                              |¦  «        }|                     ¦   «          |S )zsFormat 5 dirs always have working tree, branch and repository.

        Except when they are being cloned.
        rH   rI   ©ÚRepositoryFormat5T©Ú	_internal)rL   rJ   Ú
repositoryrf   Úsuperr_   Ú
initializeÚ_init_workingtree)r    r!   r]   rJ   rf   ÚresultrL   Ú	__class__s          €r$   r_   z%BzrDirFormat5.initialize_on_transportŠ   s�   ø€ ð
 	-Ð,Ð,Ð,Ð,Ð,Ø1Ð1Ð1Ð1Ð1Ð1Ý‘'”'×1Ò1°)Ñ<Ô<ˆØÐÑÔ×&Ò& v¸Ð&Ñ>Ô>Ð>Øð 	'Ø%Ð%Ñ'Ô'×2Ò2°6Ñ:Ô:ˆFØ×$Ò$Ñ&Ô&Ð&Øˆr%   c                 ó*   — |                       ¦   «         S r:   ©r)   rR   s    r$   Únetwork_namezBzrDirFormat5.network_name˜   ó   € Ø×%Ò%Ñ'Ô'Ð'r%   c                 ó"   — t          || ¦  «        S ©zSee BzrDirFormat._open.)ÚBzrDir5©r    r!   s     r$   Ú_openzBzrDirFormat5._open›   ó   € å�y $Ñ'Ô'Ð'r%   c                 ó"   — ddl m}  |¦   «         S )úCircular import protection.rH   re   )ri   rf   ©r    rf   s     r$   Ú__return_repository_formatz(BzrDirFormat5.__return_repository_formatŸ   ó#   € à1Ð1Ð1Ð1Ð1Ð1Ø Ð Ñ"Ô"Ð"r%   r:   ©F)r0   r1   r2   r3   r   ÚTransportLockÚ_lock_classr@   r5   r)   rN   rS   rY   rb   r_   rq   rw   Ú(_BzrDirFormat5__return_repository_formatÚpropertyÚrepository_formatÚ__classcell__©rn   s   @r$   r8   r8   e   s÷   ø€ € € € € ðð ð !Ô.€Kð-ð -ð -ð ð/ð /ñ „[ð/ð"ð "ð "ð%ð %ð %ð#ð #ð #ð #ð
Oð Oð Oðð ð ð ð ð ð(ð (ð (ð(ð (ð (ð#ð #ð #ð !˜Ð!;Ñ<Ô<ÐÐÐÐÐr%   r8   c                   ó�   ‡ — e Zd ZdZej        Zd„ Zed„ ¦   «         Z	d„ Z
d„ Zdd„Zd„ Zdˆ fd
„	Zd„ Zd„ Zd„ Z ee¦  «        Zˆ xZS )ÚBzrDirFormat6zäBzr control format 6.

    This format is a combined format for working tree, branch and repository.
    It has:
     - Format 2 working trees [always]
     - Format 4 branches [always]
     - Format 6 repositories [always]
    c                 ó<   — t          | t          |¦  «        ¦  «        S r:   r;   r>   s     r$   r@   zBzrDirFormat6.__eq__²   rA   r%   c                 ó   — dS )rC   s   Bazaar-NG branch, format 6
r6   rD   s    r$   r)   zBzrDirFormat6.get_format_stringµ   rE   r%   c                 ó   — dS )rQ   zAll-in-one format 6r6   rR   s    r$   rS   z$BzrDirFormat6.get_format_descriptionº   rT   r%   c                 ó"   — ddl m}  |¦   «         S rG   rK   rM   s     r$   rN   zBzrDirFormat6.get_branch_format¾   rO   r%   Nc                 ó   — t          ¦   «         S rV   )ÚConvertBzrDir6ToMetarX   s     r$   rY   zBzrDirFormat6.get_converterÂ   s   € õ $Ñ%Ô%Ð%r%   c                 óJ   — |                       t          |¦  «        d¬¦  «        S r\   r^   r`   s     r$   rb   z#BzrDirFormat6._initialize_for_cloneÇ   rc   r%   Fc                 ó  •— ddl m} ddlm} t	          ¦   «                              |¦  «        } |¦   «                              |d¬¦  «         |s1 |¦   «                              |¦  «        }|                     ¦   «          |S )zsFormat 6 dirs always have working tree, branch and repository.

        Except when they are being cloned.
        rH   rI   ©ÚRepositoryFormat6Trg   )rL   rJ   ri   r‘   rj   r_   rk   rl   )r    r!   r]   rJ   r‘   rm   rL   rn   s          €r$   r_   z%BzrDirFormat6.initialize_on_transportÊ   s�   ø€ ð
 	-Ð,Ð,Ð,Ð,Ð,Ø1Ð1Ð1Ð1Ð1Ð1Ý‘”×0Ò0°Ñ;Ô;ˆØÐÑÔ×&Ò& v¸Ð&Ñ>Ô>Ð>Øð 	'Ø%Ð%Ñ'Ô'×2Ò2°6Ñ:Ô:ˆFØ×$Ò$Ñ&Ô&Ð&Øˆr%   c                 ó*   — |                       ¦   «         S r:   rp   rR   s    r$   rq   zBzrDirFormat6.network_nameØ   rr   r%   c                 ó"   — t          || ¦  «        S rt   )ÚBzrDir6rv   s     r$   rw   zBzrDirFormat6._openÛ   rx   r%   c                 ó"   — ddl m}  |¦   «         S )rz   rH   r�   )ri   r‘   ©r    r‘   s     r$   r|   z(BzrDirFormat6.__return_repository_formatß   r}   r%   r:   r~   )r0   r1   r2   r3   r   r   r€   r@   r5   r)   rS   rN   rY   rb   r_   rq   rw   Ú(_BzrDirFormat6__return_repository_formatr‚   rƒ   r„   r…   s   @r$   r‡   r‡   ¦   s÷   ø€ € € € € ðð ð !Ô.€Kð-ð -ð -ð ð/ð /ñ „[ð/ð%ð %ð %ð"ð "ð "ð&ð &ð &ð &ð
Oð Oð Oðð ð ð ð ð ð(ð (ð (ð(ð (ð (ð#ð #ð #ð !˜Ð!;Ñ<Ô<ÐÐÐÐÐr%   r‡   c                   ó‚   ‡ — e Zd ZdZˆ fd„Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zˆ xZS )ÚConvertBzrDir4To5z'Converts format 4 bzr dirs to format 5.c                 ó°   •— t          ¦   «                              ¦   «          t          ¦   «         | _        t          ¦   «         | _        d| _        i | _        d S )Nr   )rj   Ú__init__ÚsetÚconverted_revsÚabsent_revisionsÚ
text_countÚ	revisions)r    rn   s    €r$   r›   zConvertBzrDir4To5.__init__é   sC   ø€ Ý‰Œ×ÒÑÔÐÝ!™eœeˆÔÝ #¡¤ˆÔØˆŒØˆŒˆˆr%   c                 óè  — || _         t          j                             ¦   «         5 | _        t          j                             t          d¦  «        ¦  «         t          | j         j        t          j
        ¦  «        r-| j                              d¦  «                             d¦  «         |                      ¦   «          t          j        | j         j        ¦  «        cddd¦  «         S # 1 swxY w Y   dS )úSee Converter.convert().z#starting upgrade from format 4 to 5Nú
stat-cache)Ú
controldirÚuiÚ
ui_factoryÚnested_progress_barÚpbÚnoter   r<   r!   r   ÚLocalTransportÚget_workingtree_transportÚdeleteÚ_convert_to_weavesr   ÚopenÚuser_url©r    Ú
to_convertr¨   s      r$   ÚconvertzConvertBzrDir4To5.convertð   s  € à$ˆŒÝŒ]×.Ò.Ñ0Ô0ð 	=°D´GÝŒM×Ò�wÐ'LÑMÔMÑNÔNÐNÝ˜$œ/Ô3µUÔ5IÑJÔJð /Ø”×9Ò9Øñô ß š& Ñ.Ô.Ð.Ø×#Ò#Ñ%Ô%Ð%Ý”? 4¤?Ô#;Ñ<Ô<ð	=ð 	=ð 	=ð 	=ñ 	=ô 	=ð 	=ð 	=ð 	=ð 	=ð 	=ð 	=øøøð 	=ð 	=ð 	=ð 	=ð 	=ð 	=s   ¦B4C'Ã'C+Ã.C+c                 óì  — t           j                             t          d¦  «        ¦  «         	 | j        j                             d¦  «        }t          |j        ¦  «        s>| j        j         	                    d¦  «         | j        j         
                    d¦  «         n/# t          $ r" | j        j         
                    d¦  «         Y nw xY wt                               d¦  «        | _        i | _        | j        j         	                    d¦  «         | j                             ¦   «         | _        |                      ¦   «          | j                             ¦   «         }t)          |¦  «        | _        |dd …         | _        | j        rG| j                             ¦   «         }|| j        vr|| j        vr|                      |¦  «         | j        °G| j                             ¦   «          |                      ¦   «         }t=          |¦  «        D ]P\  }}| j                             t          d¦  «        |tA          |¦  «        ¦  «         |  !                    |¦  «         ŒQ| j                             ¦   «          |  "                    ¦   «          |  #                    ¦   «          t           j                             t          d¦  «        ¦  «         t           j                             dt          d	¦  «        tA          | j        ¦  «        z  z   ¦  «         t           j                             dt          d
¦  «        tA          | j        ¦  «        z  z   ¦  «         t           j                             dt          d¦  «        | j$        z  z   ¦  «         |  %                    ¦   «          | j        j&         '                    dtQ          ¦   «          )                    ¦   «         | j         *                    ¦   «         ¬¦  «         d S )NzBnote: upgrade may be faster if all store files are ungzipped firstÚweavesÚ	inventoryúbranch-formatéÿÿÿÿzconverting revisionzupgraded to weaves:ú  z%6d revisions and inventoriesz%6d revisions not presentz	%6d texts©Úmode)+r¥   r¦   r©   r   r¤   r!   ÚstatÚS_ISDIRÚst_moder¬   Úmkdirr   ÚweaveÚWeaveÚ	inv_weaveÚtext_weavesÚopen_branchrL   Ú_convert_working_invÚ_revision_historyrœ   Úknown_revisionsÚto_readÚpopr    rž   Ú_load_one_revr¨   ÚclearÚ_make_orderÚ	enumerateÚupdateÚlenÚ_convert_one_revÚ_write_all_weavesÚ_write_all_revsrŸ   Ú"_cleanup_spare_files_after_format4Ú
_transportÚ	put_bytesr8   r)   Ú_get_file_mode)r    r»   Úrev_historyÚrev_idÚ	to_importÚis         r$   r­   z$ConvertBzrDir4To5._convert_to_weavesû   s�  € Ý
Œ×Ò�7ØPñRô Rñ 	Sô 	Sð 	Sð	6à”?Ô,×1Ò1°(Ñ;Ô;ˆDÝ˜4œ<Ñ(Ô(ð :Ø”Ô)×0Ò0°Ñ:Ô:Ð:Ø”Ô)×/Ò/°Ñ9Ô9Ð9øøÝð 	6ð 	6ð 	6ØŒOÔ%×+Ò+¨HÑ5Ô5Ð5Ð5Ð5ð	6øøøõ Ÿš [Ñ1Ô1ˆŒàˆÔØŒÔ!×(Ò(¨Ñ9Ô9Ð9Ø”o×1Ò1Ñ3Ô3ˆŒØ×!Ò!Ñ#Ô#Ð#Ø”k×3Ò3Ñ5Ô5ˆõ  # ;Ñ/Ô/ˆÔØ" 2 3 3Ô'ˆŒØŒlð 	+Ø”\×%Ò%Ñ'Ô'ˆFØ˜dœnÐ,Ð,Ø $Ô"7Ð7Ð7Ø×"Ò" 6Ñ*Ô*Ð*ð	 Œlð 	+ð
 	Œ�Š‰ŒˆØ×$Ò$Ñ&Ô&ˆ	Ý" 9Ñ-Ô-ð 	*ð 	*‰IˆAˆvØŒG�NŠN�7Ð#8Ñ9Ô9¸1½cÀ)¹n¼nÑMÔMÐMØ×!Ò! &Ñ)Ô)Ð)Ð)ØŒ�Š‰ŒˆØ×ÒÑ Ô Ð Ø×ÒÑÔÐÝ
Œ×Ò�7Ð#8Ñ9Ô9Ñ:Ô:Ð:Ý
Œ×Ò˜4¥'Ð*IÑ"JÔ"JÝ˜tœ~Ñ.Ô.ñ#/ñ /ñ 	0ô 	0ð 	0å
Œ×Ò˜4¥'Ð*EÑ"FÔ"FÝ˜tÔ4Ñ5Ô5ñ#6ñ 6ñ 	7ô 	7ð 	7å
Œ×Ò˜4¥'¨+Ñ"6Ô"6¸¼Ñ"HÑHÑIÔIÐIØ×/Ò/Ñ1Ô1Ð1ØŒÔ×(Ò(ØÝ‰OŒO×-Ò-Ñ/Ô/Ø”×/Ò/Ñ1Ô1ð 	)ñ 	3ô 	3ð 	3ð 	3ð 	3s   ®A1B  Â )CÃCc                 óì   — dD ]2}	 | j         j                             |¦  «         Œ## t          $ r Y Œ/w xY w| j         j                             d¦  «         | j         j                             d¦  «         d S )N)zmerged-patcheszpending-merged-patcheszinventory-storez
text-store)r¤   r!   r¬   r   Údelete_tree)r    Úns     r$   rÒ   z4ConvertBzrDir4To5._cleanup_spare_files_after_format4+  s‹   € à;ð 	ð 	ˆAðà”Ô)×0Ò0°Ñ3Ô3Ð3Ð3øÝð ð ð Ø�ðøøøàŒÔ!×-Ò-Ð.?Ñ@Ô@Ð@ØŒÔ!×-Ò-¨lÑ;Ô;Ð;Ð;Ð;s   †&¦
3²3c                 ót  — t           j                             | j        j                             d¦  «        ¦  «        }t          ¦   «         }t          j         	                    ||d¬¦  «         | j        j         
                    d|                     ¦   «         | j                             ¦   «         ¬¦  «         d S )Nrµ   T)Úworkingr¹   )Úxml4Úserializer_v4Úread_inventoryrL   rÓ   Úgetr   Úxml5Úserializer_v5Úwrite_inventoryrÔ   Úgetvaluer¤   rÕ   )r    ÚinvÚfs      r$   rÄ   z&ConvertBzrDir4To5._convert_working_inv6  s¥   € ÝÔ ×/Ò/ØŒKÔ"×&Ò& {Ñ3Ô3ñ5ô 5ˆå‰IŒIˆÝÔ×*Ò*¨3°¸4Ð*Ñ@Ô@Ð@ØŒÔ×(Ò(¨°a·j²j±l´lØ.2¬o×.LÒ.LÑ.NÔ.Nð 	)ñ 	Pô 	Pð 	Pð 	Pð 	Pr%   c                 ó   — t          | j        j        dt          j        ¬¦  «        }| j        j                             d¦  «        }t          |dt          j        ¬¦  «        }t          ¦   «         }	 d}| j                             ¦   «         D ]\\  }}| j	         
                    t          d¦  «        |t          | j        ¦  «        ¦  «         |                     |||¦  «         |dz  }Œ]| j	         
                    t          d¦  «        dd¦  «         |                     d| j        |¦  «         | j	         
                    t          d¦  «        dd¦  «         | j	                             ¦   «          d S # | j	                             ¦   «          w xY w)	NF)ÚprefixedÚversionedfile_classr´   r   zwriting weaverH   rµ   s	   inventory)ÚVersionedFileStorer¤   r!   r¿   Ú	WeaveFileÚcloneÚWriteTransactionrÂ   Úitemsr¨   rÍ   r   rÎ   Ú
_put_weaverÁ   rÊ   )r    ÚcontrolweavesÚweave_transportr´   ÚtransactionrÙ   Úfile_idÚ
file_weaves           r$   rÐ   z#ConvertBzrDir4To5._write_all_weaves>  sm  € Ý*¨4¬?Ô+DÈuÝ?D¼ðPñ Pô Pˆàœ/Ô3×9Ò9¸(ÑCÔCˆÝ# O¸eÝ8=¼ðIñ Iô Iˆå&Ñ(Ô(ˆð	ØˆAØ'+Ô'7×'=Ò'=Ñ'?Ô'?ð ð Ñ#�˜Ø”—’�w Ñ7Ô7¸Ý" 4Ô#3Ñ4Ô4ñ6ô 6ð 6à×!Ò! '¨:°{ÑCÔCÐCØ�Q‘��ØŒG�NŠN�7 ;Ñ/Ô/°°AÑ6Ô6Ð6Ø×$Ò$ \°4´>À;ÑOÔOÐOØŒG�NŠN�7 ;Ñ/Ô/°°AÑ6Ô6Ð6àŒG�MŠM‰OŒOˆOˆOˆOøˆDŒG�MŠM‰OŒOˆOˆOøøøs   Á1C&E2 Å2Fc                 óº  — | j         j                             d¦  «         | j         j                             d¦  «         | j         j                             d¦  «        }ddlm} ddlm}  |||dt           
                    ¦   «         d„ d„ ¦  «        }	 t          | j        ¦  «        D ]z\  }}| j                             t          d	¦  «        |t!          | j        ¦  «        ¦  «         |                     | j        |         ¦  «        }|f}|                     |d
|¦  «         Œ{	 | j                             ¦   «          d
S # | j                             ¦   «          w xY w)z$Write all revisions out in new form.úrevision-storer   )rä   rH   )ÚRevisionTextStoreFc                  ó   — dS ©NTr6   r6   r%   r$   ú<lambda>z3ConvertBzrDir4To5._write_all_revs.<locals>.<lambda>]  s   € °4€ r%   c                  ó   — dS rû   r6   r6   r%   r$   rü   z3ConvertBzrDir4To5._write_all_revs.<locals>.<lambda>]  s   € À€ r%   zwrite revisionN)r¤   r!   rÛ   r¾   rî   Úbzr.xml5rä   ri   rù   ÚversionedfileÚPrefixMapperrÌ   r�   r¨   rÍ   r   rÎ   Úwrite_revision_to_linesr    Ú	add_linesrÊ   )	r    Úrevision_transporträ   rù   Úrevision_storerÙ   r×   ÚlinesÚkeys	            r$   rÑ   z!ConvertBzrDir4To5._write_all_revsS  sl  € àŒÔ!×-Ò-Ð.>Ñ?Ô?Ð?ØŒÔ!×'Ò'Ð(8Ñ9Ô9Ð9Ø!œ_Ô6×<Ò<Ð=MÑNÔNÐà-Ð-Ð-Ð-Ð-Ð-Ø1Ð1Ð1Ð1Ð1Ð1Ø*Ð*Ð+=Ø+8¸%Å×A[ÒA[ÑA]ÔA]Ø+7¨<¸¸ñGô Gˆð		Ý& tÔ':Ñ;Ô;ð ;ð ;‘	��6Ø”—’�wÐ'7Ñ8Ô8¸!Ý" 4Ô#6Ñ7Ô7ñ9ô 9ð 9à%×=Ò=Ø”N 6Ô*ñ,ô ,�à�i�Ø×(Ò(¨¨d°EÑ:Ô:Ð:Ð:ð;ð ŒG�MŠM‰OŒOˆOˆOˆOøˆDŒG�MŠM‰OŒOˆOˆOøøøs   ÂBD? Ä?Ec                 ót  — | j                              t          d¦  «        t          | j        ¦  «        t          | j        ¦  «        ¦  «         | j        j                             |¦  «        sd| j          	                    ¦   «          t          j                             t          d¦  «        |z  ¦  «         | j                             |¦  «         dS | j        j                             |¦  «        }|j        D ]6}| j                             |¦  «         | j                             |¦  «         Œ7|| j        |<   dS )zxLoad a revision object into memory.

        Any parents not either loaded or abandoned get queued to be
        loaded.zloading revisionzArevision {%s} not present in branch; will be converted as a ghostN)r¨   rÍ   r   rÎ   r    rÆ   rL   ri   Úhas_revisionrÊ   r¥   r¦   r©   rž   ÚaddÚget_revisionÚ
parent_idsrÇ   Úappend)r    r×   ÚrevÚ	parent_ids       r$   rÉ   zConvertBzrDir4To5._load_one_revi  s.  € ð
 	Œ�Š•wÐ1Ñ2Ô2Ý˜4œ>Ñ*Ô*Ý˜4Ô/Ñ0Ô0ñ	2ô 	2ð 	2ð Œ{Ô%×2Ò2°6Ñ:Ô:ð 	)ØŒG�MŠM‰OŒOˆOÝŒM×Ò�wð (Fñ  Gô  Gà%ñ &ñ 'ô 'ð 'ð Ô!×%Ò% fÑ-Ô-Ð-Ð-Ð-à”+Ô(×5Ò5°fÑ=Ô=ˆCØ œ^ð /ð /�	ØÔ$×(Ò(¨Ñ3Ô3Ð3Ø”×#Ò# IÑ.Ô.Ð.Ð.Ø%(ˆDŒN˜6Ñ"Ð"Ð"r%   c                 óä   — | j         j        j                             |¦  «        5 }t          j                             |¦  «        }d d d ¦  «         n# 1 swxY w Y   ||_        | j        |         }|S r:   )	rL   ri   Úinventory_storerâ   rß   rà   rá   Úrevision_idr    )r    r×   rè   rç   r  s        r$   Ú_load_old_inventoryz%ConvertBzrDir4To5._load_old_inventory~  sž   € ØŒ[Ô#Ô3×7Ò7¸Ñ?Ô?ð 	7À1ÝÔ$×3Ò3°AÑ6Ô6ˆCð	7ð 	7ð 	7ñ 	7ô 	7ð 	7ð 	7ð 	7ð 	7ð 	7ð 	7øøøð 	7ð 	7ð 	7ð 	7à ˆŒØŒn˜VÔ$ˆØˆ
s   ¥ AÁAÁAc                 óz   — | j                              |¦  «        }t          j                             ||¦  «        }|S r:   )rÁ   Ú	get_linesrã   rä   Úread_inventory_from_lines)r    r×   Úinv_xmlrç   s       r$   Ú_load_updated_inventoryz)ConvertBzrDir4To5._load_updated_inventory…  s4   € Ø”.×*Ò*¨6Ñ2Ô2ˆÝÔ ×:Ò:¸7ÀFÑKÔKˆØˆ
r%   c                 ó  ‡ — ‰ j         |         }‰                      |¦  «        }ˆ fd„|j        D ¦   «         }‰                      |||¦  «         ‰                      |||¦  «         ‰ j                             |¦  «         dS )z:Convert revision and all referenced objects to new format.c                 ó&   •— g | ]}|‰j         v¯|‘ŒS r6   )rž   )Ú.0Úpr    s     €r$   ú
<listcomp>z6ConvertBzrDir4To5._convert_one_rev.<locals>.<listcomp>Ž  s0   ø€ ð >ð >ð > Ø tÔ'<Ð<Ð<ð Ø<Ð<Ð<r%   N)r    r  r  Ú_convert_revision_contentsÚ_store_new_invr�   r	  )r    r×   r  rç   Úpresent_parentss   `    r$   rÏ   z"ConvertBzrDir4To5._convert_one_revŠ  s˜   ø€ àŒn˜VÔ$ˆØ×&Ò& vÑ.Ô.ˆð>ð >ð >ð > c¤nð >ñ >ô >ˆà×'Ò'¨¨S°/ÑBÔBÐBØ×Ò˜C  oÑ6Ô6Ð6ØÔ×Ò Ñ'Ô'Ð'Ð'Ð'r%   c                 óÈ   — t           j                             |¦  «        }t                               |¦  «        }| j                             |j        ||¦  «         ||_        d S r:   )	rã   rä   Úwrite_inventory_to_linesÚosutilsÚsha_stringsrÁ   r  r  Úinventory_sha1)r    r  rç   r  Únew_inv_xmlÚnew_inv_sha1s         r$   r  z ConvertBzrDir4To5._store_new_inv”  s_   € ÝÔ(×AÒAÀ#ÑFÔFˆÝ×*Ò*¨;Ñ7Ô7ˆØŒ× Ò  ¤Ø!0Ø!,ñ	.ô 	.ð 	.ð *ˆÔÐÐr%   c                 ó  — |j         }t                               d|¦  «         t          t	          | j        |¦  «        ¦  «        }|                     ¦   «         }t          |¦  «         |D ]\  }}|                      |||¦  «         ŒdS )zoConvert all the files within a revision.

        Also upgrade the inventory to refer to the text revision ids.z!converting texts of revision {%s}N)	r  ÚtraceÚmutterÚlistÚmapr  Úiter_entriesÚnextÚ_convert_file_version)	r    r  rç   r  r×   Úparent_invsÚentriesÚpathÚies	            r$   r  z,ConvertBzrDir4To5._convert_revision_contentsœ  sŽ   € ð ”ˆÝ�ŠÐ8¸&ÑAÔAÐAÝ�3˜tÔ;¸_ÑMÔMÑNÔNˆØ×"Ò"Ñ$Ô$ˆÝˆW‰ŒˆØð 	=ð 	=‰HˆD�"Ø×&Ò& s¨B°Ñ<Ô<Ð<Ð<ð	=ð 	=r%   c                 óx  ‡
— |j         }|j        }| j                             |¦  «        }|€$t                               |¦  «        }|| j        |<   d}|                     |¦  «        Š
t                               | ¦  «         	                    ‰
¦  «        }ˆ
fd„|D ¦   «         }	|  
                    |	|||¦  «         dS )z¨Convert one version of one file.

        The file needs to be added into the weave if it is a merge
        of >=2 parents or if it's changed from its parent.
        NFc                 ó"   •— i | ]}|‰|         “ŒS r6   r6   )r  ÚheadÚparent_candiate_entriess     €r$   ú
<dictcomp>z;ConvertBzrDir4To5._convert_file_version.<locals>.<dictcomp>¹  s1   ø€ ð /ð /ð /Ø $ð !Ð"9¸$Ô"?ð /ð /ð /r%   )rõ   r  rÂ   râ   r¿   rÀ   Úparent_candidatesÚgraphÚGraphÚheadsÚsnapshot_ie)r    r  r2  r/  rõ   r×   ÚwÚtext_changedr;  Úprevious_entriesr6  s             @r$   r.  z'ConvertBzrDir4To5._convert_file_version¨  sÏ   ø€ ð ”*ˆØ”ˆØÔ× Ò  Ñ)Ô)ˆØˆ9Ý—’˜GÑ$Ô$ˆAØ()ˆDÔ˜WÑ%ØˆØ"$×"6Ò"6°{Ñ"CÔ"CÐÝ—’˜DÑ!Ô!×'Ò'Ð(?Ñ@Ô@ˆð/ð /ð /ð /Ø(-ð/ñ /ô /Ðà×ÒÐ)¨2¨q°&Ñ9Ô9Ð9Ð9Ð9r%   c                 ó    ‡ — ˆ fd„|D ¦   «         S )z/See graph.StackedParentsProvider.get_parent_mapc                 ó>   •— i | ]}|‰j         v ¯|‰j         |         “ŒS r6   )r    )r  r  r    s     €r$   r7  z4ConvertBzrDir4To5.get_parent_map.<locals>.<dictcomp>¿  s9   ø€ ð 6ð 6ð 6Ø#Ø" d¤nÐ4Ð4ð ˜Tœ^¨KÔ8à4Ð4Ð4r%   r6   )r    Úrevision_idss   ` r$   Úget_parent_mapz ConvertBzrDir4To5.get_parent_map½  s.   ø€ ð6ð 6ð 6ð 6Ø'3ð6ñ 6ô 6ð 	6r%   c                 ó,  — t          |¦  «        dk    rQt          t          |                     ¦   «         ¦  «        ¦  «        }|                     |¦  «        r|j        |_        d S |                     ¦   «         r}| j        j        j	         
                    |j        ¦  «        5 }|                     ¦   «         }d d d ¦  «         n# 1 swxY w Y   |                     |||¦  «         | xj        dz  c_        n|                     ||g ¦  «         ||_        d S )NrH   )rÎ   r-  ÚiterÚvaluesÚ
_unchangedÚrevisionÚhas_textrL   ri   Ú_text_storerâ   Útext_idÚ	readlinesr  rŸ   )r    Úprevious_revisionsr2  r=  r×   Úprevious_ierè   Ú
file_liness           r$   r<  zConvertBzrDir4To5.snapshot_ieÃ  s5  € õ Ð!Ñ"Ô" aÒ'Ð'Ý�tÐ$6×$=Ò$=Ñ$?Ô$?Ñ@Ô@ÑAÔAˆKØ�}Š}˜[Ñ)Ô)ð Ø)Ô2�”Ø�Ø�;Š;‰=Œ=ð 	8Ø”Ô'Ô3×7Ò7¸¼
ÑCÔCð +ÀqØŸ[š[™]œ]�
ð+ð +ð +ñ +ô +ð +ð +ð +ð +ð +ð +øøøð +ð +ð +ð +à�KŠK˜Ð 2°JÑ?Ô?Ð?ØˆOŒO˜qÑ ˆOŒOˆOà�KŠK˜Ð 2°BÑ7Ô7Ð7ØˆŒˆˆs   Â"CÃCÃ
Cc                 ó”  — t          | j        ¦  «        }| j                             ¦   «         }g }|r–t	          t          |¦  «        ¦  «        D ]w}| j        |         }t          |j        ¦  «        }|                     |¦  «        r?|                     |¦  «         | 	                    |¦  «         | 
                    |¦  «         Œx|°–|S )zŸReturn a suitable order for importing revisions.

        The order must be such that an revision is imported after all
        its (present) parents.
        )rœ   r    rž   ÚcopyÚsortedr*  r  Úissubsetr  Úremover	  )r    ÚtodoÚdoneÚorderr×   r  r  s          r$   rË   zConvertBzrDir4To5._make_orderÙ  sÌ   € õ �4”>Ñ"Ô"ˆØÔ$×)Ò)Ñ+Ô+ˆØˆØð 
	%õ !¥ d¡¤Ñ,Ô,ð %ð %�Ø”n VÔ,�Ý  ¤Ñ0Ô0�
Ø×&Ò& tÑ,Ô,ð %à—L’L Ñ(Ô(Ð(Ø—K’K Ñ'Ô'Ð'Ø—H’H˜VÑ$Ô$Ð$øð ð 
	%ð ˆr%   )r0   r1   r2   r3   r›   r²   r­   rÒ   rÄ   rÐ   rÑ   rÉ   r  r  rÏ   r  r  r.  rC  r<  rË   r„   r…   s   @r$   r™   r™   æ   s2  ø€ € € € € Ø1Ð1ðð ð ð ð ð	=ð 	=ð 	=ð.3ð .3ð .3ð`	<ð 	<ð 	<ðPð Pð Pðð ð ð*ð ð ð,)ð )ð )ð*ð ð ðð ð ð
(ð (ð (ð*ð *ð *ð
=ð 
=ð 
=ð:ð :ð :ð*6ð 6ð 6ðð ð ð,ð ð ð ð ð ð r%   r™   c                   ó   — e Zd ZdZd„ Zd„ ZdS )rW   z'Converts format 5 bzr dirs to format 6.c                 ó<  — || _         t          j                             ¦   «         5 }t          j                             t          d¦  «        ¦  «         |                      ¦   «          t          j        | j         j	        ¦  «        cddd¦  «         S # 1 swxY w Y   dS )r¢   z#starting upgrade from format 5 to 6N)
r¤   r¥   r¦   r§   r©   r   Ú_convert_to_prefixedr   r®   r¯   r°   s      r$   r²   zConvertBzrDir5To6.convertó  sÁ   € à$ˆŒÝŒ]×.Ò.Ñ0Ô0ð 	=°BÝŒM×Ò�wÐ'LÑMÔMÑNÔNÐNØ×%Ò%Ñ'Ô'Ð'Ý”? 4¤?Ô#;Ñ<Ô<ð	=ð 	=ð 	=ð 	=ñ 	=ô 	=ð 	=ð 	=ð 	=ð 	=ð 	=ð 	=øøøð 	=ð 	=ð 	=ð 	=ð 	=ð 	=s   ¦ABÂBÂBc                 ó,  — ddl m} | j        j                             d¦  «         dD �]“}t
          j                             t          d¦  «        |z  ¦  «         | j        j         	                    |¦  «        } ||d¬¦  «        }| 
                    d¦  «        D �]}t                               |¦  «        }|                     d	¦  «        s*|                     d
¦  «        s|                     d¦  «        r#t          j                             |¦  «        \  }}n|}d}|j                             |                     d¦  «        f¦  «        |z   }		 |                     ||	¦  «         ŒÌ# t*          $ rG |                     t.                               |	¦  «        ¦  «         |                     ||	¦  «         Y �Œw xY w�Œ•| j        j                             dt5          ¦   «                              ¦   «         | j                             ¦   «         ¬¦  «         d S )NrH   )ÚTransportStorer¶   )r´   rø   zadding prefixes to %sT)rê   ú.z.weavez.gzz.sigÚ zutf-8r¹   )Ústorer\  r¤   r!   r¬   r¥   r¦   r©   r   rî   Úlist_dirÚurlutilsÚunescapeÚendswithÚosr1  ÚsplitextÚ_mapperr+  ÚencodeÚmover   r¾   r"  ÚdirnamerÔ   r‡   r)   rÕ   )
r    r\  Ú
store_nameÚstore_transportr_  ÚurlfilenameÚfilenamerõ   ÚsuffixÚnew_names
             r$   rZ  z&ConvertBzrDir5To6._convert_to_prefixedû  s%  € Ø)Ð)Ð)Ð)Ð)Ð)ØŒÔ!×(Ò(¨Ñ9Ô9Ð9Ø6ð 	=ñ 	=ˆJÝŒM×Ò�wÐ'>Ñ?Ô?À*ÑLÑMÔMÐMØ"œoÔ7×=Ò=¸jÑIÔIˆOØ"�N ?¸TÐBÑBÔBˆEØ.×7Ò7¸Ñ<Ô<ð =ñ =�Ý#×,Ò,¨[Ñ9Ô9�Ø×%Ò% hÑ/Ô/ð  Ø×(Ò(¨Ñ/Ô/ð à#×,Ò,¨VÑ4Ô4ð õ ')¤g×&6Ò&6°xÑ&@Ô&@‘O�G˜V˜Và&�GØ�FØ œ=×,Ò,Ø—^’^ GÑ,Ô,Ð.ñ0ô 0Ø28ñ9�ð=Ø#×(Ò(¨°8Ñ<Ô<Ð<Ð<øÝ!ð =ð =ð =Ø#×)Ò)­'¯/ª/¸(Ñ*CÔ*CÑDÔDÐDØ#×(Ò(¨°8Ñ<Ô<Ð<Ð<Ñ<ð=øøøñ=ð" 	ŒÔ!×+Ò+ØÝ‰OŒO×-Ò-Ñ/Ô/Ø”×/Ò/Ñ1Ô1ð 	,ñ 	3ô 	3ð 	3ð 	3ð 	3s   ÅE'Å'AF8Æ7F8N)r0   r1   r2   r3   r²   rZ  r6   r%   r$   rW   rW   ð  s8   € € € € € Ø1Ð1ð=ð =ð =ð3ð 3ð 3ð 3ð 3r%   rW   c                   ó*   — e Zd ZdZd„ Zd„ Zd„ Zd„ ZdS )r�   z'Converts format 6 bzr dirs to metadirs.c                 óº	  — ddl m} ddlm} || _        t
          j                             ¦   «         | _        d| _	        d| _
        g | _        | j                             ¦   «         | _        | j                             ¦   «         | _        t
          j                             t#          d¦  «        ¦  «         | j        j                             dd	| j        ¬
¦  «         	 |                      t#          d¦  «        ¦  «         | j        j                             d¦  «         n# t,          $ r Y nw xY w|                      t#          d¦  «        ¦  «         | j                             ¦   «                              ¦   «         }| j        j                             d¦  «        }|D ]1}|                     d¦  «        r| j                             |¦  «         Œ2g d¢}|                      t#          d¦  «        dz   ¦  «         | j        j                             d| j        ¬
¦  «         |                      d¦  «         |                      d |¦   «         ¦  «         |D ]}	|                      d|	¦  «         Œ|                      t#          d¦  «        dz   ¦  «         | j        j                             d| j        ¬
¦  «         |                      d¦  «         |                      d |¦   «         ¦  «         g d¢}
|
D ]}	|                      d|	¦  «         Œg d¢}|D ]\  }}|r||vrd} nŒd}|sXt
          j                             t#          d¦  «        ¦  «         |D ](\  }}||v r| j        j                             |¦  «         Œ)nçddl m!} |                      t#          d¦  «        ¦  «         | j        j                             d| j        ¬
¦  «         |                      d¦  «         |                      d |¦   «         ¦  «         | j        D ]!}| j        j                             |¦  «         Œ"|D ]}	|                      d|	¦  «         Œ|� | j        j                             d |¦  «         | j        j                             dtE          ¦   «          #                    ¦   «         | j        ¬
¦  «         | j         $                    ¦   «          tK          j&        | j        j'        ¦  «        S )!r¢   rH   )ÚRepositoryFormat7r   )ÚBzrBranchFormat5r   é   z)starting upgrade from format 6 to metadirr¶   s   Converting to format 6r¹   zRemoving ancestry.weavezancestry.weavezFinding branch filesr]  zbasis-inventory.))zinventory.weaveT)rø   T)r´   TzUpgrading repositoryr¸   ri   zUpgrading branchz      rL   ))zrevision-historyT)zbranch-nameT)ÚparentF))zpending-mergesT)rµ   T)r£   FFTzNo working tree.)ÚWorkingTreeFormat3zUpgrading working treeÚcheckoutNzcheckout/last-revision)(ri   rr  Úbzr.fullhistoryrs  r¤   r¥   r¦   r§   r¨   ÚcountÚtotalÚgarbage_inventoriesÚ_get_dir_modeÚdir_moderÕ   Ú	file_moder©   r   r!   rÔ   Ústepr¬   r   rÃ   Úlast_revisionr`  Ú
startswithr  r¾   Ú	make_lockÚ
put_formatÚ
move_entryÚbzr.workingtree_3rv  r   r)   Úfinishedr   r®   r¯   )r    r±   r¨   rr  rs  r€  ÚbzrcontentsÚnameÚrepository_namesÚentryÚbranch_filesÚcheckout_filesÚ	mandatoryÚhas_checkoutrv  r1  s                   r$   r²   zConvertBzrDir6ToMeta.convert  s,  € à1Ð1Ð1Ð1Ð1Ð1Ø7Ð7Ð7Ð7Ð7Ð7Ø$ˆŒÝ”-×3Ò3Ñ5Ô5ˆŒØˆŒ
ØˆŒ
Ø#%ˆÔ Øœ×5Ò5Ñ7Ô7ˆŒØœ×7Ò7Ñ9Ô9ˆŒå
Œ×ÒÝÐ?Ñ@Ô@ñ	Bô 	Bð 	BàŒÔ!×+Ò+ØØ%Ø”ð 	,ñ 	!ô 	!ð 	!ð	Ø�IŠI•gÐ7Ñ8Ô8Ñ9Ô9Ð9ØŒOÔ%×,Ò,Ð-=Ñ>Ô>Ð>Ð>øÝð 	ð 	ð 	ØˆDð	øøøð 	�	Š	•'Ð0Ñ1Ô1Ñ2Ô2Ð2Øœ×3Ò3Ñ5Ô5×CÒCÑEÔEˆØ”oÔ/×8Ò8¸Ñ=Ô=ˆØð 	6ð 	6ˆDØ�ŠÐ1Ñ2Ô2ð 6ØÔ(×/Ò/°Ñ5Ô5Ð5øð.ð .ð .Ðð 	�	Š	•'Ð0Ñ1Ô1°DÑ8Ñ9Ô9Ð9ØŒÔ!×'Ò'¨¸4¼=Ð'ÑIÔIÐIØ�Š�|Ñ$Ô$Ð$ð 	�Š˜Ð&7Ð&7Ñ&9Ô&9Ñ:Ô:Ð:Ø%ð 	1ð 	1ˆEØ�OŠO˜L¨%Ñ0Ô0Ð0Ð0à�	Š	•'Ð,Ñ-Ô-°Ñ8Ñ9Ô9Ð9ØŒÔ!×'Ò'¨°t´}Ð'ÑEÔEÐEØ�Š�xÑ Ô Ð Ø�Š˜Ð"2Ð"2Ñ"4Ô"4Ñ5Ô5Ð5ð+ð +ð +ˆð "ð 	-ð 	-ˆEØ�OŠO˜H eÑ,Ô,Ð,Ð,ð1ð 1ð 1ˆð  .ð 	 ð 	 ‰OˆD�)Øð ˜T¨Ð4Ð4Ø$�Ø�øàˆLØð 	=ÝŒM×Ò�wÐ'9Ñ:Ô:Ñ;Ô;Ð;à#1ð ;ð ;‘��iØ˜;Ð&Ð&Ø”OÔ-×4Ò4°TÑ:Ô:Ð:øð;ð @Ð?Ð?Ð?Ð?Ð?Ø�IŠI•gÐ6Ñ7Ô7Ñ8Ô8Ð8ØŒOÔ%×+Ò+¨J¸T¼]Ð+ÑKÔKÐKØ�NŠN˜:Ñ&Ô&Ð&Ø�OŠO˜JÐ(:Ð(:Ñ(<Ô(<Ñ=Ô=Ð=ØÔ0ð 7ð 7�Ø”Ô)×0Ò0°Ñ6Ô6Ð6Ð6Ø'ð 3ð 3�Ø—’ 
¨EÑ2Ô2Ð2Ð2ØÐ(Ø”Ô)×3Ò3Ø,¨mñ=ô =ð =àŒÔ!×+Ò+ØÝÑÔ×1Ò1Ñ3Ô3Ø”ð 	,ñ 	!ô 	!ð 	!ð 	Œ×ÒÑÔÐÝŒ˜tœÔ7Ñ8Ô8Ð8s   ÃAD Ä
D+Ä*D+c                 óâ   — |                       t          d¦  «        |z  ¦  «         t                               | j        j        d|z  | j        | j        ¬¦  «        }|                     ¦   «          dS )z)Make a lock for the new control dir name.zMake %s lockz%s/lock)Úfile_modebitsÚdir_modebitsN)	r  r   ÚlockdirÚLockDirr¤   r!   r~  r}  Úcreate)r    rˆ  Úlds      r$   r‚  zConvertBzrDir6ToMeta.make_lockz  se   € à�	Š	•'˜.Ñ)Ô)¨DÑ0Ñ1Ô1Ð1Ý�_Š_˜Tœ_Ô6Ø&¨Ñ-Ø+/¬>Ø*.¬-ð ñ 9ô 9ˆð 	�	Š	‰Œˆˆˆr%   c                 ó  — |d         }|d         }|                       t          d¦  «        |z  ¦  «         	 | j        j                             |d                     ||¦  «        ¦  «         dS # t          $ r |r‚ Y dS w xY w)z"Move then entry name into new_dir.r   rH   z	Moving %sz{}/{}N)r  r   r¤   r!   rh  r#   r   )r    Únew_dirrŠ  rˆ  r�  s        r$   r„  zConvertBzrDir6ToMeta.move_entryƒ  sœ   € à�QŒxˆØ˜!”Hˆ	Ø�	Š	•'˜+Ñ&Ô&¨Ñ-Ñ.Ô.Ð.ð	ØŒOÔ%×*Ò*¨4°·²ÀÈÑ1NÔ1NÑOÔOÐOÐOÐOøÝð 	ð 	ð 	Øð Øðð ð ð	øøøs   ·4A- Á-A>Á=A>c                 ó|   — | j         j                             d|z  |                     ¦   «         | j        ¦  «         d S )Nz	%s/format)r¤   r!   rÔ   r)   r~  )r    ri  r#   s      r$   rƒ  zConvertBzrDir6ToMeta.put_formatŽ  sD   € ØŒÔ!×+Ò+¨K¸'Ñ,AØ,2×,DÒ,DÑ,FÔ,FØ,0¬Nñ	<ô 	<ð 	<ð 	<ð 	<r%   N)r0   r1   r2   r3   r²   r‚  r„  rƒ  r6   r%   r$   r�   r�     sZ   € € € € € Ø1Ð1ð\9ð \9ð \9ð|ð ð ð	ð 	ð 	ð<ð <ð <ð <ð <r%   r�   c                   ó”   — e Zd ZdZej        Zd„ Zed„ ¦   «         Z	d„ Z
dd„Zd„ Zd„ Zd	„ Zd
„ Zd„ Z ee¦  «        Zed„ ¦   «         ZdS )ÚBzrDirFormat4as  Bzr dir format 4.

    This format is a combined format for working tree, branch and repository.
    It has:
     - Format 1 working trees [always]
     - Format 4 branches [always]
     - Format 4 repositories [always]

    This format is deprecated: it indexes texts using a text it which is
    removed in format 5; write support for this format has been removed.
    c                 ó<   — t          | t          |¦  «        ¦  «        S r:   r;   r>   s     r$   r@   zBzrDirFormat4.__eq__£  rA   r%   c                 ó   — dS )rC   s   Bazaar-NG branch, format 0.0.4
r6   rD   s    r$   r)   zBzrDirFormat4.get_format_string¦  s
   € ð 3Ð2r%   c                 ó   — dS )rQ   zAll-in-one format 4r6   rR   s    r$   rS   z$BzrDirFormat4.get_format_description«  rT   r%   Nc                 ó   — t          ¦   «         S rV   )r™   rX   s     r$   rY   zBzrDirFormat4.get_converter¯  rZ   r%   c                 ó*   — t          j        | ¦  «        ‚)z$Format 4 branches cannot be created.)r   ÚUninitializableFormatrv   s     r$   r_   z%BzrDirFormat4.initialize_on_transport´  s   € åÔ*¨4Ñ0Ô0Ð0r%   c                 ó   — dS )zÇFormat 4 is not supported.

        It is not supported because the model changed from 4 to 5 and the
        conversion logic is expensive - so doing it on the fly was not
        feasible.
        Fr6   rR   s    r$   Úis_supportedzBzrDirFormat4.is_supported¸  s	   € ð ˆur%   c                 ó*   — |                       ¦   «         S r:   rp   rR   s    r$   rq   zBzrDirFormat4.network_nameÁ  rr   r%   c                 ó"   — t          || ¦  «        S rt   )ÚBzrDir4rv   s     r$   rw   zBzrDirFormat4._openÄ  rx   r%   c                 ó"   — ddl m}  |¦   «         S )rz   rH   ©ÚRepositoryFormat4)ri   r¨  ©r    r¨  s     r$   r|   z(BzrDirFormat4.__return_repository_formatÈ  r}   r%   c                 ój   — ||                       ¦   «         k    rt          d|z  ¦  «        ‚ | ¦   «         S r'   r(   r+   s     r$   r.   zBzrDirFormat4.from_stringÎ  r/   r%   r:   )r0   r1   r2   r3   r   r   r€   r@   r5   r)   rS   rY   r_   r¢  rq   rw   Ú(_BzrDirFormat4__return_repository_formatr‚   rƒ   r.   r6   r%   r$   rš  rš  ”  sì   € € € € € ð
ð 
ð !Ô.€Kð-ð -ð -ð ð3ð 3ñ „[ð3ð%ð %ð %ð#ð #ð #ð #ð
1ð 1ð 1ðð ð ð(ð (ð (ð(ð (ð (ð#ð #ð #ð !˜Ð!;Ñ<Ô<Ðàðð ñ „[ðð ð r%   rš  c                   óº   ‡ — e Zd ZdZˆ fd„Zd„ Zdd„Z	 	 dd„Z	 	 dd„Zdd	„Z	dd
„Z
d„ Z	 	 dd„Zd„ Zd„ Zd„ Zdd„Zd„ Zd„ Zd„ Z	 	 dd„Z	 	 	 	 dd„Zdd„Zˆ xZS )ÚBzrDirPreSplitOutz*A common class for the all-in-one formats.c                 óÐ   •— t          ¦   «                              ||¦  «         t          j        |                      d¦  «        | j        j        | j        j        ¦  «        | _        dS )zSee ControlDir.__init__.N)	rj   r›   r   ÚLockableFilesÚget_branch_transportÚ_formatÚ_lock_file_namer€   Ú_control_files)r    rÓ   r±  rn   s      €r$   r›   zBzrDirPreSplitOut.__init__Ø  sY   ø€ å‰Œ×Ò˜ WÑ-Ô-Ð-Ý,Ô:Ø×%Ò% dÑ+Ô+ØŒLÔ(ØŒLÔ$ñ&ô &ˆÔÐÐr%   c                 ó*   — t          | j        ¦  «        ‚)z4Pre-splitout bzrdirs do not suffer from stale locks.)ÚNotImplementedErrorÚ
break_lockrR   s    r$   r¶  zBzrDirPreSplitOut.break_lockà  s   € å! $¤/Ñ2Ô2Ð2r%   Fc                 ó`   — |rt          j        d¦  «        S | j                             ¦   «         S )z,Produce a metadir suitable for cloning with.z1.6)r   Úmake_controldirr±  rn   )r    r"   s     r$   Úcloning_metadirz!BzrDirPreSplitOut.cloning_metadirä  s/   € àð 	:Ý"Ô2°5Ñ9Ô9Ð9ØŒ|×%Ò%Ñ'Ô'Ð'r%   Nc                 ó¶  — |                       |¦  «         | j                             |¦  «        }|                      ¦   «                              ||¬¦  «         |                      ¦   «         }|                     |||¬¦  «         	 |                      ¦   «         }|                     |¦  «         n)# t          j        $ r | 	                    ¦   «          Y nw xY w|S )a'  See ControlDir.clone().

        force_new_repo has no effect, since this family of formats always
        require a new repository.
        preserve_stacking has no effect, since no source branch using this
        family of formats can be stacked, so there is no stacking to preserve.
        ©r  )r  Útag_selector)
Ú
_make_tailr±  rb   Úopen_repositoryrî   rÃ   Úopen_workingtreer   ÚNotLocalUrlrl   )	r    ra   r  r   Úpreserve_stackingr¼  rm   Úfrom_branchÚtrees	            r$   rî   zBzrDirPreSplitOut.cloneê  sè   € ð 	�Š˜ÑÔÐØ”×3Ò3°CÑ8Ô8ˆØ×ÒÑÔ×$Ò$ V¸Ð$ÑEÔEÐEØ×&Ò&Ñ(Ô(ˆØ×Ò˜&¨kÈÐÑUÔUÐUð	Ø×(Ò(Ñ*Ô*ˆDð
 �JŠJ�vÑÔÐÐøõ	 Ô!ð 	'ð 	'ð 	'à×$Ò$Ñ&Ô&Ð&Ð&Ð&ð	'øøøð
 ˆs   ÂB0 Â0#CÃCc                 ó¨   — |�"t          d                     | ¦  «        ¦  «        ‚| j                             ¦   «                              | ||¬¦  «        S )zSee ControlDir.create_branch.Nz,create_branch(repository=<not None>) on {!r})rˆ  Úappend_revisions_only)rµ  r#   r±  rN   rk   )r    rˆ  ri   rÅ  s       r$   Úcreate_branchzBzrDirPreSplitOut.create_branch  se   € ð Ð!Ý%Ø>×EÒEÀdÑKÔKñMô Mð MàŒ|×-Ò-Ñ/Ô/×:Ò:¸4ÀdØQfð ;ñ hô hð 	hr%   c                 ó6   — t          j        | j        | ¦  «        ‚)zSee ControlDir.destroy_branch.)r   ÚUnsupportedOperationÚdestroy_branch)r    rˆ  s     r$   rÉ  z BzrDirPreSplitOut.destroy_branch
  s   € åÔ)¨$Ô*=¸tÑDÔDÐDr%   c                 ób   — |rt          j        d| j        ¦  «        ‚|                      ¦   «         S )ú!See ControlDir.create_repository.zshared repository)r   ÚIncompatibleFormatr±  r¾  ©r    Úshareds     r$   Úcreate_repositoryz#BzrDirPreSplitOut.create_repository  s3   € àð 	OÝÔ+Ð,?ÀÄÑNÔNÐNØ×#Ò#Ñ%Ô%Ð%r%   c                 ó6   — t          j        | j        | ¦  «        ‚)z"See ControlDir.destroy_repository.)r   rÈ  Údestroy_repositoryrR   s    r$   rÑ  z$BzrDirPreSplitOut.destroy_repository  s   € åÔ)¨$Ô*AÀ4ÑHÔHÐHr%   c                 ó"  — |rt          d| ›�¦  «         	 |                      d¬¦  «        }n$# t          $ r |                      ¦   «         }Y nw xY w|�<|t          j        k    r|                     g ¦  «         n|                     |g¦  «         |S )ú"See ControlDir.create_workingtree.z*can't support hardlinked working trees in F)Úrecommend_upgrade)Úwarningr¿  r   rl   Ú_mod_revisionÚNULL_REVISIONÚset_parent_ids)r    r  rÂ  Úaccelerator_treeÚhardlinkrm   s         r$   Úcreate_workingtreez$BzrDirPreSplitOut.create_workingtree  s½   € ð ð 	ÝˆGØ�tðñ ô ð ð	.Ø×*Ò*¸UÐ*ÑCÔCˆFˆFøÝð 	.ð 	.ð 	.Ø×+Ò+Ñ-Ô-ˆFˆFˆFð	.øøøàÐ"Ø�mÔ9Ò9Ð9Ø×%Ò% bÑ)Ô)Ð)Ð)à×%Ò% { mÑ4Ô4Ð4Øˆs   –- ­AÁAc                 óÎ   — ddl m} 	  |¦   «                              | ¦  «        S # t          j        $ r0  |¦   «                              | j        | j        j        ¦  «        cY S w xY w)NrH   ©ÚWorkingTreeFormat2)	ÚworkingtreerÞ  rk   r   rÀ  Ú_stub_initialize_on_transportr!   r³  Ú
_file_mode)r    rÞ  s     r$   rl   z#BzrDirPreSplitOut._init_workingtree5  s˜   € Ø3Ð3Ð3Ð3Ð3Ð3ð	@Ø%Ð%Ñ'Ô'×2Ò2°4Ñ8Ô8Ð8øÝÔ!ð 	@ð 	@ð 	@ð &Ð%Ñ'Ô'×EÒEØ” Ô 3Ô >ñ@ô @ð @ð @ð @ð	@øøøs   ˆ% ¥<A$Á#A$c                 ó6   — t          j        | j        | ¦  «        ‚)z#See ControlDir.destroy_workingtree.)r   rÈ  Údestroy_workingtreerR   s    r$   rã  z%BzrDirPreSplitOut.destroy_workingtree?  s   € åÔ)¨$Ô*BÀDÑIÔIÐIr%   c                 ó6   — t          j        | j        | ¦  «        ‚)z,See ControlDir.destroy_workingtree_metadata.)r   rÈ  Údestroy_workingtree_metadatarR   s    r$   rå  z.BzrDirPreSplitOut.destroy_workingtree_metadataC  s   € åÔ)¨$Ô*KØ*.ñ0ô 0ð 	0r%   c                 óÄ   — |rt          | ¦  «        ‚|€| j        S 	 |                     ¦   «          n# t          $ r
 | j        cY S w xY wt	          j        || j        ¦  «        ‚)z"See BzrDir.get_branch_transport().)r   r!   r)   rµ  r   rÌ  r±  )r    Úbranch_formatrˆ  s      r$   r°  z&BzrDirPreSplitOut.get_branch_transportH  s~   € àð 	1Ý*¨4Ñ0Ô0Ð0ØÐ Ø”>Ð!ð	"Ø×+Ò+Ñ-Ô-Ð-Ð-øÝ"ð 	"ð 	"ð 	"Ø”>Ð!Ð!Ð!ð	"øøøåÔ'¨°t´|ÑDÔDÐDs   œ1 ±AÁAc                 ó¢   — |€| j         S 	 |                     ¦   «          n# t          $ r
 | j         cY S w xY wt          j        || j        ¦  «        ‚)z&See BzrDir.get_repository_transport().©r!   r)   rµ  r   rÌ  r±  )r    rƒ   s     r$   Úget_repository_transportz*BzrDirPreSplitOut.get_repository_transportT  si   € àÐ$Ø”>Ð!ð	"Ø×/Ò/Ñ1Ô1Ð1Ð1øÝ"ð 	"ð 	"ð 	"Ø”>Ð!Ð!Ð!ð	"øøøåÔ'Ð(9¸4¼<ÑHÔHÐHó   ‹   4³4c                 ó¢   — |€| j         S 	 |                     ¦   «          n# t          $ r
 | j         cY S w xY wt          j        || j        ¦  «        ‚)z'See BzrDir.get_workingtree_transport().ré  )r    Úworkingtree_formats     r$   r«   z+BzrDirPreSplitOut.get_workingtree_transport^  si   € àÐ%Ø”>Ð!ð	"Ø×0Ò0Ñ2Ô2Ð2Ð2øÝ"ð 	"ð 	"ð 	"Ø”>Ð!Ð!Ð!ð	"øøøåÔ'Ð(:¸D¼LÑIÔIÐIrë  c                 ó8   — t          | j        |j        ¦  «         S )z)See ControlDir.needs_format_conversion().)r<   r±  rn   rX   s     r$   Úneeds_format_conversionz)BzrDirPreSplitOut.needs_format_conversionh  s   € õ ˜dœl¨FÔ,<Ñ=Ô=Ð=Ð=r%   c                 ó~   — ddl m}  |¦   «         }|                     |¦  «         |                     | |d|¬¦  «        S )zSee ControlDir.open_branch.rH   rI   T)Ú_foundÚpossible_transports)rL   rJ   Úcheck_support_statusr®   )r    rˆ  ÚunsupportedÚignore_fallbacksrò  rJ   r#   s          r$   rÃ   zBzrDirPreSplitOut.open_branchn  s_   € ð 	-Ð,Ð,Ð,Ð,Ð,Ø!Ð!Ñ#Ô#ˆØ×#Ò# KÑ0Ô0Ð0Ø�{Š{˜4 ¨dØ/Bð ñ Dô Dð 	Dr%   Tc                 óÆ  — |
�<|                       ¦   «         }|
j        |j        k    rt          d|
›d| ›d|›�¦  «        ‚|r*t                               | j        | j        j        ¦  «        ‚|	st          | j        | j        j        ¦  «        ‚ddlm	} |  
                    |¦  «         | j                             |¦  «        }	 |                      ¦   «                              ||¬¦  «         n# t          j        $ r Y nw xY w	 |                       ¦   «                              ||¬¦  «         n# t          j        $ r Y nw xY w |¦   «                              |||¬¦  «         |S )	zSee ControlDir.sprout().Nzsource branch z is not within z with branch rH   rÝ  r»  )rÙ  rÚ  )rÃ   Úbaser*   Ú_mod_branchÚUnstackableBranchFormatr±  Úroot_transportr
   rß  rÞ  r½  rb   r¾  rî   r   ÚNoRepositoryPresentÚsproutÚNotBranchErrorrk   )r    ra   r  r   Úrecurserò  rÙ  rÚ  ÚstackedÚcreate_tree_if_localÚsource_branchÚ	my_branchrÞ  rm   s                 r$   rü  zBzrDirPreSplitOut.sproutw  s»  € ð
 Ð$Ø×(Ò(Ñ*Ô*ˆIØÔ! Y¤^Ò3Ð3Ý$�nà"�]�] D D D¨)¨)ð5ñ6ô 6ð 6ð ð 	8Ý×5Ò5Ø”˜dÔ1Ô6ñ8ô 8ð 8à#ð 	8Ý%Ø”˜dÔ1Ô6ñ8ô 8ð 8à3Ð3Ð3Ð3Ð3Ð3Ø�Š˜ÑÔÐØ”×3Ò3°CÑ8Ô8ˆð	Ø× Ò Ñ"Ô"×(Ò(¨¸[Ð(ÑIÔIÐIÐIøÝÔ)ð 	ð 	ð 	ØˆDð	øøøð	Ø×ÒÑÔ×%Ò% f¸+Ð%ÑFÔFÐFÐFøÝÔ$ð 	ð 	ð 	ØˆDð	øøøð 	ÐÑÔ×'Ò'¨Ø9IØ19ð 	(ñ 	;ô 	;ð 	;ð ˆs$   Ã)C, Ã,C>Ã=C>Ä)D, Ä,D>Ä=D>c                 ód   — ddl m} |�t          | ¦  «        ‚t          j        || j        ¦  «        ‚)Nr   )ÚBranchReferenceFormat)Ú
bzr.branchr  r   r   rÌ  r±  )r    Útarget_branchrˆ  r  s       r$   Úset_branch_referencez&BzrDirPreSplitOut.set_branch_referenceš  s>   € Ø7Ð7Ð7Ð7Ð7Ð7ØÐÝ*¨4Ñ0Ô0Ð0ÝÔ'Ð(=¸t¼|ÑLÔLÐLr%   r~   )NFFN)NNNr:   )NNNF)	NFNNNFFTN)r0   r1   r2   r3   r›   r¶  r¹  rî   rÆ  rÉ  rÏ  rÑ  rÛ  rl   rã  rå  r°  rê  r«   rï  rÃ   rü  r  r„   r…   s   @r$   r­  r­  Õ  sØ  ø€ € € € € Ø4Ð4ð&ð &ð &ð &ð &ð3ð 3ð 3ð(ð (ð (ð (ð ;@Ø48ðð ð ð ð. 37Ø,0ðhð hð hð hðEð Eð Eð Eð&ð &ð &ð &ðIð Ið Ið @DØ;@ðð ð ð ð:@ð @ð @ðJð Jð Jð0ð 0ð 0ð

Eð 
Eð 
Eð 
EðIð Ið IðJð Jð Jð>ð >ð >ð 27Ø@DðDð Dð Dð Dð <AØHLØCGØ!ð!ð !ð !ð !ðFMð Mð Mð Mð Mð Mð Mð Mr%   r­  c                   ó&   — e Zd ZdZdd„Zd„ Zd„ ZdS )r¥  zjA .bzr version 4 control object.

    This is a deprecated format and may be removed after sept 2006.
    Fc                 óB   — | j         j                             | |¦  «        S )rË  )r±  rƒ   rk   rÍ  s     r$   rÏ  zBzrDir4.create_repository§  s   € àŒ|Ô-×8Ò8¸¸vÑFÔFÐFr%   c                 ó   — dS )z/Format 4 dirs are always in need of conversion.Tr6   rX   s     r$   rï  zBzrDir4.needs_format_conversion«  ó   € àˆtr%   c                 óL   — ddl m}  |¦   «                              | d¬¦  «        S )úSee ControlDir.open_repository.rH   r§  T©rñ  )ri   r¨  r®   r©  s     r$   r¾  zBzrDir4.open_repository¯  ó6   € à1Ð1Ð1Ð1Ð1Ð1Ø Ð Ñ"Ô"×'Ò'¨°TÐ'Ñ:Ô:Ð:r%   Nr~   )r0   r1   r2   r3   rÏ  rï  r¾  r6   r%   r$   r¥  r¥  ¡  sT   € € € € € ðð ð
Gð Gð Gð Gðð ð ð;ð ;ð ;ð ;ð ;r%   r¥  c                   ó*   — e Zd ZdZd„ Zd„ Z	 	 dd„ZdS )	ru   zjA .bzr version 5 control object.

    This is a deprecated format and may be removed after sept 2006.
    c                 ó   — dS ©zSee ControlDir.has_workingtree.Tr6   rR   s    r$   Úhas_workingtreezBzrDir5.has_workingtree»  r  r%   c                 óL   — ddl m}  |¦   «                              | d¬¦  «        S )r  rH   re   Tr  )ri   rf   r®   r{   s     r$   r¾  zBzrDir5.open_repository¿  r  r%   FTc                 óP   — ddl m}  |¦   «         }|                     | d¬¦  «        S ©rÓ  rH   rÝ  Tr  ©rß  rÞ  r®   )r    rô  rÔ  rÞ  Ú	wt_formats        r$   r¿  zBzrDir5.open_workingtreeÄ  s<   € ð 	4Ð3Ð3Ð3Ð3Ð3Ø&Ð&Ñ(Ô(ˆ	ð �~Š~˜d¨4ˆ~Ñ0Ô0Ð0r%   N©FT©r0   r1   r2   r3   r  r¾  r¿  r6   r%   r$   ru   ru   µ  sX   € € € € € ðð ð
ð ð ð;ð ;ð ;ð
 ,1Ø+/ð1ð 1ð 1ð 1ð 1ð 1r%   ru   c                   ó&   — e Zd ZdZd„ Zd„ Zdd„ZdS )	r”   zjA .bzr version 6 control object.

    This is a deprecated format and may be removed after sept 2006.
    c                 ó   — dS r  r6   rR   s    r$   r  zBzrDir6.has_workingtreeÔ  r  r%   c                 óL   — ddl m}  |¦   «                              | d¬¦  «        S )r  rH   r�   Tr  )ri   r‘   r®   r–   s     r$   r¾  zBzrDir6.open_repositoryØ  r  r%   FTc                 óL   — ddl m}  |¦   «                              | d¬¦  «        S r  r  )r    rô  rÔ  rÞ  s       r$   r¿  zBzrDir6.open_workingtreeÝ  s8   € ð 	4Ð3Ð3Ð3Ð3Ð3Ø!Ð!Ñ#Ô#×(Ò(¨°dÐ(Ñ;Ô;Ð;r%   Nr  r  r6   r%   r$   r”   r”   Î  sP   € € € € € ðð ð
ð ð ð;ð ;ð ;ð
<ð <ð <ð <ð <ð <r%   r”   N)#r3   Úior   Ú
bzr.bzrdirr   r   r   r¤   r   r	   r
   r   r   r^  r   r   Úi18nr   r!   r   r   r   r   Úglobalsr   r8   r‡   r™   rW   r�   rš  r­  r¥  ru   r”   r6   r%   r$   ú<module>r#     s?  ðð"  Ð à Ð Ð Ð Ð Ð ðð ð ð ð ð ð ð ð ð ð
ð ð ð ð ð ð ð ð ð ð ð ð ð ðð ð ð ð ð ð ð ð Ð Ð Ð Ð Ð ðð ð ð ð ð ð ð ð ð ð
 'Ð &Ð &Ð &Ð &Ð &Ø €ˆGˆG‰IŒIð ñ ô ð ð0ð ð ð ð ˜<ñ ô ð ðB>=ð >=ð >=ð >=ð >=Ð(ñ >=ô >=ð >=ðB==ð ==ð ==ð ==ð ==Ð(ñ ==ô ==ð ==ð@Gð Gð Gð Gð G˜	ñ Gô Gð GðT&3ð &3ð &3ð &3ð &3˜	ñ &3ô &3ð &3ðRx<ð x<ð x<ð x<ð x<˜9ñ x<ô x<ð x<ðv>ð >ð >ð >ð >�Lñ >ô >ð >ðBIMð IMð IMð IMð IM˜ñ IMô IMð IMðX;ð ;ð ;ð ;ð ;Ðñ ;ô ;ð ;ð(1ð 1ð 1ð 1ð 1Ðñ 1ô 1ð 1ð2<ð <ð <ð <ð <Ðñ <ô <ð <ð <ð <r%   