EOL extension: Migrating from win32text

Colin Caughie c.caughie at indigovision.com
Tue Nov 9 08:08:54 CST 2010


> From: Martin Geisler [mailto:mg at aragost.com]
> Sent: 09 November 2010 10:09
> To: Colin Caughie
> Cc: mercurial-devel at selenic.com
> Subject: Re: EOL extension: Migrating from win32text
>
> Colin Caughie <c.caughie at indigovision.com> writes:
>
> > Hi Martin,
> >
> > I have a suggestion for the hgeol extension that I think would
> help
> > users such as ourselves who are looking to migrate from win32text.
> > What would you think about adding a global option that tells hgeol
> to
> > simulate win32text behaviour if no .hgeol file is found?
> >
> > My concern with migrating is that we have a lot of repositories,
> some
> > with several active branches (and some with branches that we think
> are
> > dead but which have a habit of unexpectedly coming back to life
> when a
> > customer finds a problem in an old release). So it would be
> difficult
> > to ensure that there will always be an .hgeol at the tip of each
> of
> > these repositories.
> >
> > I think this option would help to prevent messed up line endings
> > during the transition period. Eventually we'd hope to turn it off
> once
> > we have .hgeol files everywhere.
> >
> > What do you think?
>
> It would certainly make it easier for people to migrate if we can
> tell
> them to enable eol and that's it.
>
> It should be super easy to do this: just export our decode and
> encode
> filters under the names used by the win32text extension.

I hadn't thought of doing it that way. So the user continues to have

[encode]
** = cleverencode:

[decode]
** = cleverdecode:

in mercurial.ini.

The only downside (if I understand the code correctly) is that then any rules present in the .hgeol file will be appended to the global options instead of replacing them completely. But I guess that's not the end of the world.

I'll give that a try and submit a patch if it works.

Colin


Latest News at: http://www.indigovision.com/news2010.php


More information about the Mercurial-devel mailing list