Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert the end of line pattern in a Mercurial repository

I have a repository that was populated with files with Windows end of line markers, but I intended to use the Unix EOL pattern.

One option is to manually (dos2unix) change all the files, then commit a changeset that completely overwrites the repository. I can do this if necessary, but I'd like to avoid it. Is it possible, using hg convert or otherwise, to rebuild the repository using a different EOL marker? I considered exporting all of the changes, converting those, and rebuilding the repository that way, but the Mercurial wiki suggests export should not be trusted on merge changesets, which seems to rule out that option.

I want to avoid using the EOL extension if possible.

like image 422
Martin Avatar asked Mar 31 '11 03:03

Martin


Video Answer


1 Answers

I know you want to avoid the eolExtension, but it seems the least disruptive solution to me:

It would ensure that, from now on, any working copy respect your EOL after an hg update, and that setting would propagate through clones.

like image 185
VonC Avatar answered Sep 30 '22 09:09

VonC