HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/lib/python2.7/dist-packages/hgext/mq.pyc

Xc@@sdZddlmZddlZddlZddlZddlZddlmZddl	m
Z
mZmZm
Z
mZddlmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z ej!Z!dde"ed	fgZ#iZ$ej%e$Z%d
Z&yej'dZ(Wn?e)k
rude*fd
YZ+ej,e+ddZ(nXe(j-Z-e(j.Z.e(j/Z/e j0Z1de*fdYZ2ddddddgZ3idd6dd6dd6Z4dZ5dZ6de*fdYZ7d Z8d!ej9fd"YZ:d#e*fd$YZ;d%Z<e%d&d'd(e"ed)fd*d+ged,ed-fged.d/Z=e%d0d1d2e"ed3fge#ed4e"d5Z>e%d6d1d7e"ed8fge#ed9e"d:Z?e%d;d<d=e"ed>fd?d@dedAedBfdCdDe"edEfd*d+gedFed-fdGdHe"edIfdJdKe"edLfgedMdNZ@dOZAe%dPdQdRe"edSfgedTdUZBe%dVddWe"edXfdYdZe"ed[fdd\e"ed]fd^d_ded`edafgejCedbdceDe"ddZEe%deejFdfdedgdheDdiZGe%djdkdle"edmfge#edndoZHe%dpe#edqdrZIe%dse#edtduZJe%dve#edwdxZKdyZLe%dzd<d{e"ed|fdCdDe"ed}fdGdHe"edIfdYd~e"edfdddededfdde"edfdddededfgejMejNeddheDdZOe%dd<d{e"ed|fdGdHe"edIfdde"edfdYd~e"edfdddededfdde"edfdddededfgejMejNeddheDdZPe%dejQejRejMeddheDdZSe%dd<d{e"ed|fd'd(e"edfgejNeddZTe%ddde"edfdCdDe"edfdde"edfgeddZUe%ddde"edfd?de"edfgeddZVe%dgede"dZWdZXdZYe%ddde"edfdCdDe"edfd<de"edfdde"edfdde"edfdkde"edfd?d@dededBfdde"edfdde"edfg	ede"dZZe%ddde"edfd?d@dededBfdde"edfdCdDe"edfdde"edfgede"dZ[e%dgede"dZ\e%ddde"edfdde"edfgeddZ]e%ddQde"edfd?d@dededBfd<de"edfdCdDe"edfgejNeddZ^e%dd?de"edfdde"edfdde"edfdde"edfgeddZ_e%ddde"edfgeddZ`e%dddeaedfddeaedfdQdeaedfddeaedfddeaedfddeaedfgede"dZbdZcdZddZedZfdZgdZhejiZieiddZjejgZkdZlidd6dd6dd6dd6dd6dd	6dd
6ZmdS(smanage 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_importN(t_(tbinthextnullidtnullrevtshort(tcmdutiltcommandstdispatchterrort
extensionsthgt	localrepotlocktpatchtphasest	registrartrevsettscmutiltsubrepotutiltstsummarys print first line of patch headersships-with-hg-coretstriptdummyuicB@seZdZRS(cC@sdS(N((tselftmsg((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytdebugss(t__name__t
__module__R(((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRrsttstatusentrycB@seZdZdZRS(cC@s|||_|_dS(N(tnodetname(RR!R"((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt__init__scC@st|jd|jS(Nt:(RR!R"(R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt__repr__s(RRR#R%(((s,/usr/lib/python2.7/dist-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(s?Assuming lines contains a HG patch header, add a header line with value.
    >>> try: inserthgheader([], '# Date ', 'z')
    ... except ValueError, inst: print "oops"
    oops
    >>> inserthgheader(['# HG changeset patch'], '# Date ', 'z')
    ['# HG changeset patch', '# Date z']
    >>> inserthgheader(['# HG changeset patch', ''], '# Date ', 'z')
    ['# HG changeset patch', '# Date z', '']
    >>> inserthgheader(['# HG changeset patch', '# User y'], '# Date ', 'z')
    ['# HG changeset patch', '# User y', '# Date z']
    >>> inserthgheader(['# HG changeset patch', '# Date x', '# User y'],
    ...                '# User ', 'z')
    ['# HG changeset patch', '# Date x', '# User z']
    >>> inserthgheader(['# HG changeset patch', '# Date y'], '# Date ', 'z')
    ['# HG changeset patch', '# Date z']
    >>> inserthgheader(['# HG changeset patch', '', '# Date y'], '# Date ', 'z')
    ['# HG changeset patch', '# Date z', '', '# Date y']
    >>> inserthgheader(['# HG changeset patch', '# Parent  y'], '# Date ', 'z')
    ['# HG changeset patch', '# Date z', '# Parent  y']
    s# HG changeset patchis# (tindext	HGHEADERStlentranget
startswithtmint	enumeratetinsert(
tlinestheadertvaluetstarttnewindextbestpostitlinet	lineindexth((s,/usr/lib/python2.7/dist-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([], 'Date', 'z')
    ['Date: z']
    >>> insertplainheader([''], 'Date', 'z')
    ['Date: z', '']
    >>> insertplainheader(['x'], 'Date', 'z')
    ['Date: z', '', 'x']
    >>> insertplainheader(['From: y', 'x'], 'Date', 'z')
    ['From: y', 'Date: z', '', 'x']
    >>> insertplainheader([' date : x', ' from : y', ''], 'From', 'z')
    [' date : x', 'From: z', '']
    >>> insertplainheader(['', 'Date: y'], 'Date', 'z')
    ['Date: z', '', 'Date: y']
    >>> insertplainheader(['foo: bar', 'DATE: z', 'x'], 'From', 'y')
    ['From: y', 'foo: bar', 'DATE: z', '', 'x']
    R$iis%s: %sR(tPLAINHEADERStlowerR+R/tsplitRtgetR0(	R1R2R3tnewprioR6R7R8tlheadertlprio((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytinsertplainheaders$"	tpatchheadercB@sJeZedZdZdZdZdZdZdZ	RS(cC@sd}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|jd|n||_	||_
||_||_|	|_
|
|_||_|dk|_|pd|j
kotd|j
D|_dS(NcS@sSxL|rN|d}|jds@|jds@|jdrJ|d=qPqWdS(Nisdiff -sIndex:s===========(R-(R1tl((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyteatdiffs	

cS@s,x%|r'|djs#|d=qPqWdS(Ni(R(R1((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyteatemptys	
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: Rcs@s-|]#}|jdp$|jdVqdS(sDate: sFrom: N(R-(t.0tc((s,/usr/lib/python2.7/dist-packages/hgext/mq.pys	<genexpr>Hs(tNonetfiletrstripR-tlstriptappendR+t
diffstartlineR0tmessagetcommentstuserR'tparenttnodeidtbranchthaspatchtanyt	plainmode(RtpfR[RFRGRSRTRUR'RVtformatR(RXRWt	diffstartR8((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyR#s			




	
	
	
		



								cC@swyt|jd|WnPtk
ri|jrFt|jd|qjdd|g}||j|_nX||_dS(Ns# User tFroms# HG changeset patch(R;RTt
ValueErrorR[RCRU(RRUttmp((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytsetuserLs
	cC@swyt|jd|WnPtk
ri|jrFt|jd|qjdd|g}||j|_nX||_dS(Ns# Date tDates# HG changeset patch(R;RTR`R[RCR'(RR'Ra((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytsetdateWs
	cC@sdyt|jd|Wn=tk
rV|jsWdd|g}||j|_qWnX||_dS(Ns
# Parent  s# HG changeset patch(R;RTR`R[RV(RRVRa((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt	setparentbs
	cC@sq|jr|jn|g|_|rm|jrZ|jrZ|jdrZ|jjdn|jj|ndS(NiR(RTt_delmsgRSR[RQ(RRS((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt
setmessageks	
cC@s*dj|jj}|s"dS|dS(Ns
Rs

(tjoinRTRO(RR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt__str__tscC@s|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(RSR=txrangeR+RT(RtsubjR7tcitmi((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRfzs	
(
RRtFalseR#RbRdReRgRiRf(((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRDsg							cO@s|j}|dkr?|jjddtr?tj}q?n|dk	rc|jjdd}n|jjdd}zR|dk	r|jjdd|dn|jjddt	|j
||SWd|jj||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-committuitallowemptycommitN(t
unfilteredRMRqt
configboolRnRRptbackupconfigt	setconfigtTruetcommitt
restoreconfig(trepotphasetargstkwargstphasebackuptallowemptybackup((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt	newcommitstAbortNoCleanupcB@seZRS((RR(((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRstqueuec
B@seZd?dZejdZejdZejdZejdZ	dZ
d?d?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,Z1d-Z2ed.Z3d?eed?eeeeed/	Z4d?ee"eeed0Z5d1Z6d?d2Z7ed3Z8d?d4Z9d?d5d?d?ed6Z:d7Z;ed8Z<d?d?d9Z=d?d:Z>d;Z?ed<Z@d=ZAd?d?d?d?ed>ZBRS(Ac	C@s||_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
|_yL|jddd}|dkrRtjn|rdd	|_n	d
|_Wn2tjk
r|jdddj|_nX|jddt
|_t|_dS(
Ns
patches.queuetpatchesspatches-tserieststatustguardsRotgittyestnotautotplain( tbasepathtopentostpathRhtreadROtclosetIOErrorRtopenerRqtbaseuiRntapplieddirtytseriesdirtytaddedt
seriespatht
statuspatht
guardspathRMtactiveguardstguardsdirtyRtR
tConfigErrortgitmodetconfigR=R[Rwtcheckapplied(	RRqRRtpatchdirtfhtcurtcurpathR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyR#sB	

										
"c@sqfd}y/jjjj}t||SWn,tk
rl}|jtjkrfgSnXdS(Nc3@sx~|D]v}|jdd}t|dkrT|\}}tt||Vq|jrjjtd|qqWdS(NR$ismalformated mq status line: %s
(R>R+R RRRqtwarnR(R1REtentrytnR"(R(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt
parseliness
(RRRt
splitlinestlistRterrnotENOENT(RRR1te((Rs,/usr/lib/python2.7/dist-packages/hgext/mq.pytapplieds	cC@sPy|jj|jjSWn,tk
rK}|jtjkrEgSnXdS(N(RRRRRRR(RR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt
fullseriesscC@s|j|jS(N(tparseseriesR(R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRs
cC@s|j|jS(N(Rtseriesguards(R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRs
cC@s^x3djD]%}||jkr
t||q
q
Wt|_t|_t|_d|_dS(Ns&applied fullseries series seriesguards(	R>t__dict__tdelattrRnRRRRMR(Rta((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt
invalidates			cC@stj|j|}|jdkr0t|_nR|jdkrBn@|jdkrf|jdk|_ntjt	d|j|r|j
||}n|S(NRtkeepRRs,mq.git option can be auto/keep/yes/no got %s(RR(tpatchmodtdiffoptsRqRRwtupgradeRR
tAbortRt	patchopts(RtoptstpatchfnR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRs
cG@s|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-RwR(RRRRtpatchfR8((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRs

	cG@stjj|j|S(N(RRRh(Rtp((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRhsc@sCfd}x-t|jD]\}}||r|SqWdS(Nc@s&|jddd}|jkS(Nt#ii(R>R(RE(R(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt
matchpatch s(R/RRM(RRRR)RE((Rs,/usr/lib/python2.7/dist-packages/hgext/mq.pyt
findseriess
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
|jj|qqWdS(NRiRis%s appears more than once in %s(
RRRtfindRR
RRRhRRQtguard_retfindall(RRER:Rtcomment((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyR*s$			

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(Rtguardt	bad_charstfirstRL((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt
checkguard?s

	
cC@s}x5|D]-}|j|}|rtj|qqWtt|}|jjddj|||_t	|_
dS(Nsactive guards: %s
t (RR
RtsortedtsetRqRRhRRwR(RRRtbad((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt	setactiveKs
	cC@s|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(RRMRRRR>RRRR/RRqRRhRQ(RRterrR7RR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytactiveUs	
$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 chariRs #(R+R
RRRRtsubRRhRRwR(RtidxRtgRtdrop((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt	setguardsgs
1
cC@s8t|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
isinstancetstrRR)RRwRMRRntreprRhtmap(RRtpatchguardsRRtexactnegtpostexactpos((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytpushableus 

9))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
(RqtwriteRtverboseRRRR)RRMR(RRtall_patchesRRtwhy((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytexplainpushables,c@sfd}jr@|ttjjt_njrh|jjt_nj	r|j
jt_	njrj
rdjfdjDng_ndS(Nc@sBj|d}x|D]}|jd|qW|jdS(Ntws%s
(RRR(titemsRtfpR7(R(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt	writelists
c3@s%|]}|dkr|VqdS(N(RM(RKtf(tqrepo(s,/usr/lib/python2.7/dist-packages/hgext/mq.pys	<genexpr>s(RRRRRRnRRRRRRRRRMtadd(RR((RRs,/usr/lib/python2.7/dist-packages/hgext/mq.pyt	savedirtys				'cC@sp|jd}tjj|s%dSytj|Wn3tk
rk}|jjtdt	|nXdS(Ntundoserror removing undo: %s
(
tsjoinRRtexiststunlinktOSErrorRqRRR(RRzRtinst((s,/usr/lib/python2.7/dist-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
(
RtwjoinRRtlexistsRqtnoteRRtorigpathRtcopyfiletrename(RRztfilesRRtabsftabsorig((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytbackups c	
C@sT|jd}	tj||||}
tj|j|||||
||	|	dS(Ntstat(R?RtmatchRtdiffordiffstatRq(RRzRtnode1tnode2RRtchangesRRtm((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt	printdiffsc	C@s|j||gdtdtd|\}}|dkrC||fS|dkrktjtd|n|jjtd|t	j
||t|j||gdtdt||}	t	j||}
|
rtjtd	|
nt
|d|	j|	jd
t}|dkr@tjtdnyt|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 %sRR(tapplyRnRwRMR
RRRqRRtcleanRRRtdescriptionRURDRhR[t	ExceptionRRRRR	RR(RRztmergeqtheadRtrevRRRtctxtrettphRRT((s,/usr/lib/python2.7/dist-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(RMtdirstatetparentsRRR!t	changelog(RRzRtp1tp2tx((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytqparentss		1cC@s|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(RRRMRwRRQR RR tlookupRqRRRRt	isappliedRR(RRzRRRtpnameRRRRtreasontinfoRR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt
mergepatchs:	


$
c
C@st}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(RRRRqRMRwRRRRRRRt	tracebackRn(RRzt	patchfileRtfuzzR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyR:s	
cC@sd}}}
z|j}|j}|jd}
yO|j|||||||d|d|	d|
}|
j|j|SWnMtk
r|
j|jn&z|
jWd|j	XnXWdt
|
|||j|XdS(Ntqpusht	all_filesttobackuptkeepchanges(RMtwlockRttransactiont_applyRRRtabortRtreleaseR(RRzRRR
RRRR,R-R.R/RttrR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRIs.




c"C@sv|s|j}nd}d}xK|D]C}
|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
tdn|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|jjx|D]}|jj|qWx|D]}|jj|qW|jj\}}|j|||jj n|r\d|kr\|d}|d}t!}t"j#|||||}||j$7}nt%j&||png} |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
sconflicting local changes foundthintsdid you forget to qrefresh?Rspatch %s is empty
s.hgsubstatet.ttipRRs(qpush exactly duplicates child changesetsrepository commit faileds0patch failed, rejects left in working directory
is)fuzz found when applying patch, stopping
iN(.RRMRRRwRqRRRRhRDR[RRRSRQRYRtchangedfilesRRRRR
RRRtbeginparentchangetremoveRRt
setparentstendparentchangeRnRtsubmergetkeysRt
matchfilesRRUR'R
RRR ("RRzRRR
RRRR,R-R.RRt	patchnameRR$R\RRSttouchedtpatcherrRR*tremovedtmergedRRRtwctxtpctxt	overwritetmergedsubstateRtoldtip((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyR1fs


	
	







	
!	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(Ntreversecs@s!|]}|j|jfVqdS(N(R"R!(RKR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pys	<genexpr>ss*revision %s refers to unknown patches: %s
sunknown patches: %s
Rc3@s|]}|VqdS(N((RKR(R(s,/usr/lib/python2.7/dist-packages/hgext/mq.pys	<genexpr>s(RRMtforgetRRRhRRRRRwRRRRRQtdictRRqRRR
RRRR!(RRtnumrevsRRRRt	qfinishedtunknownR7RR((Rs,/usr/lib/python2.7/dist-packages/hgext/mq.pyt_cleanups@


.

++
	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(RR!RR/R
RRR"RRqRRQ(RRztrevstfirstrevRR7RRtbaseRRtfmt((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt_revpatchess$

c	C@s|j|j|t|}|j|t|}|r|jjddtr||d}|jjddt	j
}|j|kr|jj|kr|j
d}t	j||||WdQXqndS(NRoRpiRs
new-committqfinish(t_phasecacheRURRPR+RqRtRnRRtdraftR{RR0tadvanceboundary(RRzRQRRNtoldqbasettphaseR4((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytfinishs*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(	NRs4qdelete requires at least one revision or patch nameRscannot delete applied patch %sspatch %s not in series fileisno patches appliedR(R?R
RRR!RwR"RRQRRtrevrangetsortRUR+RP(
RRzRRtrealpatchesRR%RMRQt
revpatches((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytdelete s,
	

cC@sd|jr`|jdj}|jdj}|jj|krVtjtdn||fSdS(s'check that working directory is at qtipis&working directory revision is not qtipN(NN(	RR!R"RRR
RRRM(RRzttopR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt
checktoppatch<s	
cC@szx"|d D]}d|krdSqW|dkrE|djdn1|dkre|djdn|djddS(Nis.hgsubstatesa?iRii(RQ(Rt
substatestateRR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytputsubstate2changesFscC@s9d}|r)d}tdtdnt|||S(NRs, qrefresh firsts#local changes found, qrefresh firsts,local changed subrepos found, qrefresh first(Rtchecklocalchanges(RRzRtrefresht	excsuffix((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRfRs

RRRR6s..cC@s||jkr+tjtd|nx9d
D]1}|j|r2tjtd|q2q2Wx6dD].}||krntjtd	|qnqnWdS(Ns*"%s" cannot be used as the name of a patchs.hgs.mqs!patch name cannot begin with "%s"RR$s
s
s(%r cannot be used in the name of a patch(s.hgs.mq(RR$s
s
(t	_reservedR
RRR-(RR"tprefixRL((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytcheckreservedname\s


cC@s|j||rtjj|j|rtjj|j|rftjtd|qtjtd|ndS(Ns""%s" already exists as a directoryspatch "%s" already exists(	RkRRRRhtisdirR
RR(RR"R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytcheckpatchnameis
"
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__%s(
treRR=RRkR
RRwRRm(RttitletfallbacknametnamebaseR"R7((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt
makepatchnamers($

	

cC@s(|r$|r$tjtdndS(Ns*cannot use both --force and --keep-changes(R
RR(RR.R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytcheckkeepchangessc!@s5|jd}|jd}|jdd}|jd}|jd}	|	rftj|	}	n|ji|jdd6}
|jdtr|j|nt|}|r|jd	}n|jd
s|jds|r*d}
tj	|d#||d
|
}|jd|}n|j|dt}t
|}x|d D]}|j|qVWtj||}t|d#jdkrtjtdn|j||j}|jWy|j|d}Wn5tk
r&}tjtd||jfnXyd|tjd|}|rfd}td}tjd|d|d|}|}n|p}t|d#|||	d|dtd|}|d#krtjtdny|g|j||+|jj t!|||j"t|_#t|_$||}t%|j&||j'}|rn|j(|n|	r|j)d|	n|j*t+|j,j-|j.j/}|j/krd}n|j0||j1t2||rm|j3||}|r%|j4||nt5j6|d|d|d |d!|
}x|D]}|j1|qSWn|j7|j8}|r|d#j9|gnWn|j:nXWnbt;k
r|j&|} yt<j=| Wn+t>k
r|j?j@td"| nXnX|jA|Wd#QXd#S($sWoptions:
           msg: a string or a no-argument function returning a string
        Rteditteditformsmq.qnewRUR'Rt	checknames.hgsubstatetincludetexcludecS@s,|dkr(tjd||fndS(Ns.hgsubstates%s: %s(R
R(RR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytbadfnsRyRRiiscannot manage merge changesetsRscannot write patch "%s": %ss[mq]: %sc@s|jr|SSdS(N(RO(tdesc(t
defaultmsg(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt
finishdescss+Leave message empty to use default message.R|textramsgteditorsrepo commit faileds%s %sRRRRRserror unlinking %s
N(BR?Rt	parsedateRRwRmt
checksubstateRRRRMRRfRtextendR?R+RR
RRRct
fullseriesendR/RRtstrerrorRtgetcommiteditorRRRRQR RRRRDRhR[RbRdReRRR!RRRgRRR ReRtdiffRRRtrollbackRRRRRqRR(!RRzRtpatsRRRtRuRUR'RtinclsubsRdRyRRtcommitfilesRR0RRR~R|R}t	commitmsgRtnctxRRVtchunkstchunkRt	patchpath((R{s,/usr/lib/python2.7/dist-packages/hgext/mq.pytnews$	


		
		
	





cC@sFx?t|jD].\}}|j|kr||j|jfSqWdS(sreturns (index, rev, patch)N(R/RR"R!RM(RRR7R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyR"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ntj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+RqRRRMRt	seriesendRw(RRtmatchesR(R(s,/usr/lib/python2.7/dist-packages/hgext/mq.pytpartialnames (
RiiRspatch %s not in series(RRRtisfileRhtintR`t
OverflowErrorR+trfindR)R
RR(
RRRRtsnotrestminusR7tofftplus((Rs,/usr/lib/python2.7/dist-packages/hgext/mq.pyR!sJ/c"C@s|j|
||j}|jg}x'|jjD]}
|j|
qBW|sktg}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krF|j	j
tddS|rm|
rm|j|d
|jn|rG|
rtjtdn|rtjtdn|jrtjtdn|j|}t|j||jj}|stjtd|n|||dksGtj||qGn|ra|sktjtdnxGt|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|
r8|j|dt%}|
r|j|j*|j+|j,|j-q8|j|j*|j+n|j||!}t)}yL|ru|j.||||}n'|j/|||d|d|d|
}Wnt0k
rn|j	j
tdt1j2|j	||d|jj3dt%x<|D]4}||jkrt4j5|j6|dt%qqW|j	j
tdnX|jse|dS|jd
j7} |dr|ddkrtd}!|j	j8|!| n|j	j8td| |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
Rgs.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 recordedR6s 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
snow at: %s
(9RsRR/t	branchmapt
itervaluesRRRRRqRRRRR!R"R+RRR)RR
RRfRDRhR[RVRR
R/RRR>tAssertionErrorR0RRwRRRcRtmodifiedRRCtdeletedR&RRRtrevertRRt
unlinkpathRR"R("RRzRRRRtalltmovetexacttnobackupR.RtheadsthsR%RR$R4trootttargett	fullstarttrpnR7R)t	fullpatchtendR-RRR,RRRbR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytpushBs
	#	 
	
& 



	

	"	

#	cC@s|j|||j|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|jj}
g|jD]}|j
^q-}x|
D]1}
|
|krI|jj	tdt}qIqIWnfg|djD]}
|
j
^q}
t}x.|j|	D]}|j
|
krt}PqqW|}t}|rk|j|d|p|}|r:|sh|j|j|jqhqk|rk|j|j|j|j|jqknt|_t
|j}|j|	j
}y|jj|}Wn9tjk
rt|}tjtd|nX||jd	j
gkrtjtd
n||jd	j
jsTtjtddtd
n|r|j||}||}|j|dd \}}}}|rtjtdnt||||@}|r|rtjtdn|j |||jj!x:|D]2}t"j#|j$|dt|jj%|qWxK||D]?}||}|j&||j'|j(|jj)|qWW|j*|t+|jj,nx;t-|j|	|!D]#}|jjtd|j.qW|j|	|5t/|j||gdtdtx;|dj0j1D]&\}}|dj2|j3|q;W|jr|jj4td|jd	j.n|jj4tdWdQXdS(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 a public revisionR5s see 'hg help phases' for detailsR6is!deletions found between repo revss#local changes found, qrefresh firstRspopping %s
R
Rsnow at: %s
spatch queue now empty
(5RsR/R"R!R
RRRRqRR+RRR!RwRMRnRRfR
RRRCRRRRtLookupErrorRtmutableR RRR9RRRRtwwritetdatatflagstnormalR;RR<treversedR"RtsubstateRRR?R(RRzRRR
RRR.R%R4RRtrrRt
needupdateRR-RRRRR!tqpRRRRtdRtfctxtstate((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytpops
		
)	%	
"


!
" 	'c
	C@s|j|\}}|s5|jjtddS|j||}|jdrfd|}}n
|d}}|j||}	|j||	||d|d|dS(Nsno patches applied
RJRR(	RcRqRRR R?RMRR	(
RRzRRRbRRRRR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRAs
c?@s
|js#|jjtddS|jddj}|jd}|jdd}|jd}|jd	}|rd
tj|}n|j}	z	|j	||jdj
|jdj}
}|jj
|
|
gkrtjtdn||
js:tjtd
dtdn|jj|
}|j||
}
t|t|
}|r|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)|q/q/WxD|D]<}||kr|j*||j)|q\|j)|q\Wg}xX||D]L}||kr|j*||j+|qn
|j,||j)|qWt-|}t-|}t-|}|j|
d|d \} }!}"}#t(| |!|"|#}$g|||fD]}|j.|$^qn}%t(|}&x|%D]}|&j/|qWt"j%||&}||
j0}'d}(zt1j2|d}(|j3s|j4rUi})xg|D]_}*|jj5|*}+|+dk	r^|+|jkr^|)j6|+gj+|*n|jj)|*qWx|D]}*|j7|*},|,j8||*}+|+r|)j6|+dgj9|)j|*g|*|kr|)|+dj+|*qn|*|)kry|)|*=qyqyWx|)j:D]0\}+}-x!|-D]}*|jj;|+|*q1WqWnTx|D]}*|jj)|*q\Wx0t-|jj<D]},|jj;d|,qWx|D]},|jj*|,qWg}xOt=t>|dddD]1}.|||.s|j+||.||.=qqWx|D]},|jj?|,q)Wx|D]},|jj@|,qJWx|D]},|jjA|,qkWjBp|d}/||
jC}0|jD||jjEt|_FtG|j||
gdtHdtH|(jIWdtJ|(Xyd|t1jKd|}1|rfd}2td}3t1jKd |2d!|3d|}1|p|d"jjL}4n@|sjLs}4qd"jjL}4n|}4jM|d}5}6z@|jN}5|jOd#}6tP||0|4|/jQd|d$td%|1}7g|%D]}t-|^q	}8|rO	|jR||8ntSjT||
d&|8d|}9tU}:|:r	|j|:nx|9D]};|j|;q	W|jI|jV}<x|'D]}=|7|<|=<q	W|<jW|6|6jI|jj+tX|7|WdtYjJ|6|5XWnW||d}>|jjZ|>j
|>j!|j[|jj\td'nXWd|	jJ|j]|XdS((Nsno patches applied
iRRRtRusmq.qrefreshRUR's%d %dis(cannot qrefresh a revision with childrenscannot qrefresh public revisionR5s see 'hg help phases' for detailss.hgsubstateRRt
atomictempiiRRRis
mq.refreshR
Rs[mq]: %sc@s!|jrj||SS(N(RORg(Rz(R{R(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyR|s
s+Leave message empty to use default message.R|R}s
RoRR~RsNqrefresh interrupted while patch was popped! (revert --all, qpush to recover)
(^RRqRRR?RORRR/RcR!R"RRR
RRRR RRRRDRhR[RRbRdReRRwRRtmanifestRRRMR?RtmatchallRRR:RQtdiscardRtintersectionR
t	bookmarksRt
dirstateguardRRtcopiedt
setdefaultRNtrenamedRt	iteritemsRtcopiesRjR+RtnormallookupRRUR{R;RRRRnRR3RRSRgRR0RR'ReRRRt
_bookmarkstrecordchangeR tlockmodtrebuildRRR(?RRzRRRRtRutnewusertnewdateR/RbRtcparentstpatchparentRRdRRtmmtaatddRtmantaaatmatchfnRRRRRRRKtcmtcatcrtcdt
allmatchestrefreshchangesRtbmlisttdsguardRtdsttsrcRtdstsR7RUtoldphaseR~R|R}RSRR4RRLRRTRtmarkstbmR((R{Rs,/usr/lib/python2.7/dist-packages/hgext/mq.pyRgNsP	
!"	$"





%+





#




	"
			



	




cC@s|r4tjj|jr4tjtdnytj|jWn2tk
r|}|jtj	kss|r}q}nX|r|j
dtSdS(Ns$patch queue directory already existstcreate(RRRlR
RRtmkdirRRtEEXISTRRw(RRzRR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytinit?s
cC@s|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(RR
RRRR)RjR+RRQR(RRzRR4t	unappliedR7RR$((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRJsic@sHfd}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(Nc@s.|rjj|nrtj|j}|jrS|jd}nd}jjrjjt|t|d}|dkrt	j
||}qd}njj|dd|jjdjj|dd|njj|dd|jjddS(	NiRitlabelsqseries.s: sqseries.message.s
(RqRRDRhR[RSt	formattedt	termwidthR+Rtellipsis(tpfxR@RRRtwidth(RR(s,/usr/lib/python2.7/dist-packages/hgext/mq.pytdisplayname[s"	'	itARitURtGtguardedRs%*d %s R6sD tmissing(RR(RR(RR(RRR"RMR+RRqRRRjRRtwalkRRhRRRR-RQR(RRzRR4tlengthRRRRRtidxwidthR7RtcharRRt	msng_listRtdirsRRRtflR((RRs,/usr/lib/python2.7/dist-packages/hgext/mq.pytqseriesYsB%
"
cC@s|jdkrtSdS(Ns.hg.patches.save.line(R"Rw(RRE((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt
issavelinescC@sP|jj}|s0tjj|jdrLtj|d|jd|SdS(Ns.hgRR(RRRRRlRhRt
repository(RRRq((s,/usr/lib/python2.7/dist-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|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
tn|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
R
Rs&saved queue repository parents: %s %s
supdating queue directory
s unable to load queue repository
(RRRRMR/R-ROR>RRQR RqRRRRRRwRRRRRRRRnRRRR(RRzRRatqupdateRzR1R7t	datastartRRtqppR8RERRR"RtppR
R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytrestoresb
"		
		 	%"cC@sy|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:
Rcs@s|]}d|VqdS(s%s
N((RKR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pys	<genexpr>scs@s|]}d|VqdS(s:%s
N((RKR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pys	<genexpr>sRsrepo commit failed
s.hg.patches.save.line(RRqRRRRORRRRRhRRxRwRQR RR(RRzRRR
R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytsaves.	+
  	cC@sM|jrI|jdj}|j|}|dkrAt|jS|dSdS(Niii(RR"RRMR+R(RRR((s,/usr/lib/python2.7/dist-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|SxLt|tjD]2}j|\}}|r]|Sj|q8WtjS(N(R+RRjRR(R4R7RR$(RR(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt	nextpatchsii(RR"RR)R`(RRRR
R((RRs,/usr/lib/python2.7/dist-packages/hgext/mq.pyRs		
cC@sI|j|j}|jjs%|}n t|jj|d|}|S(NR(RR"RqRRRR)(RR)R#R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytappliednames
	 c@sLfd}|rX|r3tjtdntj||}|jdtn|svtjtdnt|dkst|dkr|rtjtdng}	|r|jj	|jj
|j}
t|
dkrtjtd|jnj
r|jj
|j}|gj
D]}|j
^qJkrtjtd|jn|
j
d	j
gkrtjtd
|jn|jjj
dj
}|jj|d}
nI|
|jj
|jgkr7tjtd|jnd}
ji|d
6}|jd}x|D]	}||jstjtd|dtdn|jj|\}}|jj
|}|tkrtjtd|n|
r0|
|kr0tjtd||
fn|}
|soj||jjdddd|}n||j||jjd|j|d}tj||gd|d||jt||}j
jd|j j!||	j!|d}|rY|j"j#ddt$rYt%j&||t%j'|gnj(t_)t_*qlWWdQXnxt+|D]\}}|r|dkrtjtdnt,|}j-|t.j/|j0r3j1|}t2j3j4|s3tjtd|q3n|rj||j"j5td||ft.j6|j1|q|}n|dkr|rtjtdn*|st,t2j3j7|j8d }nj||yP|dkrj"j9j:}n+t;j<j"|}|j:}|jWn0t=t>fk
rutjtd!|nXj|d}|j5||j|s||n|j?krj@|}|gj||+nj(t_*j"jAtd"|j j!||	j!|d}qWjB||	S(#Nc@s/|jkr+tjtd|ndS(Ns&patch %s is already in the series file(RR
RR(R@(R(s,/usr/lib/python2.7/dist-packages/hgext/mq.pytcheckseriesss*option "-r" not valid when importing filesRJsno 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 childrenRtqimportsrevision %d is not mutableR5s see 'hg help phases' for detailsscannot import merge revision %ds#revision %d is not the parent of %ds
s%d.diffRRRRoRpRs%-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
(CR
RRRR]R^RwR+RRR!RtlastRRt
parentrevsRMRR0RRRrRR>RmRR0RRtexportRR RRQRqRtRnRtretractboundaryRpRRRR/tnormnameRkRturltislocalRhRRRRRtbasenameROtfinRRtopenpathRRRRRR(RRzRR@RtexistingRRRtimportedRRSRt
lastparentRR4RRRRtseR7tfilenamet
originpathttextRR)((Rs,/usr/lib/python2.7/dist-packages/hgext/mq.pyRs*$	%!





	
	$



	


N(RRRR6s..(CRRRMR#Rt
propertycacheRRRRRRRRhRRntcompileRRRRRRRRnRRRRR	RR R&RRwRR1RPRUR\RaRcReRfRiRkRmRrRsRR"R!RRRRgRRRRRRRRRRR(((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRs(										
							'	'	i)				
			
				i	
=k	
;	6				cC@sO|jdds1|jds1|jdr5|St|}t|d<|S(NRoR.RRtkeep_changes(RtR?RLRw(RqR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytfixkeepchangesoptss"
sqdelete|qremove|qrmtkRskeep patch fileRRs%stop managing a revision (DEPRECATED)tREVshg qdelete [-k] [PATCH]...cO@s*|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(RoRaR(RqRzRRtq((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRas	
tqappliedt1Rs%show only the preceding applied patchshg qapplied [-1] [-s] [PATCH]cK@s|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
iiRR4RRRN(RoRR
RRR)RRwR?RR(RqRzRRR)RR4((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRs$		
	t
qunappliedRsshow only the first patchshg qunapplied [-1] [-s] [PATCH]cK@s|j}|rS||jkr:tjtd|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
R4RRRRN(
RoRR
RRR)RRwR+R?RRMR(RqRzRRR)R4R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRs	$	RRRsimport file in patch directoryRR"sname of patch filetNAMERRsoverwrite existing filess)place existing revisions under mq controlRRsuse git extended diff formattPRsqpush after importings>hg qimport [-e] [-n NAME] [-f] [-g] [-P] [-r REV]... [FILE]...cO@s|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.
    R@R"RRRRNRii(RRoRR?RR(RqRzR RR)R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRs,
	%%cC@s|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
RiN(
RoRRRRRRtwvfsRRRMRR(RqRzRR)RR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytqinit7	s"	






s^qinitRLscreate-reposcreate queue repositorys
hg qinit [-c]cK@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.Rtcreate_repo(R0R?(RqRzR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRQ	stqclonetpulls"use pull protocol to copy metadataRtnoupdates)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@s&d}|dkr'tj|}ntj|||j|}|jdro|j|jd}n||}ytj|||Wn)tjk
rtjt	dnXd\}}|j
r|j
}	|	jjr|	|j
tjkr|	jj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|j
r"|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.
    cS@s0|j}|jdr(|d }n|dS(s+compute a patch repo url from a repo objectRis/.hg/patches(Rtendswith(RzR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyR}	s
Rs4versioned patch repository not found (see init --mq)iR!Rscloning main repository
R3RR
tstreamR5scloning patch repository
R4s6stripping applied patches from destination repository
Rs updating destination repository
N(NN("RMRtdefaultdesttpeert
expandpathR?R
t	RepoErrorRRtlocalRoRR{RRpR!RRRRt
differenceRQRRtcapableR!RtcloneRRnRR
R7(RqtsourcetdestRRtsrtpatchespathRtdestrevRzRtdr((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRAa	sV	%&0"sqcommit|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(RoRR
RRRxRq(RqRzRRR)R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRx	s
	RRRsprint patches not in seriesshg qseries [-ms]cK@s2|jj|d|jdd|jddS(s7print the entire series file

    Returns 0 on success.RRi(RoRR?(RqRzR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyR	stqtopshg qtop [-s]cK@s|j}|jr$|jt}nd}|re|j|d|dddddd|jdn|jtddSd	S(
s>print the name of the current patch

    Returns 0 on success.iR4iRRRRsno patches applied
N(RoRRRwRR?RR(RqRzRR)tt((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRb	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
iR4RRN(RoRR+RRRRR?(RqRzRR)R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytnext	s	tqprevs
hg qprev [-s]cK@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
iR4RRRRN(
RoR+RRRRR)R"RR?(RqRzRR)RER((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytprev	s	cC@sl|jdr2|jdr2|j|d<n|jdrh|jdrhdtj|d<ndS(NRUtcurrentuserR'tcurrentdates%d %d(R?tusernameRtmakedate(RqR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytsetupheaderopts
ss^qnewRts invoke editor on commit messagess'import uncommitted changes (DEPRECATED)ROs#add "From: <current user>" to patchtuRUsadd "From: <USER>" to patchtUSERtDRPs#add "Date: <current date>" to patchRsadd "Date: <DATE>" to patchtDATEs0hg qnew [-e] [-m TEXT] [-l FILE] PATCH [FILE]...cO@sVtj||}|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
logmessageRoRSRR(RqRzRR|RRR)((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyR
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]...c
O@sh|j}tj||}t|||j.|j||d||}|j|SWdQXdS(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(RoRRXRSR/RgR(RqRzRRR)RSR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRg5
s%	


s^qdiffshg qdiff [OPTION]... [FILE]...cO@s|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(RoR(RqRzRR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRb
stqfoldskeep folded patch filess/hg qfold [-e] [-k] [-m TEXT] [-l FILE] PATCH...cO@s|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|}|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
RRRtRusmq.qfoldN(RoR
RRRcRfRRXR!RR"RQRDRhR[RSRRRRR/RgRR?RaR(RqRzRRR)RSRVRtmessagesRRRR\tpatchsuccessR*RR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytfoldx
sT	



	 	

*tqgotoskeep-changess&tolerate non-conflicting local changessoverwrite any local changess	no-backups"do not save backup copies of filesshg qgoto [OPTION]... PATCHc	K@st||}|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.(R&RoR!R?R"RRR(RqRzRRR)RR.R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytgoto
s
	$$	
tqguardRERslist all patches and guardstnonesdrop all guardss8hg qguard [-l] [-n] [PATCH] [-- [+GUARD]... [-GUARD]...]c@sfd}|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.
    c@s9j|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
(RRRRRR/R-R+(RRRRR7R(RR)Rq(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyR
s"		$cs@s|]}|jVqdS(N(R"(RKR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pys	<genexpr>sRR`s.cannot mix -l/--list with options or argumentsNiis-+sno patches appliedisno patch to work withsno patch named %s(RoRRRMRR?R
RRRjR+RR"RRRRR)R!(RqRzR|RRRR7R((RR)Rqs,/usr/lib/python2.7/dist-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(	RoR!RRRRDRhR[RS(RqRzRR)R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyR2s		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(RRR>tlistdirRnR$RMRRtgroupRh(
Rt	directoryRStnamestnameretmaxindextmaxnameRRR)((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytlastsavename0s
cC@s=t|\}}|dkr'd}n|d|d}|S(Nis.%di(RjRM(RRR)tnewpath((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytsavenameAs
	s^qpushsapply on top of local changesRs-apply the target patch to its recorded parentslist patch name in commit textRRsapply all patchesRs%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@sF|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.
    RR"s%no saved queues found, please use -n
ismerging with queue at: %s
RRRRRRRRR.R%N(RoRMR&R?RhRjRRRRRR(	RqRzRRR)RRkR7R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRHs"	-$s^qpopspop all patchessqueue name to pop (DEPRECATED)s)forget any local changes to patched filess!hg qpop [-a] [-f] [PATCH | INDEX]cK@st||}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
RR
RRRR.R%(
R&RwR?RRRRhRRRnRoRR(RqRzRRtlocalupdateR)R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRus-		$
sqrename|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<nt|_tjj|}tjj	|stj|ntj|j|||j}|rx||jkrx|d}
|j[|j|d	krO|jj||jj |n |
j!|||
j"|gWdQXn|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
NRsrenaming %s to %s
Rs #iiR($RoRMR!RRRRhRRRlRRRmRRRRRRRwRR"R RtdirnametmakedirsRRRRR/RRRRKR(RqRzRR"RR)tabsdestR7RRR%tdestdirRRE((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRsN			'
1
	!	

tqrestoreRasdelete save entryR
supdate queue working directoryshg qrestore [-d] [-u] REVcK@sT|j|}|j}|j||d|jdd|jd|jdS(ssrestore the queue state saved by a revision (DEPRECATED)

    This command is deprecated, use :hg:`rebase` instead.RaRR
i(R!RoRR?R(RqRzRRR)((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRs	
tqsaveRscopy patch directoryscopy directory nametemptysclear queue status files
force copys5hg qsave [-m TEXT] [-l FILE] [-c] [-n NAME] [-e] [-f]cK@si|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||ftj||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
Rti(RoRRXRRR?RRRhRRRlR
RRRlRRt	copyfilesRRwR(RqRzRR)RSRRRk((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRs2	
	!
	
tqselectsdisable all guardsRslist all guards in series fileRs)pop to before first guarded applied patchtreapplyspop, then reapply patchess!hg qselect [OPTION]... [GUARD]...c@s%|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.c@sjj|jdS(Ni(RRR"(R7(R)(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt<lambda>2sR`sguards deactivated
RRwsAnumber 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((R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRxQssguards in series file:
s%2d  s
sno guards in series file
sactive guards:
sno active guards
ispopping guarded patches
Rsreapplying unguarded patches
N(RoRR?RRjR+RRRRRRRRRR^RRR"RnRwRR(RqRzR|RRRt
old_unappliedR7told_guardedRRtnoguardstgsRRtcountRwtpopped((R)s,/usr/lib/python2.7/dist-packages/hgext/mq.pytselectsx)	4

 4#

	

(RVRsfinish all applied changesetsshg qfinish [-a] [REV]...cO@s|jdr/|r/tjtdn|jdrKd	|}n|j}|jst|jtddStj||}|dj	|kr|djr|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 specifiedsqbase::qtipsno patches applied
iR6s6warning: uncommitted changes in the working directory
N(sqbase::qtip(R?R
RRRoRRRR]RRMRRRR\R(RqRzR]RR)RQ((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyR\ts
		&
tqqueueslist all available queuesRsprint name of active queueRscreate new queueRsrename active queuesdelete reference to queuetpurges"delete queue, and remove patch dirs[OPTION] [QUEUE]c@s%jdddfdfd}fd}fd}fdfd	}fd
}d}	fd}
|s|jd
s|jdrt}|jdr|jd|fdSx^|D]S}|jd|f||kr_|jr_|jtdq|jdqWdS|	|stjtdnj{||jdr|krtjtd|n|r|n||||n	|jdrx}||krRtjtd|n|krztjtd|n||}
||}tj	j
|rtjtd|njdd}xjD]b}||kr'|jd|ftj	j
|
r;tj
|
|q;q|jd|fqW|jtj
jdj|n|jdr|
|n|jdr|kr|
|n||}tj	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(RRRR-(R(R)(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt_getcurrents
c@s9y jd}|jWntk
r4tSXtS(NR(tvfsRRRwRn(R(t
_allqueuesRz(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt	_noqueuess
c@s}ygjd}g|D]}|jr%|j^q%}|j||kro|j|nWntk
rg}nXt|S(NR(RRRRQRR(tcurrentRRtqueues(Rt
_defaultqueueRRz(s,/usr/lib/python2.7/dist-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(R"(t_setactivenocheckR)(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt
_setactives	c@s<jd}|dkr.|j|n|jdS(NRR(RRR(R"R(t_activequeueRz(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRsc@s4jd}|jd|f|jdS(NRs%s
(RRR(R"R(RRz(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt	_addqueuesc@s.|dkrjdSjd|SdS(NRspatches-(Rh(R"(Rz(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt	_queuedirs
cS@s%x|D]}|dkrtSqWtS(Ns:\/.(RnRw(R"R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt
_validnames
c@s|kr$tjtdn}||krQtjtdnjdd}x4D],}||krqjn|jd|fqjW|jtjjdjdS(Ns'cannot delete queue that does not exists$cannot delete currently active queuespatches.queues.newRs%s
(	R
RRRRRRRRh(R"RRR(RRRRz(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt_delete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.newRRaRs"use --create to create a new queue(RoR?RtquietRR
RR/RRRRRRRRhtshutiltrmtree(RqRzR"RRRRRRRRRRtolddirtnewdirRtqdir((RRRRRRR)Rzs,/usr/lib/python2.7/dist-packages/hgext/mq.pyRs			%	
		


	



"


cC@sn|jjrj|jjddtr0tj}n	tj}||jjdj}||j	|jn|S(sEcallback used to set mq changeset as secret when no phase data existsRoRpi(
RoRRqRtRnRRpRXR!R(RztrootstmqphaseR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytmqphasedefaultsN
s	c@sKd|jffdY|jrG|_|jjtndS(Ntmqrepoc	@sweZejdZfdZedZddddeeifdZ	fdZ
fdZRS(cS@st|j|j|jS(N(RRqRR(R((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRo[
sc@s?t|jtj|dr;t|jdndS(NRo(tsupert
invalidateallR
thasunfilteredcacheRRs(R(R(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyR_
scS@s|jjr|jjr|r|jj}g|jjD]}|j^q;}|d|ksp|d|krtj|qndS(Nii(RoRRRRR!R
R(RterrmsgRRRR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytabortifwdirpatchede
s
" Rc@s>|jtd|t|j|||||||S(Ns&cannot commit over an applied mq patch(RRRRx(RR"RUR'RRR~textra(R(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRxl
s
	c@s|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(RoRRRR!RQRRRR{RRpR
RRRt	checkpush(RtpushopRt
outappliedRR!(R(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRu
s""	
c@st|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
RRtqparentis+tag %s overrides mq patch of the same name
(Rt	_findtagsRoRR!R"RsRRR
RRqRRRthasnodeRQR(RtresultR)Rtmqtagstincludedtmqtttags(R(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyR
s2		(")+

N(RRR
tunfilteredpropertycacheRoRRnRRMRxRR((R(s,/usr/lib/python2.7/dist-packages/hgext/mq.pyRZ
s(t	__class__R>t_phasedefaultsRQR(RqRz((Rs,/usr/lib/python2.7/dist-packages/hgext/mq.pyt	reposetupY
sT	cO@sZtj|drG|jdtrG|jtd|jdn|||||S(NRt	no_commits#cannot import over an applied patchR(RtsafehasattrR?RnRR(torigRqRzR|R}((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytmqimport
s
cO@s|jdd}|s(||||S|rb|d}tj|stjtdqn3tjt	j
}|stjtdntj||}t||t
S(NRois0only a local queue repository may be initializeds5there is no Mercurial repository here (.hg not found)(RRMRRR
RRRtfindrepoRtgetcwdRR0Rw(RRqR|R}RotrepopathRz((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytmqinit
s
cO@st|jdd}|s+|||||S|j}|j}|s^tjtdn||j|||S(s>Add --mq option to operate on patch repository instead of mainRosno queue repositoryN(RRMRoRR
RRRq(RRqRzR|R}RoR)R((s,/usr/lib/python2.7/dist-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.unappliedsmq:     %s
s, smq:     (empty queue)
(
RoR+RRRQRRRRhR(RqRzR)RRRT((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytsummaryhook
s	%&&#smq()cC@sztj|ddtdtg|jjD]}||jj^q,}tjg|D]}||kr[|^q[S(sChangesets managed by MQ.
    ismq takes no arguments(	RtgetargsRRRoRR!Rtbaseset(RztsubsetRRR((s,/usr/lib/python2.7/dist-packages/hgext/mq.pytrevsetmq
s2c@sdddtdfgtjtjdttjj	dt
tjtjdt}|djfd}|tjxBtjD]4\}}|j
t
kr|t|diqqWdS(	NRRosoperate on patch repositorytimportRic@sx{|jD]m\}}tj|d}|d}tj||drTq
ntj||t}|djq
WdS(NiR7i(	RRtparsealiasesR	t_cmdattrRtwrapcommandRR(tcmdtabletcmdRtfunc(tmqoptRq(s,/usr/lib/python2.7/dist-packages/hgext/mq.pytdotables
R(RMRRRRttableRRtsummaryhooksRRRRt__file__tgetattr(RqRRtextnamet	extmodule((RRqs,/usr/lib/python2.7/dist-packages/hgext/mq.pytextsetup
s	
tredsqguard.negativetyellowsqguard.positivetgreensqguard.unguardedsblue bold underlinesqseries.applieds
black boldsqseries.guardedsred boldsqseries.missingsqseries.unapplied(nt__doc__t
__future__RRRRnRtmercurial.i18nRtmercurial.nodeRRRRRt	mercurialRRR	R
RRR
RRRRRRRRRRR3RMt
seriesoptsRtcommandt
testedwithRtstripexttKeyErrortobjectRtloadRRRftnormpathRR R*R<R;RCRDRRRRR&RaRRRR0Rt
remoteoptsRwRARRxRRbRLRNRStwalkoptst
commitoptsRRgRt	diffopts2RR\R^RR2RjRlRRRRRRR\RnRRRRRRRtrevsetpredicateRt
i18nfunctionsRt
colortable(((s,/usr/lib/python2.7/dist-packages/hgext/mq.pyt<module>?s(d	
						
	(	%					1				L	!!!	
"
?	H								6	!h(		Z