³ò ø$•Jc @s›ddklZlZddklZddkZddkZddkZddkZddk Z de fd„ƒYZ dei fd„ƒYZ e ZdS(iÿÿÿÿ(tbinthex(t_Nt remotelockcBs#eZd„Zd„Zd„ZRS(cCs ||_dS(N(trepo(tselfR((s$/sys/lib/python/mercurial/sshrepo.pyt__init__scCs|iiƒd|_dS(N(RtunlocktNone(R((s$/sys/lib/python/mercurial/sshrepo.pytreleases cCs|io|iƒndS(N(RR (R((s$/sys/lib/python/mercurial/sshrepo.pyt__del__s (t__name__t __module__RR R (((s$/sys/lib/python/mercurial/sshrepo.pyR s  t sshrepositorycBsÚeZdd„Zd„Zd„Zd„Zd„Zd„ZeZd„Z d„Z d „Z e d „Z d „Zd „Zd „Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(ic Cs†||_||_tid|ƒ}|p$|ititdƒ|ƒƒn|idƒ|_ |idƒ|_ |idƒ|_ |idƒpd|_ |ii dd d ƒ}|ii dd d ƒ}ti||i |i |i ƒ}|ovd }|||||i f}|itd ƒ|ƒti|ƒ} | djo |ititdƒƒƒqln|i||||ƒdS(Ns,^ssh://(([^@]+)@)?([^:/]+)(:(\d+))?(/(.*))?$scouldn't parse location %siiiit.tuitssht remotecmdthgs%s %s "%s init %s"s running %s iscould not create remote repo(t_urlRtretmatchtabortterrort RepoErrorRtgrouptuserthosttporttpathtconfigtutiltsshargstnotetsystemt validate_repo( RRRtcreatetmtsshcmdRtargstcmdtres((s$/sys/lib/python/mercurial/sshrepo.pyRs(  $! $cCs|iS(N(R(R((s$/sys/lib/python/mercurial/sshrepo.pyturl5sc CsÀ|iƒd}|||||if}ti|ƒ}|itdƒ|ƒti|ƒ\|_|_|_ |i dƒ|i dddddddfƒ}d d g}d }x¤|d o||ou|i ƒ} |i ƒ|d d jo| djoPn| o|i tdƒ| ƒn|i| ƒ|d8}q¹W|ititdƒƒƒtƒ|_xPt|ƒD]B} | idƒo,|ii| d idƒdiƒƒPqvqvWdS(Ns%s %s "%s -R %s serve --stdio"s running %s thellotbetweentpairss%s-%st0i(ttdummyiôiÿÿÿÿs1 s sremote: is#no suitable response from remote hgs capabilities:t:(tcleanupRRt quotecommandR!Rtpopen3tpipeotpipeitpipeetdo_cmdtreadlinetreaderrtdebugtappendRRRtsett capabilitiestreversedt startswithtupdatetsplit( RRR&R'RR(trtlinest max_noisetl((s$/sys/lib/python/mercurial/sshrepo.pyR#8s4 ! '      'cCsex^ti|iƒi}|djoPn|iiƒ}|pPn|iitdƒ|ƒqdS(Nisremote: (RtfstatR7tst_sizeR9RtstatusR(RtsizeRF((s$/sys/lib/python/mercurial/sshrepo.pyR:Zs  cCs|iƒ|‚dS(N(R2(Rt exception((s$/sys/lib/python/mercurial/sshrepo.pyRbs cCsfyX|iiƒ|iiƒx*|iD]}|iitdƒ|ƒq'W|iiƒWnnXdS(Nsremote: (R5tcloseR6R7RRIR(RRF((s$/sys/lib/python/mercurial/sshrepo.pyR2fs   cKs|iitdƒ|ƒ|iid|ƒxJ|iƒD]<\}}|iid|t|ƒfƒ|ii|ƒq;W|iiƒ|iS(Nssending %s command s%s s%s %d ( RR;RR5twritet iteritemstlentflushR6(RR(R'tktv((s$/sys/lib/python/mercurial/sshrepo.pyR8ss   cKs|i|||iƒS(N(R8t_recv(RR(R'((s$/sys/lib/python/mercurial/sshrepo.pytcall}scCsb|iiƒ}|iƒyt|ƒ}Wn&|ititdƒ|ƒƒnX|ii|ƒS(Nsunexpected response:( R6R9R:tintRRt ResponseErrorRtread(RRF((s$/sys/lib/python/mercurial/sshrepo.pyRSs #cCs[|iidt|ƒƒ|o|ii|ƒn|o|iiƒn|iƒdS(Ns%d (R5RMRORPR:(RtdataRP((s$/sys/lib/python/mercurial/sshrepo.pyt_sendŠs cCs|idƒt|ƒS(Ntlock(RTR(R((s$/sys/lib/python/mercurial/sshrepo.pyRZ’s cCs|idƒdS(NR(RT(R((s$/sys/lib/python/mercurial/sshrepo.pyR–scCs||idtdƒƒ|idd|ƒ}|d iddƒ\}}t|ƒot|ƒSn|iti|ƒƒdS(Ntlookupslook up remote revisiontkeyiÿÿÿÿt i( t requirecapRRTRBRURRRR(RR\tdtsuccessRX((s$/sys/lib/python/mercurial/sshrepo.pyR[™s  cCsZ|idƒ}ytt|d idƒƒSWn&|ititdƒ|ƒƒnXdS(NtheadsiÿÿÿÿR]sunexpected response:(RTtmapRRBRRRVR(RR_((s$/sys/lib/python/mercurial/sshrepo.pyRa¢s c Cs±|idƒ}y|h}xk|iƒD]]}|idƒ}ti|dƒ}g}|dD]}|t|ƒq\~}|||s $ í