tags:

views:

249

answers:

2

I'm using a windows PC and editing files checked out from SVN, which has files checked in using DOS.

I use cygwin and when I either create a new file or patch a file using cygwin binaries the file format is unix. Really I need to always use DOS format for these so my colleagues are not inconvenienced.

Is there any way I can have cygwin use DOS format for say a bash session?

I appreciate I can run unix2dos against such files but this is a pain - I'd rather just have them as DOS to begin with if possible.

+1  A: 

You can choose the UNIX or DOS file format during the installation of cygwin.

Phong
ok - this lead me to checkout mount options for cygwin, but using binary mount still gives me unix files when using patch where both file formats are dos.
Ben
+2  A: 

You can make SVN do this conversion for you automatically. Check out propset and the eol-style option:

http://svnbook.red-bean.com/en/1.1/ch07s02.html#svn-ch-7-sect-2.3.5

This will make the files always have the newline sequence native to the platform on which you checked out the files (i.e., you may get them in LF and the other ones will have the same files with CRLF):

svn propset svn:eol-style native put-your-filenames-here
Emil Vikström
ok, that's a good point. I'd quite like this behaviour beyond svn also. I didn't say that in my original question so I'm moving the goalposts there - sorry :-)I'll certainly consider this one, so thanks.
Ben