\x89\x50\x4E\x47\x0D\x0A\x1A\x0A PNG  \x89\x50\x4E\x47\x0D\x0A\x1A\x0A  13\c@@sdZddlmZddlZddlmZddlmZddlm Z m Z ddl m Z dZ iZe jeZed d d eejd ejZid d6dd6Zidd6dd6ZddddZdZdZdZdZdZdZdZdZied6ed6ed6ed6ed 6ed!6ed"6ed#6Z d$Z!d%Z"d&Z#d'Z$d(Z%dS()sperform automatic newline conversion (DEPRECATED) Deprecation: The win32text extension requires each user to configure the extension again and again for each clone since the configuration is not copied when cloning. We have therefore made the ``eol`` as an alternative. The ``eol`` uses a version controlled file for its configuration and each clone will therefore use the right settings from the start. To perform automatic newline conversion, use:: [extensions] win32text = [encode] ** = cleverencode: # or ** = macencode: [decode] ** = cleverdecode: # or ** = macdecode: If not doing conversion, to make sure you do not commit CRLF/CR by accident:: [hooks] pretxncommit.crlf = python:hgext.win32text.forbidcrlf # or pretxncommit.cr = python:hgext.win32text.forbidcr To do the same check on a server to prevent CRLF/CR from being pushed or pulled:: [hooks] pretxnchangegroup.crlf = python:hgext.win32text.forbidcrlf # or pretxnchangegroup.cr = python:hgext.win32text.forbidcr i(tabsolute_importN(t_(tshort(tpycompatt registrar(t stringutilsships-with-hg-coret win32texttwarntdefaults (^|[^ ]) tCRLFs tCRs tclevertmaccC@sU||krQ|rQ|rQ|rQ|jtd|t||jjdfndS(NsWARNING: %s already has %s line endings and does not need EOL conversion by the win32text plugin. Before your next commit, please reconsider your encode/decode settings in Mercurial.ini or %s. thgrc(RRt newlinestrtvfstjoin(tstnewlinetuitrepotfilename((s5/usr/lib64/python2.7/site-packages/hgext/win32text.pyt checknewlineNscK@s t|d|tjd|S(Ns s\1 (Rt re_single_lftsub(Rtcmdtkwargs((s5/usr/lib64/python2.7/site-packages/hgext/win32text.pyt dumbdecodeZscC@s|jddS(Ns s (treplace(RR((s5/usr/lib64/python2.7/site-packages/hgext/win32text.pyt dumbencode_scK@s t|d||jddS(Ns s (RR(RRR((s5/usr/lib64/python2.7/site-packages/hgext/win32text.pyt macdumbdecodebscC@s|jddS(Ns s (R(RR((s5/usr/lib64/python2.7/site-packages/hgext/win32text.pyt macdumbencodefscK@s#tj|st|||S|S(N(RtbinaryR(RRR((s5/usr/lib64/python2.7/site-packages/hgext/win32text.pyt cleverdecodeiscC@s tj|st||S|S(N(RR R(RR((s5/usr/lib64/python2.7/site-packages/hgext/win32text.pyt cleverencodens cK@s#tj|st|||S|S(N(RR R(RRR((s5/usr/lib64/python2.7/site-packages/hgext/win32text.pyt macdecodesscC@s tj|st||S|S(N(RR R(RR((s5/usr/lib64/python2.7/site-packages/hgext/win32text.pyt macencodexs s dumbdecode:s dumbencode:s cleverdecode:s cleverencode:smacdumbdecode:smacdumbencode:s macdecode:s macencode:cK@st}t}|d}xtj|jj||jddD]} || } x| jD]} | |ksc| |ksc| | krqcn|j| | | j } t j |  rc|| krc|s|j t dt|n|j t dt| j| ft}qcqcWqFW|r||dkr|t|j} t|}|j t d| | ||fn|S(Nttipiis=attempt to commit or push text file(s) using %s line endings s in %s: %s tpretxnchangegroups To prevent this mistake in your local repository, add to Mercurial.ini or .hg/hgrc: [hooks] pretxncommit.%s = python:hgext.win32text.forbid%s and also consider adding: [extensions] win32text = [encode] ** = %sencode: [decode] ** = %sdecode: (tFalsetsetRtxranget changelogttiprevtrevtfilestaddtdataRR RRRRtnodetTruetlowert filterstr(RRthooktypeR0RRthalttseenR%R,tctfR/tcrlftfilter((s5/usr/lib64/python2.7/site-packages/hgext/win32text.pyt forbidnewlines.   $ )  cK@st||||d|S(Ns (R;(RRR4R0R((s5/usr/lib64/python2.7/site-packages/hgext/win32text.pyt forbidcrlfscK@st||||d|S(Ns (R;(RRR4R0R((s5/usr/lib64/python2.7/site-packages/hgext/win32text.pytforbidcrscC@sA|jsdSx*tjD]\}}|j||qWdS(N(tlocalt_filterst iteritemst adddatafilter(RRtnametfn((s5/usr/lib64/python2.7/site-packages/hgext/win32text.pyt reposetups cC@s,|jddr(|jtdndS(NRRsKwin32text is deprecated: https://mercurial-scm.org/wiki/Win32TextExtension (t configboolRR(R((s5/usr/lib64/python2.7/site-packages/hgext/win32text.pytextsetups(&t__doc__t __future__Rtretmercurial.i18nRtmercurial.nodeRt mercurialRRtmercurial.utilsRt testedwitht configtablet configitemR1tcompilet MULTILINERRR3tNoneRRRRRR!R"R#R$R?R;R<R=RDRF(((s5/usr/lib64/python2.7/site-packages/hgext/win32text.pyt*sJ            +