hg convert -s svn ... pretxncommit.crlf hook failed

Mads Kiilerich mads at kiilerich.com
Tue Jan 13 23:57:46 UTC 2015


On 01/13/2015 08:33 PM, Ernie Rael wrote:
> Greetings,
> I'm resurrecting some very old projects and want to convert them from 
> svn to Mercurial, there are multiple svn repositories involved. Seems 
> a few of the files have dos line endings (out of dozens) in at least 
> one of the repositories. See output of hg convert below. I don't even 
> have svn loaded on the system; I can load it, but I'd prefer not to if 
> it isn't needed. In my Mercurial.ini there is (some of these settings 
> are many years old)
>
>    [extensions]
>    hgext.win32text =

win32text is deprecated. Instead, there is a significantly better eol 
extension.

>
>    [encode]
>    ** = cleverencode:
>
>    [patch]
>    eol = crlf
>
>    [hooks]
>    pretxncommit.crlf = python:hgext.win32text.forbidcrlf
>
> (I know there's no [decode], should never be needed...)
>
> Any suggestions for getting an hg repo with unix line endings using 
> only the hg convert command? I looked at the "Customization" section 
> of ConvertExtension and I suppose a custom getfile could do the trick; 
> I'm wondering (hoping) there's a simpler way...

I doubt there is a simpler way. The EOL extension do not have convert in 
mind ... and the other way around. They might happen to work together in 
the expected way ... but I wouldn't expect it.

I would go the Customization route ... and perhaps keep using the eol 
extension to maintain the encoding.

/Mads




More information about the Mercurial mailing list