\x89\x50\x4E\x47\x0D\x0A\x1A\x0A PNG  \x89\x50\x4E\x47\x0D\x0A\x1A\x0A  13\c@@sdZddlmZmZddlZddlZddlZddlZddlm Z ddl m Z m Z m Z mZmZddlmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z'ddl(m)Z)m*Z*ej+Z+dd e,e d fgZ-iZ.e j/e.Z/d Z0iZ1e j2e1Z2e2d d dde2d dde3e2d dde3e2d dde3yej4dZ5Wn?e6k rde7fdYZ8ej9e8ddZ5nXe5j:Z:e5j;Z;e5j<Z<e%j=Z>de7fdYZ?ddddddgZ@idd6d d!6d"d#6ZAd$ZBd%ZCd&e7fd'YZDd(ZEd)ejFfd*YZGd+e7fd,YZHd-ZIe/d.d/d0e,e d1fd2d3ge d4e d5fge d6d7e/jJd8ZKe/d9d:d;e,e d<fge-e d=d7e/jJe,d>ZLe/d?d:d@e,e dAfge-e dBd7e/jJe,dCZMe/dDdEdFe,e dGfdHdIde dJe dKfdLdMe,e dNfd2d3ge dOe d5fdPd e,e dQfdRdSe,e dTfge dUd7e/jNdVZOdWZPe/dXdYdZe,e d[fge d\d7e/jQd]eRd^ZSe/d_dd`e,e dafdbdce,e ddfddee,e dffdgdhde die djfgejTe dkd7e/jQdleRe,dmZUe/dnejVdod e dpd7e/jWdqeRdrZXe/dsdtdue,e dvfge-e dwd7e/jJdxZYe/dye-e dzd7e/jJd{ZZe/d|e-e d}d7e/jJd~Z[e/de-e dd7e/jJdZ\dZ]e/ddEde,e dfdLdMe,e dfdPd e,e dQfdbde,e dfddde de dfdde,e dfdd!de de dfgej^ej_e dd7e/jWd]eRdqeRdZ`e/ddEde,e dfdPd e,e dQfdde,e dfdbde,e dfddde de dfdde,e dfdd!de de dfgej^ej_e dd7e/jWd]eRdqeRdZae/dejbejcej^e dd7e/jdd]eRdqeRdZee/ddEde,e dfd/d0e,e dfgej_e dd7e/jfdZge/ddde,e dfdLdMe,e dfdde,e dfge dd7e/jJdZhe/ddde,e dfdHde,e dfge dd7e/jJdZie/dge dd7e/jJe,dZjdZkdZle/ddde,e dfdLdMe,e dfdEde,e dfdde,e dfdde,e dfdtde,e dfdHdIde de dKfdde,e dfdde,e dfg e dd7e/jJd]eRe,dZme/ddde,e dfdHdIde de dKfdde,e dfdLdMe,e dfdde,e dfge dd7e/jJd]eRe,dZne/dge dd7e/jJe,dZoe/ddde,e dfdde,e dfge dd7e/jJdZpe/ddYde,e dfdHdIde de dKfdEde,e dfdLdMe,e dfgej_e dd7e/jJdZqe/ddHde,e dfdde,e dfdde,e dfdde,e dfge dd7e/jJdZre/ddde,e dfge dd7e/jJdZse/ddde3e dfdde3e dfdYde3e dfdde3e dfdde3e dfdde3e dfge dd7e/jJe,dZtdZudZvdZwdZxdZydZze j{Z{e{ddZ|e|gZ}dZ~idd6d d 6d d 6d d6dd6dd6dd6ZdS(s manage a stack of patches This extension lets you work with a stack of patches in a Mercurial repository. It manages two stacks of patches - all known patches, and applied patches (subset of known patches). Known patches are represented as patch files in the .hg/patches directory. Applied patches are both patch files and changesets. Common tasks (use :hg:`help COMMAND` for more details):: create new patch qnew import existing patch qimport print patch series qseries print applied patches qapplied add known patch to applied stack qpush remove patch from applied stack qpop refresh contents of top applied patch qrefresh By default, mq will automatically use git patches when required to avoid losing file mode changes, copy records, binary files or empty files creations or deletions. This behavior can be configured with:: [mq] git = auto/keep/yes/no If set to 'keep', mq will obey the [diff] section configuration while preserving existing git patches upon qrefresh. If set to 'yes' or 'no', mq will override the [diff] section and always generate git or regular patches, possibly losing data in the second case. It may be desirable for mq changesets to be kept in the secret phase (see :hg:`help phases`), which can be enabled with the following setting:: [mq] secret = True You will by default be managing a patch queue named "patches". You can create other, independent patch queues with the :hg:`qqueue` command. If the working directory contains uncommitted files, qpush, qpop and qgoto abort immediately. If -f/--force is used, the changes are discarded. Setting:: [mq] keepchanges = True make them behave as if --keep-changes were passed, and non-conflicting local changes will be tolerated and preserved. If incompatible options such as -f/--force or --exact are passed, this setting is ignored. This extension used to provide a strip command. This command now lives in the strip extension. i(tabsolute_importtprint_functionN(t_(tbinthextnullidtnullrevtshort(tcmdutiltcommandst dirstateguardtencodingterrort extensionsthgt localrepotlockt logcmdutiltpatchtphasestpycompatt registrart revsetlangtscmutiltsmartsett subrepoutiltutiltvfs(tdateutilt stringutiltstsummarys print first line of patch headersships-with-hg-coretmqtgittdefaulttautot keepchangestplaintsecrettstriptdummyuicB@seZdZRS(cC@sdS(N((tselftmsg((s./usr/lib64/python2.7/site-packages/hgext/mq.pytdebugs(t__name__t __module__R+(((s./usr/lib64/python2.7/site-packages/hgext/mq.pyR(stt statusentrycB@s8eZdZdZejeZejeZRS(cC@s|||_|_dS(N(tnodetname(R)R0R1((s./usr/lib64/python2.7/site-packages/hgext/mq.pyt__init__scC@st|jd|jS(Nt:(RR0R1(R)((s./usr/lib64/python2.7/site-packages/hgext/mq.pyt __bytes__s(R,R-R2R4R t strmethodt__str__t__repr__(((s./usr/lib64/python2.7/site-packages/hgext/mq.pyR/s  s# User s# Date s# s # Branch s # Node ID s # Parent tfromitdateitsubjectc C@s|jdd}tj|}t|}xt|t|D]}||}|jdsvt||}PnxittD][\}} |j| r||kr||||<|S||krt||}nPqqWqDW|j||||S(sAssuming lines contains a HG patch header, add a header line with value. >>> try: inserthgheader([], b'# Date ', b'z') ... except ValueError as inst: print("oops") oops >>> inserthgheader([b'# HG changeset patch'], b'# Date ', b'z') ['# HG changeset patch', '# Date z'] >>> inserthgheader([b'# HG changeset patch', b''], b'# Date ', b'z') ['# HG changeset patch', '# Date z', ''] >>> inserthgheader([b'# HG changeset patch', b'# User y'], b'# Date ', b'z') ['# HG changeset patch', '# User y', '# Date z'] >>> inserthgheader([b'# HG changeset patch', b'# Date x', b'# User y'], ... b'# User ', b'z') ['# HG changeset patch', '# Date x', '# User z'] >>> inserthgheader([b'# HG changeset patch', b'# Date y'], b'# Date ', b'z') ['# HG changeset patch', '# Date z'] >>> inserthgheader([b'# HG changeset patch', b'', b'# Date y'], ... b'# Date ', b'z') ['# HG changeset patch', '# Date z', '', '# Date y'] >>> inserthgheader([b'# HG changeset patch', b'# Parent y'], ... b'# Date ', b'z') ['# HG changeset patch', '# Date z', '# Parent y'] s# HG changeset patchis# (tindext HGHEADERStlentranget startswithtmint enumeratetinsert( tlinestheadertvaluetstarttnewindextbestpostitlinet lineindexth((s./usr/lib64/python2.7/site-packages/hgext/mq.pytinserthgheaders$     c C@st|j}t|}xt|D]\}}d|kr|jdddjj}tj||d}||krd||f||<|S||kr||kr|}qq)|r|j|dn||kr|}nPq)W|j|d||f|S(sFor lines containing a plain patch header, add a header line with value. >>> insertplainheader([], b'Date', b'z') ['Date: z'] >>> insertplainheader([b''], b'Date', b'z') ['Date: z', ''] >>> insertplainheader([b'x'], b'Date', b'z') ['Date: z', '', 'x'] >>> insertplainheader([b'From: y', b'x'], b'Date', b'z') ['From: y', 'Date: z', '', 'x'] >>> insertplainheader([b' date : x', b' from : y', b''], b'From', b'z') [' date : x', 'From: z', ''] >>> insertplainheader([b'', b'Date: y'], b'Date', b'z') ['Date: z', '', 'Date: y'] >>> insertplainheader([b'foo: bar', b'DATE: z', b'x'], b'From', b'y') ['From: y', 'foo: bar', 'DATE: z', '', 'x'] R3iis%s: %sR.(t PLAINHEADERStlowerR=RAtsplitR'tgetRB( RCRDREtnewprioRHRIRJtlheadertlprio((s./usr/lib64/python2.7/site-packages/hgext/mq.pytinsertplainheaders$  "    t patchheadercB@sYeZedZdZdZdZdZdZe j eZ dZ RS(cC@sd}d}g}g}d}d}d} d} d} d} d} d}x[t|dD]J}|j}|jds|r|jdrd}Pnd}|jdrd }q^n| d kr|jd r|d }q|jd r|d }q|jdr%|dj} q|jdrA|d} q|jdr]|d} q|jd r|r|j|d} qn|dkrg}d } n| dkr|jds|jdr|d} d} n| dkr!|jds|jdr!|d}d} nz| dkr^|jdsK|jdr^|d}d} n=| dkr|dkrd} n|s|r|j|n|j|q^W||||t||_||||| r| jdr| r|jd| n||_ ||_ ||_ ||_ | |_ | |_| |_|d k|_|pd|j kotd|j D|_dS( NcS@sSxL|rN|d}|jds@|jds@|jdrJ|d=qPqWdS(Nisdiff -sIndex:s ===========(R?(RCtl((s./usr/lib64/python2.7/site-packages/hgext/mq.pyteatdiffs   cS@s,x%|r'|djs#|d=qPqWdS(Ni(R'(RC((s./usr/lib64/python2.7/site-packages/hgext/mq.pyteatemptys  itrbs diff --gits+++ is--- ithgpatchs# User is# Date s # Parent i s # Branch s # Node ID i s# s# HG changeset patchttagdones Subject: s subject: ttagsFrom: sfrom: isDate: sdate: R.cs@s-|]#}|jdp$|jdVqdS(sDate: sFrom: N(R?(t.0tc((s./usr/lib64/python2.7/site-packages/hgext/mq.pys gs(tNonetopentrstripR?tlstriptappendR=t diffstartlineRBtmessagetcommentstuserR9tparenttnodeidtbranchthaspatchtanyt plainmode(R)tpfRnRXRYRfRgRhR9RitformatR:RkRjt diffstartRJ((s./usr/lib64/python2.7/site-packages/hgext/mq.pyR2s                               cC@swyt|jd|WnPtk ri|jrFt|jd|qjdd|g}||j|_nX||_dS(Ns# User tFroms# HG changeset patch(RMRgt ValueErrorRnRURh(R)Rhttmp((s./usr/lib64/python2.7/site-packages/hgext/mq.pytsetuserks  cC@swyt|jd|WnPtk ri|jrFt|jd|qjdd|g}||j|_nX||_dS(Ns# Date tDates# HG changeset patch(RMRgRsRnRUR9(R)R9Rt((s./usr/lib64/python2.7/site-packages/hgext/mq.pytsetdatevs  cC@sdyt|jd|Wn=tk rV|jsWdd|g}||j|_qWnX||_dS(Ns # Parent s# HG changeset patch(RMRgRsRnRi(R)RiRt((s./usr/lib64/python2.7/site-packages/hgext/mq.pyt setparents  cC@sq|jr|jn|g|_|rm|jrZ|jrZ|jdrZ|jjdn|jj|ndS(NiR.(Rgt_delmsgRfRnRd(R)Rf((s./usr/lib64/python2.7/site-packages/hgext/mq.pyt setmessages   cC@s*dj|jj}|s"dS|dS(Ns R.s (tjoinRgRb(R)R((s./usr/lib64/python2.7/site-packages/hgext/mq.pyR4scC@s|jr}d|jdj}xZtjt|jD]=}||j|jkr9|j|=|jd|_Pq9q9Wnd}x?|jD]4}x!||j|kr|d7}qW|j|=qWdS(sRemove existing message, keeping the rest of the comments fields. If comments contains 'subject: ', message will prepend the field and a blank line.s subject: iiiN(RfRORtxrangeR=Rg(R)tsubjRItcitmi((s./usr/lib64/python2.7/site-packages/hgext/mq.pyRys   ( R,R-tFalseR2RuRwRxRzR4R R5R6Ry(((s./usr/lib64/python2.7/site-packages/hgext/mq.pyRVs g cO@s|j}|dkr<|jjddr<tj}q<nitd6}|dk rb||d d;Z?e d<Z@d=ZAd?d?d?d?e d>ZBRS(Ac C@s||_ytttjj|dd}|jj}WdQX|sctjj|d}ntjj|d|}Wn&tk rtjj|d}nX|p||_tj |j|_ ||_ ||_ t |_t |_g|_d|_d|_d|_d|_t |_|jdd j}tj|} | dk ro| rfd }qod }n||_|jdd |_t|_dS( Ns patches.queueRZtpatchesspatches-tserieststatustguardsR R!tyestnoR%( tbasepathRatostpathR{treadRbtIOErrortvfsmodRtopenerRtbaseuiRt applieddirtyt seriesdirtytaddedt seriespatht statuspatht guardspathR`t activeguardst guardsdirtytconfigRORt parsebooltgitmodeRRnRt checkapplied( R)RRRtpatchdirtfhtcurtcurpathRtboolmode((s./usr/lib64/python2.7/site-packages/hgext/mq.pyR2s< !               c@sqfd}y/jjjj}t||SWn,tk rl}|jtjkrfgSnXdS(Nc3@sx|D]}|jdd}t|dkrT|\}}tt||Vq|jrjjtdtj |qqWdS(NR3ismalformated mq status line: %s ( RPR=R/RR'RtwarnRRtpprint(RCRWtentrytnR1(R)(s./usr/lib64/python2.7/site-packages/hgext/mq.pyt parseliness   (RRRt splitlinestlistRterrnotENOENT(R)RRCte((R)s./usr/lib64/python2.7/site-packages/hgext/mq.pytapplieds cC@sPy|jj|jjSWn,tk rK}|jtjkrEgSnXdS(N(RRRRRRR(R)R((s./usr/lib64/python2.7/site-packages/hgext/mq.pyt fullseriess cC@s|j|jS(N(t parseseriesR(R)((s./usr/lib64/python2.7/site-packages/hgext/mq.pyRs cC@s|j|jS(N(Rt seriesguards(R)((s./usr/lib64/python2.7/site-packages/hgext/mq.pyRs cC@s^x3djD]%}||jkr t||q q Wt|_t|_t|_d|_dS(Ns&applied fullseries series seriesguards( RPt__dict__tdelattrRRRRR`R(R)ta((s./usr/lib64/python2.7/site-packages/hgext/mq.pyt invalidate s   c C@stj|j|dtd| d| }|jdkrDt|_nR|jdkrVn@|jd krz|jdk|_ntjt d|j|r|j ||}n|S( sReturn diff options tweaked for this mq use, possibly upgrading to git format, and possibly plain and without lossy options.R!t whitespacetformatchangingR#tkeepRRs,mq.git option can be auto/keep/yes/no got %s(RR( tpatchmodtdifffeatureoptsRRRtupgradeR!R tAbortRt patchopts(R)toptstpatchfnR%tdiffopts((s./usr/lib64/python2.7/site-packages/hgext/mq.pyRs  cG@sr|j}|j rn|jdkrnxF|D];}|j|d}td|D|_|jq,Wn|S(sReturn a copy of input diff options with git set to true if referenced patch is a git patch and should be preserved as such. Rtrcs@s|]}|jdVqdS(s diff --gitN(R?(R^RJ((s./usr/lib64/python2.7/site-packages/hgext/mq.pys 1s(tcopyR!RRRmtclose(R)RRRtpatchf((s./usr/lib64/python2.7/site-packages/hgext/mq.pyR(s   cG@stjj|j|S(N(RRR{(R)tp((s./usr/lib64/python2.7/site-packages/hgext/mq.pyR{6sc@sCfd}x-t|jD]\}}||r|SqWdS(Nc@s&|jddd}|jkS(Nt#ii(RPR'(RW(R(s./usr/lib64/python2.7/site-packages/hgext/mq.pyt matchpatch:s(RARR`(R)RRR;RW((Rs./usr/lib64/python2.7/site-packages/hgext/mq.pyt findseries9s  s'\s?#([-+][^-+# \t\r\n\f][^# \t\r\n\f]*)cC@sg|_g|_x|jD]}|jd}|dkrL|}d}n&|dkr^qn|| }||}|j}|r||jkrtjtd||j|j fn|jj ||jj |j j |qqWdS(NRiR.is%s appears more than once in %s( RRRtfindR'R RRR{RRdtguard_retfindall(R)RWRLRtcomment((s./usr/lib64/python2.7/site-packages/hgext/mq.pyRDs$        cC@su|stdSd}|d}|dkr@td||fSx.|D]&}||krGtd||fSqGWdS(Nsguard cannot be an empty strings# is-+s*guard %r starts with invalid character: %rs!invalid character in guard %r: %r(R(R)tguardt bad_charstfirstR_((s./usr/lib64/python2.7/site-packages/hgext/mq.pyt checkguardYs       cC@s}x5|D]-}|j|}|rtj|qqWtt|}|jjddj|||_t |_ dS(Nsactive guards: %s t ( RR RtsortedtsetRR+R{RRR(R)RRtbad((s./usr/lib64/python2.7/site-packages/hgext/mq.pyt setactivees  cC@s|jdkrg|_y|jj|jj}Wn1tk rj}|jtjkrang}nXxrt |D]a\}}|j |}|r|j j d|j |j|d|fqx|jj|qxWn|jS(Ns %s:%d: %s i(RR`RRRRPRRRRARRRR{Rd(R)RterrRIRR((s./usr/lib64/python2.7/site-packages/hgext/mq.pytactiveos   $cC@sx|D]}t|dkr;tjtd|n|ddkrgtjtd|n|j|d}|rtj|qqW|jjd|j|}|djg|D]}d|^q|j|<|j t |_ dS( Nisguard %r too shortis-+s!guard %r starts with invalid chariR.s #( R=R RRRRtsubRR{RRR(R)tidxRtgRtdrop((s./usr/lib64/python2.7/site-packages/hgext/mq.pyt setguardss 1 c C@sOt|tr$|jj|}n|j|}|sAtdfS|j}g|D]+}|jdrT|d|krT|^qT}|rt t j |dfSg|D]}|jdr|^q}g|D]}|d|kr|^q}|rE|rtt j |dfSt dj g|D]}t j |^q&fStdfS(Nt-iit+RR.( t isinstancetbytesRR;RRR`RR?RRRR{( R)Rt patchguardsRRtexactnegtpostexactposR((s./usr/lib64/python2.7/site-packages/hgext/mq.pytpushables"    +()/cC@s?|r|jj}n |jj}|s3|jjr;t|trW|jj|}n|j|\}}|r|r|dkr|t d|j|q|s|t d|j|q|t d|j||fn|s;|r|t d|j||fq8|t d|j|q;ndS(Ns"allowing %s - no guards in effect s*allowing %s - no matching negative guards sallowing %s - guarded by %s sskipping %s - guarded by %s s!skipping %s - no matching guards ( RtwriteRtverboseRRRR;RR`R(R)Rt all_patchesRRtwhy((s./usr/lib64/python2.7/site-packages/hgext/mq.pytexplainpushables,        c@sfd}jr@|ttjjt_njrh|jjt_nj r|j j t_ nj rj rdjfdj Dng_ ndS(Nc@sBj|d}x|D]}|jd|qW|jdS(Ntwbs%s (RRR(titemsRtfpRI(R)(s./usr/lib64/python2.7/site-packages/hgext/mq.pyt writelists c3@s%|]}|dkr|VqdS(N(R`(R^tf(tqrepo(s./usr/lib64/python2.7/site-packages/hgext/mq.pys s(RtmapRRRRRRRRRRRRR`tadd(R)R((RR)s./usr/lib64/python2.7/site-packages/hgext/mq.pyt savedirtys        'cC@ss|jd}tjj|s%dSytj|Wn6tk rn}|jjtdt j |nXdS(Ntundoserror removing undo: %s ( tsjoinRRtexiststunlinktOSErrorRRRRt forcebytestr(R)RRtinst((s./usr/lib64/python2.7/site-packages/hgext/mq.pyt removeundoscC@sxt|D]}|j|}tjj|r |jjtd|tj |j||ftj |j||}|rt j ||qt j ||q q WdS(Ns#saving current version of %s as %s ( RtwjoinRRtlexistsRtnoteRRtorigpathRtcopyfiletrename(R)RtfilesRRtabsftabsorig((s./usr/lib64/python2.7/site-packages/hgext/mq.pytbackups c C@si|dkri}n|jd} tj||||} tj|j||||| || | dS(Ntstat(R`RQRtmatchRtdiffordiffstatR( R)RRtnode1tnode2RRtchangesRRtm((s./usr/lib64/python2.7/site-packages/hgext/mq.pyt printdiffs   c C@s|j||gdtdtd|\}}|dkrC||fS|dkrktjtd|n|jjtd|t j ||t |j||gdtdt||} t j ||} | rtjtd | nt |d| j| jd t}|dkr@tjtd nyt|j||j} Wn*tk rtjtd |nX|j||}|j|d } t| } | r| j| n|j||||d| | j|j|d|fS(Nt update_statuststricttmergeisapply failed for patch %ss"patch didn't work out, merging %s tupdateRsupdate returned %dtforcesrepo commit failedsunable to read %stwR(tapplyRRR`R RRRRRtcleanR'RRt descriptionRhRVR{Rnt ExceptionRRRRRRR(R)RtmergeqtheadRtrevRRRtctxtrettphRRg((s./usr/lib64/python2.7/site-packages/hgext/mq.pytmergeones:   " '     cC@s|dkrL|jj\}}|tkr1|S|js>dS|jdjS|jj|\}}|tkr|g|jD]}|j^q}kr|S|S(sreturn the mq handled parent or p1 In some case where mq get himself in being the parent of a merge the appropriate parent may be p2. (eg: an in progress merge started with mq disabled) If no parent are managed by mq, p1 is returned. iN(R`tdirstatetparentsRRR0t changelog(R)RR&tp1tp2tx((s./usr/lib64/python2.7/site-packages/hgext/mq.pytqparentss   1cC@s|jsYd}t|dddt}|j||jjt||t|_n|j|}x|D]}|j |dt}|s|j j t d|d S|j |\} } | s|j|dtqon|j|} | s|j j t d|d S| d} |j||||| |\} }|rn|jjt||t|_n| ro| |fSqoW|jd |fS( Ns.hg.patches.merge.markers[mq]: merge markerRRspatch %s does not exist iRspatch %s is not applied i(iN(iN(RRR`RRRdR/RR1tlookupRRRRRt isappliedR*R(R)RR$RRtpnameRR%RRtreasontinfoR&R((s./usr/lib64/python2.7/site-packages/hgext/mq.pyt mergepatch1s:     $  c C@st}yAtj|j||ddd|dd}tt||fSWnrtk r}|jjt j |d|jj s|jj t dn|jjtt|tfSXdS(sPApply patchfile to the working directory. patchfile: name of patch fileR'iRteolmodes s*patch failed, unable to continue (try -v) N(RRRRR`RRR#R RRRRRt tracebackR(R)Rt patchfileRtfuzzR((s./usr/lib64/python2.7/site-packages/hgext/mq.pyRXs   c C@sd} } } z|j} |j} |jd} yO|j|||||||d|d| d| }| j|j|SWnMtk r| j|jn&z| jWd|j XnXWdt | | | |j |XdS(Ntqpusht all_filesttobackupR$( R`twlockRt transactiont_applyRRRtabortRtreleaseR(R)RRRRRRRR=R>R$R?RttrR(((s./usr/lib64/python2.7/site-packages/hgext/mq.pyR gs.         c " C@s||s|j}nd} d} xQ|D]I} |j| \}}|s_|j| dtq%n|jjtd| tjj || }yt |j | |j }Wn2t k r|jj td| d} PnX|j}|sd| }n)|r|jd| ndj |}|jr| rtj|j||}t|| @}|r| rttd d td n|j||d t| |} n|j||\}}}|dk r|j|n| }n.|jj td | dgd}}}|r|rg}g}xF|D]>}tjj|j|rm|j|q<|j|q<W|jjlx|D]}|jj|qWx|D]}|jj|qW|jj\}}|j||WdQXn|rXd|krX|d}|d}t }t!j"|||||}||j#7}nt$j%||pjg} |j&j'}!t(|d||j)|j*d| dt} |j&j'|!krt+j,tdn| dkrt+j,tdn|r|j-jt.| | n|rB|jj tdd} Pn|r%|r%|jj tdd} Pq%q%W| | fS(sreturns (error, hash) error = 1 for unable to read, 2 for patch failed, 3 for patch fuzz. tobackup is None or a set of files to backup before they are modified by a patch. iRs applying %s sunable to read %s isimported patch %s s imported patch %ss sconflicting local changes foundthintsdid you forget to qrefresh?Rspatch %s is empty Ns .hgsubstatet.RRs(qpush exactly duplicates child changesetsrepository commit faileds0patch failed, rejects left in working directory is)fuzz found when applying patch, stopping i(/RR`RRRRRRRR{RVRnRRRfRdRlRt changedfilesRRRRRR RR+t parentchangetremoveRR,t setparentsRRtsubmergetkeysRt matchfilesR-ttipRRhR9R RRR/("R)RRRRRRRR=R>R$RRt patchnameRR5RoR)RfttouchedtpatcherrRR;tremovedtmergedRR.R/twctxtpctxt overwritetmergedsubstateRtoldtip((s./usr/lib64/python2.7/site-packages/hgext/mq.pyRAs                   !   c@s/|s|j}|r,|dj|nxY|D]N}ytj|j|Wq3tk r}|jtjkrqq3Xq3Wng}|r|j | }|j |4t |_ ng}g} xR|D]J}|j |} | dkr| j d|fq| j | |fqW| jdt x:| D]2\} }| dkrT|j| =q/|j |q/W|r|rtd|D} xu|D]6}td|jjt| ||fqWqtdtjdjfd|Dn|jt |_g|D]} | j^qS(Nitreversecs@s!|]}|j|jfVqdS(N(R1R0(R^R((s./usr/lib64/python2.7/site-packages/hgext/mq.pys ss*revision %s refers to unknown patches: %s sunknown patches: %s R.c3@s|]}|VqdS(N((R^R(R*(s./usr/lib64/python2.7/site-packages/hgext/mq.pys s(RR`tforgetRRR{RRRRRRRRdtsortRtdictRRRRR RRRR0(R)RtnumrevsRRRRt qfinishedtunknownt sortedseriesRRIR&R((R*s./usr/lib64/python2.7/site-packages/hgext/mq.pyt_cleanupsL           + +  c C@s||jdjj}g}xt|D]\}}||kratjtd|n||}|j|j}|j|krtd} tj| |n|j|j} xHdD]@} |j| | krtd} |j j | | PqqW|j | q-W|S(Nisrevision %d is not manageds/cannot delete revision %d above applied patchess[mq]: %ssimported patch %ss-patch %s finalized without changeset message (s[mq]: %ssimported patch %s( RR0R&RAR RRR1R"RRRd( R)RtrevstfirstrevRRIR&R'tbaseR*Rtfmt((s./usr/lib64/python2.7/site-packages/hgext/mq.pyt _revpatchess$     c C@s|j|j|t|}|j|t|}|r|jjddr||d}tj|j}|j |kr|j j |kr|j d}tj ||||WdQXqndS(NR R&itqfinish( t _phasecacheRfRRaR=RRRtnewcommitphaseRR.R@tadvanceboundary(R)RRbRR^toldqbasettphaseRD((s./usr/lib64/python2.7/site-packages/hgext/mq.pytfinish7s*c C@sy| r/|jd r/tjtdng}x|D]}|j|dt}|j|}|rtjtd|n||jkrtjtd|n||kr<|j|q<q<Wd}|jdrY|j s tjtdnt j ||jd}|j |j ||} || 7}t| }n|j|||jddS( NR&s4qdelete requires at least one revision or patch nameRscannot delete applied patch %sspatch %s not in series fileisno patches appliedR(RQR RRR2RR3RRdRRtrevrangeR[RfR=Ra( R)RRRt realpatchesRR6R]Rbt revpatches((s./usr/lib64/python2.7/site-packages/hgext/mq.pytdeleteEs,     cC@sd|jr`|jdj}|jdj}|jj|krVtjtdn||fSdS(s'check that working directory is at qtipis&working directory revision is not qtipN(NN( RR0R1R+R.R RRR`(R)RttopR((s./usr/lib64/python2.7/site-packages/hgext/mq.pyt checktoppatchas  cC@szx"|d D]}d|kr dSq W|dkrE|djdn1|dkre|djdn|djddS(Nis .hgsubstatesa?iRii(Rd(R)t substatestateRR((s./usr/lib64/python2.7/site-packages/hgext/mq.pytputsubstate2changesks   cC@s9d}|r)d}tdtdnt|||S(NR.s, qrefresh firsts#local changes found, qrefresh firsts,local changed subrepos found, qrefresh first(Rtchecklocalchanges(R)RRtrefresht excsuffix((s./usr/lib64/python2.7/site-packages/hgext/mq.pyRvws   RRRRFs..cC@s||jkr+tjtd|n||jkrUtjtdnx9d D]1}|j|r\tjtd|q\q\Wx?d D]7}||krtjtd tj|qqWdS( Ns*"%s" cannot be used as the name of a patchs.patch name cannot begin or end with whitespaces.hgs.mqs!patch name cannot begin with "%s"RR3s s s(%r cannot be used in the name of a patch(s.hgs.mq(RR3s s (t _reservedR RRR'R?Rtbytestr(R)R1tprefixR_((s./usr/lib64/python2.7/site-packages/hgext/mq.pytcheckreservednames    cC@s|j|| rtjj|j|rtjj|j|rftjtd|qtjtd|ndS(Ns""%s" already exists as a directoryspatch "%s" already exists( R|RRRR{tisdirR RR(R)R1R((s./usr/lib64/python2.7/site-packages/hgext/mq.pytcheckpatchnames  " cC@stjdd|jjd}|d }|rey|j|Wqktjk ra|}qkXn|}|}d}x_tr||jkry|j |PWqtjk rqXn|d7}d||f}qzW|S(sdReturn a suitable filename for title, adding a suffix to make it unique in the existing lists[\s\W_]+RiKiis%s__%d( treRROR'R|R RRRR~(R)ttitlet fallbacknametnamebaseR1RI((s./usr/lib64/python2.7/site-packages/hgext/mq.pyt makepatchnames($     cC@s(|r$|r$tjtdndS(Ns*cannot use both --force and --keep-changes(R RR(R)R$R((s./usr/lib64/python2.7/site-packages/hgext/mq.pytcheckkeepchangess c!@sStj|}|jd}|jd}|jdd}|jd}|jd} | rutj| } n|ji|jdd6dt} |jd tr|j|nt|} | r|j d } n|jd s|jd s|r?d } t j |d$||d| }|j d|}n|j|dt}t| }x|d D]}|j|qkWt j||}t|d$jdkrtjtdn|j||j}|j`y|j|d}Wn>tk rD}tjtd|tj|jfnXyd|tj d|}|rfd}td}tj d|d|d|}|}n |p}t!|d$||| d|dtd|}|d$krtjtdny|g|j"||+|j#j$t%|||j&t|_'t|_(||}t)|j*||j+}|r|j,|n| r|j-d| n|j.t/|j0j1|j2j3}|j3krd}n|j4||j5t6||r|j7||}| rC|j8| |nt9j:|d|d |d!|d"| }x|D]}|j5|qqWn|j;|j<}|r|d$j=|gnWn|j>nXWnbt?k r;|j*|} yt@jA| Wn+tBk r4|jCjDtd#| nXnX|jE|Wd$QXd$S(%sWoptions: msg: a string or a no-argument function returning a string R*teditteditformsmq.qnewRhR9R!R%t checknames .hgsubstatetincludetexcludecS@s,|dkr(tjd||fndS(Ns .hgsubstates%s: %s(R R(RR*((s./usr/lib64/python2.7/site-packages/hgext/mq.pytbadfns RRRiiscannot manage merge changesetsRscannot write patch "%s": %ss[mq]: %sc@s|jr|SSdS(N(Rb(tdesc(t defaultmsg(s./usr/lib64/python2.7/site-packages/hgext/mq.pyt finishdescs s+Leave message empty to use default message.Rtextramsgteditorsrepo commit faileds%d %dR.RRRRserror unlinking %s N(FRt byteskwargsRQRt parsedateRRR~t checksubstateR+RRR`RRvRtextendRMR=R,R RRRst fullseriesendR?RRR t strtolocaltstrerrorRtgetcommiteditorRRRRdR/RRRRVR{RnRuRwRxRR.R0R"R'RzRRR1RuRtdiffRRRtrollbackR#RRRRRR(!R)RRtpatsRR*RRRhR9RtinclsubsRtRRRt commitfilesRRBRRRRRt commitmsgRtnctxR)RitchunkstchunkRt patchpath((Rs./usr/lib64/python2.7/site-packages/hgext/mq.pytnews% $                         cC@sFx?t|jD].\}}|j|kr||j|jfSqWdS(sreturns (index, rev, patch)N(RARR1R0R`(R)RRIR((s./usr/lib64/python2.7/site-packages/hgext/mq.pyR3"sc @s)fd}|jkr"|Stjjj|s yt|}Wnttfk rfn;Xtj |kotjknrj|S|s ||}|r|S|j d}|dkr]||| }|r]jj |}yt||dpd}Wnttfk r7qZX||dkrZj||Sq]n|j d} | dkr ||| }|rjj |}yt|| dpd}Wnttfk rqX||tjkrj||Sqq q nt j t d|dS(Nc@s|jkr|SgjD]}||kr|^q}t|dkrjjtd|x"|D]}jjd|qnWdS|r|dSjrjr|dkrjjtdS|dkrjdSndS(Nispatch name "%s" is ambiguous: s %s itqtiptqbase( RR=RRRR`Rt seriesendR(RR0tmatchesR(R)(s./usr/lib64/python2.7/site-packages/hgext/mq.pyt partialname0s (   RiiRspatch %s not in series(RRRtisfileR{tintRst OverflowErrorR=trfindR;R RR( R)RRRtsnotrestminusRItofftplus((R)s./usr/lib64/python2.7/site-packages/hgext/mq.pyR2/sJ/    c "C@s|j| ||j} |jg} x'|jjD]} | j| qBW| sktg} n|jj| kr| r|j j t dn|j s|j j t ddS|r|j|}|j|}|r(|dt|jdkr(|j j t d|dS|j|\}}|r|j j||jkrtjt d|qq |rt d|}n t d}|j j t d ||fdSn?|r |j d }|j|r |j j t d dSn|j}|t|j krF|j j t d dS| rm| rm|j|d |jn|rG| rtjt dn|rtjt dn|jrtjt dn|j |}t|j||jj}|stjt d|n|||dksGtj||qGn|rF|sktjt dnxGt|jD]6\}}|j j!|dd|j |kr{Pq{q{WxDt|j|D]/\}}|j j!|dd|krPqqW||}|j|}|j|=|jj"|||j#t$|_%nt$|_&|dkrk|j'|n|s|j |}|d}n|j j||d}t(}| r|s| r|j|dt$}| r|j|j)|j*|j+|j,q|j|j)|j*n|j ||!}t(}yL|rZ|j-|||| }n'|j.|||d|d|d| }Wnt/k rn|j j t dt0j1|j ||d|jj2dt$x6|D].}||jkr|j3j4|dt$qqW|j j t dnX|jsD|dS|jd j5} |dr|ddkrt d}!|j j6|!| n|j j6t d| |dSWdQXdS(Ns"(working directory not at a head) sno patches in series iis qpush: %s is already at the top s#cannot push to a previous patch: %ss guarded by %ssno matching guardsscannot push '%s' - %s is"all patches are currently applied s#patch series already fully applied Rws.cannot use --exact and --keep-changes togethers&cannot use --exact and --move togethers(cannot push --exact with applied patchess"%s does not have a parent recordedRFs please specify the patch to moveRR=R>R$s!cleaning up working directory... t no_backupt ignoremissingsdone s0errors during apply, please fix and qrefresh %s s now at: %s (7RRR?t branchmapt itervaluesRRR+R.RRRRRR2R3R=RRR;RR RRvRVR{RnRiRRRARRRPRBRRRRRsRtmodifiedRRRtdeletedR7R RRtrevertR,twvfst unlinkpathR1R("R)RRRRR$talltmovetexacttnobackupR$RtheadsthsR6RR5RFtrootttargett fullstarttrpnRIR;t fullpatchtendR>RRR=R(RRrR*((s./usr/lib64/python2.7/site-packages/hgext/mq.pytpushls    #       &           "     c @s|j|||jo|r~|j|}|sJ|j|}n|j|}|s~tjtd|q~n|js|jj td| S|rd} n*|r|dd} nt |jd} | t |jkr|jj td|dS|s|j j g|jD]} | j ^q-} xD]1} | | krI|jj tdt}qIqIWnLg|dj D]} | j ^qtfd|j| D}t} |rQ|j|d|p|}|r |sN| j|j|jqNqQ|rQ| j|j|j|j|jqQnt|_t |j}|j| j }y|jj|}Wn9tjk rt|}tjtd |nX||jd j gkrtjtd n||jd j js:tjtd d tdn|r|j||}||}|j|dd \}}}}|rtjtdnt|||| @} |r| rtjtdn|j || |j j!x4|D],}|j"j#|dt|j j$|qWxK||D]?}||}|j%||j&|j'|j j(|q:W|j)|t*WdQXnx;t+|j| |!D]#}|jjtd|j,qW|j| |5t-|j||gdt.dt.x;|dj/j0D]&\}}|dj1|j2|qW|jrq|jj3td|jd j,n|jj3tdWdQXdS(Nspatch %s is not appliedsno patches applied iisqpop: %s is already at the top sqpop: forcing dirstate update c3@s|]}|jkVqdS(N(R0(R^R(R,(s./usr/lib64/python2.7/site-packages/hgext/mq.pys &sRstrying to pop unknown node %sis?popping would remove a revision not managed by this patch queues&popping would remove a public revisionREs see 'hg help phases' for detailsRFis!deletions found between repo revss#local changes found, qrefresh firstRs popping %s RRs now at: %s spatch queue now empty (4RR?R3R2R RRRRRR=R+R,R0RR`RmRRvRRRRRRRR-Rt LookupErrorRtmutableR1RRRHRRRtwwritetdatatflagstnormalRJRtreversedR1R'RtsubstateRRRQR(R)RRRRRRR$R6RFR0trrRR>RRR&RR0tqpR'RRRtdRtfctxtstate((R,s./usr/lib64/python2.7/site-packages/hgext/mq.pytpops     ) %    "   ! "  'c C@s|j|\}}|s5|jjtddS|j||}|jdrfd|}}n |d}}|j||} |j|| ||d|d|dS(Nsno patches applied RYRR( RsRRRR1RQR`RR( R)RRRRrRRRRR((s./usr/lib64/python2.7/site-packages/hgext/mq.pyRfs c? @s tj|}|js2|jjtddS|jddj}|jd}|jdd}|jd}|jd }|rd tj |}n|j } z |j ||jd j |jd j } } |jj| | gkrtjtd n|| jsItjtd dtdn|jj| } |j|| } t|| }|r|jd}nt|j| |j|ji|jdd6| dt}|rj|n|rj|njt| |j | ddt}|j!| | d \}}}|jj"| }|j#|dj"}|}t$j%|d||}|jdrt$j'|||||j(}t$j%|dd|}nt$j)|}|j!d|d \}}}}t*|}t*|}t*|}x*|D]"}||kr?|j+|q?q?WxD|D]<}||kr|j,||j+|ql|j+|qlWg}xX||D]L}||kr|j,||j-|qn |j.||j+|qWt/|}t/|}t/|}|j!| d|d \} }!}"}#t*| |!|"|#}$g|||fD]}|j0|$^q~}%t*|}&x|%D]}|&j1|qWt$j'||&}|| j2}'d}(z t3j3|d}(|j4s|j5rei})xg|D]_}*|jj6|*}+|+dk rn|+|jkrn|)j7|+gj-|*n|jj+|*qWx|D]}*|j8|*},|,j9||*}+|+r|)j7|+dgj:|)j|*g|*|kr|)|+dj-|*qn|*|)kr|)|*=qqWx|)j;D]0\}+}-x!|-D]}*|jj<|+|*qAWq.WnTx|D]}*|jj+|*qlWx0t/|jj=D]},|jj<d|,qWx|D]},|jj,|,qWg}xRtj>t?|dd d D]1}.|||.s|j-||.||.=qqWx|D]},|jj@|,q<Wx|D]},|jjA|,q]Wx|D]},|jjB|,q~WjCp|d}/|| jD}0|jE| |jjFt|_GtH|j|| gdtIdtI|(jJWdtK|(Xyd| tLjMd|}1|rfd}2td }3tLjMd!|2d"|3d|}1|pd#jjN}4n@|sjNs}4qd#jjN}4n|}4jO|d}5}6zD|jP}5|jQd$}6tR||0|4|/jSd|d%td&|1}7g|%D]}t/|^q1 }8|rb |jT||8ntUjV|| d'|8d|}9tW}:|:r |j|:nx|9D]};|j|;q W|jJ|jX}<|<jY||6g|'D]}=|=|7f^q |6jJ|jj-tZ|7| Wdt[jK|6|5XWnW|| d}>|jj\|>j |>j]|j^|jj_td(nXWd| jK|j`|XdS()Nsno patches applied iR*R.RRs mq.qrefreshRhR9s%d %dis(cannot qrefresh a revision with childrenscannot qrefresh public revisionREs see 'hg help phases' for detailss .hgsubstateR!R%Rt atomictempiiRRRis mq.refreshRRs[mq]: %sc@s!|jrj||SS(N(RbRz(R(RR)(s./usr/lib64/python2.7/site-packages/hgext/mq.pyR)s  s+Leave message empty to use default message.RRs R RRRsNqrefresh interrupted while patch was popped! (revert --all, qpush to recover) (aRRRRRRRQRbRRR?RsR0R1R-RR RRR,R1RR+RVR{RnRRRuRwRxRRRRt manifestlogRRR`RMRtmatchallRRRIRdtdiscardRt intersectionRt bookmarksR R!Rtcopiedt setdefaulttfiletrenamedRt iteritemsRtcopiesR|R=Rt normallookupRRhRRJRRR'RRRCRRRfRzRR@RR9RuRRRt _bookmarkst applychangesR/tlockmodtrebuildtmanifestRRR(?R)RRRR*RRtnewusertnewdateR?RrRtcparentst patchparentRRtRRtmmtaatddRtmantaaatmatch1RRRRRR0RZtcmtcatcrtcdt allmatchestrefreshchangesRtbmlisttdsguardRtdsttsrcRtdstsRIRhtoldphaseRRRRfRRDRR_RRgRtmarkstbmR'((RR)s./usr/lib64/python2.7/site-packages/hgext/mq.pyRwssP   !  $"               %+         &      "             ,    cC@s| r4tjj|jr4tjtdnytj|jWn2tk r|}|jtj kss| r}q}nX|r|j dt SdS(Ns$patch queue directory already existstcreate( RRR}R RRtmkdirRRtEEXISTRR(R)RRR((s./usr/lib64/python2.7/site-packages/hgext/mq.pytinitds cC@s|r1||jkr1tjtd|n|sF|j}n|jj|d}g}xhtj|t|jD]K}|j |\}}|r|j ||j|fn|j |q~W|S(Nspatch %s is not in series filei( RR RRRR;RR|R=RRdR(R)RRRFt unappliedRIRR5((s./usr/lib64/python2.7/site-packages/hgext/mq.pyRos"ic@sIfd}tgjD]}|j^q} |dkrYtj|}n|sPjjrtd||d} nxtj |||D]} j| } | | krd\} }n.j | drd\} }n d\} }d }jjr!d | | | f}n|r9|| kr9qn||| |qWng}xt j j D]\}}}|tj d}xp|D]h}t j j||}|jkr|jjjfkr|jd  r|j|qqWqiWx<t|D].}jjr+dp.d }|||dqWdS(Nc@s.|rjj|nrtj|j}|jrS|jd}nd}jjrjjt|t|d}|dkrt j ||}qd}njj|dd|jjdjj|dd|njj|dd|jjddS( NiR.itlabelsqseries.s: sqseries.message.s ( RRRVR{RnRft formattedt termwidthR=Rtellipsis(tpfxRORR)R*twidth(R)R(s./usr/lib64/python2.7/site-packages/hgext/mq.pyt displaynames" '  s%ditARitURtGtguardedR.s%*d %s RFsD tmissing(R R(R R(R R(RRR1R`R=RRRRR|RRtwalkRR{RRRR?RdR(R)RRRFtlengthRRR RRtidxwidthRIRtcharRRt msng_listRtdirsRRRtflR0((R)Rs./usr/lib64/python2.7/site-packages/hgext/mq.pytqseries~sB%      " cC@s|jdkrtSdS(Ns.hg.patches.save.line(R1R(R)RW((s./usr/lib64/python2.7/site-packages/hgext/mq.pyt issavelinescC@s|jj}|jjr|j r|jj|_|jdd|jjddd|jdd|jjdddn|stjj|j drt j |d|jd|SdS(NRRtmqpagert interactives.hgRR( RRRt pageractiveRRRRR}R{Rt repository(R)RR((s./usr/lib64/python2.7/site-packages/hgext/mq.pyRs  !cC@s||jj}|j}d}d}g} g} d} xt|D]\}} | dkrr|d}qM| jdr| j} | djd} g| D]}t|^q} qM|dk rM| j} | jdd\}}|r| j t t||q'| j | qMqMW|dkrQ|j j t ddS|j j t d |d| |_| |_|jt|_t|_|jj}|rF||kr|j j t d qF|j j t d t||jj}||krt}nt}t|j ||gd |d tn| r|j j t dt| dt| df|r|j jt d|j}|s|j j t ddStj|| dqndS(Nis Patch Data:is Dirstate:i RR3sno saved patch data found srestoring status: %s s*save entry has children, leaving it alone sremoving save entry %s RRs&saved queue repository parents: %s %s supdating queue directory s unable to load queue repository (R"R'RR`RAR?RbRPRRdR/RRRRRRRRRR-RRR+R,RRRRR!(R)RR&RqtqupdateRRCRIt datastartRRtqppRJRWR0RR1RtppRR((s./usr/lib64/python2.7/site-packages/hgext/mq.pytrestoresb    "            %" cC@sy|js#|jjtddS|j|jdrS|jjtddS|shtd}nd|jd}|j}|r|jj}|dt |d t |df7}n|d 7}|d j d |jD7}|d j d |j D7}|j |dt }|sF|jjtddS|jjt|dt |_|j|dS(Ns"save: no patches applied, exiting iisstatus is already saved shg patches saved states hg patches: s s Dirstate: %s %sis Patch Data: R.cs@s|]}d|VqdS(s%s N((R^R0((s./usr/lib64/python2.7/site-packages/hgext/mq.pys scs@s|]}d|VqdS(s:%s N((R^R0((s./usr/lib64/python2.7/site-packages/hgext/mq.pys sRsrepo commit failed s.hg.patches.save.line(RRRRRRbRR+R,RR{RRRRdR/RR(R)RR*RR R((s./usr/lib64/python2.7/site-packages/hgext/mq.pytsaves.  +    cC@sM|jrI|jdj}|j|}|dkrAt|jS|dSdS(Niii(RR1RR`R=R(R)RR((s./usr/lib64/python2.7/site-packages/hgext/mq.pyRs   c@std}fd}jrjjdj}yjj|}Wntk r[dSX||dS||S(sIf all_patches is False, return the index of the next pushable patch in the series, or the series length. If all_patches is True, return the index of the first patch past the last applied one. ic@s~s|tjkr|SxOtj|tjD]2}j|\}}|r`|Sj|q;WtjS(N(R=RRR|RR(RFRIRR5(RR)(s./usr/lib64/python2.7/site-packages/hgext/mq.pyt nextpatch+s"ii(RR1RR;Rs(R)RRR#R((RR)s./usr/lib64/python2.7/site-packages/hgext/mq.pyR%s  cC@sG|j|j}|jjs%|}nd|jj|d|}|S(Ns%dR(RR1RRRR;(R)R;R4R((s./usr/lib64/python2.7/site-packages/hgext/mq.pyt appliedname=s   c@sEfd}|rX|r3tjtdntj||}|jdtn|svtjtdnt|dkst|dkr|rtjtdng} |r{|jj |jj |j } t| dkrtjtd|j nj r|jj |j } | gj D]} | j ^qJkrtjtd|j n| j d j gkrtjtd |j n|jjj d j } |jj| d } nI| |jj |j gkr7tjtd |j nd} ji|d 6}|jd}x |D]}||jstjtd|dtdn|jj|\}}|jj |} |tkrtjtd|n| r0| |kr0tjtd|| fn|} |soj||jjddd d|}n||j||jjd |j|d#}tj|| g|d|WdQXt| |}j jd |jj || j |d}|rR|j!j"ddrRt#j$||t#j%| gnj&t_'t_(qlWWdQXnxt)|D]\}}|r|dkrtjtdnt*|}j+|t,j-|j.r,j/|}t0j1j2|s,tjtd|q,n|r~j||j!j3td||ft,j4|j/|q|}n|dkr| rtjtdn*|st*t0j1j5|j6d}nj||yP|dkrj!j7j8}n+t9j:j!|}|j8}|j;Wn0t<t=fk rntjtd |nXj|d}|j3||j;|s||n|j>krj?|}|gj||+nj&t_(j!j@td!|jj || j |d}qWjA|| S("Nc@s/|jkr+tjtd|ndS(Ns&patch %s is already in the series file(RR RR(RO(R)(s./usr/lib64/python2.7/site-packages/hgext/mq.pyt checkseriesGss*option "-r" not valid when importing filesRYsno files or revisions specifiedis5option "-n" not valid when importing multiple patchess/revision %d is the root of more than one branchsrevision %d is already managedis*revision %d is not the parent of the queueis"revision %d has unmanaged childrenR!tqimportsrevision %d is not mutableREs see 'hg help phases' for detailsscannot import merge revision %ds#revision %d is not the parent of %ds s%d.diffRRR R&Rs%-e is incompatible with import from -spatch %s does not existsrenaming %s to %s s$need --name to import a patch from -t/sunable to read file %ssadding %s to series file (BR RRRRnR[RR=R-RR0RtlastRR&t parentrevsR`RR@RRRR"RPR~RRBRRt exportfileR/RRdRRRtretractboundaryR&RRRRAtnormnameR|RturltislocalR{RRRRR tbasenameRbtfinRRtopenpathRRRRRRR(R)RRROR&texistingRR!R%timportedRRdRt lastparentRRDRR.R/RtseRItfilenamet originpathttextRR;((R)s./usr/lib64/python2.7/site-packages/hgext/mq.pyR&Es*$ %!    "       $          N(RRRRFs..(CR,R-R`R2Rt propertycacheRRRRRRRRR{RRtcompileRRRRRRRRRRRRR*R1R7RRR RARaRfRmRqRsRuRvRyR|R~RRRR3R2RRRRwRRRRRR!R"RRR$R&(((s./usr/lib64/python2.7/site-packages/hgext/mq.pyRs %             '  '   h 1         j =   f   ;  6    cC@sO|jdd s1|jds1|jdr5|St|}t|d<|S(NR R$RRt keep_changes(RRQR\R(RR((s./usr/lib64/python2.7/site-packages/hgext/mq.pytfixkeepchangesoptss "  sqdelete|qremove|qrmtkRskeep patch fileRR&s%stop managing a revision (DEPRECATED)tREVshg qdelete [-k] [PATCH]...t helpcategorycO@s3|j}|j||tj||jdS(s=remove patches from queue The patches must not be applied, and at least one patch is required. Exact patch identifiers must be given. With -k/--keep, the patch files are preserved in the patch directory. To stop managing a patch and move it into permanent history, use the :hg:`qfinish` command.i(R RqRRR(RRRRtq((s./usr/lib64/python2.7/site-packages/hgext/mq.pyRqs  tqappliedt1R(s%show only the preceding applied patchshg qapplied [-1] [-s] [PATCH]c K@s*|j}tj|}|rb||jkrItjtd|n|jj|d}n|jt }|j dr| r|j tddS|j dr|dkr|j tddS|j dr|d}d}nd}|j |d|d |d d d |j d d S(s<print the patches already applied Returns 0 on success.spatch %s is not in series fileiR(sno patches applied sonly one patch applied iiRRFRR RN( R RRRR RRR;RRRQRR(RRRRR@RRF((s./usr/lib64/python2.7/site-packages/hgext/mq.pyRs&   t qunappliedRsshow only the first patchshg qunapplied [-1] [-s] [PATCH]c K@s|j}tj|}|rb||jkrItjtd|n|jj|d}n|jt }|t |jkr|j dr|j tddS|j drd}nd }|j|d|d|ddd |j d d S( s<print the patches not yet applied Returns 0 on success.spatch %s is not in series fileiRsall patches applied RFRRR RN(R RRRR RRR;RRR=RQRR`R(RRRRR@RFR((s./usr/lib64/python2.7/site-packages/hgext/mq.pyR s $ R&RR2simport file in patch directoryRR1sname of patch filetNAMERRsoverwrite existing filess)place existing revisions under mq controlRsuse git extended diff formattPRsqpush after importings>hg qimport [-e] [-n NAME] [-f] [-g] [-P] [-r REV]... [FILE]...cO@stj|}|j}|j}za|j||d|jdd|jdd|jdd|jdd|jd}Wd|jXWdQX|r|jdr|jd r|j||d Sd S( simport a patch or existing changeset The patch is inserted into the series after the last applied patch. If no patches have been applied, qimport prepends the patch to the series. The patch will have the same name as its source file unless you give it a new one with -n/--name. You can register an existing patch inside the patch directory with the -e/--existing flag. With -f/--force, an existing patch of the same name will be overwritten. An existing changeset may be placed under mq control with -r/--rev (e.g. qimport --rev . -n patch will place the current revision under mq control). With -g/--git, patches imported with --rev will use the git diff format. See the diffs help topic for information on why this is important for preserving rename/copy information and permission changes. Use :hg:`qfinish` to remove changesets from mq control. To import a patch from standard input, pass - as the patch file. When importing from standard input, a patch name must be specified using the --name flag. To import an existing patch while renaming it:: hg qimport -e existing-patch -n new-name Returns 0 if import succeeded. ROR1R2RR&R!NRii(RRRR R&RQRR(RRR6RR@R3((s./usr/lib64/python2.7/site-packages/hgext/mq.pyR&. s-  %%cC@s|j}|j||}|j|rtjj|jds|jdd}|jd|jd|jd|jd|jd|j ntjj|jds|jddj n|d j ddgt j ||nd S( s"initialize a new queue repository This command also creates a series file for ordering patches, and an mq-specific .hgignore file in the queue repository, to exclude the status and guards files (these contain mostly transient state). Returns 0 if initialization succeeded.s .hgignoreRs^\.hg s^\.mq s syntax: glob sstatus sguards RiN( R RRRRRRRRRR`RR (RRRR@RR((s./usr/lib64/python2.7/site-packages/hgext/mq.pytqinitj s"        RFR_s create-reposcreate queue repositorys hg qinit [-c]t helpbasiccK@st||d|jdS(sinit a new queue repository (DEPRECATED) The queue repository is unversioned by default. If -c/--create-repo is specified, qinit will create a separate nested repository for patches (qinit -c may also be run later to convert an unversioned patch repository into a versioned one). You can use qcommit to commit changes to this queue repository. This command is deprecated. Without -c, it's implied by other relevant commands. With -c, use :hg:`init --mq` instead.Rt create_repo(RFRQ(RRR((s./usr/lib64/python2.7/site-packages/hgext/mq.pyR stqclonetpulls"use pull protocol to copy metadataR tnoupdates)do not update the new working directoriest uncompresseds)use uncompressed transfer (fast over LAN)RRs#location of source patch repositorytREPOs#hg qclone [OPTION]... SOURCE [DEST]tnorepoc K@s5tj|}d}|dkr6tj|}ntj|||j|}|jdr~|j|jd}n ||}ytj|||Wn)tj k rtj t dnXd\}}|j r|j } | j jr| |jtjkr| j jdj}tj|st| j} t| j| j|}|j| jj|dqqn<|jdry|jd}Wqtj k rqXn|jt dtj|||j|d|jdd |d t d |jd \}} |jt d tj|||jdpb|||| d|jdd |jd d |jd | j r1| j } |r|jt dt!|| |gd t ddn|jds1|jt dtj"| | jj#q1ndS(sTclone main and patch repository at same time If source is local, destination will have no patches applied. If source is remote, this command can not check if patches are applied in source, so cannot guarantee that patches are not applied in destination. If you clone remote repository, be sure before that it has no patches applied. Source patch repository is looked for in /.hg/patches by default. Use -p to change. The patch directory must be a nested Mercurial repository, as would be created by :hg:`init --mq`. Return 0 on success. cS@s0|j}|jdr(|d }n|dS(s+compute a patch repo url from a repo objectR'is /.hg/patches(R-tendswith(RR-((s./usr/lib64/python2.7/site-packages/hgext/mq.pyR s  Rs4versioned patch repository not found (see init --mq)iR2Rscloning main repository RJRbRtstreamRLscloning patch repository RKs6stripping applied patches from destination repository Rs updating destination repository N(NN($RRR`Rt defaultdesttpeert expandpathRQR t RepoErrorRRtlocalR RRRR&R0R.RRRt differenceRdR-R,tcapableR2R tcloneR-RR'RRN( RtsourcetdestRRtsrt patchespathRtdestrevRRtdr((s./usr/lib64/python2.7/site-packages/hgext/mq.pyRX sX      %&0  "s qcommit|qcis commit|cis hg qcommit [OPTION]... [FILE]...t inferrepocO@sJ|j}|j}|s-tjdntj|j|||dS(sscommit changes in the queue repository (DEPRECATED) This command is deprecated; use :hg:`commit --mq` instead.sno queue repositoryN(R RR RR RR(RRRRR@R((s./usr/lib64/python2.7/site-packages/hgext/mq.pyR s  RRRsprint patches not in seriesshg qseries [-ms]cK@s2|jj|d|jdd|jddS(s7print the entire series file Returns 0 on success.RRi(R RRQ(RRR((s./usr/lib64/python2.7/site-packages/hgext/mq.pyR s tqtops hg qtop [-s]c K@s|j}|jr$|jt}nd}|re|j|d|dddddd|jdn|jtddSd S( s>print the name of the current patch Returns 0 on success.iRFiRRR Rsno patches applied N(R RRRRRQRR(RRRR@tt((s./usr/lib64/python2.7/site-packages/hgext/mq.pyRr s  "tqnexts hg qnext [-s]c K@sm|j}|j}|t|jkrA|jtddS|j|d|ddd|jddS(sDprint the name of the next pushable patch Returns 0 on success.sall patches applied iRFRRN(R RR=RRRRRQ(RRRR@R((s./usr/lib64/python2.7/site-packages/hgext/mq.pytnext s   tqprevs hg qprev [-s]c K@s|j}t|j}|dkr;|jtddS|sX|jtddS|jj|jdj}|j|d|ddddd |j d d S( sHprint the name of the preceding applied patch Returns 0 on success.isonly one patch applied sno patches applied iRFRRR RN( R R=RRRRR;R1RRQ(RRRR@RWR((s./usr/lib64/python2.7/site-packages/hgext/mq.pytprev+ s  cC@sl|jd r2|jdr2|j|d" to patchtuRhsadd "From: " to patchtUSERtDRgs#add "Date: " to patchRsadd "Date: " to patchtDATEs0hg qnew [-e] [-m TEXT] [-l FILE] PATCH [FILE]...cO@sntj|}tj||}|j}||dupdate the current patch If any file patterns are provided, the refreshed patch will contain only the modifications that match those patterns; the remaining modifications will remain in the working directory. If -s/--short is specified, files currently included in the patch will be refreshed just like matched files and remain in the patch. If -e/--edit is specified, Mercurial will start your configured editor for you to enter a message. In case qrefresh fails, you will find a backup of your message in ``.hg/last-message.txt``. hg add/remove/copy/rename work as usual, though you might want to use git-style patches (-g/--git or [diff] git=1) to track copies and renames. See the diffs help topic for more information on the git diff format. Returns 0 on success. R*N( RRR RRpRjR?RwRqR(RRRRR@RfR(((s./usr/lib64/python2.7/site-packages/hgext/mq.pyRws s&   $ tqdiffshg qdiff [OPTION]... [FILE]...cO@s0|jd|jj||tj|dS(sdiff of the current patch and subsequent modifications Shows a diff which includes the current patch as well as any changes which have been made in the working directory since the last refresh (thus showing what the current patch would become after a qrefresh). Use :hg:`diff` if you only want to see the changes made since the last qrefresh, or :hg:`export qtip` if you want to see changes made by the current patch without including changes made since the qrefresh. Returns 0 on success. Rsi(tpagerR RRR(RRRR((s./usr/lib64/python2.7/site-packages/hgext/mq.pyR s tqfoldskeep folded patch filess/hg qfold [-e] [-k] [-m TEXT] [-l FILE] PATCH...cO@stj|}|j}|s6tjtdn|j|dsatjtdn|j|tj ||}|j d}g}g}x|D]} |j | } | |ks| |kr|j td| n|j | rtjtd| n|j | qWx|D]} |srt|j| |j} | jrr|j | jqrn|j| } |j|| \} }}| s,tjtd| q,q,W|s;t|j||j} | j}x:|D]2}|r|r|j dn|j|qqWd j|}n|j|j|}|jS|j|d |d |jd |jd d d|j||||jWdQXdS(s,fold the named patches into the current patch Patches must not yet be applied. Each patch will be successively applied to the current patch in the order given. If all the patches apply successfully, the current patch will be refreshed with the new cumulative patch, and the folded patches will be deleted. With -k/--keep, the folded patch files will not be removed afterwards. The header for each folded patch will be concatenated with the current patch header, separated by a line of ``* * *``. Returns 0 on success.s&qfold requires at least one patch nameisno patches appliedRs!skipping already folded patch %s s*qfold cannot fold already applied patch %sserror folding patch %ss* * *s R*R!RRsmq.qfoldN(RRR R RRRsRvRRpR2RR3RdRVR{RnRfRRRRR?RwR!RQRqR(RRRRR@RfRiRtmessagesRRR)Rot patchsuccessR;R*R((s./usr/lib64/python2.7/site-packages/hgext/mq.pytfold sV          *tqgotos keep-changess&tolerate non-conflicting local changessoverwrite any local changess no-backups"do not save backup copies of filesshg qgoto [OPTION]... PATCHc K@stj|}t||}|j}|j|}|jd}|jd}|j|r|j||d|jdd|d|}n-|j||d|jdd|d|}|j |S(sSpush or pop patches until named patch is at top of stack Returns 0 on success.RR;RRR$( RRR<R R2RQR3RRR(RRRRR@RR$R(((s./usr/lib64/python2.7/site-packages/hgext/mq.pytgoto s  $ $  tqguardRWRslist all patches and guardstnonesdrop all guardss8hg qguard [-l] [-n] [PATCH] [-- [+GUARD]... [-GUARD]...]c@sfd}|jtdjDd}t|}|jdr|sm|jdrtjtdnx*t j t j D]}||qWdS| s|ddd!d krjstjtd njd j }n|dkr=|ddd!d kr=|jd}n|dkratjtd n|sv|jdrj|}|dkrtjtd |nj||jn|j jj|dS(sset or print guards for a patch Guards control whether a patch can be pushed. A patch with no guards is always pushed. A patch with a positive guard ("+foo") is pushed only if the :hg:`qselect` command has activated it. A patch with a negative guard ("-foo") is never pushed if the :hg:`qselect` command has activated it. With no arguments, print the currently active guards. With arguments, set guards for the named patch. .. note:: Specifying negative guards now requires '--'. To set guards on another patch:: hg qguard other.patch -- +2.6.17 -stable Returns 0 on success. c@s9j|pdg}j|kr2d}n"j|drNd}nd}d||f}jdjj||xt|D]\}}|jdrj|d d n8|jd rj|d d nj|d d |t|dkrjdqqWjddS(Nt unguardedRiRRs!qguard.patch qguard.%s qseries.%ss%s: RRsqguard.positiveRsqguard.negativesqguard.unguardediRs (RRRRRRAR?R=(RRRRRIR(RR@R(s./usr/lib64/python2.7/site-packages/hgext/mq.pyR4 s"  $cs@s|]}|jVqdS(N(R1(R^R((s./usr/lib64/python2.7/site-packages/hgext/mq.pys J sRR|s.cannot mix -l/--list with options or argumentsNiis-+sno patches appliedisno patch to work withsno patch named %s(R RRR`RRQR RRRR|R=RR1RRRRR;R2(RRRRRRRIR((RR@Rs./usr/lib64/python2.7/site-packages/hgext/mq.pyR s4   #   tqheadershg qheader [PATCH]cC@s|j}|r!|j|}n/|jsA|jtddS|jd}t|j||j}|jdj|jddS(sMprint the header of the topmost or specified patch Returns 0 on success.sno patches applied iRs N( R R2RRRRVR{RnRf(RRRR@R)((s./usr/lib64/python2.7/site-packages/hgext/mq.pyRDe s  c C@stjj|\}}tj|}tjd|}d}d}xb|D]Z}|j|}|rMt|j d} |dks| |kr| }|}qqMqMW|rtjj |||fSdS(Ns %s.([0-9]+)i(NN( RRRPtlistdirRR:R`RRtgroupR{( Rt directoryRdtnamestnameretmaxindextmaxnameRRR;((s./usr/lib64/python2.7/site-packages/hgext/mq.pyt lastsavenamex s cC@s=t|\}}|dkr'd}n|d|d}|S(Nis.%di(RR`(RR(R;tnewpath((s./usr/lib64/python2.7/site-packages/hgext/mq.pytsavename s   R<sapply on top of local changesRs-apply the target patch to its recorded parentslist patch name in commit textRRsapply all patchesRs%merge from another queue (DEPRECATED)smerge queue name (DEPRECATED)Rs-reorder patch series and apply only the patchs0hg qpush [-f] [-l] [-a] [--move] [PATCH | INDEX]c K@sX|j}d}tj|}t||}|jdr|jdri|jj|jd}nt|j \}}|s|j t ddSt ||j |j |}|j t d|j n|j||d|jdd|jdd|d |jd d |jd d |jd d |jd d|jd}|S(s,push the next patch onto the stack By default, abort if the working directory contains uncommitted changes. With --keep-changes, abort only if the uncommitted files overlap with patched files. With -f/--force, backup and patch over uncommitted changes. Return 0 on success. RR1s%no saved queues found, please use -n ismerging with queue at: %s RRR$RRRRRR$R;N(R R`RRR<RQRR{RRRRRRR( RRRRR@R$RRIR(((s./usr/lib64/python2.7/site-packages/hgext/mq.pyR s$ -$tqpopspop all patchessqueue name to pop (DEPRECATED)s)forget any local changes to patched filess!hg qpop [-a] [-f] [PATCH | INDEX]cK@stj|}t||}t}|jdrt||j|j|jj |jd}|j t d|jt }n |j }|j||d|jdd|d|jdd|jdd|jd }|j|S( spop the current patch off the stack Without argument, pops off the top of the patch stack. If given a patch name, keeps popping off patches until the named patch is at the top of the stack. By default, abort if the working directory contains uncommitted changes. With --keep-changes, abort only if the uncommitted files overlap with patched files. With -f/--force, backup and discard changes made to such files. Return 0 on success. R1susing patch queue: %s RRRRRR$R;(RRR<RRQRRRRR{RRRR RR(RRRRt localupdateR@R(((s./usr/lib64/python2.7/site-packages/hgext/mq.pyR s0  $ s qrename|qmvshg qrename PATCH1 [PATCH2]cK@s|j}|s|}d}n|r6|j|}n/|jsV|jtddS|jd}|j|}tjj |rt tjj|tjj |}|j|}n|j ||j td||f|j|}|jj|j|}|djg|D]} d| ^q!|j|<|jt|_|j|} | rt| d||j| d| |d sR|sguards deactivated RRsAnumber of unguarded, unapplied patches has changed from %d to %d s=number of guarded, applied patches has changed from %d to %d RiitNONEtkeycS@s |ddS(Nii((R0((s./usr/lib64/python2.7/site-packages/hgext/mq.pyR ssguards in series file: s%2d s sno guards in series file sactive guards: sno active guards ispopping guarded patches Rsreapplying unguarded patches N(R RRRRQRR|R=RRRRRRRRRRR[R RR1RRRR(RRRRRRt old_unappliedRIt old_guardedRRtnoguardstgsRRtcountRtpopped((R@s./usr/lib64/python2.7/site-packages/hgext/mq.pytselectY s~*     #     (   RgRsfinish all applied changesetsshg qfinish [-a] [REV]...cO@s|jd r/| r/tjtdn|jdrKd |}n|j}|jst|jtddStj||}|dj |kr|dj r|j tdn|j |j|||jWdQXdS( shmove applied patches into repository history Finishes the specified revisions (corresponding to applied patches) by moving them out of mq control into regular repository history. Accepts a revision range or the -a/--applied option. If --applied is specified, all applied mq revisions are removed from mq control. Otherwise, the given revisions must be at the base of the stack of applied patches. This can be especially useful if your changes have been applied to an upstream repository, or if you are about to push your changes to upstream. Returns 0 on success. Rsno revisions specifieds qbase::qtipsno patches applied iRFs6warning: uncommitted changes in the working directory N(s qbase::qtip(RQR RRR RRRRnR&R`RRRRmR(RRRnRR@Rb((s./usr/lib64/python2.7/site-packages/hgext/mq.pyRm s   & tqqueueslist all available queuesRsprint name of active queueRscreate new queueR srename active queuesdelete reference to queuetpurges"delete queue, and remove patch dirs[OPTION] [QUEUE]c @s%jdddfdfd}fd}fd}fdfd }fd }d } fd } tj|}| s|jd s|jdr} |jdr|jd| fdSx^|D]S} |jd| f| | krn|j rn|jtdq(|jdq(WdS| |stjtdnj l||jdr!|krtjtd|n|r |n||||n|jdrx} || kratjtd|n|krtjtd|n|| } ||}t j j |rtjtd|nj dd}xjD]b} | | kr6|jd|ft j j | rJtj| |qJq|jd| fqW|jj jd|n|jdr| |n|jdr|kr| |n||}t j j |rtj|qn.|krtjtdn||WdQXdS(s6manage multiple patch queues Supports switching between different patch queues, as well as creating new patch queues and deleting existing ones. Omitting a queue name or specifying -l/--list will show you the registered queues - by default the "normal" patches queue is registered. The currently active queue will be marked with "(active)". Specifying --active will print only the name of the active queue. To create a new queue, use -c/--create. The queue is automatically made active, except in the case where there are applied patches from the currently active queue in the repository. Then the queue will only be created and switching will fail. To delete an existing queue, use --delete. You cannot delete the currently active queue. Returns 0 on success. Rspatches.queuess patches.queuec@s5tjjj}|jdr1|d}n|S(Nspatches-i(RRR/R?(R(R@(s./usr/lib64/python2.7/site-packages/hgext/mq.pyt _getcurrent s c@s9y jd}|jWntk r4tSXtS(NR(RRRRR(R(t _allqueuesR(s./usr/lib64/python2.7/site-packages/hgext/mq.pyt _noqueues s  c@s}ygjd}g|D]}|jr%|j^q%}|j||kro|j|nWntk rg}nXt|S(NR(RR'RRdRR(tcurrentRRtqueues(Rt _defaultqueueRR(s./usr/lib64/python2.7/site-packages/hgext/mq.pyt _getqueues( s +    c@s/jr!tjtdn|dS(Ns@new queue created, but cannot make active as patches are applied(RR RR(R1(t_setactivenocheckR@(s./usr/lib64/python2.7/site-packages/hgext/mq.pyt _setactive6 s c@s<jd}|dkr.|j|n|jdS(NRR(RRR(R1R(t _activequeueR(s./usr/lib64/python2.7/site-packages/hgext/mq.pyR< s c@s4jd}|jd|f|jdS(NRs%s (RRR(R1R(RR(s./usr/lib64/python2.7/site-packages/hgext/mq.pyt _addqueueB sc@s4|dkrjjdSjjd|SdS(NRspatches-(RR{(R1(R(s./usr/lib64/python2.7/site-packages/hgext/mq.pyt _queuedirG s cS@s%x|D]}|dkrtSqWtS(Ns:\/.(RR(R1R((s./usr/lib64/python2.7/site-packages/hgext/mq.pyt _validnameM s  c@s|kr$tjtdn}||krQtjtdnjdd}x4D],}||krqjn|jd|fqjW|jjjddS(Ns'cannot delete queue that does not exists$cannot delete currently active queuespatches.queues.newRs%s (R RRRRRR (R1RRR(RRR2R(s./usr/lib64/python2.7/site-packages/hgext/mq.pyt_deleteS s      RRs%s Ns%ss (active) s s9invalid queue name, may not contain the characters ":\/."Rsqueue "%s" already existsR s%can't rename "%s" to its current names'non-queue directory "%s" already existsspatches.queues.newRRqRs"use --create to create a new queue(R RRRQRtquietRR RR?RRRRRR Rtshutiltrmtree(RRR1RRRRRRRRRRtolddirtnewdirRtqdir((RRRRRR2R@Rs./usr/lib64/python2.7/site-packages/hgext/mq.pyR s   %                         cC@sk|jjrg|jjddr-tj}n tj}||jjdj}||j|jn|S(sEcallback used to set mq changeset as secret when no phase data existsR R&i( R RRRRR&tdraftR0R(RtrootstmqphaseR((s./usr/lib64/python2.7/site-packages/hgext/mq.pytmqphasedefaults s   c@sKd|jffdY|jrG|_|jjtndS(Ntmqrepoc @sweZejdZfdZedZddddeedfdZ fdZ fdZ RS(cS@st|j|j|jS(N(RRRR(R)((s./usr/lib64/python2.7/site-packages/hgext/mq.pyR sc@s?t|jtj|dr;t|jdndS(NR (tsupert invalidateallRthasunfilteredcacheRR(R)(R(s./usr/lib64/python2.7/site-packages/hgext/mq.pyR scS@s|jjr|jjr| r|jj}g|jjD]}|j^q;}|d|ksp|d|krtj|qndS(Nii(R RRR+R,R0R R(R)terrmsgRR,RR((s./usr/lib64/python2.7/site-packages/hgext/mq.pytabortifwdirpatched s " R.c@sS|dkri}n|jtd|t|j|||||||S(Ns&cannot commit over an applied mq patch(R`RRRR(R)R8RhR9RRRtextra(R(s./usr/lib64/python2.7/site-packages/hgext/mq.pyR s   c@s|jjr|jjr|j rg|jjD]}|j^q/}|jrt|j}x1t|D] }||krPqi|jqiWnxB|D]7}||j t j krt j tdqqWnt|j|dS(Nssource has mq patches applied(R RRRR0RbRRRRRR&R RRRt checkpush(R)tpushopRt outappliedRR0(R(s./usr/lib64/python2.7/site-packages/hgext/mq.pyR s""   c@st|j}|j}|js+|Sg|jD]}|j|jf^q5}y"|jjj|ddWn=t j k r|j j t dt|dd|SX|jj}g|D]}||dr|^q}|s|S|j|dddf|j|dddf|j|jj|ddddf|d}xQ|D]I}|d|kr|j j t d|dqf|d||dAdd --mq option to operate on patch repository instead of mainR sno queue repositoryN(RR`R RR RRR(RRRRRR R@R((s./usr/lib64/python2.7/site-packages/hgext/mq.pyt mqcommand(s  cC@s|j}g}t|jt|j|}}|r`|j|jtdd|n|r|j|jtdd|n|r|jtddj|n|j tddS(Ns %d appliedsqseries.applieds %d unappliedsqseries.unapplieds mq: %s s, smq: (empty queue) ( R R=RRRdRRRR{R (RRR@RRRl((s./usr/lib64/python2.7/site-packages/hgext/mq.pyt summaryhook7s %&&#smq()cC@sztj|ddtdtg|jjD]}||jj^q,}tj g|D]}||kr[|^q[S(sChangesets managed by MQ. ismq takes no arguments( RtgetargsRRR RR0R&Rtbaseset(RtsubsetR0RR((s./usr/lib64/python2.7/site-packages/hgext/mq.pytrevsetmqHs2c@sdddtdfgtjtjdttjj dt tjtjdt }|dj fd}|tjxBtjD]4\}}|j t kr|t|diqqWdS( NR.R soperate on patch repositorytimportRic@ssxl|jD]^\}}tj|d}|d}|jrEq ntj||t}|djq WdS(Nii(RRt parsealiasesRNR t wrapcommandRR(tcmdtabletcmdRtfunc(tmqopt(s./usr/lib64/python2.7/site-packages/hgext/mq.pytdotable^s  R(R`RR RR ttableRRt summaryhooksRRRRt__file__tgetattr(RRRtextnamet extmodule((Rs./usr/lib64/python2.7/site-packages/hgext/mq.pytextsetupSs tredsqguard.negativetyellowsqguard.positivetgreensqguard.unguardedsblue bold underlinesqseries.applieds black boldsqseries.guardedsred boldsqseries.missingsqseries.unapplied(t__doc__t __future__RRRRRRtmercurial.i18nRtmercurial.nodeRRRRRt mercurialRR R R R R RRRRRRRRRRRRRRRRRtmercurial.utilsRRRCR`t seriesoptsRtcommandt testedwitht configtablet configitemRRtstripexttKeyErrortobjectR(tloadR'RRvtnormpathR,R/R<RNRMRURVRRRRR<tCATEGORY_CHANGE_ORGANIZATIONRqRRtCATEGORY_IMPORT_EXPORTR&RFtCATEGORY_REPO_CREATIONRRt remoteoptsRXRtCATEGORY_COMMITTINGRRRrRcReRjtwalkoptst commitoptsRRwRt diffopts2tCATEGORY_FILE_CONTENTSRtCATEGORY_CHANGE_MANAGEMENTRxRzRRDRRRRR R!R"RRmRRRRRRRtrevsetpredicateRt i18nfunctionsRt colortable(((s./usr/lib64/python2.7/site-packages/hgext/mq.pyt?s    (              * %           2          M         #    @    H                  6    " k (   \