korsygfhrtzangaiide
Elepffwdsff
/
lib64
/
python2.7
/
site-packages
/
mercurial
/
Upload FileeE
HOME
� Hq�Qc @ s� d d l m Z m Z m Z d d l m Z d d l Z d d l Z d d l Z d d l Z i d d 6Z d � Z d � Z d � Z d � Z d e f d � � YZ d � Z d e j f d � � YZ d S( i����( t bint hext nullid( t _Nt defaultt branchc C s: | j d d � j d d � j d d � } | j d d � S( s >>> d = {'nl': chr(10), 'bs': chr(92), 'cr': chr(13), 'nul': chr(0)} >>> s = "ab%(nl)scd%(bs)s%(bs)sn%(nul)sab%(cr)scd%(bs)s%(nl)s" % d >>> s 'ab\ncd\\\\n\x00ab\rcd\\\n' >>> res = _string_escape(s) >>> s == res.decode('string_escape') True s \s \\s s \ns s \rt s \0( t replace( t text( ( s9 /usr/lib64/python2.7/site-packages/mercurial/changelog.pyt _string_escape s *c C s� t j � } x� | j d � D] } | r d | k rm | j d d � } | j d d � } | j d d � } n | j d � j d d � \ } } | | | <q q W| S( s� >>> sorted(decodeextra(encodeextra({'foo': 'bar', 'baz': chr(0) + '2'}) ... ).iteritems()) [('baz', '\x002'), ('branch', 'default'), ('foo', 'bar')] >>> sorted(decodeextra(encodeextra({'foo': 'bar', ... 'baz': chr(92) + chr(0) + '2'}) ... ).iteritems()) [('baz', '\\\x002'), ('branch', 'default'), ('foo', 'bar')] R s \0s \\s \\ s t t string_escapet :i ( t _defaultextrat copyt splitR t decode( R t extrat lt kt v( ( s9 /usr/lib64/python2.7/site-packages/mercurial/changelog.pyt decodeextra s !c C s@ g t | � D] } t d | | | f � ^ q } d j | � S( Ns %s:%sR ( t sortedR t join( t dR t items( ( s9 /usr/lib64/python2.7/site-packages/mercurial/changelog.pyt encodeextra2 s 3c C s5 d j g | j � D] } | j � ^ q � j d � S( s>