§
    cÌc‡  ã                   óv   — d Z ddgZddlmZmZ ddlmZ ddlmZ dd„Z	 G d	„ d
¦  «        Z
 G d„ d¦  «        ZdS )zCReconcilers are able to fix some potential data errors in a branch.Ú	reconcileÚ
Reconcileré   )ÚerrorsÚui)Úmutter)ÚgettextFc                 óL   — t          | |¬¦  «        }|                     ¦   «         S )ae  Reconcile the data in dir.

    Currently this is limited to a inventory 'reweave'.

    This is a convenience method, for using a Reconciler object.

    Directly using Reconciler is recommended for library users that
    desire fine grained control or analysis of the found issues.

    :param canonicalize_chks: Make sure CHKs are in canonical form.
    )Úcanonicalize_chks)r   r   )Údirr
   Ú
reconcilers      ú2/usr/lib/python3/dist-packages/breezy/reconcile.pyr   r   !   s)   € õ ˜CÐ3DÐEÑEÔE€JØ×ÒÑ!Ô!Ð!ó    c                   ó   — e Zd ZdZdS )ÚReconcileResultz5Class describing the result of a reconcile operation.N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__© r   r   r   r   1   s   € € € € € Ø?Ð?Ð?Ð?r   r   c                   ó,   — e Zd ZdZdd„Zd„ Zd„ Zd„ ZdS )	r   z0Reconcilers are used to reconcile existing data.NFc                 ó"   — || _         || _        dS )zCreate a Reconciler.N)Ú
controldirr
   )Úselfr   Úotherr
   s       r   Ú__init__zReconciler.__init__8   s   € àˆŒØ!2ˆÔÐÐr   c                 óœ  — t           j                             ¦   «         5 | _        t	          ¦   «         }|                      ¦   «         }|                      ¦   «         }t          |dd¦  «        |_        t          |dd¦  «        |_	        t          |dd¦  «        |_
        t          |dd¦  «        |_        |cddd¦  «         S # 1 swxY w Y   dS )z Perform reconciliation.
        Úinconsistent_parentsNÚabortedÚgarbage_inventoriesÚfixed_history)r   Ú
ui_factoryÚnested_progress_barÚpbr   Ú_reconcile_branchÚ_reconcile_repositoryÚgetattrr   r   r   Úfixed_branch_history)r   ÚresultÚbranch_resultÚrepo_results       r   r   zReconciler.reconcile=   s  € õ Œ]×.Ò.Ñ0Ô0ð 	°D´GÝ$Ñ&Ô&ˆFØ ×2Ò2Ñ4Ô4ˆMØ×4Ò4Ñ6Ô6ˆKå*1ØÐ3°Tñ+;ô +;ˆFÔ'å$ [°)¸TÑBÔBˆFŒNÝ)0ØÐ2°Dñ*:ô *:ˆFÔ&å*1Ø˜°ñ+6ô +6ˆFÔ'àð	ð 	ð 	ð 	ñ 	ô 	ð 	ð 	ð 	ð 	ð 	ð 	øøøð 	ð 	ð 	ð 	ð 	ð 	s   ŸBCÃCÃCc                 ó  — 	 | j                              ¦   «         | _        n# t          j        $ r Y d S w xY wt
          j                             t          d¦  «        | j        j	        z  ¦  «         | j         
                    d¬¦  «        S )NzReconciling branch %sT©Úthorough)r   Úopen_branchÚbranchr   ÚNotBranchErrorr   r!   Únoter   Úbaser   )r   s    r   r$   zReconciler._reconcile_branchN   s‡   € ð	Øœ/×5Ò5Ñ7Ô7ˆDŒKˆKøÝÔ$ð 	ð 	ð 	àˆFˆFð	øøøõ 	Œ×Ò�7Ð#:Ñ;Ô;¸d¼kÔ>NÑNÑOÔOÐOØŒ{×$Ò$¨dÐ$Ñ3Ô3Ð3s   ‚! ¡4³4c                 ó"  — | j                              ¦   «         | _        t          j                             t          d¦  «        | j        j        z  ¦  «         | j         	                    t          d¦  «        dd¦  «         | j
        r`	 | j        j         n8# t          $ r+ t          j        t          d¦  «        | j        fz  ¦  «        ‚w xY w| j                             ¦   «         }n| j                             d¬¦  «        }|j        rYt          j                             t          d¦  «        ¦  «         t          j                             t          d	¦  «        ¦  «         n,t          j                             t          d
¦  «        ¦  «         |S )NzReconciling repository %szReconciling repositoryé    r   z%s cannot canonicalize CHKs.Tr,   z;Reconcile aborted: revision index has inconsistent parents.z!Run "brz check" for more details.zReconciliation complete.)r   Úfind_repositoryÚrepor   r!   r1   r   Úuser_urlr#   Úupdater
   Úreconcile_canonicalize_chksÚAttributeErrorr   ÚBzrErrorr   r   )r   Úreconcile_results     r   r%   z Reconciler._reconcile_repositoryW   s–  € Ø”O×3Ò3Ñ5Ô5ˆŒ	Ý
Œ×Ò�7Ð#>Ñ?Ô?Øœ9Ô-ñ.ñ 	/ô 	/ð 	/àŒ�Š•wÐ7Ñ8Ô8¸!¸QÑ?Ô?Ð?ØÔ!ð 	BðLØ”	Ô5Ð5Ð5øÝ!ð Lð Lð LÝ”oÝÐ:Ñ;Ô;¸t¼y¸lÑJñLô Lð LðLøøøð  $œy×DÒDÑFÔFÐÐà#œy×2Ò2¸DÐ2ÑAÔAÐØÔ#ð 	DÝŒM×Ò�wØMñ Oô  Oñ Pô Pð PåŒM×Ò�wØ3ñ 5ô  5ñ 6ô 6ð 6ð 6õ ŒM×Ò�wÐ'AÑBÔBÑCÔCÐCØÐs   Â	B Â5C)NF)r   r   r   r   r   r   r$   r%   r   r   r   r   r   5   s[   € € € € € Ø:Ð:ð3ð 3ð 3ð 3ð
ð ð ð"4ð 4ð 4ð ð  ð  ð  ð  r   N)F)r   Ú__all__Ú r   r   Útracer   Úi18nr   r   r   r   r   r   r   ú<module>rA      sá   ðð" JÐ Ið Øð€ðð ð ð ð ð ð ð ð Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð ð"ð "ð "ð "ð @ð @ð @ð @ð @ñ @ô @ð @ð7 ð 7 ð 7 ð 7 ð 7 ñ 7 ô 7 ð 7 ð 7 ð 7 r   