-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/hgext/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/hgext/mq.pyc


\,Tc@sdZddlmZddlmZmZmZmZmZddl	m
Z
ddlmZm
Z
mZmZmZmZddlmZmZmZddlmZddlmZdd	lmZdd
lZdd
lZdd
lZdd
lZddeed
fgZiZe
j eZ dZ!yej"dZ#Wn?e$k
rde%fdYZ&ej'e&ddZ#nXe#j(Z(e#j)Z)e#j*Z*ej+Z,de%fdYZ-de%fdYZ.dZ/dej0fdYZ1de%fdYZ2dZ3e dddeed fd!d"ged#ed$fged%d&Z4e d'd(d)eed*fgeed+ed,Z5e d-d(d.eed/fgeed0ed1Z6e d2d3d4eed5fd6d7ded8ed9fd:d;eed<fd!d"ged=ed$fd>d?eed@fdAdBeedCfgedDdEZ7dFZ8e dGdHdIeedJfgedKdLZ9e dMddNeedOfdPdQeedRfddSeedTfdUdVdedWedXfgej:edYdZe;ed[Z<e d\ej=d]d^ed_d`e;daZ>e dbdcddeedefgeedfdgZ?e dheedidjZ@e dkeedldmZAe dneedodpZBdqZCe drd3dseedtfd:d;eedufd>d?eed@fdPdveedwfdxdydedzed{fd|d}eed~fdddededfgejDejEedd`e;dZFe dd3dseedtfd>d?eed@fddeedfdPdveedfdxdydeded{fd|d}eedfdddededfgejDejEedd`e;dZGe dejHejIejDedd`e;dZJe dd3dseedtfddeedfgejEeddZKe dddeedfd:d;eedfddeedfgeddZLe dddeedfd6deedfgeddZMe dgededZNdZOdZPe dddeedfd:d;eedfd3deedfddeedfddeedfdcdeedfd6d7deded9fddeedfddeedfg	ededZQe dddeedfd6d7deded9fddeedfd:d;eedfddeedfgededZRe dgededZSe dddeedfdxdeedfgeddZTe ddHdeedfd6d7deded9fd3deedfd:d;eedfgejEeddZUe dd6deedfddeedfddeedfddeedfgeddZVe dddeedfgeddZWe dddeXedfddeXedfdHdeXedfddeXedfddeXedfddeXedfgededZYdZZdZ[dZ\dZ]dZ^dZ_dZ`e`gZadZbidd6dd6dd6dd6dd6dd6dd6Zcd
S(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 behaviour 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(t_(tbinthextshorttnullidtnullrev(trelease(tcommandstcmdutilthgtscmutiltutiltrevset(t
extensionsterrortphases(tpatch(t	localrepo(tsubrepoNtstsummarys print first line of patch headertinternaltstriptdummyuicBseZdZRS(cCsdS(N((tselftmsg((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytdebugXs(t__name__t
__module__R(((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRWsttstatusentrycBseZdZdZRS(cCs|||_|_dS(N(tnodetname(RRR ((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt__init__fscCst|jd|jS(Nt:(RRR (R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt__repr__hs(RRR!R#(((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRes	tpatchheadercBs\eZedZdZdZdZdZdZdZ	dZ
dZRS(	cCsyd}d}g}g}d}d}d}	d}
d}d}d}
d}xXt|D]J}|j}|jds|r|jdrd}Pnd}|jdrd}q[n|
d	kr|jd
r|d}q|jdr|d}q|jd
r"|dj}	q|jdr>|d}q|jdrZ|d}
q|jdr|r|j|d}
qn|dkrg}d	}
n|
dkr|jds|jdr|d}d}
n|
dkr|jds|jdr|d}d}
nz|
dkr[|jdsH|jdr[|d}d}
n=|
dkr||dkr|d}
n|s|r|j|n|j|q[W||||t||_|||||
r|
jdr|r|jdd|jd|n||_	||_
||_||_|	|_
|
|_||_|dk|_||_dS(NcSsSxL|rN|d}|jds@|jds@|jdrJ|d=qPqWdS(Nisdiff -sIndex:s===========(t
startswith(tlinestl((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyteatdiffms	

cSs,x%|r'|djs#|d=qPqWdS(Ni(R(R&((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyteatemptyvs	
is
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(tNonetfiletrstripR%tlstriptappendtlent
diffstartlinetinserttmessagetcommentstusertdatetparenttnodeidtbranchthaspatcht	plainmode(RtpfR=R(R)R5R6R7R8R9tformattsubjectR;R:t	diffstarttline((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyR!ls			




	
	
	
		



							cCs|jddg|sy1|jjd}|jj|dd|Wqtk
r|jst|jdgrd|g|j|_qdd|dg}||j|_qXn||_dS(NsFrom: s# User s# HG changeset patchisDate: R(tupdateheaderR6tindexR4t
ValueErrorR=t
_hasheaderR7(RR7t
patchheaderatttmp((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytsetusers
cCs|jddg|sy1|jjd}|jj|dd|Wqtk
r|jst|jdgrd|g|j|_qdd|dg}||j|_qXn||_dS(NsDate: s# Date s# HG changeset patchisFrom: R(RCR6RDR4RER=RFR8(RR8RGRH((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytsetdates
cCsj|jdg|s]y1|jjd}|jj|dd|Wq]tk
rYq]Xn||_dS(Ns	# Parent s# HG changeset patchi(RCR6RDR4RER9(RR9RG((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt	setparents
cCs8|jr|jn|g|_|j|j7_dS(N(R6t_delmsgR5(RR5((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt
setmessages	
cCslt}x_|D]W}xNtt|jD]7}|j|j|r)|||j|<t}Pq)q)Wq
W|S(sbUpdate all references to a field in the patch header.
        Return whether the field is present.(tFalsetxrangeR2R6R%tTrue(Rtprefixestnewtrestprefixti((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRCs
cCs<x5|D]-}x$|jD]}|j|rtSqWqWtS(s8Check if a header starts with any of the given prefixes.(R6R%RPRN(RRQRTtcomment((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRFs

cCs!|js
dSdj|jdS(NRs
s

(R6tjoin(R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt__str__
s	cCs|jrzd|jdj}xWtt|jD]=}||j|jkr6|j|=|jd|_Pq6q6Wnd}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(R5tlowerROR2R6(RtsubjRUtcitmi((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRLs	
(RRRNR!RIRJRKRMRCRFRXRL(((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyR$ksd	
	
						cOs|j}|dkr?|jjddtr?tj}q?n|dk	rc|jjdd}nz<|dk	r|jjdd|dn|j	||SWd|dk	r|jj
|nXdS(shelper dedicated to ensure a commit respect mq.secret setting

    It should be used instead of repo.commit inside the mq source for operation
    creating new changeset.
    tmqtsecretRs
new-commitN(t
unfilteredR-tuit
configboolRNRR^tbackupconfigt	setconfigtcommitt
restoreconfig(trepotphasetargstkwargstbackup((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt	newcommit#stAbortNoCleanupcBseZRS((RR(((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRl7stqueuec
BseZd>dZejdZejdZejdZejdZ	dZ
id>dZdZdZ
d	Zejd
ZdZdZd
ZdZdZdZedZdZdZedZd>d>d>d>idZdZd>dZdZ dZ!ee"ed>d>d>d>edZ#ee"ed>d>d>d>edZ$edZ%dZ&dZ'dZ(d Z)d!Z*ee"d"Z+d?Z,d(Z-ed)Z.d*Z/d+Z0d,Z1ed-Z2d>eed>eeeeed.	Z3d>ee"eeed/Z4d0Z5d>d1Z6ed2Z7d>d3Z8d>d4d>d>ed5Z9d6Z:ed7Z;d>d>d8Z<d>d9Z=d:Z>ed;Z?d<Z@d>d>d>d>ed=ZARS(@c	Cs||_yrttjj|d}|jj}|j|satjj|d}ntjj|d|}Wn&tk
rtjj|d}nX|p||_t	j
|j|_
||_||_t
|_t
|_g|_d|_d|_d|_d|_t
|_yF|jddd}|dkrRtjn|r^d	pad
|_Wn2tjk
r|jdddj|_nX|jddt
|_t|_dS(
Ns
patches.queuetpatchesspatches-tserieststatustguardsR]tgittyestnotautotplain( tbasepathtopentostpathRWtreadR/tclosetIOErrorR
topenerR`tbaseuiRNtapplieddirtytseriesdirtytaddedt
seriespatht
statuspatht
guardspathR-tactiveguardstguardsdirtyRaRtConfigErrortgitmodetconfigRYR=RPtcheckapplied(	RR`RRztpatchdirtfhtcurtcurpathR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyR!;s>	

										"csqfd}y/jjjj}t||SWn,tk
rl}|jtjkrfgSnXdS(Nc3sx~|D]v}|jdd}t|dkrT|\}}tt||Vq|jrjjtd|qqWdS(NR"ismalformated mq status line: %s
(tsplitR2RRRR`twarnR(R&R'tentrytnR (R(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt
parselines`s
(R~R{Rt
splitlinestlistR}terrnotENOENT(RRR&te((Rs,/usr/lib/python2.7/dist-packages/hgext/mq.pytapplied^s	cCsPy|jj|jjSWn,tk
rK}|jtjkrEgSnXdS(N(R~R{RRR}RR(RR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt
fullseriesqscCs|j|jS(N(tparseseriesRo(R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRozs
cCs|j|jS(N(Rtseriesguards(R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRs
cCs^x3djD]%}||jkr
t||q
q
Wt|_t|_t|_d|_dS(Ns&applied fullseries series seriesguards(	Rt__dict__tdelattrRNRRRR-R(Rta((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt
invalidates			cCstj|j|}|jdkr0t|_nR|jdkrBn@|jdkrf|jdk|_ntjt	d|j|r|j
||}n|S(NRutkeepRsRts,mq.git option can be auto/keep/yes/no got %s(syessno(tpatchmodtdiffoptsR`RRPtupgradeRrRtAbortRt	patchopts(RtoptstpatchfnR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRs
cGs|j}|jr|jdkrxZ|D]O}|j|d}x*|D]"}|jdrKt|_PqKqKW|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.
        Rtrs
diff --git(tcopyRrRR~R%RPR|(RRRnRtpatchfRB((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRs

	cGstjj|j|S(N(RyRzRW(Rtp((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRWscsCfd}x-t|jD]\}}||r|SqWdS(Ncs&|jddd}|jkS(Nt#ii(RR(R'(R(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt
matchpatchs(t	enumerateRR-(RRRRDR'((Rs,/usr/lib/python2.7/dist-packages/hgext/mq.pyt
findseriess
s'\s?#([-+][^-+# \t\r\n\f][^# \t\r\n\f]*)cCsg|_g|_x|jD]}|jd}|dkrL|}d}n&|dkr^qn|| }||}|j}|r||jkrtjtd||j|j	fn|jj
||jj
|jj|qqWdS(NRiRis%s appears more than once in %s(
RoRRtfindRRRRRWRR1tguard_retfindall(RR'thRRV((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRs$			

cCsu|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(Rtguardt	bad_charstfirsttc((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt
checkguards

	
cCs}x5|D]-}|j|}|rtj|qqWtt|}|jjddj|||_t	|_
dS(Nsactive guards: %s
t (RRRtsortedtsetR`RRWRRPR(RRqRtbad((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt	setactives
	cCs|jdkrg|_y|jj|jj}Wn1tk
rj}|jtjkrang}nXxrt	|D]a\}}|j
|}|r|jjd|j
|j|d|fqx|jj|qxWn|jS(Ns
%s:%d: %s
i(RR-R~R{RRR}RRRRR`RRWR1(RRqterrRURR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytactives	
$cCsx|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 chariRs #(R2RRRRRtsubRRWRRPR(RtidxRqtgRtdrop((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt	setguardss
1
cCs8t|tr$|jj|}n|j|}|sAtdfS|j}g|D],}|ddkrT|d|krT|^qT}|rtt	|dfSg|D]}|ddkr|^q}g|D]}|d|kr|^q}|r.|rtt	|dfStdj
tt	|fStdfS(Nit-it+RR(t
isinstancetstrRoRDRRPR-RRNtreprRWtmap(RRtpatchguardsRqRtexactnegtpostexactpos((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytpushables 

9))cCs<|r|jjp|jj}|s0|jjr8t|trT|jj|}n|j|\}}|r|r|dkr|t
d|j|q|s|t
d|j|q|t
d|j||fn|s8|r|t
d|j||fq5|t
d|j|q8ndS(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
(R`twriteRtverboseRRRoRDRR-R(RRtall_patchesRRtwhy((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytexplainpushables(csfd}jr@|ttjjt_njrh|jjt_nj	r|j
jt_	njrj
rdjfdjDng_ndS(NcsBj|d}x|D]}|jd|qW|jdS(Ntws%s
(R~RR|(titemsRztfpRU(R(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt	writelist1s
c3s%|]}|dkr|VqdS(N(R-(t.0tf(tqrepo(s,/usr/lib/python2.7/dist-packages/hgext/mq.pys	<genexpr>Bs(RRRRRRNRRRRRRRRR-tadd(RR((RRs,/usr/lib/python2.7/dist-packages/hgext/mq.pyt	savedirty0s				'cCsp|jd}tjj|s%dSytj|Wn3tk
rk}|jjtdt	|nXdS(Ntundoserror removing undo: %s
(
tsjoinRyRztexiststunlinktOSErrorR`RRR(RRfRtinst((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt
removeundoEscCsxt|D]}|j|}tjj|r
|jjtd||df|rutj	||dqtj
||dq
q
WdS(Ns#saving current version of %s as %s
s.orig(RtwjoinRyRztlexistsR`tnoteRRtcopyfiletrename(RRftfilesRRtabsf((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRjNsc	
CsT|jd}	tj||||}
tj|j|||||
||	|	dS(Ntstat(tgetR
tmatchRtdiffordiffstatR`(RRfRtnode1tnode2RRtchangesRRtm((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt	printdiffZsc	Cs|j||gdtdtd|\}}|dkrC||fS|dkrktjtd|n|jjtd|t	j
||t|j||gdtdd	||}	t	j||}
|
rtjtd
|
nt
|d|	j|	jdt}|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
tupdateRjRsupdate returned %dtforcesrepo commit failedsunable to read %sRR(tapplyRNRPR-RRRR`RR	tcleanRRRktdescriptionR7R$RWR=t	ExceptionRR~RRRR|R(RRftmergeqtheadRtrevRRRtctxtrettphRR6((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytmergeoneas:
"
'


cCs|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-tdirstatetparentsRRRt	changelog(RRfRtp1tp2tx((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytqparentss		1cCs|jsYd}t|dddt}|j||jjt||t|_n|j|}x|D]}|j	|dt}|s|j
jtd|d
S|j
|\}	}
|	s|j|dtqon|j|}|s|j
jtd|dS|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(RRkR-RPRR1RRR
tlookupR`RRRRt	isappliedRR(RRfRRoRtpnameRRRRtreasontinfoRR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt
mergepatchs:	


$
c
Cst}yAtj|j||ddd|dd}tt||fSWnotk
r}|jjt	|d|jj
s|jjtdn|jj
tt|tfSXdS(sPApply patchfile  to the working directory.
        patchfile: name of patch fileRiRteolmodes
s*patch failed, unable to continue (try -v)
N(RRRR`R-RPRRRRRRRt	tracebackRN(RRft	patchfileRtfuzzR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRs	
cCs!d}}}
z|j}|j}|jd}
yO|j|||||||d|d|	d|
}|
j|j|SWnqtk
r|
j|jd|jj	fSz|
j
Wd|j|jj|jXnXWdt|
|||j
|XdS(Ntqpusht	all_filesttobackuptkeepchangesi(R-twlocktlockttransactiont_applyR|RRlRR
tabortRRR(RRfRoRRRRRRRRRRttrR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRs2






c"CsP|s|j}nd}d}x%|D]}
|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	n|j||d
t|	|}	n|j||\}}}|dk	r|j|n|}n.|jj
td|
dgd}}}|r|rg}g}xF|D]>}tjj|j|ra|j|q0|j|q0Wx|D]}|jj|qyWx|D]}|jj|qW|jj\}}|j||n|r6d|kr6|d}|d
}t}t j!|||||}||j"7}nt#j$||pHg} |d}!t%|d||j&|j'd| dt}|d|!krt(j)tdn|dkrt(j)tdn|r|j*jt+||
n|r|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
s"local changes found, refresh firstRspatch %s is empty
s.hgsubstatet.ttipRRs(qpush exactly duplicates child changesetsrepository commit faileds*patch failed, rejects left in working dir
is)fuzz found when applying patch, stopping
iN(,RzR-RRRPR`RpRRyRWR$R=R}RR5R1R<RtchangedfilesRRlRjRRRRRtremoveRRt
setparentsRNRtsubmergetkeysR
t
matchfilesRkR7R8RRRR("RRfRoRRRRRRRRRRt	patchnameRRR>RR5ttouchedtpatcherrRRtremovedtmergedRR
Rtwctxtpctxt	overwritetmergedsubstateRtoldtip((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRs


	
	






	
!	cs|s|j}|r,|dj|nxY|D]N}ytj|j|Wq3tk
r}|jtjkrqq3Xq3Wng}|r|j	| }|j	|4t
|_ng}xhtg|D]}|j
||f^qdt
D]2\}	}|	dk	r|j|	=q|j|qW|r|rtd|D}
xu|D]6}td|jjt|
||fqQWqtdtjdjfd|Dn|jt
|_g|D]}|j^qS(Ntreversecss!|]}|j|jfVqdS(N(R R(RR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pys	<genexpr>vss*revision %s refers to unknown patches: %s
sunknown patches: %s
Rc3s|]}|VqdS(N((RR(R(s,/usr/lib/python2.7/dist-packages/hgext/mq.pys	<genexpr>|s(RR-tforgetRyRRWRRRRRPRRRRR1tdictRR`RRRRRRR(RRntnumrevsRRRRt	qfinishedtunknownRURR((Rs,/usr/lib/python2.7/dist-packages/hgext/mq.pyt_cleanupYs@


.

++
	cCs||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(RRRRRRRR RR`RpR1(RRftrevstfirstrevRnRURRtbaseRRtfmt((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt_revpatchess$

cCs|j|j|t|}|j|t|}|r|jjddtr||d}|jjddt	j
}|j|kr|jj|krt	j
|||qndS(NR]R^iRs
new-commit(t_phasecacheR?RR:R2R`RaRNRRtdraftRgR
tadvanceboundary(RRfR;RnR8toldqbasettphase((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytfinishs*c
Cs|r/|jdr/tjtdng}x|D]}|j|dt}|j|}|rtjtd|n||jkrtjtd|n||kr<|j|q<q<Wd}|jdr|j	s	tjtdnt
j||jd}t|dkrW|d|dkrW|j
n|j||}	||	7}t|	}n|j|||jd	dS(
NRs4qdelete requires at least one revision or patch nameRscannot delete applied patch %sspatch %s not in series fileisno patches appliediR(RRRRRRPRRoR1RR
trevrangeR2R4R?R:(
RRfRnRtrealpatchesRRR7R;t
revpatches((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytdeletes.
	&

cCsd|jr`|jdj}|jdj}|jj|krVtjtdn||fSdS(s'check that working directory is at qtipis&working directory revision is not qtipN(NN(	RRR RR
RRRR-(RRfttopR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt
checktoppatchs	
cCszx"|d D]}d|krdSqW|dkrE|djdn1|dkre|djdn|djddS(Nis.hgsubstatesa?iRii(R1(Rt
substatestateRR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytputsubstate2changesscCs9d}|r)d}tdtdnt|||S(NRs, refresh firsts"local changes found, refresh firsts+local changed subrepos found, refresh first(Rtchecklocalchanges(RRfRtrefresht	excsuffix((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRNs

RoRpRqR"s..cCs||jkr+tjtd|nx9dD]1}|j|r2tjtd|q2q2Wx6d	D].}||krntjtd|qnqnWdS(
Ns*"%s" cannot be used as the name of a patchs.hgs.mqs!patch name cannot begin with "%s"RR"s*"%s" cannot be used in the name of a patch(s.hgs.mq(RR"(t	_reservedRRRR%(RR RTR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytcheckreservednames


cCs|j||rtjj|j|rtjj|j|rftjtd|qtjtd|ndS(Ns""%s" already exists as a directoryspatch "%s" already exists(	RRRyRzRRWtisdirRRR(RR R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytcheckpatchnames
"
cCs(|r$|r$tjtdndS(Ns*cannot use both --force and --keep-changes(RRR(RRR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytcheckkeepchangessc sp|jd}|jd}|jd}|jd}|rTtj|}n|ji|jdd6}	|jdtr|j|nt|}
|
r|jd}n|jds|jd	s|rtj	|d&||}d
}
|
|_|jd|}n|j
|dt}t|
}x|d
 D]}|j|qGWtj||}t|d&jdkrtjtdn|j||j}|j}zy|j|d}Wn5tk
r}tjtd||jfnXy|jrw|rZ|jd|d|sZ|jdqZn|r|jd|qnp|jd|jdt|d&jjd|r|jd|dn|r|jd|nd|t j!}|r?fd}td}t j!d|d|}|}n|pH}t"|d&|||d|dtd|}|d&krtjtdny:|g|j#||+|j$j%t&|||j't|_(t|_)||}|j*j+kr&|j*d }|j|n|r|j,||}|
rW|j-||nt.j/|d!|d"|d#|d$|	}x|D]}|j|qWn|j0|j1}|r|d&j2|gnWn|j3nXWnbt4k
rO|j5|}yt6j7|Wn+t8k
rH|j9j:td%|nXnX|j;|Wd&t<|Xd&S('sWoptions:
           msg: a string or a no-argument function returning a string
        RteditR7R8Rrt	checknames.hgsubstatetincludetexcludecSs,|dkr(tjd||fndS(Ns.hgsubstates%s: %s(RR(RR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytbadfnsRRiiscannot manage merge changesetsRscannot write patch "%s": %ssFrom: s
s
Date: %d %d

s# HG changeset patch
s	# Parent s# User s# Date %s %s

s[mq]: %scs|jr|SSdS(N(R/(tdesc(t
defaultmsg(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt
finishdesc<ss+Leave message empty to use default message.R]textramsgteditorsrepo commit faileds

RRRRserror unlinking %s
N(=RRt	parsedateRRPRTt
checksubstateRR
RR-RRpRNRtextendR)R2RRRRKt
fullseriesendRR~R}tstrerrorR=RRR
RRtgetcommiteditorRkRRR1RRRRRR/R
RMRtdiffR|RRtrollbackRRWRyRRR`RRR( RRfRtpatsRRRVR7R8RtinclsubsRLRRZRtcommitfilesRR4RRRR_R]R^t	commitmsgRtnctxR9tchunkstchunkRt	patchpath((R\s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRRs$		
	
%
		
		





cCsFx?t|jD].\}}|j|kr||j|jfSqWdS(sreturns (index, rev, patch)N(RRR RR-(RRRUR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRqsc
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ntjt
d|dS(Ncs|jkr|SgjD]}||kr|^q}t|dkrjjtd|x"|D]}jjd|qnWdS|r|dSjrjr|dkrjjtdS|dkrjdSndS(Nispatch name "%s" is ambiguous:
s  %s
itqtiptqbase(	RoR2R`RRR-Rt	seriesendRP(RRtmatchesR(R(s,/usr/lib/python2.7/dist-packages/hgext/mq.pytpartialnames (
RiiRspatch %s not in series(RoRyRztisfileRWtintREt
OverflowErrorR2trfindRDRRR(
RRRRttsnoRStminusRUtofftplus((Rs,/usr/lib/python2.7/dist-packages/hgext/mq.pyR~sJ/c'
Cs|j|
||j}|j}zg}
x'|jjD]}|
j|qDW|
smtg}
n|jj|
kr|r|j	j
tdn|js|j	j
tddS|r|j|}|j|}|r*|dt|jdkr*|j	j
td|dS|j|\}}|r|jj||jkrtjtd|qq
|rtd|}ntd}|j	j
td	||fdSn?|r
|jd
}|j|r
|j	j
tddSn|j}|t|jkrH|j	j
tddS|ro|
ro|j|d
|jn|rI|
rtjtdn|rtjtdn|jrtjtdn|j|}t|j||jj}|stjtd|n|||dksItj||qIn|rc|smtjtdnxGt|jD]6\}}|j j!|dd|j|kr}Pq}q}WxDt|j|D]/\}}|j j!|dd|krPqqW||}|t|jks#t"|j|}|j|=|jj#|||j$t%|_&nt%|_'|dkr|j(|n|s|j|}|d}n|jj||d}t)}|	r|s|
r4|j|dt%\}}}}|
r |j||||q4|j||n|j||!} t)}!yL|rq|j*||| |}"n'|j+|| |d|!d|d|
}"Wn|j	j
td|jj}#tj,||#dx<|!D]4}$|$|jkrtj.|j/|$dt%qqW|j	j
tdnX|jsD|"dS|jd
j0}%|"dr|"ddkrtd}&|j	j1|&|%n|j	j1td|%|"dSWd|j2XdS(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
ROs.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 recordedR"s please specify the patch to moveRRRRs cleaning up working directory...t
ignoremissingsdone
s/errors during apply, please fix and refresh %s
snow at: %s
(3RURRt	branchmapt
itervaluesRbRRR
R`RpRRoRRRR2RRRDRrRRRNR$RWR=R9R	RRRRRtAssertionErrorR4RRPRRRKRRRtrevertR-t
unlinkpathRR RR('RRfRRRRtalltmovetexacttnobackupRRRtheadsthsRRRtstarttrootttargett	fullstarttrpnRURDt	fullpatchtendRRRRtdRRRRRRJR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytpushs	#	 
	
& 



	

	!	
#	c Cs|j|||j}zr|r|j|}	|	sL|j|}n|j|}	|	stjtd|qn|js|jj	td|S|rd}
n*|r|	dd}
nt
|jd}
|
t
|jkr|jj	td|dS|s|jj}g|jD]}|j
^q/}
x|D]1}||
krK|jj	tdt}qKqKWnfg|djD]}|j
^q}t}x.|j|
D]}|j
|krt}PqqW|}t}|rg|j|d|p
|\}}}}|rB|sd|j||qdqg|rg|j||||qgnt|_t
|j}|j|
j
}y|jj|}Wn9tjk
rt|}tjtd|nX||jd	j
gkrtjtd
n||jd	j
jsPtjtddtd
n|r|j||}||}|j|dd \}}}}|rtjtdnt||||@}|r|rtjtdn|j||x:|D]2}tj|j|dt|jj |qWxK||D]?}||}|j!||j"|j#|jj$|qFW|j%|t&nx;t'|j|
|!D]#}|jjtd|j(qW|j|
|5t)|j||gdtddx;|dj*j+D]&\}}|dj,|j-|qW|jrw|jj.td|jd	j(n|jj.tdWd|j/XdS(Nspatch %s is not appliedsno patches applied
iisqpop: %s is already at the top
sqpop: forcing dirstate update
Rstrying to pop unknown node %sis?popping would remove a revision not managed by this patch queues*popping would remove an immutable revisionthints see "hg help phases" for detailsR"is!deletions found between repo revss"local changes found, refresh firstR}spopping %s
RRjRsnow at: %s
spatch queue now empty
(0RURRRRRRRR`RR2RRRRPR-RNRRNRRR	RRtLookupErrorRtmutableR
RpRjRRRtwwritetdatatflagstnormalR&RtreversedR RtsubstateRRRRR( RRfRRRRRRRRRRRtrrRt
needupdateRRRRRRRRRRtqpRRtfctxRtstate((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytpopOs		
)	!	
"

!
" 	'c
	Cs|j|\}}|s5|jjtddS|j||}|jdrfd|}}n
|d}}|j||}	|j||	||d|d|dS(Nsno patches applied
R4RR(	RKR`RRR
RR-RR(
RRfRhRRJRRRRR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRfs
c;s
|js#|jjtddS|jddj}|jd}|jd}|jd}|rdtj|}n|j}zn	|j	||jd	j
|jd	j}	}
|jj
|	|	gkrtjtd
n||	js(tjtddtd
n|jj|	}|j||	}t|t|}
|
rw|jd}nt|j|
|j|ji|jdd6|
}|rj|n|rj|njt||j|
ddt}|j||	d \}}}|jj|	}|j j|d}|}t!j"|d||}|jdrt!j$|||||j%}t!j"|dd|}nt!j&|}|jd|d \}}}}t'|}t'|}t'|}x*|D]"}||kr|j(|qqWxD|D]<}||kry|j)||j(|qJ|j(|qJWg}xX||D]L}||kr|j)||j*|qn
|j+||j(|qWt,|}t,|}t,|}|j|d|d \}} }!}"t'|| |!|"}#g|||fD]}|j-|#^q\}$t'|
}%x|$D]}|%j.|qWt!j$||%}||	j/}&y|j0s|j1r+i}'xg|D]_}(|jj2|(})|)dk	r4|)|jkr4|'j3|)gj*|(n|jj(|(qWx|D]}(|j4|(}*|*j5||(})|)r|'j3|)dgj6|'j|(g|(|kr|'|)dj*|(qn|(|'krO|'|(=qOqOWx|'j7D]0\})}+x!|+D]}(|jj8|)|(qWqWnTx|D]}(|jj(|(q2Wx0t,|jj9D]}*|jj8d|*qbWx|D]}*|jj)|*qWg}xOt:t;|dd	d	D]1},|||,s|j*||,||,=qqWx|D]}*|jj<|*qWx|D]}*|jj=|*q Wx|D]}*|jj>|*qAWj?pk|d}-||	j@}.|jA||jjBt|_CtD|j||	gdtEddWn|jjFnXyd|
tGjH}/|rNfd}0td}1tGjHd|0d|1}/|pHd jjI}2n@|s{jIsf}2qd jjI}2n|}2jJ|tK||.|2|-jLd|d!td"|/}3g|$D]}t,|^q}4|
r|jM||4ntNjO||d#|4d|}5tP}6|6r3	|j|6nx|5D]}7|j|7q:	W|jQ|jR}8x|&D]}9|3|8|9<qk	W|8j|jj*tS|3|
WnW||d}:|jjT|:j
|:j |jU|jjVtd$nXWd|jW|jX|XdS(%Nsno patches applied
iRRRVR7R8s%d %dis'cannot refresh a revision with childrens!cannot refresh immutable revisionRs see "hg help phases" for detailss.hgsubstateRrRt
atomictempiiRRRiRRjRs[mq]: %scs!|jrj||SS(N(R/RM(R[(R\R(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyR]{s
s+Leave message empty to use default message.R]R^s
RR_RsMrefresh interrupted while patch was popped! (revert --all, qpush to recover)
(YRR`RRRR/RR`RRKRR R	RRRRR
RaRRR$RWR=RRIRJRKR~RPRpR{tmanifestR
RR-R)RtmatchallRRR%R1tdiscardRtintersectionRt	bookmarksRrRtcopiedt
setdefaultR.trenamedRbt	iteritemsRtcopiesROR2RtnormallookupRR7RgR&RRRRNRRReR5RMRkR8RMRRfRR|t
_bookmarksRtrebuildRRRR(;RRfRhRRRVtnewusertnewdateRRJRtcparentstpatchparentRiRLRRtmmtaatddRtmantaaatmatchfnRRRRRRR5tcmtcatcrtcdt
allmatchestrefreshchangesRtbmlistRtdsttsrcRtdstsRUR7toldphaseR_R]R^R5RRRmR6RntmarkstbmR((R\Rs,/usr/lib/python2.7/dist-packages/hgext/mq.pyROs>	
!"	$"





%+





#




	&

			


	



cCs|r4tjj|jr4tjtdnytj|jWn2tk
r|}|jtj	kss|r}q}nX|r|j
dtSdS(Ns$patch queue directory already existstcreate(RyRzRSRRRtmkdirRRtEEXISTRRP(RRfRR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytinits
cCs|r1||jkr1tjtd|n|sF|j}n|jj|d}g}xet|t|jD]K}|j|\}}|r|j	||j|fn|j
|q{W|S(Nspatch %s is not in series filei(RoRRRRrRDROR2RR1R(RRfRRt	unappliedRURR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRsicsHfd}tgjD]}|j^q}	|dkrYtj|}n|sOjjrtt||d}
nxt	|||D]}j|}||	krd\}
}n.j
|drd\}
}nd\}
}d
}jjr d|
||
f}n|r8||
kr8qn||||qWng}xtjj
D]\}}}|tj
d}xp|D]h}tj
j||}|jkr|jjjfkr|jdr|j|qqWqhWx<t|D].}jjr*d
p-d
}|||dqWdS(Ncs+|rjj|nrtj|j}|jrP|jdpSd}jjrjjt|t|d}|dkrt	j
||}qd}njj|dd|jjdjj|dd|njj|dd|jjddS(	NiRitlabelsqseries.s: sqseries.message.s
(R`RR$RWR=R5t	formattedt	termwidthR2Rtellipsis(tpfxR*RRRtwidth(RR(s,/usr/lib/python2.7/dist-packages/hgext/mq.pytdisplaynames'	itARitURtGtguardedRs%*d %s R"sD tmissing(Rsapplied(Rs	unapplied(Rsguarded(RRR R-R2RoR`RRRORRytwalkRzRWRRRR%R1R(RRfRRtlengthRpRRRRtidxwidthRURtcharRRt	msng_listRtdirsRRRtflR((RRs,/usr/lib/python2.7/dist-packages/hgext/mq.pytqseriessB%
"
cCs|jdkrtSdS(Ns.hg.patches.save.line(R RP(RR'((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt
issavelinescCsP|jj}|s0tjj|jdrLtj|d|jd|SdS(Ns.hgRzR(RRRyRzRSRWR	t
repository(RRR`((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRs!cCs||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|jjt
ddS|jjt
d	|d|	|_|
|_|jt|_t|_|jj}|rF||kr|jjt
d
qF|jjt
dt||jj}||krt}nt}t|j||gd|d
dn|r|jjt
dt|dt|df|r|jjt
d|j}|s|jjt
ddStj||dqndS(NisPatch Data:is	Dirstate:i
RR"sno saved patch data found
srestoring status: %s
s*save entry has children, leaving it alone
sremoving save entry %s
RRjRs&saved queue repository parents: %s %s
supdating queue directory
s unable to load queue repository
(RRRR-RR%R/RRR1RR`RRRRRRPRRR	RRRRRNRpRR	R(RRfRRItqupdateR[R&RUt	datastartRoRtqppRBR'RRR RtppRR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytrestoresb
"		
		 	%"cCsy|js#|jjtddS|j|jdrS|jjtddS|shtd}nd|jd}|j}|r|jj}|dt	|d	t	|df7}n|d
7}|dj
d|jD7}|dj
d
|jD7}|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:
Rcss|]}d|VqdS(s%s
N((RR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pys	<genexpr>Rscss|]}d|VqdS(s:%s
N((RR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pys	<genexpr>SsRsrepo commit failed
s.hg.patches.save.line(RR`RRRR/RRRRRWRRdRPR1RRR(RRfRRRR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytsaveAs.	+
  	cCsM|jrI|jdj}|j|}|dkrAt|jS|dSdS(Niii(RR RR-R2R(RRR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRc\s	
cstd}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.
        ics{s|tjkr|SxLt|tjD]2}j|\}}|r]|Sj|q8WtjS(N(R2RoRORR(RRURR(RR(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt	nextpatchksii(RR RoRDRE(RRRRR((RRs,/usr/lib/python2.7/dist-packages/hgext/mq.pyRres		
cCsI|j|j}|jjs%|}n t|jj|d|}|S(NR(RR R`RRRoRD(RRDRR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytappliedname}s
	 csfd}|rX|r3tjtdntj||}|jdtn|svtjtdnt|dkst|dkr|rtjtdng}	|r9|jj	|jj
|d}
t|
dkrtjtd|dnjr|jj
|d	}|gjD]}|j
^qDkr|tjtd
|d	n|
jdj
gkrtjtd|d	n|jjjd	j
}|jj
|d	}
nE|
|jj
|d	gkr)tjtd|d	nd}
ji|d
6}x|D]}||jstjtd|dtdn|jj
|\}}|jj
|}|tkrtjtd|n|
r|
|krtjtd||
fn|}
|s/td|}n||j||jjd	|j|d}tj||gd|d||jt||}jjd	|jj||	j|d}|r|jjddtrt j!|t j"|gnj#t_$t_%qLWnxt&|D]\}}|rE|dkr|tjtdnt|}j'|tj(|j)rj*|}t+j,j-|stjtd|qn|r<j||jj.td||ftj/|j*|qV|}n|dkrp|rptjtdn*|stt+j,j0|j1d}nj||yP|dkrjj2j3}n+t4j5j|}|j3}|jWn0t6t7fk
r,tjtd|nXj|d}|j.||j|si||n|j8krj9|}|gj||+nj#t_%jj:td |jj||	j|d}qFWj;||	S(!Ncs/|jkr+tjtd|ndS(Ns&patch %s is already in the series file(RoRRR(R*(R(s,/usr/lib/python2.7/dist-packages/hgext/mq.pytcheckseriesss*option "-r" not valid when importing filesR4sno files or revisions specifiedis5option "-n" not valid when importing multiple patchesis/revision %d is the root of more than one branchisrevision %d is already manageds*revision %d is not the parent of the queues"revision %d has unmanaged childrenRrsrevision %d is not mutableRs see "hg help phases" for detailsscannot import merge revision %ds#revision %d is not the parent of %ds%d.diffRRRR]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
(<RRRR
RFtsortRPR2R	RRRRt
parentrevsR-RRRtnormnameRTRR4R~RtexportR|RRR1R`RaRNRtretractboundaryR^RRRRRRturltislocalRWRyRzRuRRtbasenameR/tfinR{R	topenpathRR}RoRcRR(RRfRR*RtexistingRRrRtimportedRR=Rt
lastparentRRR
RRtseRUtfilenamet
originpathttextRRD((Rs,/usr/lib/python2.7/dist-packages/hgext/mq.pytqimports*"	%




	
	$



	


N(sseriessstatussguardsR"s..(BRRR-R!Rt
propertycacheRRRoRRRRRWRtretcompileRRRRRRRRNRRRRjRRR
RRRPRRR:R?RERIRKRMRNRQRRRTRURRRRRRRfRORRRRRRRRcRrRR(((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRm:s#										
							'	'	e)		
		
			
			s	
=m	
7	6				cCsO|jdds1|jds1|jdr5|St|}t|d<|S(NR]RRRtkeep_changes(RaRR6RP(R`R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytfixkeepchangesoptss"
sqdelete|qremove|qrmtkRskeep patch fileRRs%stop managing a revision (DEPRECATED)tREVshg qdelete [-k] [PATCH]...cOs*|j}|j||||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]RIR(R`RfRnRtq((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRIs	
tqappliedt1tlasts%show only the preceding applied patchshg qapplied [-1] [-s] [PATCH]cKs|j}|rS||jkr:tjtd|n|jj|d}n|jt}|jdr|r|j	tddS|jdr|dkr|j	tddS|jdr|d}d}nd}|j
|d|d	|d
dd|jdd
S(s<print the patches already applied

    Returns 0 on success.spatch %s is not in series fileiRsno patches applied
sonly one patch applied
iiRRRpRRN(R]RoRRRRDRrRPRRR(R`RfRRRRR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyR&s$		
	t
qunappliedRsshow only the first patchshg qunapplied [-1] [-s] [PATCH]cKs|j}|rS||jkr:tjtd|n|jj|d}n|jt}|t|jkr|j	dr|j
tddS|j	drdpd
}|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
RRRpRRN(
R]RoRRRRDRrRPR2RRR-R(R`RfRRRRR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRHs	$RRRsimport file in patch directoryRR sname of patch filetNAMERRsoverwrite existing filess)place existing revisions under mq controlRRrsuse git extended diff formattPRsqpush after importings>hg qimport [-e] [-n NAME] [-f] [-g] [-P] [-r REV]... [FILE]...cOs|j}z||j}za|j||d|jdd|jdd|jdd|jdd|jd}Wd|jXWd|jX|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.
    R*R RRRRrNRii(RR]RRRRR(R`RfRRRRR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyR`s,	%%cCs|j}|j||}|j|rtjj|jds|jdd}|jd|jd|jd|jd|jd|j	ntjj|jds|jddj	n|d
jddgt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
RoiN(
R]RRRyRzRRtwopenerRR|R-RR(R`RfRRRR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytqinits"	






s^qinitRscreate-reposcreate queue repositorys
hg qinit [-c]cKst||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.Rtcreate_repo(RR(R`RfR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRstqclonetpulls"use pull protocol to copy metadataRtnoupdates)do not update the new working directoriestuncompresseds)use uncompressed transfer (fast over LAN)RRns#location of source patch repositorytREPOs#hg qclone [OPTION]... SOURCE [DEST]tnorepocKs&d}|dkr'tj|}ntj|||j|}|jdro|j|jd}n||}ytj|||Wn)tjk
rtj	t
dnXd\}}|jr|j}	|	jj
r|	|jtjkr|	jj
dj}tj|s|t|	j}
t|
j|	j|}|j|	jj|dq|qn<|jdry|jd}Wqtjk
rqXn|jt
dtj|||j|d|jdd	|d
td|jd\}}|jt
d
tj|||jdpS||||d|jdd
|jdd|jd|jr"|j}	|r|jt
dt ||	|gd
tddn|jds"|jt
dtj!|	|	jj"q"ndS(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 <src>/.hg/patches by
    default. Use -p <url> to change.

    The patch directory must be a nested Mercurial repository, as
    would be created by :hg:`init --mq`.

    Return 0 on success.
    cSs0|j}|jdr(|d }n|dS(s+compute a patch repo url from a repo objectRis/.hg/patches(Rtendswith(RfR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRs
Rns4versioned patch repository not found (see init --mq)iRRqscloning main repository
RRRtstreamRscloning patch repository
Rs6stripping applied patches from destination repository
Rjs updating destination repository
N(NN(#R-R	tdefaultdesttpeert
expandpathRRt	RepoErrorRRRtlocalR]RRgRR^RRRRRt
differenceR1R	RtcapableRRtcloneRRNRRR#(R`tsourcetdestRRtsrtpatchespathRqtdestrevRfRtdr((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRsV	%&0"sqcommit|qcis
^commit|ciis hg qcommit [OPTION]... [FILE]...t	inferrepocOsJ|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]RRRRRdR`(R`RfRhRRR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRd	s
	RRRsprint patches not in seriesshg qseries [-ms]cKs2|jj|d|jdd|jddS(s7print the entire series file

    Returns 0 on success.RRi(R]RR(R`RfR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRo,	stqtopshg qtop [-s]cKs}|j}|jr!|jtp$d}|rb|j|d|dddddd|jdn|jtddSd	S(
s>print the name of the current patch

    Returns 0 on success.iRiRRpRRsno patches applied
N(R]RRrRPRRRR(R`RfRRtt((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRJ8	s	"tqnexts
hg qnext [-s]c	Ksm|j}|j}|t|jkrA|jtddS|j|d|ddd|jddS(sDprint the name of the next pushable patch

    Returns 0 on success.sall patches applied
iRRRN(R]RrR2RoRRRR(R`RfRRR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytnextF	s	tqprevs
hg qprev [-s]cKs|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
iRRRpRRN(
R]R2RRRRoRDR RR(R`RfRRR'R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytprevR	s	cCsl|jdr2|jdr2|j|d<n|jdrh|jdrhdtj|d<ndS(NR7tcurrentuserR8tcurrentdates%d %d(RtusernameRtmakedate(R`R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytsetupheaderoptsc	ss^qnewRVs invoke editor on commit messagess'import uncommitted changes (DEPRECATED)R+s#add "From: <current user>" to patchtuR7sadd "From: <USER>" to patchtUSERtDR,s#add "Date: <current date>" to patchRR8sadd "Date: <DATE>" to patchtDATEs0hg qnew [-e] [-m TEXT] [-l FILE] PATCH [FILE]...cOsVtj||}|j}||d<t|||j|||||jdS(screate a new patch

    qnew creates a new patch on top of the currently-applied patch (if
    any). The patch will be initialized with any outstanding changes
    in the working directory. You may also use -I/--include,
    -X/--exclude, and/or a list of files after the patch name to add
    only changes to matching files to the new patch, leaving the rest
    as uncommitted modifications.

    -u/--user and -d/--date can be used to set the (given) user and
    date, respectively. -U/--currentuser and -D/--currentdate set user
    to current user and date to current date.

    -e/--edit, -m/--message or -l/--logfile set the patch header as
    well as the commit message. If none is specified, the header is
    empty and the commit message is '[mq]: PATCH'.

    Use the -g/--git option to keep the patch in the git extended diff
    format. Read the diffs help topic for more information on why this
    is important for preserving permission changes and copy/rename
    information.

    Returns 0 on successful creation of a new patch.
    Ri(Rt
logmessageR]R/RRR(R`RfRRhRRR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRRi	s&	


s	^qrefreshRs;refresh only files already in the patch and specified filess2add/update author field in patch with current users0add/update author field in patch with given users0add/update date field in patch with current dates.add/update date field in patch with given dates=hg qrefresh [-I] [-X] [-e] [-m TEXT] [-l FILE] [-s] [FILE]...cOss|j}tj||}t|||j}z-|j||d||}|j|SWd|jXdS(s>update 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.
    RN(R]RR4R/RRORR(R`RfRhRRR5RR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRO	s%	

s^qdiffshg qdiff [OPTION]... [FILE]...cOs|jj|||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.
    i(R]Rf(R`RfRhR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRf	stqfoldskeep folded patch filess/hg qfold [-e] [-k] [-m TEXT] [-l FILE] PATCH...c	Os|j}|s'tjtdn|j|dsRtjtdn|j|tj||}|jd}g}g}x|D]}	|j|	}
|
|ks|
|kr|j	td|
n|j
|
rtjtd|
n|j|
qWx|D]}
|sct|j
|
|j}|jrc|j|jqcn|j
|
}|j||\}
}}|
stjtd|
qqW|s,t|j
||j}|j}x:|D]2}|r|r|jdn|j|qqWd	j
|}n|j|j|}|j}zL|j|d
|d|jd|jd|j||||jWd
|jXd
S(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 appliedRps!skipping already folded patch %s
s*qfold cannot fold already applied patch %sserror folding patch %ss* * *s
RRrRVN(R]RRRRKRNRR4RRRR1R$RWR=R5RRbRRRRORrRRIRR(R`RfRRRR5R9RntmessagesRRRR>tpatchsuccessRRRR((s,/usr/lib/python2.7/dist-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	Kst||}|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.t	no_backupRRRR(RR]RRRRRR(R`RfRRRRRR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytgoto"
s
	$$	
tqguardR'Rslist all patches and guardstnonesdrop all guardss8hg qguard [-l] [-n] [PATCH] [-- [+GUARD]... [-GUARD]...]csfd}|jtdjDd}t|}|jdr|sm|jdrtjtdnx't	t
jD]}||qWdS|s|ddd!d	krjstjtd
njdj}n|dkr:|ddd!d	kr:|j
d}n|dkr^tjtdn|ss|jdrj|}|dkrtjtd
|nj||jn|jjj|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.
    cs9j|pdg}j|kr2d}n"j|drNd}nd}d||f}jdjj||xt|D]\}}|jdrj|d	d
n8|jdrj|d	dnj|d	d
|t|dkrjdqqWjddS(Nt	unguardedRiRRs!qguard.patch qguard.%s qseries.%ss%s: RRsqguard.positiveRsqguard.negativesqguard.unguardediRs
(RRoRRRRR%R2(RRqRRRUR(RRR`(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRpT
s"		$css|]}|jVqdS(N(R (RR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pys	<genexpr>j
sRR=s.cannot mix -l/--list with options or argumentsNiis-+sno patches appliedisno patch to work withsno patch named %s(R]RRR-RRRRRROR2RoR RRRRRDR(R`RfRhRRpRRUR((RRR`s,/usr/lib/python2.7/dist-packages/hgext/mq.pyR:
s4		#
tqheadershg qheader [PATCH]cCs|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
iRps
N(	R]RRRRR$RWR=R5(R`RfRRR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytheader
s		c
Cstjj|\}}tj|}tjd|}d}d}xb|D]Z}|j|}|rMt|j	d}	|dks|	|kr|	}|}qqMqMW|rtjj
|||fSdS(Ns%s.([0-9]+)i(NN(RyRzRtlistdirRRR-RRvtgroupRW(
Rzt	directoryR=tnamestnameretmaxindextmaxnameRRRD((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytlastsavename
s
cCs=t|\}}|dkr'd}n|d|d}|S(Nis.%di(RHR-(RzRRDtnewpath((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytsavename
s
	s^qpushsapply 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	KsF|j}d}t||}|jdr|jdrW|j|jd}nt|j\}}|s|jtddSt	||j
|j|}|jtd|jn|j||d|jdd|jdd|d	|jd	d
|jd
d|jdd|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.
    RR s%no saved queues found, please use -n
ismerging with queue at: %s
RRRRRRRR:RRN(R]R-RRRWRHRzRRRmRR(	R`RfRRRRRIRUR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyR
s"	-$s^qpopspop all patchessqueue name to pop (DEPRECATED)s)forget any local changes to patched filess!hg qpop [-a] [-f] [PATCH | INDEX]cKst||}t}|jdrtt||j|j|j|jd}|jtd|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.
    R susing patch queue: %s
RRRRR:RR(
RRPRRmRRzRWRRRNR]RR(R`RfRRtlocalupdateRR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyR
s-		$
sqrename|qmvshg qrename PATCH1 [PATCH2]cKs|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<nt|_tjj|}tjj	|stj|ntj|j|||j}|r||jkr|d}
|j}zZ|j|d	krQ|jj||jj |n |
j!|||
j"|gWd|j#Xn|j$dS(
srename a patch

    With one argument, renames the current patch to PATCH1.
    With two arguments, renames PATCH1 to PATCH2.

    Returns 0 on success.sno patches applied
NRpsrenaming %s to %s
Rs #iiR(%R]R-RRRRRWRyRzRSRRRTRRRRRRRPRRRRtdirnametmakedirsRRRRRRRRR5RR(R`RfRR RRtabsdestRURqRRtdestdirRR/R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRsR			'
1
	!	
tqrestoreRIsdelete save entryRsupdate queue working directoryshg qrestore [-d] [-u] REVcKsT|j|}|j}|j||d|jdd|jd|jdS(ssrestore the queue state saved by a revision (DEPRECATED)

    This command is deprecated, use :hg:`rebase` instead.RIRRi(RR]RRR(R`RfRRR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyR;s	
tqsaveRscopy patch directoryscopy directory nametemptysclear queue status files
force copys5hg qsave [-m TEXT] [-l FILE] [-c] [-n NAME] [-e] [-f]cKsi|j}tj||}|j|d|}|r:|S|j|jdr9|j}|jdrtjj|j	|jd}tjj
|r	tjj|stj
td|n|jdstj
td|qq	nt|}|jtd||ftj||n|jdre|j2t|_|jnd	S(
s`save current queue state (DEPRECATED)

    This command is deprecated, use :hg:`rebase` instead.RRR s,destination %s exists and is not a directoryRs&destination %s exists, use -f to forcescopy %s to %s
RRi(R]RR4RRRRzRyRWRwRRSRRRRJRt	copyfilesRRPR(R`RfRRR5RRzRI((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRJs2	
	!
	
tqselectsdisable all guardsRoslist all guards in series fileRs)pop to before first guarded applied patchtreapplyspop, then reapply patchess!hg qselect [OPTION]... [GUARD]...cs%|jj}fd}|s9|jdrj|}gttjD]}||s^|^q^}j|j|s|j	t
dn|jdr|jdrj|}	gttjD]}||s|^q}
t|	t|krV|j	t
dt|t|	fnt|
t|kr|j	t
dt|t|
fqqnb|jdri}d	}xUjD]J}|s|d
7}nx.|D]&}
|j|
d	||
cd
7<qWqW|j
r)||d<n|j}|jdd
|r|jt
dxK|D]-\}}|jd||j|dqhWq|jt
dnP|r|jt
dx4|D]}
|j|
dqWn|jt
d|jdo'jo'jdj}t}|jdsN|jdrxttjD]o}||sd|j	t
dt}|d	krj|dtnj|j|d
jPqdqdWn|r!z0|r|j	t
dj||nWdjXndS(suset or print guarded patches to push

    Use the :hg:`qguard` command to set or print guards on patch, then use
    qselect to tell mq which guards to use. A patch will be pushed if
    it has no guards or any positive guards match the currently
    selected guard, but will not be pushed if any negative guards
    match the current guard. For example::

        qguard foo.patch -- -stable    (negative guard)
        qguard bar.patch    +stable    (positive guard)
        qselect stable

    This activates the "stable" guard. mq will skip foo.patch (because
    it has a negative match) but push bar.patch (because it has a
    positive match).

    With no arguments, prints the currently active guards.
    With one argument, sets the active guard.

    Use -n/--none to deactivate guards (no other arguments needed).
    When no guards are active, patches with positive guards are
    skipped and patches with negative guards are pushed.

    qselect can change the guards on applied patches. It does not pop
    guarded patches by default. Use --pop to pop back to the last
    applied patch that is not guarded. Use --reapply (which implies
    --pop) to push back to the current patch afterwards, but skip
    guarded patches.

    Use -s/--series to print a list of all guards in the series file
    (no other arguments needed). Use -v for more information.

    Returns 0 on success.csjj|jdS(Ni(RRR (RU(R(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt<lambda>sR=sguards deactivated
RRUsAnumber of unguarded, unapplied patches has changed from %d to %d
s=number of guarded, applied patches has changed from %d to %d
RoiitNONEtkeycSs|ddS(Nii((R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRVssguards in series file:
s%2d  s
sno guards in series file
sactive guards:
sno active guards
ispopping guarded patches
Rsreapplying unguarded patches
N(R]RRRROR2RRRRpRRRRRRRRR RNRPRR(R`RfRhRRqRt
old_unappliedRUtold_guardedRRtnoguardstgsRRtcountRUtpopped((Rs,/usr/lib/python2.7/dist-packages/hgext/mq.pytselectqsx)	4

 4#

	

(tqfinishRsfinish all applied changesetsshg qfinish [-a] [REV]...cOs|jdr/|r/tjtdn|jdrKd	|}n|j}|jst|jtddStj||}|dj	|kr|djr|jtdn|j
}z|j|||jWd|jXdS(
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 specifiedsqbase::qtipsno patches applied
iR"s6warning: uncommitted changes in the working directory
N(sqbase::qtip(RRRRR]RRpR
RFRR-RRRRERR(R`RfRFRRR;R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyREs"
		&tqqueueslist all available queuesRsprint name of active queueRscreate new queueRsrename active queuesdelete reference to queuetpurges"delete queue, and remove patch dirs[OPTION] [QUEUE]csjdddfdfd}fd}fd}fdfd	}fd
}d}	fd}
|s|jd
s|jdrt}|jdr|jd|fdSx^|D]S}|jd|f||kr_|jr_|jtdq|jdqWdS|	|stjtdn||jdr|krtjtd|n|r|n||||n	|jdrk}||krEtjtd|n|krmtjtd|n||}
||}tjj	|rtjtd|nj
dd}xjD]b}||kr|jd|ftjj	|
r.tj|
|q.q|jd|fqW|jtjj
dj
|n|jdr|
|n|jdr|kr|
|n||}tjj	|rtj|qn.|krtjtdn||dS(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.
    Rnspatches.queuess
patches.queuecs5tjjj}|jdr1|d}n|S(Nspatches-i(RyRzRR%(R(R(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt_getcurrent.s
cs9y jd}|jWntk
r4tSXtS(NR(R~R|R}RPRN(R(t
_allqueuesRf(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt	_noqueues4s
cs}ygjd}g|D]}|jr%|j^q%}|j||kro|j|nWntk
rg}nXt|S(NR(R~RR|R1R}R(tcurrentRRmtqueues(Rdt
_defaultqueueRcRf(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt
_getqueues=s	+


cs/jr!tjtdn|dS(Ns@new queue created, but cannot make active as patches are applied(RRRR(R (t_setactivenocheckR(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt
_setactiveKs	cs<jd}|dkr.|j|n|jdS(NRRn(R~RR|(R R(t_activequeueRf(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRjQscs4jd}|jd|f|jdS(NRs%s
(R~RR|(R R(RdRf(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt	_addqueueWscs.|dkrjdSjd|SdS(NRnspatches-(RW(R (Rf(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt	_queuedir\s
cSs%x|D]}|dkrtSqWtS(Ns:\/.(RNRP(R R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt
_validnamebs
cs|kr$tjtdn}||krQtjtdnjdd}x4D],}||krqjn|jd|fqjW|jtjjdjdS(Ns'cannot delete queue that does not exists$cannot delete currently active queuespatches.queues.newRs%s
(RRRR~RR|RRW(R RfRRm(RdRcRRf(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt_deletehs	

RRs%s
Ns%ss
 (active)
s
s9invalid queue name, may not contain the characters ":\/."Rsqueue "%s" already existsRs%can't rename "%s" to its current names'non-queue directory "%s" already existsspatches.queues.newRRIRbs"use --create to create a new queue(R]RRtquietRRRRyRzRR~RR|RWtshutiltrmtree(R`RfR RReRiRkRmRnRoRpRfRmtolddirtnewdirRtqdir((RlRdRhRcRjRRRfs,/usr/lib/python2.7/dist-packages/hgext/mq.pyRas			%			


	


"


cCsn|jjrj|jjddtr0tj}n	tj}||jjdj}||j	|jn|S(sEcallback used to set mq changeset as secret when no phase data existsR]R^i(
R]RR`RaRNRR^RARR(RftrootstmqphaseRq((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytmqphasedefaultss	csKd|jffdY|jrG|_|jjtndS(Ntmqrepoc	sweZejdZfdZedZddddeeifdZ	fdZ
fdZRS(cSst|j|j|jS(N(RmR`RRz(R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyR]scs?t|jtj|dr;t|jdndS(NR](tsupert
invalidateallRthasunfilteredcacheRR_(R(Rz(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyR|scSs|jjr|jjr|r|jj}g|jjD]}|j^q;}|d|ksp|d|krtj|qndS(Nii(R]RRRRRRR(RterrmsgRRRRn((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytabortifwdirpatcheds
" Rcs>|jtd|t|j|||||||S(Ns&cannot commit over an applied mq patch(RRR{Rd(RRR7R8RRR_textra(Rz(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRds
	cs|jjr|jjr|jrg|jjD]}|j^q/}|jrt|j}x1t|D] }||krPqi|jqiWnxB|D]7}||j	t
jkrtj
tdqqWnt|j|dS(Nssource has mq patches applied(R]RRRRR;RRRRgRR^RRRR{t	checkpush(RtpushopRt
outappliedRR(Rz(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRs""	
cst|j}|j}|js+|Sg|jD]}|j|jf^q5}y"|jjj|ddWn=t	j
k
r|jjt
dt|dd|SX|jj}g|D]}||dr|^q}|s|S|j|dddf|j|dddf|j|jj|ddddf|d}xQ|D]I}|d|kr|jjt
d|dqf|d||d<qfW|S(	s,augment tags from base class with patch tagsiis)mq status file refers to unknown node %s
RpRqtqparentis+tag %s overrides mq patch of the same name
(R{t	_findtagsR]RRR R_R	RRRR`RRRthasnodeR1R(RtresultRRtmqtagstincludedtmqtttags(Rz(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRs2		(")+

N(RRRtunfilteredpropertycacheR]R|RNRR-RdRR((Rz(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRzs(t	__class__Rt_phasedefaultsR1Ry(R`Rf((Rzs,/usr/lib/python2.7/dist-packages/hgext/mq.pyt	reposetupsT	cOsZtj|drG|jdtrG|jtd|jdn|||||S(NRt	no_commits#cannot import over an applied patchR(RtsafehasattrRRNRR(torigR`RfRhRi((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytmqimport
s
cOs|jdd}|s(||||S|rb|d}tj|stjtdqn3tjt	j
}|stjtdntj||}t||t
S(NR]is0only a local queue repository may be initializeds5there is no Mercurial repository here (.hg not found)(RR-R	RRRRRtfindrepoRytgetcwdRRRP(RR`RhRiR]trepopathRf((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytmqinit%
s
cOst|jdd}|s+|||||S|j}|j}|s^tjtdn||j|||S(s>Add --mq option to operate on patch repository instead of mainR]sno queue repositoryN(RR-R]RRRRR`(RR`RfRhRiR]RR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt	mqcommand8
s	cCs|j}g}t|jt|j|}}|r`|j|jtdd|n|r|j|jtdd|n|r|jtddj|n|j	tddS(Ns
%d appliedsqseries.applieds%d unappliedsqseries.unappliedsmq:     %s
s, smq:     (empty queue)
(
R]R2RRR1RRRRWR(R`RfRRRR0((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytsummaryhookG
s	%&&#cCsztj|ddtdtg|jjD]}||jj^q,}tjg|D]}||kr[|^q[S(s+``mq()``
    Changesets managed by MQ.
    ismq takes no arguments(	RtgetargsRRR]RRRtbaseset(RftsubsetRRR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytrevsetmqV
s2csdddtdfgtjtjdttjj	dt
tjtjdt}|djt
tjjdfd}|tjxBtjD]4\}}|jtkr|t|d	iqqWttjd<dS(
NRR]soperate on patch repositorytimportRiRcsfx_|jD]Q}tj|d}|kr8q
ntj||t}|djq
WdS(Nii(R(RtparsealiasesR
twrapcommandRRb(tcmdtabletcmdR(tmqopttnowrap(s,/usr/lib/python2.7/dist-packages/hgext/mq.pytdotablen
sR(R-RR
RRttableRRtsummaryhooksRRRRbRRRt__file__tgetattrRRtsymbols(R`RRtextnamet	extmodule((RRs,/usr/lib/python2.7/dist-packages/hgext/mq.pytextsetupa
s
tredsqguard.negativetyellowsqguard.positivetgreensqguard.unguardedsblue bold underlinesqseries.applieds
black boldsqseries.guardedsred boldsqseries.missingsqseries.unapplied(dt__doc__tmercurial.i18nRtmercurial.nodeRRRRRtmercurial.lockRt	mercurialRRR	R
RRR
RRRRRRRyRRRrR-t
seriesoptsRtcommandt
testedwithRtstripexttKeyErrortobjectRtloadRRaRNtnormpathRRR$RkRRlRmRRIRRRRRt
remoteoptsRPRRRdRoRJR(R*R/twalkoptst
commitoptsRRRORt	diffopts2RfR8R;RR@RHRJRRRRRR_RERNRaRyRRRRRRt
i18nfunctionsRt
colortable(((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt<module>?s|(.0
									4				L	!!!	
"
!A	H								9	!h+		Z								


Copyright © 2017 || Recoded By Mr.Bumblebee