\x89\x50\x4E\x47\x0D\x0A\x1A\x0A PNG  \x89\x50\x4E\x47\x0D\x0A\x1A\x0A  13\c@@sddlmZddlZddlZddlmZddlmZmZm Z m Z m Z m Z ddl mZmZdZdZeZd Zed Zead Zd Zed ZedZdS(i(tabsolute_importNi(t_(t demandimporttencodingterrort extensionstpycompattutil(tprocutilt stringutilc C@s%t|r2|}tj|jd|j}nk|jd}|dkrotjtd||fn|| } t j } t j rt j j| \} } | r| rt j | gt _ | } qntj"yttj| }Wnttfk rt j} ytdtj| }Wqttfk rt j}|jrx|jtdn|j| |jr|jtdn|j||jstd}nd }tjtd|| fd |qXnXWd QX| t _ y1x*|jdd D]}t||}q"WWn0tk rntjtd ||fnXt|stjtd ||fn|jtd||ftj}zy+|d|d|d|tj|}Wnt k r}t!|tj"r?|jtd||j#dfn,|jtd|t$j%t&|f|rwn|js|jtdn|jt't'fSXWd tj|}|j(dd|||X|r|rtj)td|n|jtd|n|t*fS(scall python hook. hook is callable object, looked up as name in python module. if callable returns "true", hook fails, else passes. if hook raises exception, treated as hook failure. exception propagates if throw is "true". reason for "true" meaning "hook failed" is so that unmodified commands (e.g. mercurial.commands.update) can be run as hooks without wrappers to convert return values.t.is(%s hook is invalid: "%s" not in a moduleshgext_%ss,exception from first failed import attempt: s-exception from second failed import attempt: s$run with --traceback for stack traces)%s hook is invalid: import of "%s" failedthintNis'%s hook is invalid: "%s" is not defineds(%s hook is invalid: "%s" is not callablescalling hook %s: %s tuitrepothooktypeserror: %s hook failed: %s is'error: %s hook raised an exception: %s s'(run with --traceback for stack trace) t pythonhooks,pythonhook-%s: %s finished in %0.2f seconds s%s hook failedswarning: %s hook failed (+tcallableRtsysbytest __module__t__name__trfindRt HookLoadErrorRtsystpathRt mainfrozentostsplitRt deactivatedt __import__tsysstrt ImportErrort SyntaxErrortexc_infot tracebackflagtwarnt tracebacktNonetgetattrtAttributeErrortnoteRttimert strkwargst Exceptiont isinstancetAborttargsRt strtolocaltstrtTruetlogt HookAborttFalse(R R thtypethnametfuncnameR-tthrowtobjtdtmodnametoldpathstmodpathtmodfilete1te2t tracebackhinttpt starttimetrtexctduration((s4/usr/lib64/python2.7/site-packages/mercurial/hook.pyRs                   $      +   c C@s*tj}i}|dk r_|j} |jj| | r_| jr_|j|ds  . _ -