comparison hgext/eol.py @ 12979:733345a127ca

eol: fix win32text encode/decode filter names
author Martin Geisler <mg@lazybytes.net>
date Sat, 13 Nov 2010 15:46:51 +0100
parents 793563fd88c0
children df7c2f81afd5
comparison
equal deleted inserted replaced
12978:5ac9c903e7d2 12979:733345a127ca
59 the extension convert files with inconsistent EOLs. Inconsistent 59 the extension convert files with inconsistent EOLs. Inconsistent
60 means that there is both ``CRLF`` and ``LF`` present in the file. 60 means that there is both ``CRLF`` and ``LF`` present in the file.
61 Such files are normally not touched under the assumption that they 61 Such files are normally not touched under the assumption that they
62 have mixed EOLs on purpose. 62 have mixed EOLs on purpose.
63 63
64 The extension provides ``cleverencode:`` and ``cleverdecode:`` filters
65 like the deprecated win32text extension does. This means that you can
66 disable win32text and enable eol and your filters will still work. You
67 only need to these filters until you have prepared a ``.hgeol`` file.
68
64 See :hg:`help patterns` for more information about the glob patterns 69 See :hg:`help patterns` for more information about the glob patterns
65 used. 70 used.
66 """ 71 """
67 72
68 from mercurial.i18n import _ 73 from mercurial.i18n import _
103 filters = { 108 filters = {
104 'to-lf': tolf, 109 'to-lf': tolf,
105 'to-crlf': tocrlf, 110 'to-crlf': tocrlf,
106 'is-binary': isbinary, 111 'is-binary': isbinary,
107 # The following provide backwards compatibility with win32text 112 # The following provide backwards compatibility with win32text
108 'cleverencode': tolf, 113 'cleverencode:': tolf,
109 'cleverdecode': tocrlf 114 'cleverdecode:': tocrlf
110 } 115 }
111 116
112 117
113 def hook(ui, repo, node, hooktype, **kwargs): 118 def hook(ui, repo, node, hooktype, **kwargs):
114 """verify that files have expected EOLs""" 119 """verify that files have expected EOLs"""