�t�c@s�ddlZddlZddlmZd�Zee_xUeejj��D]>Zej dd�Z
ejej dd�Zeeje
<qPWejZ
d�Zee_edkr�ddlZej�ndS(i�N(tNumbercCs�t|t�r||St|t�r;|jdd�}nt|t�r_|jdd�}nt|t�r�g}x?|D]7}t|t�r�|jdd�}n|j|�q{Wt|�}n||}|jdd�S(s\Custom implementation of a formatter for bytestrings.
This function currently relies on the string formatter to do the
formatting and always returns bytes objects.
>>> bytesformatter(20, 10)
0
>>> bytesformatter('unicode %s, %s!', ('string', 'foo'))
b'unicode string, foo!'
>>> bytesformatter(b'test %s', 'me')
b'test me'
>>> bytesformatter('test %s', 'me')
b'test me'
>>> bytesformatter(b'test %s', b'me')
b'test me'
>>> bytesformatter('test %s', b'me')
b'test me'
>>> bytesformatter('test %d: %s', (1, b'result'))
b'test 1: result'
sutf-8tsurrogateescape(t
isinstanceRtbytestdecodettupletappendtencode(tformattargstnewargstargtret((s8/sys/lib/python2.7/site-packages/mercurial/py3kcompat.pytbytesformatters
sutf-8RcCst|t�r|St|�S(N(Rtinttorigord(tchar((s8/sys/lib/python2.7/site-packages/mercurial/py3kcompat.pytfakeord?st__main__(tostbuiltinstnumbersRR
tlisttenvirontkeystkeyRtbkeytbvaluetordRRt__name__tdoctestttestmod(((s8/sys/lib/python2.7/site-packages/mercurial/py3kcompat.pyt<module>s )
|