³ò ø$•Jc@sðddklZddkZddkZddkZddkZddkZddkZddkZddk Z ddk Z ddk Z he d<e d<e d<e d<e d<e d<e d <e d RGR(RRVRWtdefaultRZRXtuvalue((s/sys/lib/python/mercurial/ui.pyRyscCst|i||d|ƒ}|djo|Sn|iƒtjo&titdƒ|||fƒ‚nt|iƒS(Ns%s.%s not a boolean ('%s')(RR>tlowert _booleansR:R;R(RRVRWR`RZtv((s/sys/lib/python/mercurial/ui.pyRQ‚s cCsf|i||d|ƒ}|djo|pg}nt|tƒo|iddƒiƒ}n|S(s.Return a list of comma/space separated stringsRZt,t N(RR>t isinstancet basestringtreplacetsplit(RRVRWR`RZtresult((s/sys/lib/python/mercurial/ui.pyRR‹s  cCs||i|ƒjS(s&tell whether section exists in config.(R[(RRVRZ((s/sys/lib/python/mercurial/ui.pyt has_section”scCsŸ|i|ƒi|ƒ}|ioy| oq|iogxd|ii|ƒD]L\}}|ii||ƒ|jo$|itdƒ|||fƒqGqGWn|S(Ns3ignoring untrusted configuration option %s.%s = %s ( R[RMRRRRR_RGR(RRVRZRMtkRd((s/sys/lib/python/mercurial/ui.pyt configitems˜s ccsm|i|ƒ}xW|iƒD]I}x@|i||ƒD],\}}||t|ƒiddƒfVq5WqWdS(Ns s\n(R[R3RnR<Ri(RRZRCRVRWRX((s/sys/lib/python/mercurial/ui.pyt walkconfig¡s   cCsItiidƒ}|d jo|iddƒ}n|d jotiidƒ}n|d jo2|iddƒo|itdƒdd ƒ}n|d joQy7dti ƒt i ƒf}|i td ƒ|ƒWqõt j oqõXn|ptitd ƒƒ‚nd |jo#titd ƒt|ƒƒ‚n|S(sAReturn default username to be used in commits. Searched in this order: $HGUSER, [ui] section of hgrcs, $EMAIL and stop searching if one of these is set. If not found and ui.askusername is True, ask the user, else use ($LOGNAME or $USER or $LNAME or $USERNAME) + "@full.hostname". tHGUSERR R'tEMAILt askusernamesenter a commit username:R`s%s@%ss&No username found, using '%s' instead sPlease specify a username.s susername %s contains a newline N(R?tenvironR_R>RRQtpromptRRtgetusertsockettgetfqdnR+tKeyErrortAborttrepr(RR0((s/sys/lib/python/mercurial/ui.pyR'§s$      #cCs!|ipti|ƒ}n|S(s>Return a short representation of a user name or email address.(RRt shortuser(RR0((s/sys/lib/python/mercurial/ui.pyR{ÂscCsf|id|ƒ}|oId|jo<|id|||id|ƒfƒ|iddƒ}n|S(NRFs%%s((deprecated '%%' in path %s=%s from %s) t%(RR+R^Ri(RtlocRU((s/sys/lib/python/mercurial/ui.pyt_pathÇs  cCsyd|jp"tiitii|dƒƒo|Sn|i|ƒ}| o |dj o|i|ƒ}n|p|S(s:Return repository location relative to cwd or from [paths]s://s.hgN(R?R@tisdirRPR~R>(RR}R`R@((s/sys/lib/python/mercurial/ui.pyt expandpathÏs /cCs|iigƒdS(N(R tappend(R((s/sys/lib/python/mercurial/ui.pyt pushbufferÙscCsdi|iiƒƒS(Nt(RPR tpop(R((s/sys/lib/python/mercurial/ui.pyt popbufferÜscGsn|io9|idig}|D]}|t|ƒq"~ƒn(x$|D]}tiit|ƒƒqJWdS(Niÿÿÿÿ(R textendR<tsyststdouttwrite(Rtargst_[1]ta((s/sys/lib/python/mercurial/ui.pyR‰ßs  9cGsygtiiptiiƒnx$|D]}tiit|ƒƒq(WtiiptiiƒnWn/tj o#}|iti jo‚q™nXdS(N( R‡RˆtclosedtflushtstderrR‰R<R8terrnotEPIPE(RRŠRŒRE((s/sys/lib/python/mercurial/ui.pyt write_erræs"cCs:ytiiƒWnnXytiiƒWnnXdS(N(R‡RˆRŽR(R((s/sys/lib/python/mercurial/ui.pyRŽòscCs7|idddƒ}|djotiiƒSn|S(NR t interactive(RQR>R‡tstdintisatty(Rti((s/sys/lib/python/mercurial/ui.pyR“øs RƒcCs‡tiiƒo1yddk}|iWqAtj oqAXnt|ƒ}tidjo&|o|ddjo|d }n|S(Niÿÿÿÿs s ( R‡R”R•treadlinetread_history_filet Exceptiont raw_inputR?tlinesep(RRtR—tline((s/sys/lib/python/mercurial/ui.pyt _readlineþs    (tycCs„|iƒp|i|d|dƒ|Sny*|i|dƒ}|p|Sn|SWn(tj otitdƒƒ‚nXdS(shPrompt user with msg, read response. If ui is not interactive, the default is returned. Rfs sresponse expectedN(R“R‰RtEOFErrorRRyR(RtmsgR`tr((s/sys/lib/python/mercurial/ui.pyRts icCsžg}|D]$}|||idƒdiƒq ~}x_toW|i|||ƒ}|iƒ|jo|i|iƒƒSn|itdƒƒq;WdS(sVPrompt user with msg, read response, and ensure it matches one of the provided choices. The index of the choice is returned. choices is a sequence of acceptable responses with the format: ('&None', 'E&xec', 'Sym&link') Responses are case insensitive. If ui is not interactive, the default is returned. t&isunrecognized response N(tindexRbRRtR‰R(RR tchoicesR`R‹tstrespsR¡((s/sys/lib/python/mercurial/ui.pyt promptchoices 8 cCsb|iƒp|Snyti|p tdƒƒSWn(tj otitdƒƒ‚nXdS(Ns password: sresponse expected(R“tgetpassRRŸRRy(RRtR`((s/sys/lib/python/mercurial/ui.pyR¨.s cGs|ip|i|ŒndS(N(R R‰(RR ((s/sys/lib/python/mercurial/ui.pytstatus4scGs|i|ŒdS(N(R’(RR ((s/sys/lib/python/mercurial/ui.pyR+6scGs|io|i|ŒndS(N(RR‰(RR ((s/sys/lib/python/mercurial/ui.pytnote8scGs|io|i|ŒndS(N(RR‰(RR ((s/sys/lib/python/mercurial/ui.pyRG:sc CsÏtidddddtƒ\}}z–ti|dƒ}|i|ƒ|iƒ|iƒ}ti d||fdh|d