[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Subversion and samba

From: Ryan Schmidt <subversion-2008a_at_ryandesign.com>
Date: Fri, 14 Mar 2008 05:28:10 -0500

On Mar 14, 2008, at 05:10, <nicklist_at_planet.nl> <nicklist_at_planet.nl>

>> I have a subversion working copy in unix. I have configured samba
>> on my unix box so that I can access the working copy from windows.
>> I have modified files in windows and commit them using TortoiseSVN
>> on windows.
>> When I check / open the files in unix, I see that there are
>> control-M characters in each file that I committed from windows.
>> Is there any configuration / settings available in subversion or
>> Tortoise SVN which will avoid adding control characters when files
>> modified and committed from windows.
>> Also, I don't see the TortoiseSVN Icons on the samba shared
>> working copy in windows.
> First thing, don't share working copies between OS's. Check out a
> local working copy, and synchronize them with svn up.

Sure, where possible, that's the best idea. Sometimes, however, it's
nice to share working copies. We did this in the web design shop
where I worked. There was one LAMP server (Linux/Apache/MySQL/PHP)
and each developer had his or her working copies under /home/
<username>/public_html, and they accessed this using Samba from their
Windows workstations and used TortoiseSVN to checkout, update,
commit, etc. It can work.

> To prevent ^M (wrong line endings) set the svn:eol-style property
> to native. That way it will rewrite the files when checking out to
> contain the right EOL style.

In our case, we decided to use LF line endings on all files, and
configure our Windows editors to recognize and retain LF line
endings, rather than Windows' usual CRLF. The editor we were using
(UltraEdit) was rather peculiar in that it required (IIRC) four
separate settings in order to accomplish this. And developers were
frequently having to reinstall Windows, and then they forgot to set
one or more of the required settings in the editor, such that we
fairly frequently got files committed with the wrong line endings in
them. This could have been avoided if we had set svn:eol-style=LF on
all files and/or installed a pre-commit hook to reject commits of
text files containing ^M.

To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-03-14 11:28:58 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.