Re: CVS->GIT with CRLF eols in the GIT repository

Gh Savulescu <[email protected]> Sat, 9 Nov 2013 18:56:16 +0200
Newsgroups gmane.comp.version-control.subversion.cvs2svn.user
Message-ID <[email protected]>
Hi again,

> How cvs2git handles line endings is very flexible if you are willing to
> do some manual configuration.  Check out the following documentation:
>
>     doc/properties.txt
>     doc/text-transformations.txt
>
> I guess you'll want to set _eol_fix to '\r\n' on the files in question,
> for example by using --auto-props=FILE (or an AutoPropsPropertySetter).
>  I believe that to use this facility you will have to --use-cvs or
> --use-rcs as opposed to --use-external-blob-generator.
> ...

Thanks for the suggestions.

In the meantime I looked at the code, and figured out that --default-eol 
does not have any effect for CVS->GIT. All the stuff up to and including 
setting svn:eol-style properties is done, but then for GIT output this 
property is not checked anymore to set _eol_fix. Now I have a patch that 
fixes this and seems to do the job. I'll post it after I'll do some more 
cleaning-up and testing.

I also have, if anybody interested, a patch to add an --exclude-path 
commandline option. Can be used one or more times to "fill" the 
excluded_paths list without the need for an options file. I used it to 
exclude .gitattributes (which I retrofitted into the CVS repo in preparation 
of the CVS->GIT conversion, but which creates problems with my intended 
workaroud for the GitEye missbehaviour I mentioned).

Once these 2 done, I stumbled against another problem with cvs2svn/git/etc. 
Even if the CVS repo was created by an old version of "standard" CVS, I used 
CVSNT for a long time so some "*,v" files have the text-vs-binary option in 
the admin header but many others have this setting per revision. So before 
my fixes the conversion worked simply because, although cvs2git though some 
binary files are text, it did not apply any --default-eol and thus did not 
change anything in the files. Now I'm working to implement handling of 
per-revision text-vs-binary attributes. If/when I'll have something that 
works, I'll post the patches here. I am almost Python-ignorant, so thing are 
not going that fast...

sags

------------------------------------------------------
http://cvs2svn.tigris.org/ds/viewMessage.do?dsForumId=1670&dsMessageId=3068161

To unsubscribe from this discussion, e-mail: [[email protected]].