§
    cÌc¼V  ã                   ó„  — d Z ddlmZ ddlmZ ddlmZmZ ddlm	Z	m
Z
 ddlmZmZmZmZmZmZmZmZmZ ddlmZ dd	lmZ d
dlmZmZ d
dlmZm Z m!Z!m"Z" d
dl#m$Z$  G d„ dej%        ¦  «        Z&dD ]Z'ej(         )                    de'¦  «         Œ G d„ de¦  «        Z* G d„ de*¦  «        Z+ G d„ dej,        ¦  «        Z-d„ Z.dS )z5An adapter between a Git Repository and a Breezy one.é    )ÚBytesIO)ÚNotCommitError)ÚCommitÚZERO_SHA)Úpeel_shaÚtree_lookup_pathé   )	ÚcheckÚerrorsÚgraphÚlockÚ
repositoryÚrevisionÚtraceÚtransactionsÚui)Úonly_raises)ÚForeignRepositoryé   )ÚGitFileLastChangeScannerÚGitFileParentProvider)Údefault_mappingÚencode_git_pathÚforeign_vcs_gitÚmapping_registry)ÚGitRevisionTreec                   ó*   — e Zd Zdd„Zdd„Zd„ Zd„ ZdS )	ÚGitCheckTc                 óL   — || _         || _        d| _        d | _        g | _        d S )Nr   )r   Ú
check_repoÚchecked_rev_cntÚobject_countÚproblems)Úselfr   r    s      ú7/usr/lib/python3/dist-packages/breezy/git/repository.pyÚ__init__zGitCheck.__init__E   s+   € Ø$ˆŒØ$ˆŒØ ˆÔØ ˆÔØˆŒˆˆó    Nc                 óx  — |€i }| j                              ¦   «         5  t          j                             ¦   «         5 | _        t          | j         j        j        ¦  «        }t          |¦  «        | _
        t          |¦  «        D ]…\  }}| j                             d|| j
        ¦  «         | j         j        j        |         }	 |                     ¦   «          ŒS# t          $ r&}| j                             ||f¦  «         Y d }~Œ~d }~ww xY w	 d d d ¦  «         n# 1 swxY w Y   d d d ¦  «         d S # 1 swxY w Y   d S )Nzchecking objects)r   Ú	lock_readr   Ú
ui_factoryÚnested_progress_barÚprogressÚsetÚ_gitÚobject_storeÚlenr"   Ú	enumerateÚupdater
   Ú	Exceptionr#   Úappend)r$   Úcallback_refsr    ÚshasÚiÚshaÚoÚes           r%   r
   zGitCheck.checkL   s»  € ØÐ ØˆMØŒ_×&Ò&Ñ(Ô(ð 	3ð 	3Ý”×1Ò1Ñ3Ô3ð	3Ø7;´}Ý�t”Ô+Ô8Ñ9Ô9ˆDÝ # D¡	¤	ˆDÔå# D™/œ/ð 3ð 3‘��3Ø”×$Ò$Ð%7¸¸DÔ<MÑNÔNÐNØ”OÔ(Ô5°cÔ:�ð3Ø—G’G‘I”I�I�IøÝ ð 3ð 3ð 3Ø”M×(Ò(¨#¨q¨Ñ2Ô2Ð2Ð2Ð2Ð2Ð2Ð2øøøøð3øøøð3ð	3ð 	3ð 	3ñ 	3ô 	3ð 	3ð 	3ð 	3ð 	3ð 	3ð 	3øøøð 	3ð 	3ð 	3ð 	3ð 	3ð 	3ð 	3ñ 	3ô 	3ð 	3ð 	3ð 	3ð 	3ð 	3ð 	3ð 	3øøøð 	3ð 	3ð 	3ð 	3ð 	3ð 	3s_   žD/½BDÃCÃDÃ
D	Ã!D	Ã=DÄD	ÄDÄD/ÄD	ÄD/ÄD	ÄD/Ä/D3Ä6D3c                 óø   — t          j        d                     | j        j        | j        j        ¦  «        ¦  «         t          j        d| j        ¦  «         | j        D ]\  }}t          j        d||¦  «         Œd S )Nzchecked repository {} format {}z%6d objectsz%s: %s)r   ÚnoteÚformatr   Úuser_urlÚ_formatr"   r#   )r$   Úverboser8   Úproblems       r%   Ú_report_repo_resultszGitCheck._report_repo_results\   s†   € ÝŒ
Ð4×;Ò;ØŒOÔ$ØŒOÔ#ñ%ô %ñ 	&ô 	&ð 	&õ 	Œ
�= $Ô"3Ñ4Ô4Ð4Ø œMð 	/ð 	/‰LˆC�ÝŒJ�x  gÑ.Ô.Ð.Ð.ð	/ð 	/r'   c                 óB   — | j         r|                      |¦  «         d S d S ©N)r    rB   )r$   r@   s     r%   Úreport_resultszGitCheck.report_resultsd   s0   € ØŒ?ð 	/Ø×%Ò% gÑ.Ô.Ð.Ð.Ð.ð	/ð 	/r'   )T©NT)Ú__name__Ú
__module__Ú__qualname__r&   r
   rB   rE   © r'   r%   r   r   C   sZ   € € € € € ðð ð ð ð3ð 3ð 3ð 3ð /ð /ð /ð/ð /ð /ð /ð /r'   r   )ÚInterRemoteGitNonGitRepositoryÚInterLocalGitNonGitRepositoryÚInterLocalGitLocalGitRepositoryÚ InterLocalGitRemoteGitRepositoryÚ InterRemoteGitLocalGitRepositoryÚInterToLocalGitRepositoryÚInterToRemoteGitRepositoryzbreezy.git.interrepoc                   óÖ   ‡ — e Zd ZdZeZdZˆ fd„Zd„ Zd„ Z	d„ Z
d„ Zd„ Zd	„ Zd
„ Zd„ Z eej        ej        ¦  «        d„ ¦   «         Zd„ Zd„ Zd„ Zdd„Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zˆ xZS )ÚGitRepositoryz'An adapter to git repositories for bzr.Nc                 ó¾   •— |j         | _        t          ¦   «                              t	          ¦   «         |d ¬¦  «         |j         j        | _        d | _        d| _        d S )N)Úcontrol_filesr   )Úroot_transportÚ
_transportÚsuperr&   ÚGitRepositoryFormatÚbaseÚ
_lock_modeÚ_lock_count)r$   ÚgitdirÚ	__class__s     €r%   r&   zGitRepository.__init__{   sa   ø€ Ø Ô/ˆŒÝ‰Œ×ÒÕ,Ñ.Ô.Ø,2À$ð 	ñ 	Hô 	Hð 	HàÔ)Ô.ˆŒ	ØˆŒØˆÔÐÐr'   c                 óJ   — t          j        | j        | j        j        ¦  «        ‚rD   )r   ÚUnstackableRepositoryFormatr?   Úcontrol_transportrZ   )r$   Ú	basis_urls     r%   Úadd_fallback_repositoryz%GitRepository.add_fallback_repositoryƒ   s'   € ÝÔ0°´Ø15Ô1GÔ1LñNô Nð 	Nr'   c                 ó   — dS ©NFrJ   ©r$   s    r%   Ú	is_sharedzGitRepository.is_shared‡   ó   € Øˆur'   c                 ó   — dS re   rJ   rf   s    r%   Úget_physical_lock_statusz&GitRepository.get_physical_lock_statusŠ   rh   r'   c                 óð   — | j         r0| j         dk    rt          j        | ¦  «        ‚| xj        dz  c_        n&d| _         d| _        t	          j        ¦   «         | _        t          j        | j	        d¦  «        S )zSee Branch.lock_write().Úwr   N)
r[   r   ÚReadOnlyErrorr\   r   ÚWriteTransactionÚ_transactionr   ÚRepositoryWriteLockResultÚunlockrf   s    r%   Ú
lock_writezGitRepository.lock_write�   sw   € àŒ?ð 	@ØŒ #Ò%Ð%ÝÔ*¨4Ñ0Ô0Ð0ØÐÔ Ñ!ÐÔÐà!ˆDŒOØ ˆDÔÝ ,Ô =Ñ ?Ô ?ˆDÔÝÔ3°D´KÀÑFÔFÐFr'   c                 ó*   — t          | j        ¦  «        ‚rD   )ÚNotImplementedErrorÚ
break_lockrf   s    r%   ru   zGitRepository.break_lock™   s   € Ý! $¤/Ñ2Ô2Ð2r'   c                 ó*   — t          | j        ¦  «        ‚rD   )rt   Údont_leave_lock_in_placerf   s    r%   rw   z&GitRepository.dont_leave_lock_in_placeœ   s   € Ý! $Ô"?Ñ@Ô@Ð@r'   c                 ó*   — t          | j        ¦  «        ‚rD   )rt   Úleave_lock_in_placerf   s    r%   ry   z!GitRepository.leave_lock_in_placeŸ   s   € Ý! $Ô":Ñ;Ô;Ð;r'   c                 óÐ   — | j         r!| j         dvrt          ‚| xj        dz  c_        n&d| _         d| _        t          j        ¦   «         | _        t          j        | j        ¦  «        S )N)Úrrl   r   r{   )	r[   ÚAssertionErrorr\   r   ÚReadOnlyTransactionro   r   ÚLogicalLockResultrq   rf   s    r%   r)   zGitRepository.lock_read¢   sj   € ØŒ?ð 	CØŒ jÐ0Ð0Ý$Ð$ØÐÔ Ñ!ÐÔÐà!ˆDŒOØ ˆDÔÝ ,Ô @Ñ BÔ BˆDÔÝÔ% d¤kÑ2Ô2Ð2r'   c                 óÞ  — | j         dk    rt          j        | ¦  «        ‚| j         dk    rQ| j        dk    rF| j        �?|                      ¦   «          | xj         dz  c_         d | _        t          j        d¦  «        ‚| xj         dz  c_         | j         dk    rTd | _        | j        }d | _        |                     ¦   «          t          | d¦  «        r| j
                             ¦   «          d S d S d S )Nr   r   rl   z3Must end write groups before releasing write locks.r.   )r\   r   ÚLockNotHeldr[   Ú_write_groupÚabort_write_groupÚBzrErrorro   ÚfinishÚhasattrr.   Úclose)r$   Útransactions     r%   rq   zGitRepository.unlock­   s  € àÔ˜qÒ Ð ÝÔ$ TÑ*Ô*Ð*ØÔ˜qÒ Ð  T¤_¸Ò%;Ð%;ØÔ Ð,Ø×&Ò&Ñ(Ô(Ð(ØÐ Ô  AÑ%Ð Ô Ø"&�”Ý”oØIñKô Kð KàÐÔ˜AÑÐÔØÔ˜qÒ Ð Ø"ˆDŒOØÔ+ˆKØ $ˆDÔØ×ÒÑ Ô Ð Ý�t˜VÑ$Ô$ð "Ø”	—’Ñ!Ô!Ð!Ð!Ð!ð !Ð ð
"ð "r'   c                 ó   — | j         dk    S )Nrl   ©r[   rf   s    r%   Úis_write_lockedzGitRepository.is_write_lockedÁ   s   € Ø” 3Ò&Ð'r'   c                 ó   — | j         d uS rD   r‰   rf   s    r%   Ú	is_lockedzGitRepository.is_lockedÄ   s   € Ø” tÐ+Ð,r'   c                 óD   — | j         €t          j        ¦   «         S | j         S )z!See Repository.get_transaction().)ro   r   ÚPassThroughTransactionrf   s    r%   Úget_transactionzGitRepository.get_transactionÇ   s#   € àÔÐ$ÝÔ6Ñ8Ô8Ð8àÔ$Ð$r'   Fc                 ó4   — ddl m}  |¦   «         }d|_        |S )zReconcile this repository.r	   )ÚReconcileResultF)Ú	reconciler‘   Úaborted)r$   ÚotherÚthoroughr‘   Úrets        r%   r’   zGitRepository.reconcileÎ   s-   € à/Ð/Ð/Ð/Ð/Ð/ØˆoÑÔˆØˆŒØˆ
r'   c                 ó   — dS rF   rJ   rf   s    r%   Úsupports_rich_rootz GitRepository.supports_rich_rootÕ   s   € Øˆtr'   c                 ó   — t           S rD   )r   rf   s    r%   Úget_mappingzGitRepository.get_mappingØ   s   € ÝÐr'   c                 ó*   — t          | j        ¦  «        ‚rD   )rt   Úmake_working_treesrf   s    r%   rœ   z GitRepository.make_working_treesÛ   s   € Ý! $Ô"9Ñ:Ô:Ð:r'   c                 ó   — dS re   rJ   rf   s    r%   Ú%revision_graph_can_have_wrong_parentsz3GitRepository.revision_graph_can_have_wrong_parentsÞ   rh   r'   c                 ó6   — t          j        | j        | ¦  «        ‚rD   ©r   ÚUnsupportedOperationÚadd_signature_text)r$   ÚrevidÚ	signatures      r%   r¢   z GitRepository.add_signature_textá   ó   € ÝÔ)¨$Ô*AÀ4ÑHÔHÐHr'   c                 ó6   — t          j        | j        | ¦  «        ‚rD   r    )r$   Úrevision_idÚgpg_strategys      r%   Úsign_revisionzGitRepository.sign_revisionä   r¥   r'   re   ) rG   rH   rI   Ú__doc__r   ÚvcsÚ	chk_bytesr&   rc   rg   rj   rr   ru   rw   ry   r)   r   r   r€   Ú
LockBrokenrq   rŠ   rŒ   r�   r’   r˜   rš   rœ   rž   r¢   r©   Ú__classcell__©r^   s   @r%   rS   rS   u   sœ  ø€ € € € € Ø1Ð1à
€CØ€Iðð ð ð ð ðNð Nð Nðð ð ðð ð ð
Gð 
Gð 
Gð3ð 3ð 3ðAð Að Að<ð <ð <ð	3ð 	3ð 	3ð €[�Ô# VÔ%6Ñ7Ô7ð"ð "ñ 8Ô7ð"ð&(ð (ð (ð-ð -ð -ð%ð %ð %ðð ð ð ðð ð ðð ð ð;ð ;ð ;ðð ð ðIð Ið IðIð Ið Ið Ið Ið Ið Ir'   rS   c                   óÔ   ‡ — e Zd ZdZd„ Z	 	 	 d d„Zd„ Zd„ Zd„ Zd!ˆ fd	„	Z	d
„ Z
d„ Zd"d„Zd„ Zd"d„Zd„ Zd„ Zd#d„Zd$d„Zd%d„Zd„ Zd„ Zd%d„Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zˆ xZS )&ÚLocalGitRepositoryz"Git repository on the file system.c                 óŠ   — t                                | |¦  «         |j        | _        t          | ¦  «        | _        d | _        d S rD   )rS   r&   r.   r   Ú_file_change_scannerro   )r$   r]   s     r%   r&   zLocalGitRepository.__init__ë   s?   € Ý×Ò˜t VÑ,Ô,Ð,Ø”KˆŒ	Ý$<¸TÑ$BÔ$BˆÔ!Ø ˆÔÐÐr'   NFc
                 ó`   — ddl m}
  |
| ||||||||	¦	  «	        }|                      ¦   «          |S )aˆ  Obtain a CommitBuilder for this repository.

        :param branch: Branch to commit to.
        :param parents: Revision ids of the parents of the new revision.
        :param config: Configuration to use.
        :param timestamp: Optional timestamp recorded for commit.
        :param timezone: Optional timezone for timestamp.
        :param committer: Optional committer to set for commit.
        :param revprops: Optional dictionary of revision properties.
        :param revision_id: Optional revision id.
        :param lossy: Whether to discard data that can not be natively
            represented, when pushing to a foreign VCS
        r   )ÚGitCommitBuilder)Úcommitrµ   Ústart_write_group)r$   ÚbranchÚparentsÚconfigÚ	timestampÚtimezoneÚ	committerÚrevpropsr§   Úlossyrµ   Úbuilders               r%   Úget_commit_builderz%LocalGitRepository.get_commit_builderñ   sa   € ð 	ð 	ð 	ð 	ð 	ð 	ð #Ð"Ø�'˜6 9¨h¸	À8Ø˜ñ ô  ˆð 	×ÒÑ Ô Ð Øˆr'   c                 ó¦   — t          ¦   «         }|                     |¦  «         | j                             d|                     ¦   «         ¦  «         d S )Nrº   )r   Úwrite_to_filer.   Ú_put_named_fileÚgetvalue)r$   ÚcsÚfs      r%   Ú_write_git_configz$LocalGitRepository._write_git_config
  sE   € Ý‰IŒIˆØ
×Ò˜ÑÔÐØŒ	×!Ò! (¨A¯JªJ©L¬LÑ9Ô9Ð9Ð9Ð9r'   c                 óN   — t          j        t          | j        ¦  «        ¦  «        S rD   )Ú
_mod_graphÚGraphr   r³   rf   s    r%   Úget_file_graphz!LocalGitRepository.get_file_graph  s*   € ÝÔÕ 5ØÔ%ñ!'ô !'ñ (ô (ð 	(r'   c           	   #   óz  K  — i }|D ]1\  }}}|                      |g ¦  «                             ||f¦  «         Œ2|                     ¦   «         D �]l\  }}	 |                      |¦  «        \  }}	n(# t          j        $ r t	          j        || ¦  «        ‚w xY w	 | j        j        |         }
n## t          $ r t	          j        || ¦  «        ‚w xY w|
j
        }|D ]ã\  }}	 |	                     |¦  «        }n%# t          $ r t	          j        ||f| ¦  «        ‚w xY w	 t          | j        j        j        |t          |¦  «        ¦  «        \  }}| j        j        |         }|j        dk    r|g fV — Œ–|j        dk    r||j        fV — Œ­t%          d|z  ¦  «        ‚# t          $ r t	          j        ||f| ¦  «        ‚w xY w�ŒndS )a,  Iterate through file versions.

        Files will not necessarily be returned in the order they occur in
        desired_files.  No specific order is guaranteed.

        Yields pairs of identifier, bytes_iterator.  identifier is an opaque
        value supplied by the caller as part of desired_files.  It should
        uniquely identify the file version in the caller's context.  (Examples:
        an index number or a TreeTransform trans_id.)

        bytes_iterator is an iterable of bytestrings for the file.  The
        kind of iterable and length of the bytestrings are unspecified, but for
        this implementation, it is a list of bytes produced by
        VersionedFile.get_record_stream().

        :param desired_files: a list of (file_id, revision_id, identifier)
            triples
        s   trees   blobzfile text resolved to %rN)Ú
setdefaultr4   ÚitemsÚlookup_bzr_revision_idr   ÚNoSuchRevisionÚRevisionNotPresentr.   r/   ÚKeyErrorÚtreeÚparse_file_idÚ
ValueErrorr   Ú__getitem__r   Ú	type_nameÚchunkedr|   )r$   Údesired_filesÚper_revisionÚfile_idr§   Ú
identifierr£   ÚfilesÚ	commit_idÚmappingr¶   Ú	root_treeÚfileidÚpathÚmodeÚitem_idÚobjs                    r%   Úiter_files_bytesz#LocalGitRepository.iter_files_bytes  sa  è è € ð& ˆØ2?ð 	'ð 	'Ñ.ˆW�k :Ø×#Ò# K°Ñ4Ô4×;Ò;Ø˜*Ð%ñ'ô 'ð 'ð 'à(×.Ò.Ñ0Ô0ð 	Oñ 	O‰LˆE�5ð=Ø'+×'BÒ'BÀ5Ñ'IÔ'IÑ$�˜G˜GøÝÔ(ð =ð =ð =ÝÔ/°°tÑ<Ô<Ð<ð=øøøð=ØœÔ/°	Ô:��øÝð =ð =ð =ÝÔ/°°tÑ<Ô<Ð<ð=øøøàœˆIØ&+ð Oð OÑ"�˜
ðKØ"×0Ò0°Ñ8Ô8�D�DøÝ!ð Kð Kð KÝ Ô3°V¸U°OÀTÑJÔJÐJðKøøøðOÝ$4Øœ	Ô.Ô:¸IÝ'¨Ñ-Ô-ñ%/ô %/‘M�D˜'ð œ)Ô0°Ô9�Cð ”}¨Ò/Ð/Ø)¨2Ð.Ð.Ð.Ð.Ð.Øœ¨'Ò1Ð1Ø)¨3¬;Ð7Ð7Ð7Ð7Ð7å,Ð-GÈ#Ñ-MÑNÔNÐNøõ  ð Kð Kð KÝ Ô3°V¸U°OÀTÑJÔJÐJðKøøøñOð	Oð 	Os1   ÁA-Á-%BÂB)Â) C	ÃC1Ã1"DÄAFÆ"F6c                 ó   •— t          ¦   «                              ||¦  «        }g }| j        j        D ]9}| j        j        |         }|j        dk    r|                     |j        ¦  «         Œ:t          |¦  «        |d<   |S )zSee Repository.gather_stats().s   commitÚ	revisions)rX   Úgather_statsr.   r/   rØ   r4   Úidr0   )r$   r£   Ú
committersÚresultÚrevsr8   r9   r^   s          €r%   rê   zLocalGitRepository.gather_statsH  s€   ø€ å‘”×%Ò%Ø�:ñô ˆàˆØ”9Ô)ð 	"ð 	"ˆCØ”	Ô& sÔ+ˆAØŒ{˜iÒ'Ð'Ø—’˜AœDÑ!Ô!Ð!øÝ! $™iœiˆˆ{ÑØˆr'   c              #   óê   K  — |                       ¦   «         }| j        j        D ]O}| j        j        |         }t          |t          ¦  «        sŒ*|                     |j        ¦  «        }|j        |fV — ŒPd S rD   )rš   r.   r/   Ú
isinstancer   Úrevision_id_foreign_to_bzrrë   )r$   rà   r8   r9   r£   s        r%   Ú_iter_revision_idsz%LocalGitRepository._iter_revision_idsT  sƒ   è è € Ø×"Ò"Ñ$Ô$ˆØ”9Ô)ð 	ð 	ˆCØ”	Ô& sÔ+ˆAÝ˜a¥Ñ(Ô(ð ØØ×6Ò6°q´tÑ<Ô<ˆEØ”$˜�+ÐÐÐÐð	ð 	r'   c                 óš   — t          ¦   «         }|                      ¦   «         D ]\  }}|                     |¦  «         Œt          |¦  «        S rD   )r-   rò   ÚaddÚlist)r$   r–   Úgit_shar£   s       r%   Úall_revision_idsz#LocalGitRepository.all_revision_ids]  sG   € Ý‰eŒeˆØ"×5Ò5Ñ7Ô7ð 	ð 	‰NˆG�UØ�GŠG�E‰NŒNˆNˆNÝ�C‰yŒyÐr'   c                 óÊ  — t          |¦  «        t          k    rt          ‚	 |                      |¦  «        \  }}n# t          j        $ r Y d S w xY w	 | j        j        |         }n# t          $ r Y d S w xY wg }|j	        D ]d}	 | 
                    |                      ||¦  «        ¦  «         Œ-# t          $ r+ | 
                    |                     |¦  «        ¦  «         Y Œaw xY w|S rD   )ÚtypeÚbytesrÖ   rÐ   r   rÑ   r.   r/   rÓ   r¹   r4   Úlookup_foreign_revision_idrñ   )r$   r£   Úno_alternatesÚhexsharà   r¶   r–   Úps           r%   Ú_get_parentszLocalGitRepository._get_parentsc  s"  € Ý�‰;Œ;�%ÒÐÝÐð	Ø $× ;Ò ;¸EÑ BÔ BÑˆV�W�WøÝÔ$ð 	ð 	ð 	Ø�4�4ð	øøøð	Ø”YÔ+¨FÔ3ˆFˆFøÝð 	ð 	ð 	Ø�4�4ð	øøøàˆØ”ð 	Bð 	BˆAðBØ—
’
˜4×:Ò:¸1¸gÑFÔFÑGÔGÐGÐGøÝð Bð Bð BØ—
’
˜7×=Ò=¸aÑ@Ô@ÑAÔAÐAÐAÐAðBøøøàˆ
s3   ¡: ºAÁAÁA$ Á$
A2Á1A2Â)B+Â+2C ÃC c                 ó0   — |                       |d¬¦  «        S )NT©rü   )Úget_parent_map)r$   Úrevidss     r%   Ú_get_parent_map_no_fallbacksz/LocalGitRepository._get_parent_map_no_fallbacksw  s   € Ø×"Ò" 6¸Ð"Ñ>Ô>Ð>r'   c                 óØ   — i }|D ]d}|                       ||¬¦  «        }|t          j        k    rd||<   Œ/|€Œ2t          |¦  «        dk    rt          j        g}t	          |¦  «        ||<   Œe|S )Nr  rJ   r   )rÿ   Ú_mod_revisionÚNULL_REVISIONr0   Útuple)r$   r  rü   Ú
parent_mapr§   r¹   s         r%   r  z!LocalGitRepository.get_parent_mapz  s�   € Øˆ
Ø!ð 
	5ð 
	5ˆKØ×'Ò'Ø¨=ð (ñ :ô :ˆGà�mÔ9Ò9Ð9Ø*,�
˜;Ñ'ØØˆØÝ�7‰|Œ|˜qÒ Ð Ý(Ô6Ð7�Ý&+¨G¡n¤nˆJ�{Ñ#Ð#ØÐr'   c                 ó„  — t          |¦  «        }i }|rši }|D ]/}|t          j        k    rŒ|                      |¦  «        }|�|||<   Œ0|                     |¦  «         t          ¦   «         }|                     ¦   «         D ]}|                     |¦  «         Œ|                     |¦  «        }|°št          j        |¦  «        S )zNReturn the known graph for a set of revision ids and their ancestors.
        )	r-   r  r  rÿ   r2   ÚvaluesÚ
differencerÊ   Ú
KnownGraph)r$   Úrevision_idsÚpendingr	  Úthis_parent_mapr£   r¹   r  s           r%   Úget_known_graph_ancestryz+LocalGitRepository.get_known_graph_ancestry‰  sä   € õ �lÑ#Ô#ˆØˆ
Øð 	5Ø ˆOØ ð 5ð 5�Ø�MÔ7Ò7Ð7ØØ×+Ò+¨EÑ2Ô2�ØÐ&Ø-4�O EÑ*øØ×Ò˜oÑ.Ô.Ð.Ý‘e”eˆGØ)×0Ò0Ñ2Ô2ð 'ð '�Ø—’˜vÑ&Ô&Ð&Ð&Ø×(Ò(¨Ñ4Ô4ˆGð ð 	5õ Ô$ ZÑ0Ô0Ð0r'   c                 óæ   — |                       |¦  «        \  }}	 | j        j        |         }n## t          $ r t	          j        | |¦  «        ‚w xY w|j        €t	          j        | |¦  «        ‚|j        S rD   )rÐ   r.   r/   rÓ   r   rÑ   Úgpgsig)r$   r§   Úgit_commit_idrà   r¶   s        r%   Úget_signature_textz%LocalGitRepository.get_signature_text�  s�   € Ø!%×!<Ò!<¸[Ñ!IÔ!IÑˆ�wð	;Ø”YÔ+¨MÔ:ˆFˆFøÝð 	;ð 	;ð 	;ÝÔ'¨¨kÑ:Ô:Ð:ð	;øøøàŒ=Ð ÝÔ'¨¨kÑ:Ô:Ð:ØŒ}Ðs	   š- ­ ATc                 óR   — t          | |¬¦  «        }|                     |¦  «         |S )N)r    )r   r
   )r$   r  r5   r    rí   s        r%   r
   zLocalGitRepository.check§  s+   € Ý˜$¨:Ð6Ñ6Ô6ˆØ�Š�]Ñ#Ô#Ð#Øˆr'   c                 óB   — | j         j                             ¦   «          d S rD   )r.   r/   Úpack_loose_objects)r$   ÚhintÚclean_obsolete_packss      r%   ÚpackzLocalGitRepository.pack¬  s   € ØŒ	Ô×1Ò1Ñ3Ô3Ð3Ð3Ð3r'   c                 ó^  — t          |t          ¦  «        st          |¦  «        ‚|€|                      ¦   «         }|t          k    rt
          j        S t          | j        j	        |¦  «        \  }}t          |t          ¦  «        st          |j        ¦  «        ‚|                     |¦  «        }|S )a  Lookup a revision id.

        :param foreign_revid: Foreign revision id to look up
        :param mapping: Mapping to use (use default mapping if not specified)
        :raise KeyError: If foreign revision was not found
        :return: bzr revision id
        )rð   rú   Ú	TypeErrorrš   r   r  r  r   r.   r/   r   r   rë   Úget_revision_id)r$   Úforeign_revidrà   ÚunpeeledÚpeeledr£   s         r%   rû   z-LocalGitRepository.lookup_foreign_revision_id¯  s¡   € õ ˜-­Ñ/Ô/ð 	+Ý˜MÑ*Ô*Ð*Øˆ?Ø×&Ò&Ñ(Ô(ˆGØ�HÒ$Ð$Ý Ô.Ð.Ý# D¤IÔ$:¸MÑJÔJÑˆ�&Ý˜&¥&Ñ)Ô)ð 	,Ý  ¤Ñ+Ô+Ð+Ø×'Ò'¨Ñ/Ô/ˆàˆr'   c                 ó^   — 	 |                       |¦  «         dS # t          j        $ r Y dS w xY w)zzCheck whether a GPG signature is present for this revision.

        This is never the case for Git repositories.
        TF)r  r   rÑ   ©r$   r§   s     r%   Úhas_signature_for_revision_idz0LocalGitRepository.has_signature_for_revision_idÄ  sI   € ð
	Ø×#Ò# KÑ0Ô0Ð0ð �4øõ Ô$ð 	ð 	ð 	Ø�5�5ð	øøøs   ‚ ™,«,c                 ó  — ddl m} |                      ¦   «         5  |                      |¦  «        \  }}	 | j        j        |         }n## t          $ r t          j        | |¦  «        ‚w xY w|j	        €|j
        dfcddd¦  «         S t          j        |                     ¦   «         ¦  «        }d|_	        |                     |                     ¦   «         |j	        ¦  «        \  }}	}
||	fcddd¦  «         S # 1 swxY w Y   dS )zÙVerify the signature on a revision.

        :param revision_id: the revision to verify
        :gpg_strategy: the GPGStrategy object to used

        :return: gpg.SIGNATURE_VALID or a failed SIGNATURE_ value
        r   )ÚgpgN)Úbreezyr&  r)   rÐ   r.   r/   rÓ   r   rÑ   r  ÚSIGNATURE_NOT_SIGNEDr   Úfrom_stringÚas_raw_stringÚverify)r$   r§   r¨   r&  r  rà   r¶   Úwithout_sigrí   ÚkeyÚ
plain_texts              r%   Úverify_revision_signaturez,LocalGitRepository.verify_revision_signatureÐ  s  € ð 	ÐÐÐÐÐØ�^Š^ÑÔð 	!ð 	!Ø%)×%@Ò%@ÀÑ%MÔ%MÑ"ˆM˜7ð?ØœÔ/°Ô>��øÝð ?ð ?ð ?ÝÔ+¨D°+Ñ>Ô>Ð>ð?øøøð Œ}Ð$ØÔ/°Ð5ð	!ð 	!ð 	!ð 	!ñ 	!ô 	!ð 	!ð 	!õ !Ô,¨V×-AÒ-AÑ-CÔ-CÑDÔDˆKØ!%ˆKÔà(4×(;Ò(;Ø×)Ò)Ñ+Ô+¨V¬]ñ)<ô )<Ñ%ˆV�S˜*à˜C�=ð	!ð 	!ð 	!ð 	!ñ 	!ô 	!ð 	!ð 	!ð 	!ð 	!ð 	!ð 	!øøøð 	!ð 	!ð 	!ð 	!ð 	!ð 	!s/   ›C5µAÁC5Á A(Á(C5ÂA!C5Ã5C9Ã<C9c                 óŠ   — 	 t          j        |¦  «        \  }}||fS # t          j        $ r t          j        | |¦  «        ‚w xY w)zøLookup a bzr revision id in a Git repository.

        :param bzr_revid: Bazaar revision id
        :param mapping: Optional mapping to use
        :return: Tuple with git commit id, mapping that was used and supplement
            details
        )r   Úrevision_id_bzr_to_foreignr   ÚInvalidRevisionIdrÑ   )r$   Ú	bzr_revidrà   rö   s       r%   rÐ   z)LocalGitRepository.lookup_bzr_revision_idê  sa   € ð	&Ý!1Ô!LØñ"ô "ÑˆW�gð
 ˜WÐ%Ð%øõ Ô'ð 	9ð 	9ð 	9ÝÔ'¨¨iÑ8Ô8Ð8ð	9øøøs	   ‚ �%Ac                 ó^  — t          |t          ¦  «        st          j        || ¦  «        ‚|                      |¦  «        \  }}	 | j        j        |         }n## t          $ r t          j        | |¦  «        ‚w xY w| 	                    || j
        d¬¦  «        \  }}}|€t          ‚|r||_        |S )NF)Ústrict)rð   rú   r   r2  rÐ   r.   r/   rÓ   rÑ   Úimport_commitrû   r|   r§   )r$   r§   r  rà   r¶   r   Úroundtrip_revidÚ	verifierss           r%   Úget_revisionzLocalGitRepository.get_revisionú  sÒ   € Ý˜+¥uÑ-Ô-ð 	>ÝÔ*¨;¸Ñ=Ô=Ð=Ø!%×!<Ò!<¸[Ñ!IÔ!IÑˆ�wð	;Ø”YÔ+¨MÔ:ˆFˆFøÝð 	;ð 	;ð 	;ÝÔ'¨¨kÑ:Ô:Ð:ð	;øøøà/6×/DÒ/DØ�DÔ3¸Eð 0Eñ 0Cô 0CÑ,ˆ�/ 9àÐÝ Ð àð 	3Ø#2ˆHÔ Øˆs   ÁA Á A7c                 ó˜   — |t           j        k    rdS 	 |                      |¦  «        \  }}n# t          j        $ r Y dS w xY w|| j        v S )zSee Repository.has_revision.TF)r  r  rÐ   r   rÑ   r.   )r$   r§   r  rà   s       r%   Úhas_revisionzLocalGitRepository.has_revision  sf   € à�-Ô5Ò5Ð5Ø�4ð	Ø%)×%@Ò%@ÀÑ%MÔ%MÑ"ˆM˜7˜7øÝÔ$ð 	ð 	ð 	Ø�5�5ð	øøøà ¤Ð*Ð+s   ”- ­A ¿A c                 óF   — t          t          | j        |¦  «        ¦  «        S )zSee Repository.has_revisions.)r-   Úfilterr;  )r$   r  s     r%   Úhas_revisionsz LocalGitRepository.has_revisions  s   € å•6˜$Ô+¨\Ñ:Ô:Ñ;Ô;Ð;r'   c              #   ó|   K  — |D ]6}	 |                       |¦  «        }n# t          j        $ r d}Y nw xY w||fV — Œ7dS )zSee Repository.get_revisions.N)r9  r   rÑ   )r$   r  r£   Úrevs       r%   Úiter_revisionsz!LocalGitRepository.iter_revisions  ss   è è € à!ð 	ð 	ˆEðØ×'Ò'¨Ñ.Ô.��øÝÔ(ð ð ð Ø���ðøøøà˜#�,ÐÐÐÐð	ð 	s   ˆž2±2c              #   óB   K  — |D ]}|                       |¦  «        V — ŒdS )zSee Repository.revision_trees.N)Úrevision_tree)r$   r  r£   s      r%   Úrevision_treesz!LocalGitRepository.revision_trees"  s<   è è € àð 	,ð 	,ˆEØ×$Ò$ UÑ+Ô+Ð+Ð+Ð+Ð+ð	,ð 	,r'   c                 óJ   — |€t          d|z  ¦  «        ‚t          | |¦  «        S )zSee Repository.revision_tree.Nzinvalid revision id %s)rÖ   r   r#  s     r%   rC  z LocalGitRepository.revision_tree'  s,   € àÐÝÐ5¸ÑCÑDÔDÐDÝ˜t [Ñ1Ô1Ð1r'   c                 ó6   — t          j        | j        | ¦  «        ‚rD   )r   r¡   Úset_make_working_trees)r$   Útreess     r%   rG  z)LocalGitRepository.set_make_working_trees-  s   € ÝÔ)¨$Ô*EÀtÑLÔLÐLr'   c                 ó^   — | j                              ¦   «                              dd¦  «         S )N)ÚcoreÚbare)r.   Ú
get_configÚget_booleanrf   s    r%   rœ   z%LocalGitRepository.make_working_trees0  s)   € Ø”9×'Ò'Ñ)Ô)×5Ò5°jÀ&ÑIÔIÐIÐIr'   )NNNNNF)NN)F)NNTre   rD   ) rG   rH   rI   rª   r&   rÁ   rÈ   rÌ   rç   rê   rò   r÷   rÿ   r  r  r  r  r
   r  rû   r$  r/  rÐ   r9  r;  r>  rA  rD  rC  rG  rœ   r®   r¯   s   @r%   r±   r±   è   s  ø€ € € € € Ø,Ð,ð!ð !ð !ð EIØCGØ38ðð ð ð ð2:ð :ð :ð
(ð (ð (ð3Oð 3Oð 3Oðj
ð 
ð 
ð 
ð 
ð 
ðð ð ðð ð ðð ð ð ð(?ð ?ð ?ðð ð ð ð1ð 1ð 1ð(ð ð ðð ð ð ð
4ð 4ð 4ð 4ðð ð ð ð*
ð 
ð 
ð!ð !ð !ð4&ð &ð &ð &ð ð ð ð",ð ,ð ,ð<ð <ð <ðð ð ð,ð ,ð ,ð
2ð 2ð 2ðMð Mð MðJð Jð Jð Jð Jð Jð Jr'   r±   c                   ó˜   — e 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dZdZdZdZdZdZed„ ¦   «         Zd„ Zdd„Zd„ Zd„ Zd	„ Zd
S )rY   zGit repository format.FTc                 ó"   — ddl m}  |¦   «         S )Nr   )ÚLocalGitControlDirFormat)ÚdirrP  )r$   rP  s     r%   Ú_matchingcontroldirz'GitRepositoryFormat._matchingcontroldirL  s#   € à1Ð1Ð1Ð1Ð1Ð1Ø'Ð'Ñ)Ô)Ð)r'   c                 ó   — dS )NzGit RepositoryrJ   rf   s    r%   Úget_format_descriptionz*GitRepositoryFormat.get_format_descriptionQ  s   € ØÐr'   c                 ó~   — ddl m} t          ||¦  «        st          j        | ¦  «        ‚|                     ¦   «         S )Nr   )ÚGitDir)rQ  rV  rð   r   ÚUninitializableFormatÚopen_repository)r$   Ú
controldirÚsharedÚ	_internalrV  s        r%   Ú
initializezGitRepositoryFormat.initializeT  sI   € ØÐÐÐÐÐÝ˜* fÑ-Ô-ð 	5ÝÔ.¨tÑ4Ô4Ð4Ø×)Ò)Ñ+Ô+Ð+r'   c                 ó   — |j         S rD   )Úrich_root_data)r$   Útarget_repo_formats     r%   Úcheck_conversion_targetz+GitRepositoryFormat.check_conversion_targetZ  s   € Ø!Ô0Ð0r'   c                 ó"   — ddl m}  |¦   «         S )Nr   )ÚForeignTestsRepositoryFactory)Útests.test_repositoryrb  )r$   rb  s     r%   Ú$get_foreign_tests_repository_factoryz8GitRepositoryFormat.get_foreign_tests_repository_factory]  s1   € ð	ð 	ð 	ð 	ð 	ð 	ð -Ð,Ñ.Ô.Ð.r'   c                 ó   — dS )Ns   gitrJ   rf   s    r%   Únetwork_namez GitRepositoryFormat.network_namec  s   € Øˆvr'   N)FF)rG   rH   rI   rª   Úsupports_versioned_directoriesÚsupports_tree_referencer^  Úsupports_leaving_lockÚfast_deltasÚsupports_funky_charactersÚsupports_external_lookupsÚsupports_full_versioned_filesÚsupports_revision_signaturesÚsupports_nesting_repositoriesrž   Úsupports_unreferenced_revisionsÚsupports_setting_revision_idsÚsupports_storing_branch_nickÚsupports_overriding_transportÚ#supports_custom_revision_propertiesÚrecords_per_file_revisionÚsupports_multiple_authorsÚsupports_ghostsÚsupports_chksÚpropertyrR  rT  r\  r`  rd  rf  rJ   r'   r%   rY   rY   4  s÷   € € € € € Ø Ð à%*Ð"Ø"ÐØ€NØ!ÐØ€KØ $ÐØ %ÐØ$)Ð!Ø#(Ð Ø$)Ð!Ø,1Ð)Ø&*Ð#Ø$)Ð!Ø#(Ð Ø$)Ð!Ø*/Ð'Ø %ÐØ %ÐØ€OØ€Màð*ð *ñ „Xð*ð ð  ð  ð,ð ,ð ,ð ,ð1ð 1ð 1ð/ð /ð /ðð ð ð ð r'   rY   c                  óÔ   — ddl m}  ddlm} |j        t          ¦   «          | ¦   «         f|j        t          ¦   «         t          ¦   «         f|j         | ¦   «         t          ¦   «         fgS )Nr	   )ÚRepositoryFormat2ar   )Ú	interrepo)Úbzr.groupcompress_repor{  Ú r|  rL   rY   rM   rP   )r{  r|  s     r%   Ú%get_extra_interrepo_test_combinationsr  g  s�   € Ø;Ð;Ð;Ð;Ð;Ð;ØÐÐÐÐÐà	Ô	0Ý	Ñ	Ô	Ð 2Ð 2Ñ 4Ô 4ð	6à	Ô	2Ý	Ñ	Ô	Õ 3Ñ 5Ô 5ð	7à	Ô	,Ø	Ð	Ñ	Ô	Õ2Ñ4Ô4ð	6ð
ð 
r'   N)/rª   Úior   Údulwich.errorsr   Údulwich.objectsr   r   Údulwich.object_storer   r   r~  r
   r   r   rÊ   r   r   r   r  r   r   r   Ú
decoratorsr   Úforeignr   Ú	filegraphr   r   rà   r   r   r   r   rÔ   r   ÚCheckr   Ú	optimiserÚInterRepositoryÚregister_lazy_optimiserrS   r±   ÚRepositoryFormatrY   r  rJ   r'   r%   ú<module>rŒ     sÒ  ðð$ <Ð ;à Ð Ð Ð Ð Ð ðð ð ð ð ð ðð ð ð ð ð ð ð ðð ð ð ð ð ð ð ð
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð %Ð $Ð $Ð $Ð $Ð $ðð ð ð ð ð ðð ð ð ð ð ð ð ðð ð ð ð ð ð ð ð ð ð ð ðð ð ð ð ð ð
#/ð #/ð #/ð #/ð #/ˆuŒ{ñ #/ô #/ð #/ðLð 	+ð 	+€Ið Ô×6Ò6Ø 	ñ+ô +ð +ð +ðpIð pIð pIð pIð pIÐ%ñ pIô pIð pIðfIJð IJð IJð IJð IJ˜ñ IJô IJð IJðX
0ð 0ð 0ð 0ð 0˜*Ô5ñ 0ô 0ð 0ðf

ð 

ð 

ð 

ð 

r'   