§
    cÌcƒ  ã                   ób   — d dl mZmZmZmZ d dlmZ d dlmZ d dl	m
Z
 d„ Z	 	 dd„Zdd	„Zd
„ ZdS )é   )ÚerrorsÚlockÚmergeÚrevision)ÚBranch)Úgettext)Únotec                 óz   — ddl m} t          j        d         }|sd S  || |||¦  «        }|D ]} ||¦  «         Œd S )Nr   )ÚSwitchHookParamsÚpost_switch)Úbranchr   r   Úhooks)Úcontrol_dirÚ	to_branchÚforceÚrevision_idr   r   ÚparamsÚhooks           ú//usr/lib/python3/dist-packages/breezy/switch.pyÚ_run_post_switch_hooksr      sk   € Ø(Ð(Ð(Ð(Ð(Ð(ÝŒL˜Ô'€EØð ØˆØÐ˜k¨9°e¸[ÑIÔI€FØð ð ˆØˆˆV‰Œˆˆðð ó    FNc                 ó  — 	 |                       ¦   «         }|s|j                             ¦   «         r|                     ¦   «          n9|                     ¦   «          n$# t
          j        $ r}|r|r|‚d}Y d}~nd}~ww xY w	 |�H|                     ¦   «         }	t          |	¦  «        dk    r!t          j	        t          d¦  «        ¦  «        ‚|r|                     ¦   «          |€
|j        }
d}n |j        j        }
|                     ¦   «         }|�|                     ¦   «          n# |�|                     ¦   «          w w xY w|                     ¦   «         5  t!          | ||r|j        nd|¦  «         ddd¦  «         n# 1 swxY w Y   |                       ¦   «         }|r|                     ¦   «          n|                     ¦   «          	 |€|                     ¦   «         }|€|                     ¦   «         }||k    r2|s/t#          t          d¦  «        |                     ¦   «         ¦  «         nŽ|
                     |¦  «        }|j                             |¦  «        }t)          j        ||||¦  «         |                     |¦  «         |s1t#          t          d¦  «        |                     ¦   «         z  ¦  «         |r|                     ¦   «          t1          | |||¦  «         |                     ¦   «          dS # |                     ¦   «          w xY w)a€  Switch the branch associated with a checkout.

    :param control_dir: ControlDir of the checkout to change
    :param to_branch: branch that the checkout is to reference
    :param force: skip the check for local commits in a heavy checkout
    :param revision_id: revision ID to switch to.
    :param store_uncommitted: If True, store uncommitted changes in the
        branch.
    Nr   zAPending merges must be committed or reverted before using switch.z"Tree is up to date at revision %d.zUpdated to revision %d.)Úopen_workingtreer   Úget_bound_locationÚ
lock_writeÚlock_tree_writer   ÚNotBranchErrorÚget_parent_idsÚlenÚCommandErrorr   Ústore_uncommittedÚ
repositoryÚlast_revisionÚunlockÚ	lock_readÚ_set_branch_locationr	   ÚrevnoÚrevision_treer   ÚMerge3MergerÚset_last_revisionÚrestore_uncommittedr   )r   r   r   Úquietr   r!   Úpossible_transportsÚtreeÚexÚ
parent_idsÚsource_repositoryÚbase_revision_idÚ	base_treeÚtarget_trees                 r   Úswitchr5   (   s¨  € ð#Ø×+Ò+Ñ-Ô-ˆð ð 	# ¤× >Ò >Ñ @Ô @ð 	#Ø�OŠOÑÔÐÐà× Ò Ñ"Ô"Ð"Ð"øõ Ô ð ð ð àð 	Ð)ð 	ØˆHàˆDˆDˆDˆDˆDˆDøøøøðøøøðØÐØ×,Ò,Ñ.Ô.ˆJÝ�:‰Œ Ò"Ð"ÝÔ)Ýð Iñ Jô JñKô Kð Kð ð 	%Ø×"Ò"Ñ$Ô$Ð$Øˆ<Ø )Ô 4ÐØ#ÐÐà $¤Ô 6Ðð  $×1Ò1Ñ3Ô3ÐàÐØ�KŠK‰MŒMˆMøøð ÐØ�KŠK‰MŒMˆMˆMð øøøà	×	Ò	Ñ	Ô	ð [ð [Ý˜[¨)ÀDÐ5R°T´[°[ÈdÐTYÑZÔZÐZð[ð [ð [ñ [ô [ð [ð [ð [ð [ð [ð [øøøð [ð [ð [ð [à×'Ò'Ñ)Ô)€DØð Ø�ŠÑÔÐÐà×ÒÑÔÐðØÐ#ð  $×1Ò1Ñ3Ô3ÐØÐØ#×1Ò1Ñ3Ô3ˆKØ˜{Ò*Ð*Øð (Ý•WÐAÑBÔBØ—_’_Ñ&Ô&ñ(ô (ð (øð *×7Ò7Ð8HÑIÔIˆIØ#Ô.×<Ò<¸[ÑIÔIˆKÝÔ˜t T¨9°kÑBÔBÐBØ×"Ò" ;Ñ/Ô/Ð/Øð MÝ•WÐ6Ñ7Ô7¸)¿/º/Ñ:KÔ:KÑKÑLÔLÐLØð 	'Ø×$Ò$Ñ&Ô&Ð&Ý˜{¨I°u¸kÑJÔJÐJà�Š‰Œˆˆˆøˆ�Š‰ŒˆˆøøøsC   ‚A ÁA<Á*A7Á7A<Â BD# Ä#D<ÅE;Å;E?ÆE?ÇDK6 Ë6Lc                 óê  — |                       ¦   «         }|                     | ¦  «        �|                     | d|¦  «         dS |}|                     ¦   «         }|��&g }	 |s1t	          ||¦  «        r!t          j        t          d¦  «        ¦  «        ‚n@# t
          j        $ r.}t          j        t          d¦  «        |j	        z  ¦  «        ‚d}~ww xY w| 
                    ¦   «         5  |                     d¦  «         |                     |d|¬¦  «         |                     |j        ¦  «         |                     |                     ¦   «                              ¦   «         ¦  «         ddd¦  «         dS # 1 swxY w Y   dS |                     ¦   «         5  |j                             |j        ¦  «        }	|j        j        j        rr|s:|	                     |                     ¦   «         |                     ¦   «         ¦  «        r6|j                             ¦   «          |j                             |d¬¦  «         n!t          j        t          d¦  «        ¦  «        ‚	 ddd¦  «         dS # 1 swxY w Y   dS )	zîSet location value of a branch reference.

    :param control: ControlDir of the checkout to change
    :param to_branch: branch that the checkout is to reference
    :param force: skip the check for local commits in a heavy checkout
    NzyCannot switch as local commits found in the checkout. Commit these to the bound branch or use --force to throw them away.z_Unable to connect to current master branch %(target)s: %(error)s To switch anyway, use --force.T)Ú	overwriter-   Ú )Únamez(Cannot switch a branch, only a checkout.)Úfind_branch_formatÚget_referenceÚset_referencer   Ú_any_local_commitsr   r    r   ÚBoundBranchConnectionFailureÚ__dict__r   Úset_bound_locationÚpullÚbaseÚ
set_parentÚget_master_branchÚ
get_parentr%   r"   Ú	get_graphÚ
controldirÚ_formatÚcolocated_branchesÚis_ancestorr#   Údestroy_branchÚset_branch_reference)
Úcontrolr   Úcurrent_branchr   Úbranch_formatÚbÚbound_branchr-   ÚeÚgraphs
             r   r&   r&   v   sY  € ð ×.Ò.Ñ0Ô0€MØ×"Ò" 7Ñ+Ô+Ð7à×#Ò# G¨T°9Ñ=Ô=Ð=Ð=Ð=àˆØ×+Ò+Ñ-Ô-ˆØÑ#ð
 #%Ðð
 Øð -Õ!3°AÐ7JÑ!KÔ!Kð -Ý Ô-­gð+ñ/,ô /,ñ -ô -ð -øøõ Ô6ð  ð  ð  ÝÔ)­'ð?ñ+@ô +@ð ”Jñ+ñ  ô  ð  øøøøð øøøð
 —’‘”ð Að AØ×$Ò$ TÑ*Ô*Ð*Ø—’�y¨DØ+>ð ñ @ô @ð @à×$Ò$ Y¤^Ñ4Ô4Ð4Ø—’˜Q×0Ò0Ñ2Ô2×=Ò=Ñ?Ô?Ñ@Ô@Ð@ðAð Að Añ Aô Að Að Að Að Að Að Að Aøøøð Að Að Að Að Að Að —’‘”ð 	Mð 	MØœ×.Ò.¨yÔ/CÑDÔD�Ø”LÔ(Ô;ð MØðMØ#×/Ò/ØŸšÑ)Ô)¨9×+BÒ+BÑ+DÔ+DñFô FðMð ”L×/Ò/Ñ1Ô1Ð1Ø”L×5Ò5°iÀbÐ5ÑIÔIÐIÐIå Ô-ÝÐ JÑKÔKñMô Mð Mð Jð	Mð 	Mð 	Mñ 	Mô 	Mð 	Mð 	Mð 	Mð 	Mð 	Mð 	Mð 	Møøøð 	Mð 	Mð 	Mð 	Mð 	Mð 	Ms>   Á3B ÂCÂ")CÃCÃ'BE5Å5E9Å<E9ÆCI(É(I,É/I,c                 óî  — |                       ¦   «         }|t          j        k    rÐ|                      |¦  «        }|                      ¦   «         5  |                     ¦   «         5  |                      ¦   «         }| j                             |j        ¦  «        }|                     ||¦  «        s	 ddd¦  «         ddd¦  «         dS 	 ddd¦  «         n# 1 swxY w Y   ddd¦  «         n# 1 swxY w Y   dS )z;Does this branch have any commits not in the master branch?NTF)r#   r   ÚNULL_REVISIONrD   r%   r"   rF   rJ   )Úthis_branchr-   Úlast_revÚother_branchÚother_last_revrS   s         r   r=   r=   ª   sž  € à×(Ò(Ñ*Ô*€HØ•8Ô)Ò)Ð)Ø"×4Ò4Ð5HÑIÔIˆØ×"Ò"Ñ$Ô$ð 	ð 	 l×&<Ò&<Ñ&>Ô&>ð 	ð 	Ø)×7Ò7Ñ9Ô9ˆNØÔ*×4Ò4ØÔ'ñ)ô )ˆEà×$Ò$ X¨~Ñ>Ô>ð Øð	ð 	ð 	ñ 	ô 	ð 	ð 	ð 	ð 	ñ 	ô 	ð 	ð 	ð 	ðð		ð 	ð 	ñ 	ô 	ð 	ð 	ð 	ð 	ð 	ð 	øøøð 	ð 	ð 	ð 	ð 	ð 	ð 	ñ 	ô 	ð 	ð 	ð 	ð 	ð 	ð 	øøøð 	ð 	ð 	ð 	ð ˆ5s=   ÁC*Á#ACÂ.C*ÃC*ÃC	ÃC*ÃC	ÃC*Ã*C.Ã1C.)FFNFN)F)r8   r   r   r   r   r   r   Úi18nr   Útracer	   r   r5   r&   r=   © r   r   ú<module>r]      sÝ   ðð&ð ð ð ð ð ð ð ð ð ð ð ð Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð ðð ð ð JNØ8<ðKð Kð Kð Kð\1Mð 1Mð 1Mð 1Mðhð ð ð ð r   