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/mercurial/wireproto.pyc

x7_c@@sddlmZddlZddlZddlZddlZddlZddlmZddl	m
Z
mZddlm
Z
mZmZmZmZmZmZmZmZejZejZedZdefd	YZd
ejfdYZdejfd
YZ ej!Z!ej"Z"ddZ#ddZ$dZ%dZ&dZ'idd6dd6dd6dd6dd6dd6dd6Z(dej)fd YZ*d!efd"YZ+d#efd$YZ,d%efd&YZ-d'efd(YZ.d)Z/d*Z0d+Z1d,Z2iZ3iZ4d-d.Z5d/e4d0<e5d0d1d2Z6d/e4d3<e5d3d4d5Z7d/e4d6<e5d6d7Z8d/e4d8<e5d8dd9Z9e5d:d-d;Z:d<d=d6d>d?d@dAd0gZ;dBZ<d/e4dC<e5dCdDZ=d/e4dE<e5dEdFdGZd/e4d=<e5d=dHdIZ>d/e4dJ<e5dJdKdLZ?d/e4d@<e5d@dMdNZ@d/e4d<e5ddOZAd/e4dP<e5dPdQZBd/e4d<e5ddRdSZCd/e4d<<e5d<dTdUZDd/e4d?<e5d?dVdWZEdXe4d><e5d>dYdZZd/e4d[<e5d[d\ZFdXe4d]<e5d]dd^ZGdS(_i(tabsolute_importNi(t_(tbinthex(	tbundle2tchangegrouptencodingterrortexchangetpeertpushkeytstreamclonetutilslincompatible Mercurial client; bundle2 required
(see https://www.mercurial-scm.org/wiki/IncompatibleClient)
tabstractserverprotocB@s;eZdZdZdZdZdZdZRS(s^abstract class that summarizes the protocol API

    Used as reference and documentation.
    cC@s
tdS(sareturn the value for arguments in <args>

        returns a list of values (same order as <args>)N(tNotImplementedError(tselftargs((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pytgetargs/scC@s
tdS(swrite the whole content of a file into a file like object

        The file is in the form::

            (<chunk-size>
<chunk>)+0


        chunk size is the ascii version of the int.
        N(R(Rtfp((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pytgetfile5s	cC@s
tdS(sTmay setup interception for stdout and stderr

        See also the `restore` method.N(R(R((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pytredirect@scC@s
tdS(smGenerator of chunks to send to the client.

        Some protocols may have compressed the contents.
        N(R(Rtfh((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pytgroupchunksQscC@s
tdS(sGenerator of possible compressed chunks to send to the client.

        This is like ``groupchunks()`` except it accepts a generator as
        its argument.
        N(R(Rtchunks((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pytcompresschunksXs(t__name__t
__module__t__doc__RRRRR(((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyR
)s				tremotebatchcB@s)eZdZdZdZdZRS(s<batches the queued calls; uses as few roundtrips as possiblecC@stjj|||_dS(sNremote must support _submitbatch(encbatch) and
        _submitone(op, encargs)N(R	tbatchert__init__tremote(RR((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRbscC@sgg}}x|jD]\}}}}t|j|}t|dd}|dk	r||j||}	t|	\}
}|r|j||
f|j|	||fq|j|
q|r|j||gg}}n|j|||qW|r|j||ndS(Nt	batchable(	tcallstgetattrRtNonetim_selftnexttappendtsett
_submitreq(RtreqtrsptnameRtoptstresreftmtdtbatchablefnR tencargsorrest	encresref((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pytsubmitgs"
c	C@se|jj|}xLt||D];\}}|\}}}|j||jt|q"WdS(N(Rt_submitbatchtzipR'R%(	RR)R*t
encresultstencrestrR R1R-((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyR({s

(RRRRR2R((((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyR`s		tremoteiterbatchercB@s,eZdZdZdZdZRS(cC@s tt|j||_dS(N(tsuperR8Rt_remote(RR((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRscC@s>t|j|ts(td|ntt|j|S(Ns/Attempted to iterbatch non-batchable call to %r(R"R:tFalsetAttributeErrorR9R8t__getattr__(RR+((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyR=scC@sgg}}x|jD]\}}}}t|j|}|j|j||}t|\}	}
|
sqt|j||	f|j||
fqW|r|jj||_	n||_
dS(sBreak the batch request into many patch calls and pipeline them.

        This is mostly valuable over http where request sizes can be
        limited, but can be used in other places as well.
        N(R!R"R:R R$R%tAssertionErrorR&R3t_resultitert_rsp(RR)R*R+RR,R-R.R R0R1((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyR2s
cc@sKxDtj|j|jD]*\\}}}|j|t|VqWdS(N(t	itertoolstizipR@R?R'R%(RR R1R6((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pytresultss	"
(RRRR=R2RC(((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyR8s			t cC@s |rtt|j|SgS(N(tmapRtsplit(tltsep((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyt
decodelistscC@s5y|jtt|SWntk
r0nXdS(N(tjoinRERt	TypeError(RGRH((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyt
encodelists
cC@s4|jddjddjddjddS(	Nt:s:ct,s:ot;s:st=s:e(treplace(tplain((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyt	escapeargs
cC@s4|jddjddjddjddS(	Ns:eRPs:sROs:oRNs:cRM(RQ(tescaped((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pytunescapeargs
cC@s|g}xf|D]^\}}td|Ds5tdjd|jD}|jd||fq
Wdj|S(s;Return a ``cmds`` argument value for the ``batch`` command.cs@s!|]}t||kVqdS(N(RS(t.0tk((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pys	<genexpr>sRNcs@s1|]'\}}dt|t|fVqdS(s%s=%sN(RS(RVRWtv((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pys	<genexpr>ss%s %sRO(tallR>RJt	iteritemsR&(R)tcmdstoptargsdictR((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pytencodebatchcmdsstnodestheadstcommontbooleant
obsmarkerstscsvt
bundlecapstcsvtlistkeystcgtcbattemptedtwirepeercB@seZdZdZdZdZdZedZedZ	edZ
edZd	Zd
Z
edZedZd
ZdZdZdZdZddddZdZdZdZdZdZdZRS(sClient-side interface for communicating with a peer repository.

    Methods commonly call wire protocol commands of the same name.

    See also httppeer.py and sshpeer.py for protocol-specific
    implementations of this interface.
    cC@s*|jdrt|Stj|SdS(Ntbatch(tcapableRR	t
localbatch(R((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRks
cc@s|jddt|}|jd}|g}x|rx2d|krp|rp|jd}|j|q?Wdj|}x3d|kr|jdd\}}t|VqW|jd}||g}q6Wtdj|VdS(sqrun batch request <req> on the server

        Returns an iterator of the raw responses from the server.
        RkR[iROtiN(t_callstreamR^treadR&RJRFRU(RR)R*tchunktworktmergedtone((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyR3s		cC@s|j||S(N(t_call(RR\R((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyt
_submitonescC@s
t|S(N(R8(R((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyt	iterbatchscc@s|jdtdt}itj|d6|fV|j}|d jdd\}}t|ryt|Vn|j	t
j|dS(Ntlookupslook up remote revisiontkeyiRDi(t
requirecapRtfutureRt	fromlocaltvalueRFtintRt_abortRt	RepoError(RRytftdtsuccesstdata((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRxs		cc@sgt}i|fV|j}yt|d VWn0tk
rb|jtjtd|nXdS(Nisunexpected response:(R{R}RIt
ValueErrorRRt
ResponseErrorR(RRR((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyR`s		
cc@st}it|d6|fV|j}y(g|D]}tt|^q4VWn0tk
r|jtjt	d|nXdS(NR_sunexpected response:(
R{RLR}tboolR~RRRRR(RR_RRtb((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pytknown's		(
cc@st}i|fV|j}yli}xZ|jD]L}|jdd\}}tjtj|}t|}|||<q3W|VWn0t	k
r|j
tjt
d|nXdS(NRDisunexpected response:(R{R}t
splitlinesRFRttolocalturlreqtunquoteRIRKRRRR(RRRt	branchmapt
branchpartt
branchnametbranchheads((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyR1s			
cC@st|}|jdd|}y3g|jD]}tt|^q1}|SWn0tk
r|jtjt	d|nXdS(NtbranchesR_sunexpected response:(
RLRuRttupleRIRRRRR(RR_tnRRtbr((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRAs+
cC@sd}g}xtdt||D]}djg||||!D]}t|d^qC}|jdd|}y!|jd|jDWq%tk
r|jt	j
td|q%Xq%W|S(	NiiRDt-tbetweentpairscs@s'|]}|rt|pgVqdS(N(RI(RVRG((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pys	<genexpr>Qssunexpected response:(txrangetlenRJRLRutextendRRRRRR(RRRkR7titpRR((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRJs6!
'c	c@s*|jdstdfVnt}|jjd||fitj|d6tj|d6tj|d6tj|d6|fV|j}|j	dd\}}yt
t|}Wn)tk
rt
jtd	|nXx0|jtD]}|jjtd
|qW|VdS(NR
spreparing pushkey for "%s:%s"
t	namespaceRytoldtnews
is"push failed (unexpected response):sremote: (RlR;R#R{tuitdebugRR|R}RFRR~RRRRRtTruetstatus(	RRRyRRRRtoutputRG((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyR
Vs$		
cc@s|jdsidfVnt}|jjd|itj|d6|fV|j}|jjd|t|ft	j
|VdS(NR
spreparing listkeys for "%s"
Rs$received listkey for "%s": %i bytes
(RlR#R{RRRR|R}Rt
pushkeymodt
decodekeys(RRRR((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRgks		cC@s
|jdS(Nt
stream_out(Ro(R((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRwscC@s1t|}|jdd|}tj|dS(NRtrootstUN(RLt_callcompressabletchangegroupmodtcg1unpacker(RR_tkindRR((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRzscC@sY|jdtdt|}t|}|jdd|d|}tj|dS(Ntchangegroupsubsetslook up remote changestbasesR`R(RzRRLRRR(RRR`RR((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRsc	K@s|jdtdi}|jd}|dk	rJt||d<nd}x|jD]\}}|dkr{q]ntj|}|dkrts"tdnw|dkrt	|}n\|dkrdj
|}n>|d	krd
t|}n|dkr"td|n|||<q]W|j
d|}td
|Drktj|j|Stj|dSdS(Nt	getbundleslook up remote changesRet
unexpectedR_RfRdRNRbs%iRRs unknown getbundle option type %scs@s|]}|jdVqdS(tHG2N(t
startswith(RVtcap((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pys	<genexpr>sR((RfRd(RzRtgetR#tsortedRZt	gboptsmapR;R>RLRJRtKeyErrorRtanyRtgetunbundlerRRR(	RtsourcetkwargsR,ReRyR}tkeytypeR((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRs4
cC@sW|dgkrQ|jdrQtdtjdjt|jg}nt|}tj|dr&|j	d|d|\}}|dkrt
jtd|nyt
|}Wn)tk
rt
jtd	|nXx`|jtD]}|jjtd
|qWn-|jd|d|}tj|j|}|S(sSend cg (a readable file-like object representing the
        changegroup to push, typically a chunkbuffer object) to the
        remote server as a bundle.

        When pushing a bundle10 stream, return an integer indicating the
        result of the push (see localrepository.addchangegroup()).

        When pushing a bundle20 stream, return a bundle20 stream.

        `url` is the url the client thinks it's pushing to, which is
        visible to hooks.
        tforcetunbundlehashthashedRntdeltaheadertunbundleR`spush failed:s"push failed (unexpected response):sremote: (RlRLthashlibtsha1RJRtdigestRtsafehasattrt	_callpushRRRR~RRRRRt_calltwowaystreamRR(RRhR`turltretRRGtstream((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRs&-
 cC@sTi}|dk	r||d<n|dk	r8||d<n|jdd|d||S(Ntthreetfourt
debugwireargsRtttwo(R#Ru(RRtRRRtfiveR,((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRs

cK@s
tdS(sexecute <cmd> on the server

        The command is expected to return a simple string.

        returns the server reply as a string.N(R(RtcmdR((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRuscK@s
tdS(sexecute <cmd> on the server

        The command is expected to return a stream. Note that if the
        command doesn't return a stream, _callstream behaves
        differently for ssh and http peers.

        returns the server reply as a file like object.
        N(R(RRR((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRos	cK@s
tdS(sEexecute <cmd> on the server

        The command is expected to return a stream.

        The stream may have been compressed in some implementations. This
        function takes care of the decompression. This is the only difference
        with _callstream.

        returns the server reply as a file like object.
        N(R(RRR((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRscK@s
tdS(sexecute a <cmd> on server

        The command is expected to be related to a push. Push has a special
        return method.

        returns the server reply as a (ret, output) tuple. ret is either
        empty (error) or a stringified int.
        N(R(RRRR((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRs	cK@s
tdS(sqexecute <cmd> on server

        The command will send a stream to the server and get a stream in reply.
        N(R(RRRR((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRscC@s
tdS(sKclearly abort the wire protocol connection and raise the exception
        N(R(Rt	exception((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRsN(RRRRkR3RvRwR RxR`RRRRR
RgRRRRRR#RRuRoRRRR(((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRjs2				

								(				
		t	streamrescB@seZdZdZRS(swireproto reply: binary stream

    The call was successful and the result is a stream.
    Iterate on the `self.gen` attribute to retrieve chunks.
    cC@s
||_dS(N(tgen(RR((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRs(RRRR(((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRstpushrescB@seZdZdZRS(swireproto reply: success with simple integer return

    The call was successful and returned an integer contained in `self.res`.
    cC@s
||_dS(N(tres(RR((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRs(RRRR(((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRstpusherrcB@seZdZdZRS(shwireproto reply: failure

    The call failed. The `self.res` attribute contains the error message.
    cC@s
||_dS(N(R(RR((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyR&s(RRRR(((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyR!stooberrorcB@seZdZdZRS(swireproto reply: failure of a batch of operation

    Something failed during a batch call. The error message is stored in
    `self.message`.
    cC@s
||_dS(N(tmessage(RR((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyR/s(RRRR(((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyR)scC@s
|jdS(sObtain the repo used for processing wire protocol commands.

    The intent of this function is to serve as a monkeypatch point for
    extensions that need commands to operate on different repo views under
    specialized circumstances.
    tserved(tfiltered(trepotprototcommand((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pytgetdispatchrepo2scC@sAt|||}t|\}}|j|}||||S(N(RtcommandsR(RRRtfunctspecR((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pytdispatch;scC@ski}x2|D]*}||kr
||||<||=q
q
W|rgtjjd|dj|fn|S(Ns,warning: %s ignored unexpected arguments %s
RN(tsyststderrtwriteRJ(RtkeystothersR,RW((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pytoptionsAs
cC@s|j}d|jk}|rJ|jdd|d}|dk	rJ|Sn|jdd|d}|dk	rs|S|r|jddd}|dk	r|Sn|jddtS(sWhether a bundle1 operation is allowed from the server.

    Priority is:

    1. server.bundle1gd.<action> (if generaldelta active)
    2. server.bundle1.<action>
    3. server.bundle1gd (if generaldelta active)
    4. server.bundle1
    tgeneraldeltatserversbundle1gd.%ss
bundle1.%st	bundle1gdtbundle1N(Rtrequirementst
configboolR#R(RtactionRtgdRX((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pytbundle1allowedLs
	Rnc@sfd}|S(s#decorator for wire protocol commandc@s|ft<|S(N(R(R(RR+(s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pytregisterss((R+RR((RR+s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pytwireprotocommandqstpullRkscmds *cC@s|jd}g}x|jdD]}|jdd\}}i}xK|jdD]:}	|	rY|	jd\}
}t||t|
<qYqYWt|\}}
tj|dr|jtj|dn|
r|
j}i}xo|D]g}|d	krMi}x1|j	D]#}||kr||||<qqW||d	<q||||<qW|||g|D]}||^qo}n|||}t
|tr|S|jt
|q%Wdj|S(
NRRORDiRNRPt	checkpermtpusht*(RRFRURRRRtpermissionsRRt
isinstanceRR&RSRJ(RRR[RRtpairR\RtvalstaRRXRRRRRWtstarRytresult((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRkzs:

,RRcC@sog|jdD]}t|d^q}g}x.|j|D]}|jt|dqAWdj|S(NRDRs
Rn(RFRIRR&RLRJ(RRRRR7R((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRs
+RcC@sw|j}g}xU|jD]G\}}tjtj|}t|}|jd||fqWdj|S(Ns%s %ss
(	RRZRtquoteRR|RLR&RJ(RRRR`tbranchR_Rtbranchnodes((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRsRcC@sPt|}g}x.|j|D]}|jt|dq"Wdj|S(Ns
Rn(RIRR&RLRJ(RRR_R7R((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRs
tclonebundlescC@s|jjdS(sZServer command for returning info for available bundles to seed clones.

    Clients will parse this response and determine what bundle to fetch.

    Extensions may wrap this command to filter or dynamically emit data
    depending on the request. e.g. you could advertise URLs for the closest
    data center given the client's IP address.
    sclonebundles.manifest(topenerttryread(RR((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRs
RxRR
RRRcC@sRtt}tj|jr|jjddtrF|jdn|j|j	@}|t
dsv|jdq|jddjt|n|jjdd	t
rtjtj|}|jd
tj|n|jddjtj|jd|jjdd
d|jjddtrN|jdn|S(s)return a list of capabilities for a repo

    This function exists to allow extensions to easily wrap capabilities
    computation

    - returns a lists: easy to alter
    - change done here will be propagated to both `capabilities` and `hello`
      command without any other action needed.
    Rtpreferuncompressedsstream-preferredtrevlogv1Rs
streamreqs=%sRNtexperimentalsbundle2-advertisesbundle2=sunbundle=%ss
httpheader=%dtmaxhttpheaderlenithttppostargs(R(tlistt
wireprotocapsRtallowservergenerationRRR;R&RtsupportedformatsR'RJRRRt
encodecapstgetrepocapsRRtbundlepriorityt	configint(RRtcapstrequiredformatstcapsblob((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyt
_capabilitiess"#tcapabilitiescC@sdjt||S(NRD(RJR(RR((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRsRRcC@s4t|}tj||d}t|j|S(Ntserve(RIRRRR(RRRR_Rh((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRssbases headscC@sCt|}t|}tj|||d}t|j|S(NR(RIRRRR(RRRR`Rh((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRsRs	one two *cC@s+tdddg|}|j|||S(NRRR(RR(RRRtRRR,((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRsRcC@satdtj|}x|jD]\}}t|}|dkrZt|||<q%|dkrt|jd||<q%|dkrt|jd||<q%|dkr|dkrt||<qt	|||<q%|dkr%t
d	|q%q%Wt|d
s9tj
|jds9ttSntj|d|}t|j|S(
NRR_RfRNRdRbt0RRs unknown getbundle option type %sRReR(RRRRZRIRRFR'R;RRRRtbundle2requestedRRtbundle2requiredtgetbundlechunksRR(RRRR,RWRXRR((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRs*


cC@s|j}t|dS(Ns
(R`RL(RRth((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyR`-sthellocC@sdt||S(sthe hello command returns a set of lines describing various
    interesting things about the server, in an RFC822-like format.
    Currently the only one defined is "capabilities", which
    consists of a line in the form:

    capabilities: space separated list of tokens
    scapabilities: %s
(R(RR((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyR3s	RcC@s1|jtj|j}tjt|S(N(RgRRtitemsRt
encodekeysR(RRRR((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRg?sRycC@sey/tj|}||}|j}d}Wn%tk
rV}t|}d}nXd||fS(Niis%s %s
(RRRt	Exceptiontstr(RRRyRWtcR7Rtinst((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRxEs


snodes *cC@s&djd|jt|DS(NRncs@s!|]}|rdpdVqdS(t1RN((RVR((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pys	<genexpr>Ts(RJRRI(RRR_R((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRRsRsnamespace key old newcC@sDt|dkr^|jd|kr^y |jdtj|}Wqmtk
rZqmXntj|}tj|dr|jy=|j	tj|tj|tj||pt
}Wntjk
rt
}nX|j
}dt||fS|j	tj|tj|tj||}dt|S(Nis
string-escapesutf-8trestores%s
%ss%s
(RtencodetdecodeRRtUnicodeDecodeErrorRRRR
R;RtAbortR'R~(RRRRyRRR7R((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyR
Ws&'



RcC@s^tj|jsdSd}y#tj|}t||SWntjk
rYdSXdS(sIf the server supports streaming clone, it advertises the "stream"
    capability with a value representing the version and flags of the repo
    it is serving. Client checks to see if it understands the format.
    s1
cs@sdVx|D]}|VqWdS(Ns0
((titRq((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyt	getstreams
s2
N(RRRtgeneratev1wireprotoRRt	LockError(RRR-R,((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRxs	RcC@st|}y|jtj||dtjdd\}}tj|d}d}z|j||j	dtj
|j|d}t
|tjrt|drttStj|||d|j}tj|drt|jSt|SWd|jtj|XWnRtjtjtjfk
r{}	t |	d	t!syWqtjk
rt"j#j$d
|	tdStjk
rt%t&|	SXnt'j(|j}
x't |	ddD]}|
j)|qWyYyWnKtj*k
rL}	t |	dd}|dk	rPd
|j+dd krPn|
j,d}
|
j-d|	j.|	j/dk	r|
j-d|	j/dt!n|	j0dk	r|
j-d|	j0dt!n|	j1dk	r|
j-d|	j1dt!n|	j2dk	r|
j-d|	j2dt!n|	j3dk	rM|
j-d|	j3dt!qMnXWntjk
r}	|
j,d}|	j4dk	r|j-d|	j4n|	j5rk|j-ddj6|	j5qkntjk
r6}	dt&|	fg}g}|	j7dk	r|j8d|	j7fn|
j)t'j9d||n5tjk
rj}	|
j,ddt&|	fgnXt|
jSXdS(!Nspreparing changestprefixshg-unbundle-swb+iRRtaddparttduringunbundle2s
abort: %s
t_bundle2salvagedoutputt
_replycapsR
Rs
error:pushkeysin-reply-toRt	mandatoryRyRRRserror:unsupportedcontenttparttypetparamssRthintserror:abortserror:pushraced(((:RIRRtcheck_headsttempfiletmkstemptostfdopenRtseekt
readbundleRR#RRRRRRRt_clientRRRt	getchunksRtclosetunlinkRtBundleValueErrorR+t	PushRacedR"R;RRRRR#Rtbundle20R1t
PushkeyFailedRtnewparttaddparamtpartidRRyRRRR6R7RJR8R&t
bundlepart(RRR`ttheir_headstfdttempnameRR7Rtexctbundlertoutt
remotecapstpartterrparttmanargstadvargs((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyRs




!
$	"#(Ht
__future__RRRAR<RR:ti18nRtnodeRRRnRRRRRRR	R
RRRturlerrRRtobjectR
RRtiterbatcherR8R R{RIRLRSRUR^RtpeerrepositoryRjRRRRRRRRRRRRkRRRRR
RRRRRR`RRgRxRRR(((s7/usr/lib/python2.7/dist-packages/mercurial/wireproto.pyt<module>s@			7"%					

&							
+



	"