cvs2hg emit .hgeol?
Martin Geisler
mg at aragost.com
Fri Aug 26 07:44:09 UTC 2011
Tom Udale <tom at ionoptix.com> writes:
> Hi Martin,
>
> Actually, there is some hoseage (if you will). The CVS repo we had was
> running on linux. Everything was checked out on Windows. For whatever
> reason (my understanding is that the CVS internal eol format, at least
> on unix, is unix style) everything in the hg repo is unix style eol.
> Thus they currently get checked out on my Windows machine this way.
>
> This is not actually a problem for most files because the editors and
> compilers can handle either style eol. The most notable exceptions are
> notepad (the default windows editor) which is only a problem in the
> sense of "it would be nice to work", and the resource compiler, which
> is not optional. It completely barfs on RC files with the wrong ending
> style.
Okay, I see. I naively assumed that your existing files in CVS had the
right newline formats :-)
I'm glad to see you've found a way to inject a .hgeol file in the 0th
revision with the --existing-hgrepos flag for cvs2hg. That sounds like a
good way to achieve what you want.
> Actually, now that I think about it, there is something that I don't
> understand about your suggested solution.
>
> I could, in principal, check out very early in the repo and run an eol
> search and replace on all the RC files, converting them from unix to
> dos style. But when I commit them, that basically would just create a
> branch.
>
> What I would want though is to have that change suddenly appear in the
> RC files going forward in the tree from that point. Otherwise, if I
> checked out just one change set into the future, I would be right back
> where I was, right?
Definitely -- if you commit a .hgeol file based on an old changeset you
get a branch and the .hgeol file wont affect any of the existing
changesets.
> So I don't understand how to merge this change in such that it would
> appear in the files in the future, which I think is what you are
> suggesting is possible with this bit:
>
>> To me, that sounds like a rare problem. If you encounter it, then
>> just copy in a good .hgeol file and fix the offending files with a
>> new commit.
>
> This would only fix the offending files at that point in time right,
> not into the future?
It would fix the files on the branch you created by making a commit
based on a old changeset -- that's all.
--
Martin Geisler
aragost Trifork
Professional Mercurial support
http://mercurial.aragost.com/kick-start/
More information about the Mercurial
mailing list