^c"ddlZddlmZddlmZmZddlmZmZmZm Z m Z m Z m Z ej dZddZdd Zd Zd ZdZdZddZdS)N)_)hexnullrev)errornodeobsoleteobsutilrevsetscmutilutils\b[0-9a-f]{6,64}\bc"|jjt|}||kr$fd|D}d|}nH|}t d}|tj||dz fz}|S)zreturns a string summarizing revisions in a decent size If there are few enough revisions, we list them all. Otherwise we display a summary of the form: 1ea73414a91b and 5 others cJg|]}tj| S)rshort).0rtonodes 7/usr/lib/python3/dist-packages/mercurial/rewriteutil.py z_formatrevs..*s+666A$*VVAYY''666s, s%s and %d othersr) changelogrlenjoinfirstrr)reporevsmaxrevsnumrevsshortssummaryrrs @r _formatrevsr#s^ F$iiG6666666**V$$ '((DJvve}}--w{;; NrrewriteTct|vr7td|z}td}tj||t d|Dr&|jdd|D}t|ddkr$tj td |z| d |}|rIt||}td ||fz}td }tj||t||}|rDtd }tjtd|t|fz||sdStj|tjst!||} | r| \} } } td|| | fz}| | kr|td| zz }|jjr|| | kr|td| | fzz }|td| | | fzz }tj|tdtj|tddSdS)a&check if revs can be rewritten action is used to control the error message. check_divergence allows skipping the divergence checks in cases like adding a prune marker (A, ()) to obsstore (which can't be diverging). Make sure this function is called after taking the lock. scannot %s the null revisionsno changeset checked out)hintc3@K|]}tj|dVdS)revN)r safehasattrrrs r zprecheck..As/ 4 4!4 Au % % 4 4 4 4 4 4rs-rewriteutil.precheck called with ctx not revsc3>K|]}|VdSN)r(r*s rr+zprecheck..Cs*&&A&&&&&&rNrs"cannot %s changesets while mergings%ld and public()scannot %s public changesets: %ss see 'hg help phases' for detailss#see 'hg help evolution.instability's7cannot %s changeset, as that will orphan %d descendantss8cannot %s %s, as that creates content-divergence with %ss , from %ss0 changeset %s is a successor of changeset %ss changeset %s already has a successor in changeset %s rewriting changeset %s would create "content-divergence" set experimental.evolution.allowdivergence=True to skip this checksEsee 'hg help evolution.instability' for details on content-divergences@add --verbose for details or see 'hg help evolution.instability')rrr InputErroranyui develwarnrparents StateErrorrr#disallowednewunstabler isenabledallowdivergenceopt_find_new_divergencer(verbose) rractioncheck_divergencemsgr& publicrevsr" newunstablenew_divergence local_ctx other_ctxbase_ctxs rprecheckrB3s5$.//&8,--s.... 4 4t 4 4 444' JKKK&&&&& 4:      1$$ 3 4 4v =   .55J/dJ//233vw6GG455s....'d33K 788 H I Is;''( )      dH$? @ @'-dD99 % -; *Iy(KC}}(,,..00q11w ==??hllnn441P"H-..Cq'y)455&`&;C''% % rctj|tj}|rtjS|d||S)zChecks whether editing the revs will create new unstable changesets and are we allowed to create them. To allow new unstable changesets, set the config: `experimental.evolution.allowunstable=True` s (%ld::) - %ld)r r5allowunstableoptr basesetr)rr allowunstables rr4r4sF&tX-FGGM ~ 99%tT 2 22rc|d|}|D]Q}t|||}|r7||||d||dfcSRdS)Ns%ld and obsolete()rr)rfind_new_divergence_from unfiltered)rrobsrevsrdivs rr7r7sii-t44G FF&tT!W55  FGT#a&\4??+<+, ) or None Nrsdivergentnodesscommonpredecessor)r r successorssetsr divergentsets)rctxssetdivsetsnsuccsetprecs rrHrHs <<>>t  !$ 3 3D Q CHHJJ'''c22  'qz"34H1:23DQK& &trc|dd}|dkrdS|dkrdStjtd||fz)Nr$sempty-successorsskipTskeepFsf%s doesn't know how to handle config rewrite.empty-successor=%s (only 'skip' and 'keep' are supported))configr ConfigErrorr)r0commandempty_successors rskip_empty_successorrYslii ,>??O'!!t G # #u    (  )   rc P|si}i}tjt|}|}|D]m} t j||}n!#t jt jf$rY7wxYw|>||}| s| |} | r| g} n)tj || |} t| dkrt| ddkrx| dd} | The stale commit message reference to %s could not be updated )refindallNODE_RErIr resolvehexnodeidprefixrWdirUnsupportedAmbiguousPrefixLookupErrorr getr rMrrrreplacer0noter) r commitmsgpendingr[hashesunfihfullnoderO successors successornewhashs rupdate_hash_refsrns  E Z + +F ??  D )) 5dA>>HH%u'GH    H    8n||~~ O X..J!$JJ /chhjjNNNJ z??a  C 1 $6$6!$;$;"1 a(I$i..%--a3q661BCC  Q  GLL(      sAA/.A/)r)r$Tr-)r\i18nrrrrrr r r r r compiler^r#rBr4r7rHrYrnrrrrrs?   "*+ , ,(QQQQh 3 3 32   "::::::r