\x89\x50\x4E\x47\x0D\x0A\x1A\x0A PNG  \x89\x50\x4E\x47\x0D\x0A\x1A\x0A  13\c@@sddlmZddlmZmZddlmZddlmZddl m Z m Z ddl m Z dZd Zd Zd Zd Ziid d6dd6e6id d6dd6e6idd6dd6d6idd6dd6e6ZdefdYZdefdYZdefdYZdefdYZdefdYZdefdYZdd Zdd!Zd"Zd#Zi d$d%6d&d'6d$d(6d&d)6d&d*6d+d,6d-d.6d&d/6d&d06d&d16Zd2e j fd3YZ!d4efd5YZ"d6e#fd7YZ$d8Z%ej&d9efd:YZ'ej&d;efd<YZ(ej&d=efd>YZ)d?S(@i(tabsolute_importi(tbinthex(t_(tattr(terrortutil(t interfaceutilsssh-v1sexp-ssh-v2-0003sexp-http-v2-0003s exp-narrow-1sexp-ellipses-1tssht transporttversionthttpshttp-v1it bytesresponsecB@seZdZdZRS(s1A wire protocol response consisting of raw bytes.cC@s ||_dS(N(tdata(tselfR ((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pyt__init__9s(t__name__t __module__t__doc__R(((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pyR 7stooberrorcB@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((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pyRBs(RRRR(((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pyR<stpushrescB@seZdZdZRS(swireproto reply: success with simple integer return The call was successful and returned an integer contained in `self.res`. cC@s||_||_dS(N(trestoutput(RRR((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pyRJs (RRRR(((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pyREstpusherrcB@seZdZdZRS(shwireproto reply: failure The call failed. The `self.res` attribute contains the error message. cC@s||_||_dS(N(RR(RRR((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pyRSs (RRRR(((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pyRNst streamrescB@seZdZdedZRS(sEwireproto reply: binary stream The call was successful and the result is a stream. Accepts a generator containing chunks of data to be sent to the client. ``prefer_uncompressed`` indicates that the data is expected to be uncompressable and that the stream should therefore use the ``none`` engine. cC@s||_||_dS(N(tgentprefer_uncompressed(RRR((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pyRbs N(RRRtNonetFalseR(((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pyRWs tstreamreslegacycB@seZdZddZRS(s:wireproto reply: uncompressed binary stream The call was successful and the result is a stream. Accepts a generator containing chunks of data to be sent to the client. Like ``streamres``, but sends an uncompressed data for "version 1" clients using the application/mercurial-0.1 media type. cC@s ||_dS(N(R(RR((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pyRpsN(RRRRR(((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pyRfs t cC@s0|r,g|j|D]}t|^qSgS(N(tsplitR(tltseptv((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pyt decodelistts&cC@s5y|jtt|SWntk r0nXdS(N(tjointmapRt TypeError(R!R"((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pyt encodelistys cC@s4|jddjddjddjddS( Nt:s:ct,s:ot;s:st=s:e(treplace(tplain((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pytescapebatchargs    cC@s4|jddjddjddjddS( Ns:eR,s:sR+s:oR*s:cR)(R-(tescaped((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pytunescapebatchargs    tnodestheadstbooleant bookmarkstcommont obsmarkerstphasestscsvt bundlecapstcsvtlistkeystcgt cbattemptedtstreamtbaseprotocolhandlercB@s\eZdZejdZdZdZdZdZ dZ dZ dZ RS( sFAbstract base class for wire protocol handlers. A wire protocol handler serves as an interface between protocol command handlers and the wire protocol transport layer. Protocol handlers provide methods to read command arguments, redirect stdio for the duration of the request, handle response types, etc. slThe name of the protocol implementation. Used for uniquely identifying the transport type. cC@sdS(sreturn the value for arguments in For version 1 transports, returns a list of values in the same order they appear in ``args``. For version 2 transports, returns a dict mapping argument name to value. N((targs((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pytgetargsscC@sdS(sReturns the list of protocol-level capabilities of client Returns a list of capabilities as declared by the client for the current request (or connection for stateful protocol handlers).N((((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pyt getprotocapsscC@sdS(sProvide a generator for the raw payload. The caller is responsible for ensuring that the full payload is processed. N((((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pyt getpayloadscC@sdS(sContext manager to possibly redirect stdio. The context manager yields a file-object like object that receives stdout and stderr output when the context manager is active. Or it yields ``None`` if no I/O redirection occurs. The intent of this context manager is to capture stdio output so it may be sent in the response. Some transports support streaming stdio to the client in real time. For these transports, stdio output won't be captured. N((((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pytmayberedirectstdioscC@sdS(s:Returns a string representation of this client (as bytes).N((((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pytclientscC@sdS(sAdds advertised capabilities specific to this protocol. Receives the list of capabilities collected so far. Returns a list of capabilities. The passed in argument can be returned. N((trepotcaps((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pytaddcapabilitiesscC@sdS(sValidate that the client has permissions to perform a request. The argument is the permission required to proceed. If the client doesn't have that permission, the exception should raise or abort in a protocol specific manner. N((tperm((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pyt checkperms( RRRRt AttributetnameRBRCRDRERFRIRK(((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pyR@s      t commandentrycB@sAeZdZddddddZdZdZdZRS(s,Represents a declared wire protocol command.ttpushcC@sC||_||_|pt|_||_||_||_dS(N(tfuncRAtsett transportst permissiont cachekeyfntextracapabilitiesfn(RRQRARSRTRURV((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pyRs     cC@s(t|d|dt|jd|jS(s<Merge this instance with an incoming 2-tuple. This is called when a caller using the old 2-tuple API attempts to replace an instance. The incoming values are merged with data not captured by the 2-tuple and a new instance containing the union of the two objects is returned. RARSRT(RNRRRSRT(RRQRA((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pyt_mergescc@s|jV|jVdS(N(RQRA(R((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pyt__iter__scC@s6|dkr|jS|dkr&|jStddS(Niis can only access elements 0 and 1(RQRAt IndexError(Rti((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pyt __getitem__s   N(RRRRRRWRXR[(((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pyRNs  t commanddictcB@s eZdZdZdZRS(sContainer for registered wire protocol commands. It behaves like a dict. But __setitem__ is overwritten to allow silent coercion of values from 2-tuples for API compatibility. cC@st|trnt|trt|dkrBtdn||kro||j|d|d}qt|dd|ddttdd}n td tt |j ||S( Nis+command tuples must have exactly 2 elementsiiRARSRTRPs:command entries must be commandentry instances or 2-tuples( t isinstanceRNttupletlent ValueErrorRWRRt TRANSPORTStsuperR\t __setitem__(RtkR#((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pyRcs !   cC@sH|jtkst|j|}|s.tS|j|jkrDtStS(s?Determine if a command is available for the requested protocol.(RMRatAssertionErrortgetRRStTrue(Rtcommandtprototentry((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pytcommandavailable-s(RRRRcRk(((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pyR\s c@s|tjtjfksttjj|}|tjkrZ|jddd}n|jddd}s|tjkrdnd}g|D]'}t|j|d kr|^qSt d |Dt fd D}|r.t j t d |d j t|fng|D]}|jkr5|^q5}t|dfd}|st j t d|dt dd jn|S(s?Obtain the list of supported compression engines for a request.tservertcompressionenginessserver.compressionenginest experimentaltclientcompressionenginess%experimental.clientcompressionenginestserverprioritytclientpriorityics@s|]}|jVqdS(N(RM(t.0te((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pys Zsc3@s!|]}|kr|VqdS(N((RrRs(t validnames(s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pys [ss,invalid compression engine defined in %s: %ss, tkeyc@sj|jS(N(tindexRM(Rs(t configengines(s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pytbss?%s config option does not specify any known compression enginesthintsusable compression engines: %s(Rt CLIENTROLEt SERVERROLERet compenginestsupportedwireenginest configlisttgetattrtwireprotosupportRRRtAbortRR%tsortedRM(tuitroleR|tconfigRRst invalidnames((RwRts>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pytsupportedcompengines;s4    %"+  tencodedresponsecB@seZdZejZRS(s7Represents response data that is already content encoded. Wire protocol version 2 only. Commands typically emit Python objects that are encoded and sent over the wire. If commands emit an object of this type, the encoding step is bypassed and the content from this object is used instead. (RRRRtibR (((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pyRls talternatelocationresponsecB@seZdZejZejZejddZejddZ ejddZ ejddZ ejddZ RS(sRepresents a response available at an alternate location. Instances are sent in place of actual response objects when the server is sending a "content redirect" response. Only compatible with wire protocol version 2. tdefaultN( RRRRRturlt mediatypeRtsizet fullhashest fullhashseedtserverdercertstservercadercerts(((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pyRxs  tindefinitebytestringresponsecB@seZdZejZRS(sRepresents an object to be encoded to an indefinite length bytestring. Instances are initialized from an iterable of chunks, with each chunk being a bytes instance. (RRRRRtchunks(((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pyRsN(*t __future__RtnodeRRti18nRt thirdpartyRRORRtutilsRtSSHV1tSSHV2tHTTP_WIREPROTO_V2t NARROWCAPt ELLIPSESCAPRatobjectR RRRRRR$R(R/R1tGETBUNDLE_ARGUMENTSt InterfaceR@RNtdictR\RtsRRR(((s>/usr/lib64/python2.7/site-packages/mercurial/wireprototypes.pytsl           D#- 1