win32text deprecation, trying to use eol extension instead
Haszlakiewicz, Eric
EHASZLA at transunion.com
Fri Feb 25 16:28:59 UTC 2011
>From: Martin Geisler [mailto:mg at aragost.com]
>"Haszlakiewicz, Eric" <EHASZLA at transunion.com> writes:
>> Since the win32text extension is deprecated I'm trying to switch over
>> to using the eol extension, but I'm having some problems:
>>
>> 1) Where do I put the .hgeol file? I have lots of repositories and I
>> don't want to update them all. (and for policy reasons here at work, I
>> really shouldn't be changing many of them except as part of an
>> official project)
>Indeed... as 'hg help eol' explains, you put the [patterns] section into
>the .hgeol file in the root of your repository, commit the file and push
>it so that everybody has the same rules.
>
>I'll update the documentation to be more explicit about where to put the
>file.
So there isn't any way to have global rules? It's going to be a real pain to have to update dozens of different repositories. ugh.
>> 2) How do I use cleverencode/cleverdecode like I could with win32text?
>> Trying to list that in .hgeol just errors out with "ignoring unknown
>> EOL style". I don't want to have to keep updating the list of patterns
>> every time someone adds a file with a new extension (or even with some
>> wonky name w/o an extension).
>
>You should be able to say
>
> [encode]
> cleverencode:
> [decode]
> cleverdecode:
>and that will take care of converting files to LF format in the
>repository and CRLF in the working copy.
Nope, that didn't work:
hg: parse error at C:\Documents and Settings\ehaszla\mercurial.ini:27: cleverencode:
and using
[encode]
** = cleverencode:
complains about "'cleverencode:' is not recognized as an internal or external command, operable program or batch file.", probably because it's only available when win32text is enabled.
It seems like the win32text extension was deprecated way too early. Would it be possible to un-deprecate it until the eol extension supports global pattern config, and automatic detection of which files need to have line endings changes?
>> 3) Is the hgext.win32text.forbidcrlf hook going to be moved to the
>> eolextension? If not, how do I reject commits of files with crlf line
>> endings? The hook seems to still work, even without the win32text
>> extension enabled, but I'm worried that it'll break when win32text is
>> removed.
>
>The help (see 'hg help eol') tells you that the eol extension provides
>eol.hook for this as well.
This eol.hook isn't mentioned anywhere on the online EolExtension page. Unless I'm sitting at the command line on a unix machine I'm looking at the web pages to figure out how to do things. I imagine many (most?) other people are too. Could you possibly update that with whatever is new?
This is especially useful since "hg help eol" doesn't actually do anything if you're not already using the extension.
eric
More information about the Mercurial
mailing list