Adding new files to the SVN repository

Everything concerning SVN, our wiki and this forum.

Moderator: PPS-Leaders

Post Reply
User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Adding new files to the SVN repository

Post by 1337 » Sun Dec 14, 2008 11:19 am

We are developing cross platform and that really does bring a few issues.
One of them is the line ending problem. But there is a solution, provided by SVN: It can store the line endings in unix format internally but your checkout will always have native style (cr+lf on windows for example).

However this feature can not be enabled server-side, but there is an automatic solution for the client.
The catch is that you need to enable it first by editing your svn config file. Look for "enable-auto-props" and set it to "yes" with a "=": "enable-auto-props = yes".
Then in the "[auto-props]" section, you can add wildcard matches for specific files. For instance there should already be a line "*.c = svn:eol-style=native".
I recommend the following settings:

Code: Select all

### Set enable-auto-props to 'yes' to enable automatic properties
### for 'svn add' and 'svn import', it defaults to 'no'.
### Automatic properties are defined in the section 'auto-props'.
enable-auto-props = yes

### Section for configuring automatic properties.
[auto-props]
### The format of the entries is:
###   file-name-pattern = propname[=value][;propname[=value]...]
### The file-name-pattern can contain wildcards (such as '*' and
### '?').  All entries which match will be applied to the file.
### Note that auto-props functionality must be enabled, which
### is typically done by setting the 'enable-auto-props' option.
*.c   = svn:eol-style=native
*.cc  = svn:eol-style=native
*.cpp = svn:eol-style=native
*.h   = svn:eol-style=native
*.hpp = svn:eol-style=native
*.txt = svn:eol-style=native
*.cmake = svn:eol-style=native
*.oxw = svn:eol-style=native
*.oxo = svn:eol-style=native
*.ini = svn:eol-style=native
*.cfg = svn:eol-style=native
*.bat = svn:eol-style=native
*.pkg = svn:eol-style=native
*.tcl = svn:eol-style=native
*.bat = svn:eol-style=native

*.sln = svn:eol-style=native
*.vsprops = svn:eol-style=native
*.vcproj = svn:eol-style=native
*.vcproj.user = svn:eol-style=native

*.png = svn:mime-type=image/png
*.jpg = svn:mime-type=image/jpeg
*.tga = svn:mime-type=image/tga
The reason why I bring this up is because merging gets very difficult (guaranteed conflict, at least with our svn version) when added the svn property some time later by someone else.

So: Please configure your client to automatically add the "svn:eol-style native" property to all newly added files. Thank you.
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
beni
Baron Vladimir Harkonnen
Posts: 949
Joined: Tue Oct 03, 2006 9:15 am
Location: Zurich
Contact:

Post by beni » Mon Dec 15, 2008 2:56 pm

Thanks, that's really useful to know. We should add this to the SVN tutorial!
"I'm Commander Shepard and this is my favorite forum on the internet."

User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Post by 1337 » Mon Dec 15, 2008 2:57 pm

indeed, thanks. but after the presentation ;)
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
greenman
Baron Vladimir Harkonnen
Posts: 360
Joined: Wed Oct 03, 2007 2:53 pm
Contact:

Post by greenman » Mon Dec 15, 2008 3:58 pm

i remember that i already changed this once upon a time on my computer, but i think it was lost during a o/s change ^^

reappled it again now, thanks
There are only 10 types of people in the world: Those who understand binary, and those who don't.

User avatar
x3n
Baron Vladimir Harkonnen
Posts: 810
Joined: Mon Oct 30, 2006 5:40 pm
Contact:

Re: Adding new files to the SVN repository

Post by x3n » Fri Jan 03, 2014 1:02 pm

I want to bump this topic up again because it seems to be forgotten.

So here's a reminder:
Please set the SVN-property "eol-style" to "native" for every new text-based file (.h, .cc, .txt, .cmake, .xml, etc) which is added to SVN.
Of course we cannot expect this from every pps student, but the assistants should do it when they merge the branches.

You can use the configuration from the first post or you can add it manually for each file.

Thanks!
Fabian 'x3n' Landau, Orxonox developer

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest