^c%DddlmZddlmZmZmZmZmZdZdZ dZ dZ dZ gdZ e e e e dZd0d Zed ed fed edfdeded fededfdededfededfdeded fededfdeded fededfdeddfeddfdededfededfdededfeded fded!dfed!dfded"dfed#ed$fdd% Zd1d'Z d2d)Z d2d*Zd+Zd,Zd-Zd.Zd/ZdS)3)_) bookmarkserrorobsutilscmutilstackc|jj}|jj}|jj}t }t ||}|r|}tj|||}|s| ||n0|D]-} | D](} || } | dkr| | ).||S)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. ) changelognode parentrevsrevsetlistpoprsuccessorssetsextendadd) reportonodeparentstorevdesttovisitrsuccsetsssndrs 4/usr/lib/python3/dist-packages/mercurial/destutil.pyorphanpossibledestinationr! s^ Fn'G N E 55D773<<  G % KKMM)$q :: % NN771:: & & & & % %%%AqBRxx % %& Kcd}|d}|}d}|r|stj||}|r5d|D}|d|}nd|}|r(|}|(|}|.tj |r|d}||dfS)z9decide of an update destination from obsolescence markersNcg|] }|D]}| Sr%).0subrs r z"_destupdateobs..Is%???3??a!????r"smax(%ln).) p1obsoletechildrenrrr revsfirstrisactivewdirparent)rcleanr wcr*movemark successorss r _destupdateobsr4/s D dB BH {{}})R[[]])+D"''))<<   @?z???J99[*55;;==DDB++-- UUWW++-- 7799D   99-u55;;==D  ' - - )Dz((H * $ $RUUWW $yy899??AADz   4 r"c|d}|}d}||vr||d}|s Jd|d|}| Jdt j|r|d}n!|d}| Jd ||dfS) zCdecide on an update destination from closed heads in current branchNTcloseds any branch has at least one headr<s4any revision has at least one descendant branch headr)stips%'tip' exists even in empty repository) r=r>r?r-r.rr/r lookup)rr0r1r@r2rAr s r _destupdatebranchfallbackrGs dBIIKKMH((((  t <<999999yy)5117799    B     ' - - )Dz((H{{6""!I 4 r")s evolutionsbookmarksbranchsbranchfallbackFcdx}x}}tD] }t|||\}}}|n!||}|||fS)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)destupdatestepsdestupdatestepmapr)rr0r r2r9steprs r destupdaterLsm$('D'8j%6t%>>>ZZ\\FF   f % %F YY~y& 9 9F*6* tzz||   ! !$%:;FCIC$]3F;ICk#D)))) $)),fi@@ A AF  -v66 7 7DDIIni>>?? 4yy1}} !1&9 T F a((&s6666   >$%78@IC    " "$%:;FCIC 6MCC >%%:;FCIC$_5f=IC$St4444Aw     Kr"c|jrt||||}nt|||||}||S)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 )rcrdre)rcrdrmre)r^rirrr)rrcrdrmrer s r destmergertzsi    9     #     :>>  r"c|dd}|tj|}n:|rtj||g}n!t jtd|r|SdS)z0Default base revision to edit for `hg histedit`.shistedits defaultrevNs0config option histedit.defaultrev can't be empty) configrgetstackrrevranger ConfigErrorrmin)r7rdefaultr-s r desthisteditr|sii ]33G~d##  wi00 A B B    xxzz 4r"cZtj|}|r|ndS)N)rrwr.)r7rr-s r stackbaser~s( >$  D )4::<<.s666A1r"s&%i other divergent bookmarks for "%s" )rr]r8r^r-rstatusr_)r7rrfrhrgs @r _statusotherbookrs&t,,God23G yy$g..B6666g666  B>??C IIcS\\4+?@@ A A A A A BB B Br"cJ|j}||d}||}|d|rD|d|}|dr|t d|z|r4|t dt|zdS|t d|zdS|r|d}|t d || d d fz|t d t||fzdSdSdS) NTrDs%ln and parents()s%ln - parents()r)sCno 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") supdated to "%s: %s"  rZs%i other heads for branch "%s" ) rkr=r?r- closesbranchwarnrr_r descriptionsplit)r7rr@allheadsrA otherheadsrgs r _statusotherbranchheadsrsM((**M d;;H   ] + +E yy%x00(YY1599 : " " $ $  GG3      E: (?@@=P 4jG II*++G//1177>>qABC    II566z??M23     K((>  r"cX|jrt||dSt||dS)zPrint message about other headN)r^rr)r7rs r statusotherdestsrs;  *T"""""D)))))r")F)rMNN)rMNTN)i18nrrrrrrr!r4r:rBrGrIrJrLr`rirrrtr|r~rrrr%r"r rsu77777777777777D( ( ( V&&&   6   0LKK!  0 %%%%2 AB   AE F F   AA   AM N N  & AA   AE F F   A@   AM N N  & AM N N AC D D AL M M AK L L   AI J J AE F F AH I I AM N N   AM N N AE F F AL M M AM N N  1())40A*++T2 1())11-G+H+HIA*++QQ/I-J-JK A9 : : AC D D A9 : : AB C C  1+,,d3A,--t4 1ABBDI A? @ @ A< = = ##{dd N*HLFFFFTHL4(*** BBB,,,^*****r"