diff --git a/contrib/sample.hgrc b/contrib/sample.hgrc --- a/contrib/sample.hgrc +++ b/contrib/sample.hgrc @@ -73,9 +73,9 @@ # hgext.churn = /home/user/hg/hg/contrib/churn.py -### win32text - line ending conversion filters for the Windows platform +### eol - automatic management of line endings -# hgext.win32text = +# hgext.eol = ### --- hgk additional configuration diff --git a/contrib/win32/mercurial.ini b/contrib/win32/mercurial.ini --- a/contrib/win32/mercurial.ini +++ b/contrib/win32/mercurial.ini @@ -43,6 +43,7 @@ editor = notepad ;churn = ;color = ;convert = +;eol = ;extdiff = ;fetch = ;gpg = @@ -63,39 +64,8 @@ editor = notepad ;record = ;transplant = ;win32mbcs = -;win32text = ;zeroconf = -; To use cleverencode/cleverdecode, you must enable win32text extension - -[encode] -; Encode files that don't contain NUL characters. - -; ** = cleverencode: - -; Alternatively, you can explicitly specify each file extension that -; you want encoded (any you omit will be left untouched), like this: - -; *.txt = dumbencode: - - -[decode] -; Decode files that don't contain NUL characters. - -; ** = cleverdecode: - -; Alternatively, you can explicitly specify each file extension that -; you want decoded (any you omit will be left untouched), like this: - -; **.txt = dumbdecode: - -[patch] -; If you enable win32text filtering, you will want to enable this -; line as well to allow patching to work correctly. - -; eol = crlf - - ; ; Define external diff commands ; diff --git a/doc/hgrc.5.txt b/doc/hgrc.5.txt --- a/doc/hgrc.5.txt +++ b/doc/hgrc.5.txt @@ -294,24 +294,9 @@ the command. where the standard shell I/O redirection operators often have strange effects and may corrupt the contents of your files. -The most common usage is for LF <-> CRLF translation on Windows. For -this, use the "smart" converters which check for binary files:: - - [extensions] - hgext.win32text = - [encode] - ** = cleverencode: - [decode] - ** = cleverdecode: - -or if you only want to translate certain files:: - - [extensions] - hgext.win32text = - [encode] - **.txt = dumbencode: - [decode] - **.txt = dumbdecode: +This filter mechanism is used internally by the ``eol`` extension to +translate line ending characters between Windows (CRLF) and Unix (LF) +format. We suggest you use the ``eol`` extension for convenience. ``defaults`` diff --git a/hgext/win32text.py b/hgext/win32text.py --- a/hgext/win32text.py +++ b/hgext/win32text.py @@ -7,6 +7,14 @@ '''perform automatic newline conversion + 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]