cvs2hg emit .hgeol?
Greg Ward
greg-hg at gerg.ca
Wed Aug 24 02:20:32 UTC 2011
On Mon, Aug 22, 2011 at 6:01 PM, Tom Udale <tom at ionoptix.com> wrote:
> I have a cvs2hg question and I hope this is an appropriate place to ask it.
Sure, why not. Either here or the cvs2svn users list is fine by me.
> I had this fantasy that if I set the DefaultEOLStyleSetter('native') setter
> in my options file (i.e. uncommented it and commented out
> DefaultEOLStyleSetter(None)) that cvs2hg would emit a checked in .hgeol file
> in the resulting hg repository.
Hahaha. Nice try.
> I tried this and there is no .hgeol.
Historical note: cvs2hg precedes the eol extension. So not only did
this feature never occur to me when I was writing cvs2hg, it never
*could* have occurred to me due to causality. Darn those pesky
fundamental limitations of the universe.
The good news is that cvs2{svn,hg} is written in a very extensible
style, so it's not too hard to add your own behaviour. Three cheers
for the cvs2svn developers: it's a great piece of software. I suggest
you sneak in a synthetic revision 0 that adds the .hgeol you want.
That way, it's *always there* no matter what old changeset you update
to.
(The docs for eol are unclear, but from peeking at the code it looks
like it reads .hgeol from the working dir. So if you add .hgeol
*after* your CVS conversion, then people working at tip are fine and
benefit from eol. But if someone updates to an old pre-conversion
changeset, there is no .hgeol file and thus I'm not sure what eol will
do.)
I did a similar trick to add .hgignore to our Mercurial repo before
any changesets converted from CVS. Worked great, although it does look
a bit weird having rev 0 from 2010 and rev 1 from 1998. ;-)
Greg
More information about the Mercurial
mailing list