^cEB ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl m Z ddlmZddlmZmZddlmZmZmZmZmZmZmZmZmZmZmZmZddlm Z m!Z!m"Z"m#Z#m$Z$ej%Z%d&d e'ej(e)d DZ*d Z+d d dddZ,dZ-dZ.GddZ/dZ0e1Z2gZ3GddZ4da5dZ6dZ7dZ8dZ9dS)N)_)hex)getattropen) colorconfig configitemsencodingerror formatter loggingutilprogresspycompatrcutilscmutilutil)dateutilprocutil resourceutil stringutilurlutilc#BK|]}||VdSN)isalnum).0cs ./usr/lib/python3/dist-packages/mercurial/ui.py r 6sC  rs [ui] # The rollback command is dangerous. As a rule, don't use it. rollback = False # Make `hg status` report copy information statuscopies = yes # Prefer curses UIs when available. Revert to plain-text with `text`. interface = curses # Make compatible commands emit cwd-relative paths by default. relative-paths = yes [commands] # Grep working directory by default. grep.all-files = True # Refuse to perform an `hg update` that would cause a file content merge update.check = noconflict # Show conflicts information in `hg status` status.verbose = True # Make `hg resolve` with no action (like `-m`) fail instead of re-merging. resolve.explicit-re-merge = True [diff] git = 1 showfunc = 1 word-diff = 1 s# example user config (see 'hg help config' for more info) [ui] # name and email, e.g. # username = Jane Doe username = # We recommend enabling tweakdefaults to get slight improvements to # the UI over time. Make sure to set HGPLAIN in the environment when # writing scripts! # tweakdefaults = True # uncomment to disable color in command output # (see 'hg help color' for details) # color = never # uncomment to disable command output pagination # (see 'hg help pager' for details) # paginate = never [extensions] # uncomment the lines below to enable some popular extensions # (see 'hg help extensions' for more info) # # histedit = # rebase = # uncommit = s# example repository config (see 'hg help config' for more info) [paths] default = %s # path aliases to other clones of this repo in URLs or filesystem paths # (see 'hg help config.paths' for more info) # # default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork # my-fork = ssh://jdoe@example.net/hg/jdoes-fork # my-clone = /home/jdoe/jdoes-clone [ui] # name and email (local to this repository, optional), e.g. # username = Jane Doe s# example repository config (see 'hg help config' for more info) [paths] # path aliases to other clones of this repo in URLs or filesystem paths # (see 'hg help config.paths' for more info) # # default = http://example.com/hg/example-repo # default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork # my-fork = ssh://jdoe@example.net/hg/jdoes-fork # my-clone = /home/jdoe/jdoes-clone [ui] # name and email (local to this repository, optional), e.g. # username = Jane Doe s# example system-wide hg config (see 'hg help config' for more info) [ui] # uncomment to disable color in command output # (see 'hg help color' for details) # color = never # uncomment to disable command output pagination # (see 'hg help pager' for details) # paginate = never [extensions] # uncomment the lines below to enable some popular extensions # (see 'hg help extensions' for more info) # # blackbox = # churn = )susersclonedslocalsglobalc@tjtj|Sr)rrapplystrurl) maybebytess r _maybestrurlr&s ?8?J 7 77rc@tjtj|Sr)rr#bytesurl)maybestrs r_maybebytesurlr*s ?8,h 7 77rc*eZdZdZdZdZdZdZdS)httppasswordmgrdbproxyz)Delays loading urllib2 until it's needed.cd|_dSr)_mgrselfs r__init__zhttppasswordmgrdbproxy.__init__s  rcZ|jt|_|jSr)r.urlreqhttppasswordmgrwithdefaultrealmr/s r_get_mgrzhttppasswordmgrdbproxy._get_mgrs% 9 >>@@DIyrc|t|t|t|t|Sr)r5 add_passwordr&)r0realmurisuserpasswds rr7z#httppasswordmgrdbproxy.add_passwordsN}}++              rc|}t|t|t|Sr)r5r*find_user_passwordr&)r0r8urimgrs rr=z)httppasswordmgrdbproxy.find_user_passwordsDmmoo  " "<#6#6 S8I8I J J   rN)__name__ __module__ __qualname____doc__r1r5r7r=rrr,r,sV33         rr,ctjr)r SignalInterrupt)argss r _catchtermrHs  rceZdZdtdZdZedZdZdZdZ e j dZ e j d Z d Zd Z dud Z dudZ dudZdvdZdZdwdZdZdZdxdZdZdydZed fdZed fdZdZed fdZed fdZ ed fdZ!edd fdZ"ed fd Z#ed fd!Z$ed fd"Z%ed fd#Z&d$Z'dyd%Z(dyd&Z)dzd'Z*dzd(Z+d)Z,d*Z-dtd+Z.dyd,Z/d-Z0dtd.Z1e2j3d/Z4d0Z5e6d1Z7e7j8d2Z7e6d3Z9e9j8d4Z9e6d5Z:e:j8d6Z:e6d7Z;e;j8d8Z;e j d{d9Zd<Z?d=Z@d>ZAd?ZBd@ZCdAZDdBZEdCZFdDZGdEZHdFZIdGZJdHZKe j dIZLdJZMdKZNdtdLZOe6dMZPdNZQdOZRdPZSdQZTdRZUd|dTZVd}dVZWdWZXeYdXZZd~dZZ[dwd[Z\d\Z]d]Z^d^Z_d_Z`d`Zae]Zbe`Zce^ZdeBZe ddaZf ddbZgdcZhdddZideZje2j3dfZkdgZldvdhZmdiZndjZodkZpdlZqddnZrddpZsdqZte j dxdrZudsZvdS)uiNcg|_g|_d|_dx|_x|_x|_|_d|_tj |_ tj |_ tj |_ tj |_t|_t|_d|_i|_d|_d|_d|_i|_i|_d|_d|_|r|j|_|j|_|j|_|j|_|j|_|j |_ |j!|_!|j"#|_"|j$|_$|j%|_%|j&|_&|j #|_ |j#|_|j #|_ |j#|_|j#|_|j'|_'|j|_|j|_|j|_|j|_|j#|_|j#|_|(|j)|_)|j*|_*ntVj,|_tVj-|_tVj.|_d|_|j/|_|j0|_ d|_!i|_"d|_$d|_%d|_&tbj'|_'te|_)tgj4tj|_*|6dd}d|vr|j'|_7dSi|_7|D] }||j'vr|j'||j7|<!dS)zCreate a fresh new ui object if no src given Use uimod.ui.load() to create a ui which knows global and user configs. In most cases, you should use ui.copy() to create a copy of an existing ui object. NFT experimentalsexportableenviron*)8_buffers _bufferstates_bufferapplylabelsquietverbose debugflag tracebackflag_reportuntrustedr coreitems _knownconfigr _ocfg_tcfg_ucfgset _trustusers _trustgroups callhooks _path_to_rootinsecureconnectionslogblockedtimes _colormode_terminfoparams_styles_uninterruptible showtimestamp_fout_ferr_fin_fmsg_fmsgout_fmsgerr_finoutredirected_loggerscopy pageractive _disablepager_tweakedenviron fixconfighttppasswordmgrdb _blockedtimesrstdoutstderrstdinfoutferrr r, collections defaultdictint configlist_exportableenviron)r0srcallowedks rr1z ui.__init__s5  #'JOO OT\ODNT5G $'1]__ ]__ ]__ 55EE#( $! %" / >DJDJDIDJLDMLDM%(%:D "L--//DM"D !$!2D LDM))DJ))DJ))DJ"3355D  # 0 5 5 7 7D ;DL ]DN!$!2D '*'>D $!nDO##;#;#=#=D ;++--DL NN   %(%:D "!$!2D  !DJ!DJ DIDJ IDM IDM%*D "DM$D !&D !DM$+DL%;%=%=D "!,!8!=!=D ///3GHH 7??&*lD # # #&(D # A A $$15aD+A. A Arc|j|j|jdSr)rX new_sourcerYrZr/s r _new_sourcezui._new_source2sD   rcz|}tjD]\}}|dkr||d#|dkr||dA|dkr|t }|D]V\}}}}|j|||||j||||||W|D]}| |tj d|z| ||S)z,Create a ui and load global and user configsspathT)trustsresourcesitemssectionsunknown rctype: %s) r rccomponents readconfigread_resource_configrr[rYrZaddrtr ProgrammingError_maybetweakdefaults) clsutfsectionsrnamevaluesources rloadzui.load7s` CEE')) H HDAqG|| Qd ++++k!!&&q&5555h 5545**0GT5&GKKuf===GKKuf===LL))))'11GKKK00001,-BQ-FGGG  rcx|ddsdS|js|drdSd|_tj}|dt |D]K}||D]3\}}|||s||||d4LdS)Nuis tweakdefaultsTs) configboolrrplainr parsetweakrcitems hasconfig setconfig)r0tmpcfgrrrs rrzui._maybetweakdefaultsRsu&677  F = DJJ'788  F  '111 M MG%||G44 M M e~~gt44MNN7D%9KLLL M M Mrc,||Sr) __class__r/s rrozui.copyfs~~d###rcl|jr|jt|_dS)z;Clear internal state that shouldn't persist across commandsN)_progbar resetstater,rur/s rrz ui.resetstateis4 = ' M $ $ & & &!7!9!9rc#Ktj} dV|j|dzxxtj|z dzz cc<dS#|j|dzxxtj|z dzz cc<wxYw)Ns_blocked)rtimerrv)r0key starttimes rtimeblockedsectionzui.timeblockedsectionosJLL   EEE  s[0 1 1 1 y(6  1 1 1 1 1D s[0 1 1 1 y(6  1 1 1 1 1 1 1s A 1A=c#TKdd}|r*ddr}js|sdVdSfd}tj|5 d_dVd_n #d_wxYw ddddS#1swxYwYdS)a/Mark an operation as unsafe. Most operations on a repository are safe to interrupt, but a few are risky (for example repair.strip). This context manager lets you advise Mercurial that something risky is happening so that control-C etc can be blocked if desired. rLs nointerruptsnointerrupt-interactiveonlyNctdtddS)Nsshutting down cleanly s4press ^C again to terminate immediately (dangerous) T)warnrr/srrz ui.uninterruptible..warnsG IIa233 4 4 4 IIJKK   4rTF)r interactivereruninterruptible)r0enabledrs` rrzui.uninterruptiblezs<///>BB  )t ;   )&&((G     EEE F      %d + + . . .(,%(-%%%----%  . . . . . . . . . . . . . . . . . .s*.B0 B;B B  BB!$B!c0tj||||Sr)r )r0topicoptss rr z ui.formatters"4ud;;;rctj|}tj|rdS|j|j}}d|vsd|vrdStj|j}tj|j}||vs||vs|tjkrdS|j r(| td|||fzdS)NTrMs6not trusting file %s from untrusted user %s, group %s F) rfstatisownerr\r]usernamest_uid groupnamest_gidrUrr)r0fprsttuserstgroupsr:groups r_trustedz ui._trusteds Z^^ <   4*D,= 6>>TW__4}RY''ry)) 6>>Ug--1H1H4    II+dE" #   urFc tj|d|d}n#t$r|sYdSwxYw|d|z|||||dS)Nrrsresource:%s.%s)r open_resourceIOError _readconfig)r0rrootrrremaprs rrzui.read_resource_configs +DGT!W==BB         $b$x     s !$ 55c t|d}n#t$r|sYdSwxYw|||||||dS)Nrb)rrr)r0filenamerrrrrs rrz ui.readconfigsk h%%BB       2tUHeDDDDDs  $$c|5tj}|p|p|||} |||||nP#tj$r>} |r|t d| j| jfzYd} ~ nd} ~ wwxYwdddn #1swxYwY| |||dS)N)rrsignored %s: %s ) r rreadr ConfigErrorrrlocationmessage _applyconfig) r0rrrrrrcfgtrustedinsts rrzui._readconfigs?  -//CF%F4==X+F+FG 2FFFF$    )**dmT\-JJ                 #w-----s:.B(A  B( B4BB(BB((B,/B,rctj}|jD] \\}}}|||||!||d|dS)aAdd configitems from a non-file source. Unlike with ``setconfig()``, they can be overridden by subsequent config file reads. The items are in the same format as ``configoverride()``, namely a dict of the following structures: {(section, name) : value} Typically this is used by extensions that inject themselves into the config file load procedure by monkeypatching ``localrepo.loadhgrc()``. TN)r rr[r)r0r rrrrrrs r applyconfigzui.applyconfigskmoo&7k&7&9&9 2 2 "OWdU GGGT5& 1 1 1 1 #tT*****rc|rdD]}||dvr |d|=|dD]\}}|d|=|dD]\}}|d|=|dD]\}}|d|=|dr$|dD]\}}|d|=|dr$|dD]\}}|d|=|dr$|dD]\}}|d|=|r9|j||j|j|j||j|j|t jd }| | dS) N) debugsfallbackencodingquietsslashs logtemplatemessage-outputs statuscopiessstyle tracebackverbosersdefaultsscommandsscommand-templatessaliass revsetaliass templatealias~)r) rrrYupdaterXrZospath expanduserrt)r0rrrrvs rrzui._applyconfigs0 ::<< 1  & &E ??E 1  +.. ( (1 $Q'' +.. ( (1 $Q'' "677 1 11,-a00 ::h   % (++ % %1M!$$ ::n % % + .11 + +1'** ::& ' ' - "233 - -1()!,,  * J  c " " " J  dj ) ) ) # $*%%% <7%%d++D D!!!!!rc|dvr|ptj}|j|j|jfD]}|dD]\}}|}|d|pd}|||f}||jvr ||j|<d|vr<|s?d|vrB|d}|td|||fz| dd}||kr| d|||d vr t|\|_ |_|d d |_|jp|d d |_|j o|d d |_|jr|jrdx|_|_|jp|d d|_|d d|_|d d|_|d d|_|dvr\|j|dd|j|dd|dvrt|jrot7} |ddr| d| r6t;j|j| } | d | dSdSdSdS)N)Npathsrsnone:s%%nones((deprecated '%%' in path %s=%s from %s) %)NrrrrrFsreport_untrustedstimestamp-outputrslogblockedtimes)Ntrustedrsuserssgroups)Ndevelrrsdebug.extensionss extension)!r getcwdrYrZrXr configsourcer_rrreplacealter_selectmsgdestsrkrlrrSrRrQrUrfrTrar\rrr]r[rrfileobjectloggerrh setlogger) r0rrrnpold_psroot_keytrackedloggers rrtz ui.fixconfigs & & &,8?,,DZTZ7 0 0GGH--00DAqE))(A66A'A !1ayHt'9997;*84qyy ! zz9 &A JKK !Qi(IIeT22Ezz!Q///)0, m # #+:4+@+@ (DM4=!__UH==DN>OT__UJ-O-ODL!^+Px0P0PDJ| 2  2,11 T\$(N%doo*77D !"&8K!L!LD !% !E!ED #'??5:L#M#MD ( ( (   # #DOOJ$I$I J J J   $ $T__Z%K%K L L L - - -$. -eeGx)<== * L))) 1$5dj'JJx00000 . - - - 1 1rc|j|||j|||j||fSr)rXbackuprYrZ)r0ritems r backupconfigzui.backupconfigWsK J  gt , , J  gt , , J  gt , ,  rc|j|d|j|d|j|ddS)Nrr)rXrestorerYrZ)r0datas r restoreconfigzui.restoreconfig^sV 47### 47### 47#####rc|j|j|jfD]}||||||||dS)Nr)rXrYrZr[rtr)r0rrrrrs rrz ui.setconfigcseJ DJ7 2 2C GGGT5& 1 1 1 1 w'''   """""rc"|r|jp|jSr)rZrY)r0 untrusteds r_datazui._datais'TZ54:5rcT||||Sr)rrr0rrrs rrzui.configsourcels$zz)$$++GT:::rcN|||||}|turdS|S)z+return the plain string version of a config)defaultrN)_config_unsetr0rrr rrs rr z ui.configos8 T7i   F??4 rc|x}}|j|i|}||fg}|K||jt |jr|}n(|j}n d} | ||fz} || dd|tur>||}n|jtj ur#d}d} | ||fz} || ddnQ|}nN|L|jtj ur9||kr3d} | ||tj |fz} || ddg} | ||D]1\} } j| | d} | | | | | f2| rfd}t| |d}|jrO|sM|jrF|D]C\} } |j| | }|!||kr|d | | |fzD|S) Ns+accessing unregistered config item: '%s.%s'rswarn-config-unknowns7config item requires an explicit default value: '%s.%s'swarn-config-defaultsPspecifying a mismatched default value for a registered config item: '%s.%s' '%s'c>j|d|dS)Nrr)level)xr s rrzui._config..levels#v|AaD!A$///r)r3ignoring untrusted configuration option %s.%s = %s )rWgetextendaliascallabler  develwarnr r dynamicdefaultrbytestrrappendmaxrSrUrZdebug)r0rrr rr itemdefaultr alternatesmsg candidatesrr candidateruvaluer s @rr z ui._configxs%%  $$Wb1155d;;o&     dj ) ) ) %% +"llnn "l @C GT? "C NN3#9 : : : f  |!;;;P&sA'=>>>>#   K$>>>;&&-  GT8#3G#<#<= =C NN3#9 : : : I&& 5 5DAq" 1a..I$!!1a"3444  2 0 0 0 0 0 ...q1E > ) 0E "  11--%&E//JJ(+,a.9 rc|j|i|}|t||f|jS)zreturn the default value for a config option The default is returned "raw", for example if it is a callable, the callable was not called. )rWrKeyErrorr )r0rrrs rconfig_defaultzui.config_defaultsI  $$Wb1155d;; <GT?++ +|rc|||||}||}i}d|z}||D]4\} } | |r| || t |d<5|jrg|se|jr^|D]I\} } |j|d|| fz} | "| | kr| d||| | fzJ||fS)aGet a config option and all sub-options. Some config options have sub-options that are declared with the format "key:opt = value". This method is used to return the main option and all its declared sub-options. Returns a 2-tuple of ``(option, sub-options)``, where `sub-options`` is a dict of defined sub-options where keys and values are strings. rs%s:Ns%s:%ss6ignoring untrusted configuration option %s:%s.%s = %s ) r rr startswithlenrSrUrZrr) r0rrr rmainrsubprefixrrr"s rconfigsuboptionszui.configsuboptionss%{{7D'Y{GGzz)$$$JJw'' * *DAq||F## *()Ac&kkmm$% > ) 0E    1T1I1EFF%&A++JJ+.5tQ-GH Syrc|||||}|dStj|rd|vr||||}d|vrutj|dd}tj|tj|}|S)zMget a path config item, expanded relative to repo root or config fileNs://rr) r rrisabsrdirnamersplitjoinr)r0rrr rrrbases r configpathz ui.configpaths KKw : : 94w}}Q >6??##GT9==Cs{{wszz$'7'7':;;GLLrw'9'9!'<'<==rc|||||}||S|tur |turdS|St|tr|St j|}|'t jtd|||fz|S)a\parse a configuration element as a boolean >>> u = ui(); s = b'foo' >>> u.setconfig(s, b'true', b'yes') >>> u.configbool(s, b'true') True >>> u.setconfig(s, b'false', b'no') >>> u.configbool(s, b'false') False >>> u.configbool(s, b'unknown') False >>> u.configbool(s, b'unknown', True) True >>> u.setconfig(s, b'invalid', b'somevalue') >>> u.configbool(s, b'invalid') Traceback (most recent call last): ... ConfigError: foo.invalid is not a boolean ('somevalue') r'NFs%s.%s is not a boolean ('%s')) r r  isinstanceboolr parseboolr rr)r0rrr rrbs rrz ui.configbools* LL$9L E E 9H ;;&  uN a   H   # # 9#233wa6HH rc |||||}||S ||S#ttjf$rD|t j|j}tjtd||||fzwxYw)aparse a configuration element with a conversion function >>> u = ui(); s = b'foo' >>> u.setconfig(s, b'float1', b'42') >>> u.configwith(float, s, b'float1') 42.0 >>> u.setconfig(s, b'float2', b'-4.25') >>> u.configwith(float, s, b'float2') -4.25 >>> u.configwith(float, s, b'unknown', 7) 7.0 >>> u.setconfig(s, b'invalid', b'somevalue') >>> u.configwith(float, s, b'invalid') Traceback (most recent call last): ... ConfigError: foo.invalid is not a valid float ('somevalue') >>> u.configwith(float, s, b'invalid', desc=b'womble') Traceback (most recent call last): ... ConfigError: foo.invalid is not a valid womble ('somevalue') Ns%s.%s is not a valid %s ('%s')) r ValueErrorr ParseErrorrsysbytesr@rr)r0convertrrr descrrs r configwithz ui.configwiths2 KKw : : 9H 71:: E,-   |()9::#344tQ7OO  s )ABc@|t|||d|S)aparse a configuration element as an integer >>> u = ui(); s = b'foo' >>> u.setconfig(s, b'int1', b'42') >>> u.configint(s, b'int1') 42 >>> u.setconfig(s, b'int2', b'-42') >>> u.configint(s, b'int2') -42 >>> u.configint(s, b'unknown', 7) 7 >>> u.setconfig(s, b'invalid', b'somevalue') >>> u.configint(s, b'invalid') Traceback (most recent call last): ... ConfigError: foo.invalid is not a valid integer ('somevalue') sinteger)r@r~r0rrr rs r configintz ui.configint5s'& $Y   rc*|||||}|tur |turd}|}t|ts|S t j|S#t j$r(t jtd|||fzwxYw)aparse a configuration element as a quantity in bytes Units can be specified as b (bytes), k or kb (kilobytes), m or mb (megabytes), g or gb (gigabytes). >>> u = ui(); s = b'foo' >>> u.setconfig(s, b'val1', b'42') >>> u.configbytes(s, b'val1') 42 >>> u.setconfig(s, b'val2', b'42.5 kb') >>> u.configbytes(s, b'val2') 43520 >>> u.configbytes(s, b'unknown', b'7 MB') 7340032 >>> u.setconfig(s, b'invalid', b'somevalue') >>> u.configbytes(s, b'invalid') Traceback (most recent call last): ... ConfigError: foo.invalid is not a byte quantity ('somevalue') rs#%s.%s is not a byte quantity ('%s')) r r r6bytesr sizetointr r<rrr s r configbyteszui.configbytesLs, WdGY?? F??&  E%'' L >%(( (   #899D%()  s A7Bc|tj|||d|}t|trtj|S|gS|S)aparse a configuration element as a list of comma/space separated strings >>> u = ui(); s = b'foo' >>> u.setconfig(s, b'list1', b'this,is "a small" ,test') >>> u.configlist(s, b'list1') ['this', 'is', 'a small', 'test'] >>> u.setconfig(s, b'list2', b'this, is "a small" , test ') >>> u.configlist(s, b'list2') ['this', 'is', 'a small', 'test'] slist)r@r parselistr6rE)r0rrr rrs rrz ui.configlistqs[ OO  '4'9   a   '** * YIrc|||||r$|tj|||d|S|turdS|S)zparse a configuration element as a tuple of ints >>> u = ui(); s = b'foo' >>> u.setconfig(s, b'date', b'0 0') >>> u.configdate(s, b'date') (0, 0) sdateN)r r@r parsedater rBs r configdatez ui.configdates[ ;;wgy 9 9 ??"GT7GY  f  4rc|j|i|}d}|0t|jr|}n|j}|S)z,returns the default value of the config itemN)rWrrr )r0rrrrs r configdefaultzui.configdefaultsa $$Wb1155d;;   %% +"llnn "l rcT||||Sr)rhasitemrs rrz ui.hasconfigs$zz)$$,,Wd;;;rc0|||vS)z&tell whether section exists in config.)r)r0rrs r has_sectionzui.has_sections$**Y////rcF|||}|r d|D}|jrc|sa|jrZ|j|D]?\}}|j|||kr|d|||fz@|S)Nc&g|]}d|dv |S)rrrD)ris r z"ui.configitems..s&:::1QqT)9)9Q)9)9)9rr)rrrSrUrZrYrr)r0rr ignoresubrrrs rr zui.configitemss 9%%++G44  ;:::::E > ) 0E  ((11  1:>>'1--22JJ(+2Aq/: rc#K||}|s |D]}|VdS|}t|d}t|d}||||Vt|d}n||Vt|d}nz|dd|ddkr%|Vt|d}t|d}n?|dd|ddkr|Vt|d}n|Vt|d}||dSdS)Nrr) _walk_config _walk_knownnext)r0r all_knowndefineddknowncurrent_defined current_knowns r walkconfigz ui.walkconfigsw##I..    F  ""w--UD)) )]-F&#### $UD 1 1 &%%%%"&w"5"5qs#qs';;;%%%%"&w"5"5 $UD 1 1 qs#oac&:::#### $UD 1 1 %%%%"&w"5"5!)]-F-F-F-F-Frc#dKt|jD]\}}t|D]_\}}|jr t |jr|}n|jt jurd}n|j}||j|fV`dS)Ns ) sortedrWrgenericrr r rr)r0rrrrUr s rrZzui._walk_knowns$T%6%<%<%>%>?? / /NGUu{{}}-- / /19AI&&(iikkGGY+"<<<*GGiGqvw..... / / /rc#K||}|D]%}|||D] \}}|||fV &dSr)rrr )r0rrrrrs rrYzui._walk_configsvjj##||~~ + +G#//CC + + etU***** + + +rcpdtjvrdtjvrdStjddd}dtjdddvr|d|r|r||vSdS) auis plain mode active? Plain mode means that all configuration variables which affect the behavior and output of Mercurial should be ignored. Additionally, the output should be stable, reproducible and suitable for use in scripts or applications. The only way to trigger plain mode is by setting either the `HGPLAIN' or `HGPLAINEXCEPT' environment variables. The return value can either be - False if HGPLAIN is not set, or feature is in HGPLAINEXCEPT - False if feature is disabled by default and not included in HGPLAIN - True otherwise sHGPLAINs HGPLAINEXCEPTFr,s +strictflagss strictflagsT)r rsrstripsplitr)r0feature exceptionss rrzui.plains" h. . . (8885   !13 7 7 = = ? ? E Ed K K  ("2"6"6z3"G"G"M"M # #      n - - -  -z -*, ,trcdtjd}|7|dd}|tj|}|tjd}||r|S|:|ddr$|tdd}|| sr d tj tj tjfz}|td |zn#t"$rYnwxYw|s0t%jtd td  d|vr6t%jtdt)j|z|S)aReturn 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 acceptempty is True, returns None. If not found and ui.askusername is True, ask the user, else use ($LOGNAME or $USER or $LNAME or $USERNAME) + "@full.hostname". If no username could be found, raise an Abort error. HGUSERNrsusernamesEMAILs askusernamesenter a commit username:r s%s@%ss&no username found, using '%s' instead sno username supplieds+use 'hg config --edit' to set your username)hint susername %r contains a newline )r rsrr rr expandvarsrpromptrrrgetuser strtolocalsocketgetfqdnrr$r Abortrr)r0 acceptemptyr:s rrz ui.usernames##I.. <;;uk22Dw))$// <#''11D BB<;;q!<==t;LLD < 0 0 2 2< $&&'(8(899# !FGG$NOOOO     +)**IJJ  D==+5669I$9O9OO  sA D44 EEc<|jstj|}|S)z>Return a short representation of a user name or email address.)rRr shortuser)r0r:s rr{z ui.shortuser/s!| .'--D rcd}||d ||}|r|jSn#tj$rYnwxYw|r5 ||}|r|jSn#tj$rYnwxYw|S)z:Return repository location relative to cwd or from [paths]s?ui.expandpath is deprecated, use `get_*` functions from urlutil6.0) deprecwarngetpathrawlocr RepoError)r0locr rrs r expandpathz ui.expandpath5sP V$$$  S!!A x     D    LL))$8O$?     s!9A  A A00BBc*tj|Sr)rpathsr/s rrzui.pathsJs}T"""rc^d}||d|jj|g|Ri|S)zwsee paths.getpath for details This method exist as `getpath` need a ui for potential warning message. s<ui.getpath is deprecated, use `get_*` functions from urlutilr})r~rr)r0rGkwargsrs rrz ui.getpathNsC N V$$$!tz!$8888888rc|jSr)rgr/s rrzzui.foutW zrcL||_t|\|_|_dSr)rgrrkrlr0rs rrzzui.fout[# '6t'<'<$ t}}}rc|jSr)rhr/s rr{zui.ferr`rrcL||_t|\|_|_dSr)rhrrkrlrs rr{zui.ferrdrrc|jSrrir/s rfinzui.finis yrc||_dSrrrs rrzui.finms  rc|jS)zUStream dedicated for status/error messages; may be None if fout/ferr are used)rjr/s rfmsgzui.fmsgqs zrcL||_t|\|_|_dSr)rjrrkrlrs rrzui.fmsgwrrc#K|||| dV|dS#|wxYw)N)r subproclabeled) pushbuffer popbufferr0r rrs rsilentz ui.silent|sX eWgFFF  EEE NN     DNN    s 6A c|jg|j|||f||_dS)aeinstall a buffer to capture standard output of the ui object If error is True, the error output will be captured too. If subproc is True, output from subprocesses (typically hooks) will be captured too. If labeled is True, any labels associated with buffered output will be handled. By default, this has no effect on the output returned, but extensions and GUI tools may handle this argument and returned styled output. If output is being buffered so it can be captured and parsed or processed, labeled should not be set to True. N)rNrrOrPrs rrz ui.pushbuffersF R    !!5'7";<<<")rc|j|jr|jdd|_nd|_d|jS)z2pop the last buffer and return the buffered outputrNr)rOpoprPr2rNr/s rrz ui.popbuffersb      +&*&8&.1(L(L!Au)=)=(L(L(L(L(L(LrNkeepprogressbarFr stdio_blockedr)rgrNrrPr _progclearr2rrrbr win32printwriterrr StdioErrorrv)r0rGrrrrerrrs` @rrzui.writes.z = HHWc**E /0 / b!(((L(L(L(L(Lt(L(L(LLLLL b!((... Fxx)511  OO   hhtnnJLL  (** tz3??$?????. HHWc22E**S%00C 3 ( ( ("3'' ' (  / 0 0 0 y(5  0 0 0 0 0D / 0 0 0 y(5  0 0 0 0 0 0 0s+A-EF E$ EE$$F.Gc2|j|jg|Ri|dSr)_writerh)r0rGrs r write_errz ui.write_errs, DJ.........rc6|rp|ddr6jr/jdfd|DdSjd|dSj|g|Ri|dS)Nrrrc3DK|]}|VdSrrrs rr zui._write..rr)rrrPrNr _writenobuf)r0rrGrrs` @rrz ui._writes   D ! ! 2HHWc**E /0 / b!(((L(L(L(L(Lt(L(L(LLLLLL b!((..... D T 1D 1 1 1D 1 1 1 1 1rcd|dds|d|}tj} ||jur/t |jdds|jt |ddr|j |fi|nm|j dkrtj ||j |fi|nH|j ,|dd}| ||}| |||jur%t |dds|n#t$r~}||jur\|jtjtjtjfvr2Yd}~|jdxxtj|z d zz cc<dSt)j|d}~wwxYw|jdxxtj|z d zz cc<dS#|jdxxtj|z d zz cc<wxYw) NrFrclosed structuredrrrr)rrr2rrrhrrgflushrrbrrrrerrnoEPIPEEIOEBADFrvr r)r0rrGrrrrrs rrzui._writenobufswxx)511  OO   hhtnnJLL  tz!!'$*h*N*N!   """t\511  3''$''''H,, tz3??$?????. HHWc22E**S%00C 3tz!!'$%*H*H!  ( ( (tz!!ci   4''   / 0 0 0 y(5  0 0 0 0 0"3'' ' (  / 0 0 0 y(5  0 0 0 0 0D / 0 0 0 y(5  0 0 0 0 0 0 0s7C3EH G3G H7G  GH.H/c4|jo|ddv}|rIdtjtjzf|z}t|j|g|Ri||r| dSdS)Ntype>notererrorstatuswarnings[%s] ) rfrrrdatetimenow isoformat _writemsgwithrr)r0rrGr timestamps r _writemsgz ui._writemsg%s& 488F+;+;@ ,   "8#4#8#8#:#:#D#D#F#FGGHD dk47$777$777   JJLLLLL  rc2t|j|g|Ri|dSr)rr)r0rrGrs r_writemsgnobufzui._writemsgnobuf6s+d&A=8C5=BC5B F C2*>C-(F-C22F5E&7DE& E#>EE&E##E&&F.GcZ|ddrdStj|S)NrnonttyF)rrisatty)r0fhs r_isattyz ui._isattyMs- ??5) , , 5r"""rc|jr|j|jfStj|j|j\}}||f|j|jfk|_||fS)aDuplicate ui streams and redirect original if they are stdio Returns (fin, fout) which point to the original ui fds, but may be copy of them. The returned streams can be considered "owned" in that print(), exec(), etc. never reach to them. )rmrirgr protectstdior0rrzs r protectfinoutzui.protectfinoutRs^  ! )9dj( ()$)TZ@@ T"%tDJ0G!GDyrc||f|j|jfkrdStj|j|j||d|_dS)z7Restore ui streams from possibly duplicated (fin, fout)NF)rirgr restorestdiormrs r restorefinoutzui.restorefinoutasJ ;49dj1 1 1 FdiS$???"'rc#K|\}} ||fV|||dS#|||wxYw)z.Run code block with protected standard streamsN)rrrs rprotectedfinoutzui.protectedfinoutjsg&&(( T *t)OOO   sD ) ) ) ) )D  sD ) ) ) )s 9Acd|_dS)NT)rqr/s r disablepagerzui.disablepagerss!rc>|js|jrdS|ds||ddvs|ddrz|dd|zdr`t jd d ks=|r)| s|j sd tj vrdStj r1ttd dd kr|ddS|ddt$j}|sdSi}t%jD]\}}|t jvr|||<|dt-j|z||}t3jt6dr$t7jt6jt:|||rqd|_|dd|d|dddd|j }||dd|krtCj"|dSdS|#dS)a Start a pager for subsequent command output. Commands which produce a long stream of output should call this function to activate the user's preferred pagination mechanism (which may be no pager). Calling this function precludes any future use of interactive functionality, such as prompting the user or activating curses. Args: command: The full, non-aliased name of the command. That is, "log" not "history, "summary" not "summ", etc. Nsinternal-always-spagersignorerspaginatesattend-TTERMdumbs --debuggerfrozen console_exes+pager is unavailable with py2exe packaging sstarting pager for command %s sSIGPIPE formatted interactiveFscolors pagermode)$rqrpr(rrr rsr formattedrrNrsysargv iswindowsrsysrr r fallbackpagerdefaultpagerenvrrpprintrr safehasattrsignalSIGPIPErH _runpagerrrbrsetupr)r0commandpagercmdpagerenvrr wasformattedcms rpagerzui.pagervs   !1  F!!"566  tx;; ; ;??5+66 <??8Z'-A4HH <##G,,77>>##8zz|| 8 } 8 000 F   '#x">">-"O"O JJF G G G F;;x63GHH  F!13399;; ' 'KD%8+++!& .1B71K1K K    ~~''  FJ / / 6 M&.* 5 5 5 >>(H - - #D  NN5, h G G G NN5.% B B BBT[[<<<<< D!!!!!=<        rcdkrdStfddD}tjrA|s?tj}|s'|t dzdS| tjtj |dtj tj tj tj tjtj|n9#t $r,|s(|t dzYdSwxYwt#jtj t#jtj t#jjtj |tj rHt#jjtj |jfd}d S) zActually start the pager and set up file descriptors. This is separate in part so that extensions (like chg) can override how a pager is invoked. scatFc3 K|]}|vV dSrrD)rrrs rr zui._runpager..s'HHQALHHHHHHrs|&;<>()$`\"' *?[#~=%s+missing pager command '%s', skipping pager r)shellbufsize close_fdsryrwrxenvctjtdr)tjtjtjt jtj t jtj j  dS)NsSIGINT)rrrSIGINTSIG_IGNrdup2rrwfilenorxryclosewait)rstderrfdstdoutfdsr killpagerzui._runpager..killpagers 22 = fmV^<<< GHho4466 7 7 7 GHho4466 7 7 7 K      JJLLLLLrT)anyrrrfindexerr subprocessPopen tonativestrclosefdsPIPErwrx tonativeenv shellenvironFileNotFoundErrorrduprrryratexit) r0rrrfullcmdr rr r s ` @@@rrz ui._runpagers9 f  5 HHHH*GHHHHH   e  &w//G  EFFPuG $$W--"+ o()>s)C)CDD   EE!     EFFPuu   6(/0022336(/002233  ""$$ho&<&<&>&>??? << ( ( D GEK&&(((/*@*@*B*B C C C         ts6A:C111D'%D'ctSr)_reqexithandlersr/s r _exithandlerszui._exithandlers src@|j|||f|S)zzregister a function to run after dispatching a request Handlers do not stay registered across request boundaries.)rr)r0funcrGrs rrz ui.atexits' !!4v"6777 rctddg}ddgddgd}||vrtd|zt||}||krtd|z|s#tjddkrdSd}|dd }||vr|}|}|dd |z}||vr|}|V||krP|'|td |fzn'|td ||fz|.||kr(|td|||fz|S)aAwhat interface to use for interactive console features? The interface is controlled by the value of `ui.interface` but also by the value of feature-specific configuration. For example: ui.interface.histedit = text ui.interface.chunkselector = curses Here the features are "histedit" and "chunkselector". The configuration above means that the default interfaces for commands is curses, the interface for histedit is text and the interface for selecting chunk is crecord (the best curses interface available). Consider the following example: ui.interface = curses ui.interface.histedit = text Then histedit will use the text interface and chunkselector will use the default curses interface (crecord at the moment). stextscurses)s chunkselectorshisteditsUnknown feature requested %ss1Feature %s does not handle all default interfacesrrrs interfaces interface.%sNs#invalid value for ui.interface: %s s.invalid value for ui.interface: %s (using %s) s1invalid value for ui.interface.%s: %s (using %s) ) frozensetkeysr;rr rsrr rr) r0rk alldefaultsfeatureinterfacesavailableinterfacesdefaultinterfacerUchoseninterfacers r interfacez ui.interfaces, ) 455      +0022 2 2 2 2 9<< ** *rcdtjvr0 ttjdS#t$rYnwxYwt j|dS)z$how wide is the terminal in columns?sCOLUMNSr)r rsr~r;rtermsizer/s r termwidthz ui.termwidth{sa ) ) ) 8+J7888    %%a((s / <<c|rdS|dd}|||jS|S)a*should formatted output be used? It is often desirable to format the output to suite the output medium. Examples of this are truncating long lines or colorizing messages. However, this is not often not desirable when piping output into other utilities, e.g. `grep'. Formatted output is triggered by the value of the `ui.formatted' configuration variable or - if it is unset - when `sys.stdout' points to a terminal device. Please note that `ui.formatted' should be considered an implementation detail; it is not intended for use outside Mercurial or its extensions. This function refers to output only; for input, see `ui.interactive()'. This function always returns false when in plain mode, see `ui.plain()'. Frr)rrrrgr)s rrz ui.formattedsL" ::<< 5 OOE< 0 0 9<< ++ +r c||joK||jo1tj|jotj|j}|r ddl}|jn#t$rd}YnwxYw|j dks|s1|si}|j |j |fddi|| d}n| |ddz}|d5|ry| tj|}tjt%|}t&jd kr|d r |dd }n|jt'j||j |j}|st0|t&j}dddn #1swxYwY|S) NrFrrpromptr.s ui.promptstdios  r)rrirgrisstdinisstdoutreadlineread_history_file Exceptionrbrrkrrrr strfromlocalruinputr oslinesependswithrrEOFErrorrstrip)r0rs promptopts usereadliner5lines r _readlinez ui._readlineso LL # # . TZ(( . ++ .!$*--   $ $ *** $ $ $#  $ ?h & &k &  D  v  ,5 9C    JJLLLFFZZ 55r)rrrkrArr<r ResponseExpected)r0rrr rs rrDz ui._prompts y/!!  DN4=#t L L) Lt L L L NN w~#u=    N +cd;;A um44 M18UH + + +(** * +s AB**Cctjd|}|d}d|ddD}d|fd|DfS)a4Extract prompt message and list of choices from specified prompt. This returns tuple "(message, choices)", and "choices" is the list of tuple "(response character, text without &)". >>> ui.extractchoices(b"awake? $$ &Yes $$ &No") ('awake? ', [('y', 'Yes'), ('n', 'No')]) >>> ui.extractchoices(b"line\nbreak? $$ &Yes $$ &No") ('line\nbreak? ', [('y', 'Yes'), ('n', 'No')]) >>> ui.extractchoices(b"want lots of $$money$$?$$Ye&s$$N&o") ('want lots of $$money$$?', [('s', 'Yes'), ('o', 'No')]) s(?s)(.+?)\$\$([^$]*&[^ $].*)rc8g|]}|dS)r.)ri)rrs rrVz%ui.extractchoices..s"BBBQ1774==BBBrrs$$c|d}||dz|dz|dddfS)N&rrr)indexlowerr)rampidxs r choicetuplez&ui.extractchoices..choicetuple sJWWT]]FVaZ&1*,-3355qyysA7N7NN Nrc&g|] }|SrDrD)rrrOs rrVz%ui.extractchoices.. s!666kk!nn666r)rematchrrj)rsmrchoicesrOs @rextractchoiceszui.extractchoicess( H5v > >ggajjBB!''!***:*:5*A*ABBB O O O6666g66677rrcT||\}}d|D} |||||}||vr'||S||jt d)aePrompt user with a message, read response, and ensure it matches one of the provided choices. The prompt is formatted as follows: "would you like fries with that (Yn)? $$ &Yes $$ &No" The index of the choice is returned. Responses are case insensitive. If ui is not interactive, the default is returned. cg|]\}}|SrDrD)rrGrs rrVz#ui.promptchoice..s'''tq!'''rT)r rTsunrecognized response )rUrDrMrLrrkr)r0rsr rrTrespsrGs r promptchoicezui.promptchoices**622 W''w''' I S%.' JJAwwyyE!!{{17799--- NN4=!,F*G*G H H H  Irc|s|S ||j|ptddd|d5|ddrC|j}|st| dcdddStj cdddS#1swxYwYdS#t$rtj wxYw) Ns password: r0T)rpasswordr1rrrq)rrrlrrrrir5r<r=r get_passwordr rF)r0rsr ls rgetpassz ui.getpass#su!! N + NN *!M**    ((22 / /??5)44/ **,,A'&88E??  / / / / / / / / ,.. / / / / / / / / / / / / / / / / / / + + +(** * +s=AC A C' C 4C C CC CC C>cH|js|j|jg|Rddi|dSdS)zqwrite status message to output (if ui.quiet is False) This adds an output label of "ui.status". rrN)rQrrkr0rrs rstatusz ui.status:sJ z H DN4= G3 G G Gy G$ G G G G G H Hrc6|j|jg|Rddi|dS)zewrite warning message to output (stderr) This adds an output label of "ui.warning". rrNrrlr`s rrzui.warnBs3 t}DDDD:DtDDDDDrc6|j|jg|Rddi|dS)zawrite error message to output (stderr) This adds an output label of "ui.error". rrNrcr`s rr zui.errorIs3 t}BcBBB8BTBBBBBrcH|jr|j|jg|Rddi|dSdS)zfwrite note to output (if ui.verbose is True) This adds an output label of "ui.note". rrN)rRrrkr`s rnotezui.notePsJ < F DN4= E E E Ew E E E E E E F Frc|jrD|j|jg|Rddi||ddd|dSdS)zrwrite debug message to output (if ui.debugflag is True) This adds an output label of "ui.debug". rrs%srN)rSrrklogr2r`s rrzui.debugXsg > 5 DN4= F# F F Fx F F F F HHXuchhsmm 4 4 4 4 4 5 5rc||dddd}|?|d|d|||}|dkrd} n|rd |z} n|d} d} |d d r|} t jd |d zdz| | \} } t j| d5} | tj |dddn #1swxYwYd|i}d|vr*|dt|didD]%}||vr|d||in&|r|d|i|r|d|i| }| d|| fz|tjt!ddt#| d5} tj| }dddn #1swxYwYt j| n#t j| wxYw|S)NsAaction is None but will soon be a required parameter to ui.edit()editors.txt)prefixsuffixrls>extra.suffix is not None but will soon be ignored by ui.edit()sdiffs.diffs .%s.hg.txtrLs editortmpinhgshg-rk-)r,suffixdirwbrnstransplant_sources HGREVISION)sintermediate-sourcessources rebase_sources HGEDITFORMs HG_PENDINGs%s "%s"s edit failed)rsonerr errprefix blockedtagr)rrrrrmkstemprfdopenrr tonativeeolr geteditorsystemr CanceledErrorrr fromnativeeolrunlink)r0textr:extraeditformpendingrepopathactionextra_defaultsrnrdirfdrrrsreditorrs reditzui.editgsD > NN*    !    yy##/,  ! !% ( ( ( W  FF  &"V+FF9%F ???,< = = D%E),,t3F   T 2t$$ 0(../// 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0!$'G#u,,"C.B(C$D$DEO  E>>NNM5<#@AAAE" : x8999 9 w7888^^%%F KK~-)N++$    dD!! 1Q&qvvxx00 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 IdOOOOBIdOOOOsU:I(D7 IDI D C)I4'H' I'H++I.H+/IIc|(|dtdd}d|z}|j}td|jDr|}||5|||||} dddn #1swxYwY| rG|rEdtj|dtj | fz} |rd|| fz} || | S) zexecute shell command with appropriate output stream. command output will be redirected if fout is not stdout. if command fails and onerr is None, return status, else raise onerr object as exception. Nisunknown_system_c3&K|] }|dV dSrNrD)rrs rr zui.system..s&00qt000000rrscwdouts%s %srs%s: %s) translate _keepalnumrgr rOr _runsystemr shellsplit explainexit) r0cmdrsrrqrrrs cmdsuffixrrcerrmsgs rrxz ui.systems^   dJ77=I+i7Jj 00T/000 0 0 C  $ $Z 0 0 I Ig3CHHB I I I I I I I I I I I I I I I  % #C((+$R((!F 9"i%88%--  s'B  BBc2tj||||S)z[actually execute the given shell command (can be overridden by extensions like chg)r)rrx)r0rrsrrs rrz ui._runsystemssG#FFFFrc |js|ru|tj}t|ddd}|t j|d}t j|d}t j|d|d}|dtj d |ddtj d |tj d |nbt j |d|d|d}|tj d ||jp|S) zprint exception traceback if traceback printing enabled or forced. only to call in exception handler. returns true if traceback printed.Nrcauserrs#Traceback (most recent call last): r) rTrexc_infor traceback format_tbformat_exception_onlyrr rur2format_exception)r0excforcercausetbexctbexconlyoutputs rrz ui.tracebacksR   E E{lnnCFGT22E #-eAh77!+CF33#9%(E!HMM;'crc (;(;<<'(8(899'(8(899 #3CFCFCFKKx22776??CCDDD!*U*rctjdkrd}ntjrd}nd}tjdp|dd|S)zreturn editor to usesplan9EsvimsvisHGEDITORrrj)r sysplatformisdarwinr rsrr )r0rs rrwz ui.geteditorsg  8 + +FF    FFF##K00 DKK 9f5 5  rc|js1|js*|ddstj|sdSt |S)z,setup the progbar singleton to the ui objectprogresssdisableN)rQrSrr shouldprint getprogbarr/s rrz ui._progbarsZ J ~ {J77 '--   4$rctsdS|j'|jjr|jdSdSdS)z:clear progress bar output if any. use it before any outputN) haveprogbarrprintedclearr/s rrz ui._progclearsM}}  F = $)> $ M   ! ! ! ! ! % $ $ $rctjddrfd}nj jj}nd}t j||||S)z0Create a progress helper for the specified topicrFc Jjdd|||||dS)Nr)rrposrunittotal)rlr)rrrrrr0s r updatebarz"ui.makeprogress..updatebar#sA ##$$rNcdSrrD)rrrrrs rrz"ui.makeprogress..updatebar2sr)rrlrrr)r0rrrrs` r makeprogresszui.makeprogresssw 4=, 6 6       ] & .II   ieDDDrc6|j|S)z=Returns a logger of the given name; or None if not registered)rnr)r0rs r getloggerz ui.getlogger7s}  &&&rc||j|<dS)zInstall logger which can be identified later by the given name More than one loggers can be registered. Use extension or module name to uniquely identify the logger instance. N)rn)r0rrs rrz ui.setlogger;s % drc|jsdSfd|jD}|sdS||z}tj|}|j}i|_ |D]}|||| ||_dS#||_wxYw)a2hook for logging facility extensions event should be a readily-identifiable subsystem, which will allow filtering. msgfmt should be a newline-terminated format string to log, and *msgargs are %-formatted into it. **opts currently has no defined meanings. Nc>g|]}||SrD)r)rr]events rrVzui.log..Ps*OOOqaii>N>NOOOOr)rnvaluesr byteskwargsrh) r0rmsgfmtmsgargsr activeloggersrregisteredloggersrs ` rrhzui.logCs}  FOOOODM$8$8$:$:OOO   Fw#D)) M  .' 3 3 4T2222 3.DMMM-DM - - - -s B B c@|jtj|||S|S)aVstyle msg based on supplied label If some color mode is enabled, this will add the necessary control characters to apply such color. In addition, 'debug' color mode adds markup showing which label affects a piece of text. ui.write(s, 'label') is equivalent to ui.write(ui.label(s, 'label')). )rbr colorlabel)r0rrs rrzui.label^s& ? &#D#u55 5 rrc |dds||d|sdSd|z}|dz }|jrctj|||j|j|dd|dtj|fzdStj }tj |d }||dd \}}}tj |tj |}}|d ||||fz|dd ||||~~dS) zissue a developer warning message Use 'stacklevel' to report the offender some layers further up in the stack. r all-warningsNs devel-warn: rs develwarns %s at: %srrs%s at: %s:%d (%s) )rrTrdebugstacktracerhrgrhr2getstackframesinspect currentframegetouterframesrr=r) r0r stacklevelr curframecalframefnamelinenors rrz ui.develwarnlsf x99 ~T__Xv%F%F~#a     j$*dj I I I HH!4Z!@!@AABC      +--H-h::H"*:"6qs"; E64"+E22H4Ed4K4K4E NN1S%4NN O O O HH4c5&$    rrc|dds|ddsdS|d|zz }|||ddS)zissue a deprecation warning - msg: message explaining what is deprecated and how to upgrade, - version: last version where the API will be supported, rrs deprec-warnNsF (compatibility will be dropped after Mercurial-%s, update your code.))rr )rr)r0rversionrs rr~z ui.deprecwarnsn OOHo 6 6 x88  F  #   sz.IIIIIrc|jS)zWThe environment variables that are safe to export, e.g. through hgweb. )rr/s rexportableenvironzui.exportableenvirons &&rc#Ki} |D];\\}}}||||||f<|||||' label if the dest isn't a structured channel, so that the message will be colorized. rrFrrs ui.%sN)rrr)rrrGrs rrrsp~~gdL%@@~#..TXXf=M=M1MMW  E$r):r|rrrrrrQrrvrrri18nrnoderrrrrrr r r r r rrrrrutilsrrrrrr3r2mapbytechrrangerr samplehgrcsr&r*r,rHobjectr rrJrrrrrrDrrrs                                XXs8#UU3ZZ00  86 sKK \888888        4   r&r&r&r&r&r&r&r&n?*** K K K     r