\x89\x50\x4E\x47\x0D\x0A\x1A\x0A PNG  \x89\x50\x4E\x47\x0D\x0A\x1A\x0A  13\c@@sMddlmZddlZddlZddlZddlZddlmZddlm Z m Z m Z m Z mZmZmZmZddlmZejZejZejZejZddZdefd YZd ejfd YZd Zejed Zde j fdYZ dZ!dZ"de j#fdYZ$de j fdYZ%de$fdYZ&erde j fdYZ'd e j(ej)fdYZ)ndej*fdYZ*dej+fdYZ+dej,fd YZ-gZ.dddd!de/d"Z0dd#Z1d$Z2dS(%i(tabsolute_importNi(t_(tencodingterrorthttpconnectiont keepalivetpycompattsslutilt urllibcompattutil(t stringutilcC@sU|jdd}|jdd}|jdd}|rQ|jdd}n|S( s1Replace special characters "&", "<" and ">" to HTML-safe sequences. If the optional flag quote is true, the quotation mark character (") is also translated. This is the same as cgi.escape in Python, but always operates on bytes, whereas cgi.escape in Python 3 only works on unicodes. t&s&ts>t"s"(treplace(tstquote((s3/usr/lib64/python2.7/site-packages/mercurial/url.pytescape%s t passwordmgrcB@s5eZdZdZdZdZdZRS(cC@s||_||_dS(N(tuitpasswddb(tselfRR((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyt__init__5s cC@s|jj||||S(N(Rt add_password(Rtrealmturitusertpasswd((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR9sc C@s|jj||}|\}}|rG|rG|j||||fS| sU| rtj|j||}|r|\}}|jd|jd}}|jjd|qn| s| rtj t j |} d| _ |jjs!tjtdtjt| n|jjtdtjt| |jjtdt j ||r|jjtd|n|jjtdd d}|s|jj}qn|jj|||||j||||fS( Ntusernametpasswords#using auth.%s.* for authentication s"http authorization required for %ss#http authorization required for %s s realm: %s s user: %s suser:tdefault(Rtfind_user_passwordt _writedebugthttpconnectionmodtreadauthforuriRtgettdebugR turlRtbytesurltNonetqueryt interactiveRtAbortRt hidepasswordtbytestwritetprompttgetpassR( RRtauthuritauthinfoRRtrestgrouptauthtu((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR <s8     #cC@s@td}|jj|||r1dt|p4dfdS(Ns http auth: user %s, password %s t*snot set(RRR%tlen(RRRtmsg((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR!_s cC@s|jjd|S(N(RR R((RR1((s3/usr/lib64/python2.7/site-packages/mercurial/url.pytfind_stored_passwordcs(t__name__t __module__RRR R!R:(((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR4s    # t proxyhandlercB@seZdZdZRS(cC@s|jddp!tjjd}|r|jdpE|jdsYd|d}ntj|}|js|jdd|_|jdd|_nd d g}|j g|j dd D]}|j ^q|j gtjjd d j dD]$}|j r|j j ^q|jddrJg|_n ||_t|}i|d6|d6}|jdtj|ni}tjj||||_dS(Nt http_proxythostshttp:shttps:shttp://t/RRt localhosts 127.0.0.1tnotno_proxytt,talwaysthttpthttpssproxying through %s (tconfigRtenvironR$t startswithR R&RRtextendt configlisttlowertsplittstript configbooltno_listR-R%R,turlreqR=RR(RRtproxyurltproxyRRtptproxies((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyRgs2   ) "%   cC@stj|jdd}xm|jD]b}||kr<dS|jdrb|j|drbdS|jdr&|j|dr&dSq&Wtjj ||||S(Nt:is*.it.i( RtgethostRORRR(RKtendswithRSR=t proxy_open(RtreqRUttype_R?te((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR\s ""(R;R<RR\(((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR=fs %c@sfd}|S(Nc@sZt|tjrI|jdx4tj|D]}||q/Wn ||dS(Ni(t isinstanceR"t httpsendfiletseekR t filechunkiter(Rtdatatchunk(torgsend(s3/usr/lib64/python2.7/site-packages/mercurial/url.pyt _sendfiles  ((RfRg((Rfs3/usr/lib64/python2.7/site-packages/mercurial/url.pyt _gen_sendfiles t httpshandlerRcB@s#eZeejjZdZRS(cC@sKt|dd}|r;|jr.|jnd|_|Stjj|S(Ntproxyres(tgetattrR(t will_closetcloseRjRtHTTPConnectiont getresponse(RRj((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyRos   (R;R<RhRRntsendRo(((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyRscC@st|dd}|r>|d d kr5d|}nt}ntj|}t}|sn|tj|krtj|}|s|j dkrdj |j |j pdg|_ |jj|_|jj|jjdSnd|_ d|_dS( Nt _tunnel_hostishttp://shttps:/shttps://RHRXt443(shttp://shttps:/(RkR(tTrueRt getselectortFalset getfullurlR R&tschemetjoinR?tportt realhostporttheaderstcopytupdatetparentt addheaders(thandlerthR]t tunnel_hostt new_tunnelR6((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyt_generic_start_transactions   $ c @setg|jD].}|jjdr ||j|f^q }|jd|jx%|jD]}|jd|qeW|jd|j|jd|j d|j xNt rj \}}}|t jkrPnttfddqW|_|j_jd krFttjjdt S|d kr^d _nB|jd ryd _n'|dkrd_nt j|jdkrd_d_d_t jt_tSt jj_dj_jj d}|rC|jdkrCd_d_!n d_j"_jj d}|rj ryt#|_Wnt$k rd_qXjdkrd_qn d_|t j%ks|t j&ksd|ko d knsj dkr)d_nj rXj rXjdkrXd_n|_'tS(Nsproxy-sCONNECT %s HTTP/1.0 s%s: %s s tstricttmethodc@sjjjS(N(tfptreadlineRP((R3(s3/usr/lib64/python2.7/site-packages/mercurial/url.pytsRDisHTTP/1.0i sHTTP/1.i sHTTP/0.9i iistransfer-encodingtchunkedscontent-lengthidtHEAD((tdictR{RNRKRpRzt iteritemstresponse_classtsockRt_methodRst _read_statusthttplibtCONTINUEtlisttitertstatusRPtreasonRRtversiontUnknownProtocolR(tlengthRRlt HTTPMessagetstringioR9Rut getheadert chunk_leftt _check_closetintt ValueErrort NO_CONTENTt NOT_MODIFIEDRj( Rtxt proxyheaderstheaderRRRttrencR((R3s3/usr/lib64/python2.7/site-packages/mercurial/url.pyt_generic_proxytunnelsx1                          t httphandlercB@seZdZdZRS(cC@s|jt|S(N(tdo_openR(RR]((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyt http_open(scC@s&t|||tjj|||S(N(RRt HTTPHandlert_start_transaction(RRR]((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR+s(R;R<RR(((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR's tlogginghttpconnectioncB@s,eZdZejdkr*dZnRS(cO@s#tjj|||||_dS(N(RRnRt_create_connection(Rt createconntargstkwargs((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR0siicC@sD|j|j|jf|j|j|_|jr@|jndS(N(RR?Ryttimeouttsource_addressRRqt_tunnel(R((s3/usr/lib64/python2.7/site-packages/mercurial/url.pytconnect7s  (iii(R;R<Rtsyst version_infoR(((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR/s tlogginghttphandlercB@s,eZdZddZdZdZRS(s"HTTP handler that logs socket I/O.cC@s8tt|jd|||_||_||_dS(NR(tsuperRRt_logfht_lognamet _observeropts(Rtlogfhtnamet observeroptsR((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR@s  cC@s|j|j|S(N(Rt_makeconnection(RR]((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyRJsc@sfd}t|||S(Nc@s1tj||}tjj|jjS(N(tsockettcreate_connectionR tmakeloggingsocketRRR(RRR(R(s3/usr/lib64/python2.7/site-packages/mercurial/url.pytcreateconnectionNs(R(RRRR((Rs3/usr/lib64/python2.7/site-packages/mercurial/url.pyRMsN(R;R<t__doc__R(RRR(((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR>s thttpsconnectioncB@sVeZejZejZeej Z ej ej Z ddddZdZRS(cO@s2tjj|||||||_||_dS(N(RRnRtkey_filet cert_file(RR?RyRRRR((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR]s cC@stj|j|jf|_|j}|jrVt||jjddd}ntj |j|j |j d|j d||_tj |jdS(NRXiiRtserverhostname(RRR?RyRRzRtrsplitRt wrapsocketRRRtvalidatesocket(RR?((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyRcs    N(R;R<Rt HTTPResponseRRt HTTPS_PORTt default_portRhtsafesendRptwrapgetresponseRnRoR(RR(((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyRVs   cB@s2eZddZdZdZddZRS(cC@sNtjj|d|tjj|||_t|j|jj|_dS(NR( RtKeepAliveHandlerRRSRiRRthttppasswordmgrdbtpwmgr(RRR((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyRps   cC@s&t|||tjj|||S(N(RRRR(RRR]((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyRwscC@stj|}|jj|\}}tj|j||}|rq|\}}||_|jjd|n d|_|j |j |S(Ns#using auth.%s.* for authentication ( RRvRR:R"R#RR5R%R(RR(RR]R&RRR3R4R5((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyt https_open{s   cO@sd}d}t|dkr+|d}nt|dkrJ|d}n|d}|jrd|jkrd|jkr|jd}|jd}nt||||||}|j|_|S(Niiitkeytcert(R(R8R5RR(RR?RyRRtkeyfiletcertfiletconn((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyRs   '   N(R;R<R(RRRR(((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyRios   thttpdigestauthhandlercB@s#eZdZdZdZRS(cO@s#tjj|||d|_dS(N(RSRRR(t retried_req(RRR((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyRscC@sdS(N((R((s3/usr/lib64/python2.7/site-packages/mercurial/url.pytreset_retry_countscC@s@||jk r$||_d|_ntjj|||||S(Ni(RtretriedRSRthttp_error_auth_reqed(Rt auth_headerR?R]R{((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyRs    (R;R<RRR(((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyRs  thttpbasicauthhandlercB@s>eZdZdZdZdZdZdZRS(cO@s,d|_tjj|||d|_dS(N(R(R5RSRRR(RRR((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyRs cC@s&|jr"|j|j|jn|S(N(R5tadd_unredirected_headerR(Rtrequest((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyt http_requests cC@s&|jr"|j|j|jn|S(N(R5RR(RR((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyt https_requests cC@sdS(N((R((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyRscC@s@||jk r$||_d|_ntjj|||||S(Ni(RRRSRR(RRR?R]R{((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyRs    cC@s|jj|tj|\}}|dk rdtj|tj|f}dtjtj |j }|j |j d|krdS||_ |j|j ||jj|SdSdS(Ns%s:%ssBasic %s(RR RRvR(RR'tstrurltbase64t b64encodeRPt get_headerRR5RR~topen(RR?R]RRtpwtrawR5((s3/usr/lib64/python2.7/site-packages/mercurial/url.pytretry_http_basic_auths  "" (R;R<RRRRRR(((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyRs      t cookiehandlercB@s#eZdZdZdZRS(cC@sd|_|jdd}|s%dStj|}y2tjjtj|}|j ||_Wn?tjj k r}|j t d|t j|fnXdS(NR5t cookiefiles?(error loading cookie file %s: %s; continuing without cookies) (R(t cookiejarRIR t expandpatht cookielibtMozillaCookieJarRtfsdecodetloadt LoadErrortwarnRR t forcebytestr(RRRRR_((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyRs    cC@s |jr|jj|n|S(N(Rtadd_cookie_header(RR((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyRs cC@s |jr|jj|n|S(N(RR(RR((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyRs (R;R<RRR(((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyRs  RcC@s)|jtdd}g}|rI|jt|||p9id|n8|jtd|tr|jt|d|n|jt|t||j } |d k r8|\} } } } | j | d\}}| |ks| r| j | | | | n|j d| | r*dt| p-dfn|jt| t| f|jgtD]}||| ^qd|jt|tj|}d|_d|_d|_|sdtj}dtj|fg|_ndtj|fg|_|r%|jjd n|S( s@ construct an opener suitable for urllib2 authinfo will be added to the password manager The opener can be configured to log socket events if the various ``logging*`` arguments are specified. ``loggingfh`` denotes a file object to log events to. ``loggingname`` denotes the name of the to print when logging. ``loggingopts`` is a dict of keyword arguments to pass to the constructed ``util.socketobserver`` instance. ``sendaccept`` allows controlling whether the ``Accept`` request header is sent. The header is sent by default. RGRis http auth: user %s, password %s R7snot sets"mercurial/proto-1.0 (Mercurial %s)s User-agenttAcceptsapplication/mercurial-0.1N(Rsapplication/mercurial-0.1(t configwithtfloattappendRRt has_httpsRiR=RRR(R:RR%R8RLRRt handlerfuncsRRSt buildopenert requestscounttsentbytescounttreceivedbytescountR RRtsysstrR(RR2t useragentt loggingfht loggingnamet loggingoptst sendacceptRthandlerstpassmgrRturisRRt savedusert savedpassRtopenertagent((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyRs@  ')   cC@stj|}|jr?|jj|_|j\}}n=tjtjj|}dt j t j |}d}t||jt j||S(Nsfile://(R R&RwRNR2tnormpathtostpathtabspathRR'RSt pathname2urlR(RRR(Rturl_RdR6R2R((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyRRs c@s5|jd|jffdY}||_dS(sWrap a response object with common error handlers. This ensures that any I/O from any consumer raises the appropriate error and messaging. t readerproxyc@seZdfdZRS(c@sy|SWntjk r}|jrat|j}|j|}td||f}n td}tj|dtdn;tjk r}tjtd|dtdnXdS(NsBHTTP request error (incomplete response; expected %d bytes got %d)s(HTTP request error (incomplete response)thintsvthis may be an intermittent network failure; if the error persists, consider contacting the network or server operatorsHTTP request error (%s)( RtIncompleteReadtexpectedR8tpartialRRtPeerTransportErrort HTTPException(RtsizeR_tgotttotalR9(torigread(s3/usr/lib64/python2.7/site-packages/mercurial/url.pytreadfs     N(R;R<R(R#((R"(s3/usr/lib64/python2.7/site-packages/mercurial/url.pyResN(R#t __class__(trespR((R"s3/usr/lib64/python2.7/site-packages/mercurial/url.pyt wrapresponse]s (3t __future__RRRRRti18nRRDRRRR"RRRRR tutilsR RRturlerrRSR(RtobjectRR=Rht safehasattrRRnRRRRRRRRRiRRt basehandlerRRRsRRR&(((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyt sB    :      22   ]"/. R