Danny Rancher
Danny Rancher

Reputation: 2005

Using autoprops in eclipse for all files and folders in an svn project

Pre-commit triggers recently introduced to my institution's svn are proving troublesome.

They require every file to have the property:

Manually (in eclipse), I can right-click on the Java Project Folder and navigate Team>SetProperty. I then enter the properties listed above one by one ticking apply property recursively to all resources before clicking OK.

I am then able to commit.

This process is arduous and has to be repeated every time a new file is introduced.

As a result, I am keen to implement the use of autoprops within eclipse.

Navigating Window>Preferences>Team>SVN>Properties Configuration, I import the following file:

[auth]

[helpers]

[tunnels]

[miscellany]
enable-auto-props = yes

[auto-props]
*.* = svn:mime-type=text/plain;svn:eol-style=native

This works great for files. However, the settings are not applied to newly created directories.

Any ideas would be appreciated.

Regards.

Upvotes: 4

Views: 1265

Answers (1)

bahrep
bahrep

Reputation: 30662

If you use Subversion 1.8 or newer client then you can start using the svn:auto-props versioned property to set these svn:mime-type, svn:eol-style and other properties automatically. See the following articles:

This works great for files. However, the settings are not applied to newly created directories.

The value of auto-props section you have is *.*. The property applies only to files and directories with the name like foo.bar. You can leave just * and the property will apply to all newly-added items.

Upvotes: 2

Related Questions