
    6hHD                        S SK Jr  SSKJr  SSKJrJrJrJrJ	r	  S r
S rS rS rS	 r/ S
Qr\\\\S
.rS/S jr\" S5      \" S5      4\" S5      \" S5      4S.\" S5      \" S5      4\" S5      \" S5      4S.\" S5      \" S5      4\" S5      \" S5      4S.\" S5      \" S5      4\" S5      \" S5      4S.\" S5      \" S5      4\" S5      \" S5      4S.\" S5      S4\" S5      S4S.\" S5      \" S5      4\" S5      \" S5      4S.\" S5      \" S 5      4\" S5      \" S!5      4S.\" S"5      S4\" S"5      S4S.\" S#5      S4\" S$5      \" S%5      4S.S&.
rS0S' jr S1S( jr S1S) jrS* rS+ rS, rS- rS. rg)2    )annotations   )_)	bookmarkserrorobsutilscmutilstackc                   U R                   R                  nU R                   R                  nU R                   R                  n[	        5       n[        U" U5      5      nU(       a  UR                  5       n[        R                  " X" U5      5      nU(       d  UR                  U" U5      5        O3U H-  n	U	 H$  n
U" U
5      nUS:w  d  M  UR                  U5        M&     M/     U(       a  M  U$ )zReturn all changesets that may be a new parent for orphan `rev`.

This function works fine on non-orphan revisions, it's just silly
because there's no destination implied by obsolete markers, so
it'll return nothing.
)	changelognode
parentrevsrevsetlistpopr   successorssetsextendadd)repor   tonodeparentstorevdesttovisitrsuccsetsssndrs               4/usr/lib/python3/dist-packages/mercurial/destutil.pyorphanpossibledestinationr#      s     ^^  Fnn''GNNE5D73< G
KKM))$q	: NN71:& AqBRx   '& K    c                   SnU S   nUR                  5       nSnUR                  5       (       Ga
  UR                  5       (       d  [        R                  " XR                  5       5      nU(       a=  U VVs/ s H  ow  H  oPM     M     nnnU R                  SU5      R                  5       nO\UR                  5       nUR                  5       (       a'  UR                  5       nUR                  5       (       a  M'  UR                  5       nUb.  [        R                  " U 5      (       a  U S   R                  5       nX%S4$ s  snnf )z9decide of an update destination from obsolescence markersNs   max(%ln)   .)
p1obsoletechildrenr   r   r   revsfirstr   isactivewdirparent)	r   cleanr   wcr'   movemark
successorssubr    s	            r"   _destupdateobsr2   0   s    D	dB	BH	{{}}R[[]]++D'')<
  (2?z3a!3!zJ? 99[*5;;=DB++--UUW ++--779D	 < <T B BDz(H4 @s   5D>c                x    Sn[         R                  " U R                  U 5      u  p4Ub  U R                  U   nX$U4$ )z4decide on an update destination from active bookmarkN)r   calculateupdateui
_bookmarks)r   r-   r   
activemarkr/   s        r"   _destupdatebookr8   [   sA     D$44TWWdCJz*:%%r$   c                   U S   nS=p4UR                  5       nU(       a  U S   R                  5       nXPR                  5       ;   ag  U R                  U5      nU(       a   U R                  SU5      R	                  5       n[
        R                  " U 5      (       a  U S   R                  5       nONUS:X  a5  UR                  5       (       d   U R                  S5      R	                  5       nOU S   R                  5       nXCS4$ )zWdecide on an update destination from current branch

This ignores closed branch heads.
Nr&      max(.::(%ln))s   defaults   max(head() and not closed()))	branch	branchmapbranchheadsr*   r+   r   r,   r   r'   )r   r-   r.   r/   r   currentbranchheadss          r"   _destupdatebranchr@   e   s    
 
dBHIIKMT
))+((  /99-u5;;=D''--Dz(H	*	$RUUWW yy89??ADz 4r$   c                   U S   nUR                  5       nSnX0R                  5       ;   aw  U R                  USS9nU(       d   S5       eU R                  SU5      R	                  5       nUc   S5       e[
        R                  " U 5      (       a  U S   R                  5       nOU R                  S5      nUc   S	5       eXdS4$ )
zCdecide on an update destination from closed heads in current branchNTcloseds    any branch has at least one headr:   s4   any revision has at least one descendant branch headr&   s   tips%   'tip' exists even in empty repository)	r;   r<   r=   r*   r+   r   r,   r   lookup)r   r-   r.   r>   r/   r?   r   s          r"   _destupdatebranchfallbackrE      s    	dBIIKMH((  t <999uyy)51779	CB	C''--Dz(H {{6"I!II4r$   )s	   evolutions   bookmarks   branchs   branchfallbackc                    S=n=p4[          H  n[        U   " X5      u  p#nUc  M    O   X   R                  5       nXcU4$ )a
  destination for bare update operation

return (rev, movemark, activemark)

- rev: the revision to update to,
- movemark: node to move the active bookmark from
            (cf bookmark.calculate update),
- activemark: a bookmark to activate at the end of the update.
N)destupdatestepsdestupdatestepmapr   )r   r-   r   r/   r7   stepr   s          r"   
destupdaterJ      sS     $('D'8%6t%<T%I"
   *..
C*$$r$   sT   multiple matching bookmarks to merge - please merge with an explicit rev or bookmarks4   run 'hg heads' to see all heads, specify rev with -rsT   multiple matching bookmarks to rebase - please rebase to an explicit rev or bookmarks<   run 'hg heads' to see all heads, specify destination with -d)   merges   rebasesM   no matching bookmark to merge - please merge with an explicit rev or bookmarksM   no matching bookmark to rebase - please rebase to an explicit rev or bookmarks<   branch '%s' has %d heads - please merge with an explicit revs2   run 'hg heads .' to see heads, specify rev with -rs;   branch '%s' has %d heads - please rebase to an explicit revs:   run 'hg heads .' to see heads, specify destination with -ds8   heads are bookmarked - please merge with an explicit revs7   heads are bookmarked - please rebase to an explicit revs<   branch '%s' has one head - please merge with an explicit revs;   branch '%s' has one head - please rebase to an explicit revs   nothing to mergeNs   nothing to rebases   use 'hg update' insteads(   working directory not at a head revisions2   use 'hg update' or merge with an explicit revisions1   use 'hg update' or rebase to an explicit revisions   source set is emptys)   source set is rooted in multiple branchess.   rebaseset is rooted in multiple named branchess+   specify an explicit destination with --dest)
   toomanybookmarks   nootherbookmarks   toomanyheads   bookmarkedheads   nootherbranchheads   nootherheads   nootherheadsbehind
   notatheads   emptysourceset   multiplebranchessourcesetc                |   Sn[         R                  " U 5      nU R                  U R                     n[	        U5      S:X  a  XeS   :X  a  US   nOhUS   nOb[	        U5      S:  a"  [
        S   U   u  px[        R                  " XxS9e[	        U5      S::  a"  [
        S   U   u  px[        R                  " XxS9eUc   eU$ )z2find merge destination in the active bookmark caseN   r   r   rL   hintrM   )	r   headsforactiver6   _activebookmarklenmsgdestmerger   ManyMergeDestAbortNoMergeDestAbort)	r   action	sourceset	destspacer   bmheadscurheadmsgrY   s	            r"   _destmergebookrf     s    D&&t,Good223G
7|qaj 1:D1:D	W	 !45f=	&&s66	W	 !45f=	$$S44Kr$   c                    SnUcF  X R                   R                  5          R                  5       /nU R                   R                  5       nOU(       d"  [        S   U   u  px[
        R                  " XxS9eSnU R                  SX"5       HL  n	Ub6  U	R                  5       U:w  a"  [        S   U   u  px[
        R                  " XxS9eU	R                  5       nMN     U R                  U5      n
U R                  SX*5      nU(       aU  U(       dN  [        U R                  5       5      S::  a  [        S   U   u  pxO[        S	   U   u  px[
        R                  " XxS9e[        U R                  S
X5      5      n
[        U R                  SU
5      5      nUb  [        U R                  SXL5      5      n[        U5      S:  a4  [        S   U   u  pxXv[        U
5      S-   4-  n[
        R                  " XxS9eU(       d~  U
(       a  [        S   U   u  pxOT[        U R                  5       5      S:  a  [        S   U   u  pxXv-  nO$U(       d  [        S   U   u  pxO[        S   U   u  px[
        R                  " XxS9eUS   nUc   eU$ )z,find merge destination based on branch headsNrT   rX   s   roots(%ld::%ld)rU   s   %ld and %lnr   rR   rS   s   %ln - (%ld::)s   %ld - bookmark()s   %ld and %ldrN   rO   rP   rQ   r   )dirstater'   r   r;   r]   r   r_   r   r^   r=   r*   r\   r?   Abortr   )r   r`   ra   onheadcheckrb   r   r;   re   rY   ctxbheadsonheadnbhss                r"   _destmergebranchro   2  s_    D--**,-1134	%%' !23F;	$$S4488.	EC!cjjlf&<()EFvN	..s>>ZZ\F	 F f%FYY~y9F6 tzz|!$%:;FCIC$]3F;ICkk#))$)),f@AF		-v67D DIIni>?
4y1} !1&9	Fa((&&s66
 $%78@IC"$%:;FCICMC %%:;FCIC$_5f=IC$$S44AwKr$   c                x    U R                   (       a  [        XX$S9nO[        U UUUUS9nX   R                  5       $ )zreturn the default destination for a merge

(or raise exception about why it can't pick one)

:action: the action being performed, controls emitted error message
)r`   ra   rb   )r`   ra   rj   rb   )r[   rf   ro   r   )r   r`   ra   rj   rb   r   s         r"   	destmergerq   {  sH     9
  #
 :>>r$   c                   U R                  SS5      nUc  [        R                  " U5      nO>U(       a  [        R                  " X/5      nO[
        R                  " [        S5      5      eU(       a  UR                  5       $ g)z0Default base revision to edit for `hg histedit`.s   histedits
   defaultrevNs0   config option histedit.defaultrev can't be empty)	configr
   getstackr	   revranger   ConfigErrorr   min)r5   r   defaultr*   s       r"   desthisteditry     sj    ii]3G~~d#	i0AB
 	
 xxzr$   c                `    [         R                  " U5      nU(       a  UR                  5       $ S $ )N)r
   rt   r+   )r5   r   r*   s      r"   	stackbaser{     s#    >>$D4::<)T)r$   c                F   [         R                  " U5      nUR                  UR                     nUR	                  SU5      (       aV  U Vs/ s H  oCU:w  d  M
  UPM     nnU(       a5  [        S5      nU R                  U[        U5      UR                  4-  5        g g g s  snf )Ns   %n and parents()s&   %i other divergent bookmarks for "%s"
)r   rZ   r6   r[   r*   r   statusr\   )r5   r   rc   rd   bre   s         r"   _statusotherbookr     s    &&t,Good223Gyy$g..%6gA1g6>?CIIcS\4+?+?@@A  /6s   	BBc                   UR                   R                  5       nUR                  USS9nUR                  U5      nUR                  SU5      (       Ga  UR                  SU5      nUS   R	                  5       (       ai  U R                  [        S5      U-  5        U(       a'  U R                  [        S5      [        U5      -  5        g U R                  [        S5      U-  5        g U(       al  US   nU R                  [        S	5      XfR                  5       R                  S
5      S   4-  5        U R                  [        S5      [        U5      U4-  5        g g g )NTrB   s   %ln and parents()s   %ln - parents()r&   sC   no open descendant heads on branch "%s", updating to a closed head
sJ   (committing will reopen the head, use 'hg heads .' to see %i other heads)
s%   (committing will reopen branch "%s")
s   updated to "%s: %s"
   
r   s   %i other heads for branch "%s"
)rh   r;   r=   r*   closesbranchwarnr   r\   r}   descriptionsplit)r5   r   r>   allheadsr?   
otherheadsrd   s          r"   _statusotherbranchheadsr     sW   MM((*Md;H]+Eyy%x00 YY159
:""$$GG3  	  E :	( ?@=P 4jGII*+//177>qABC II56z?M23 ? 1r$   c                T    UR                   (       a  [        X5        g[        X5        g)zPrint message about other headN)r[   r   r   )r5   r   s     r"   statusotherdestsr     s    
 ")r$   )F)rK   NN)rK   NTN)
__future__r   i18nr    r   r   r   r	   r
   r#   r2   r8   r@   rE   rG   rH   rJ   r]   rf   ro   rq   ry   r{   r   r   r    r$   r"   <module>r      s   #  7 7D( V& 6 0 L !  0	 %2 B EF
 A MN
& A EF
 @ MN
& MNCD

 LMKL
	 IJEF

 HIMN
	 MNEF

 LMMN
	 ()40*+T2 ()1-G+HI*+Q/I-JK 9:CD

 9:BC
	 +,d3,-t4
 ABDI?@<=
#{dN* HLFT HL4(*
B,^*r$   