ó OåNc@sÒdZddlZeZeƒZyeejiiddƒWnek rZd„Z nXeZ defd„ƒYZ ddddd„Z ddd d d d d dddddddgZ d„Z d„ZdS(sU demandimport - automatic demandloading of modules To enable this module, do: import demandimport; demandimport.enable() Imports of the following forms will be demand-loaded: import a, b.c import a.b as c from a import b,c # a will be loaded immediately These imports will not be delayed: from a import * b = __import__(a) iÿÿÿÿNcCst||||ƒS(s'call _origimport with no level argument(t _origimport(tnametglobalstlocalstfromlisttlevel((s:/sys/lib/python2.7/site-packages/mercurial/demandimport.pyt_import#st _demandmodcBsMeZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z RS(smodule demand-loader and proxycCsrd|kr0|jddƒ\}}|g}n |}g}tj|d||||fƒtj|ddƒdS(Nt.it_datat_module(tsplittobjectt __setattr__tNone(tselfRRRtheadtresttafter((s:/sys/lib/python2.7/site-packages/mercurial/demandimport.pyt__init__+s  cCs|jdj|ƒdS(s%add to the list of submodules to loadiN(R tappend(RR((s:/sys/lib/python2.7/site-packages/mercurial/demandimport.pyt_extend4scsŸ|js›|j\}}}}t|||ƒ}‡fd†‰x|D]}ˆ||ƒqFW|r…|j|ƒ|kr…|||is(R R (R((s:/sys/lib/python2.7/site-packages/mercurial/demandimport.pyt__repr__Ms cOstdt|ƒƒ‚dS(Ns%s object is not callable(t TypeErrortrepr(Rtargstkwargs((s:/sys/lib/python2.7/site-packages/mercurial/demandimport.pyt__call__QscCs6|dkrtj||ƒS|jƒt|j|ƒS(NR RR!R (s_datas_extends_loads_module(R t__getattribute__R!RR (Rtattr((s:/sys/lib/python2.7/site-packages/mercurial/demandimport.pyR(Ss  cCs!|jƒt|j||ƒdS(N(R!RR (RR)tval((s:/sys/lib/python2.7/site-packages/mercurial/demandimport.pyR Xs ( t__name__t __module__t__doc__RRR!R"R'R(R (((s:/sys/lib/python2.7/site-packages/mercurial/demandimport.pyR)s     c CsÒ| s|tks|dkr5t|||||ƒS|sád|krÑ|jddƒ\}}|r“|jddƒ|kr“t|||||ƒS||krÑt||tƒrÆ||j|ƒn||Snt|||ƒS|dkrt|||||ƒSt|||ƒ}xg|jdƒdD]R}t ||t ƒt krlt ||t||j |j ƒƒnt ||ƒ}q)WxH|D]@} t || t ƒt kr†t || t| |j |ƒƒq†q†W|SdS(Nt*RiR+iÿÿÿÿ(R.( tignoreRR RRt isinstanceRRRRRRR( RRRRRtbaseRRtcompR ((s:/sys/lib/python2.7/site-packages/mercurial/demandimport.pyt _demandimport\s.    % &t_hashlibt_xmlplustfcntlswin32com.gen_pyt_winregt pythoncomtpwdtgrptresourcetgtkt__main__t_ssltrfc822t mimetoolscCs tt_dS(s'enable global demand-loading of modulesN(R3t __builtin__t __import__(((s:/sys/lib/python2.7/site-packages/mercurial/demandimport.pytenable•scCs tt_dS(s(disable global demand-loading of modulesN(RRARB(((s:/sys/lib/python2.7/site-packages/mercurial/demandimport.pytdisable™s(R-RARBRR RR+RR#RRR3R/RCRD(((s:/sys/lib/python2.7/site-packages/mercurial/demandimport.pyts4    3#