hg convert -s svn ... pretxncommit.crlf hook failed
Ernie Rael
err at raelity.com
Tue Jan 13 19:33:30 UTC 2015
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 =
[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... BTW, don't know yet if there
are any binary files in repos. One solution is to convert without the
hook, then put the hook back and fix as/when needed.
-ernie
$ hg convert -s svn AstroPersist
assuming destination AstroPersist-hg
initializing destination AstroPersist-hg repository
scanning source...
sorting...
converting...
27 First cut at database and persistence.
26 First cut at database and persistence.
attempt to commit or push text file(s) using CRLF line endings
in ed98a2441718: build.xml
in ed98a2441718: nbproject/build-impl.xml
in ed98a2441718: nbproject/genfiles.properties
in ed98a2441718: nbproject/project.properties
in ed98a2441718: nbproject/project.xml
transaction abort!
rollback completed
abort: pretxncommit.crlf hook failed
More information about the Mercurial
mailing list