Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to automate property setting in SVN?

My subversion repository has a pre-commit hook that requires all files to have a SVN property before its commit.

I am setting this property manually making each addition of files and folders a 2-step commit.

How to automate this?

like image 703
Jader Dias Avatar asked Dec 23 '22 00:12

Jader Dias


2 Answers

Take a look at the Automatic property setting section in the TortoiseSVN documentation.

You can either locally configure each client as already explained by Josh, or alternatively put the configuration in the repository with the tsvn:autoprops property. The latter only works for TortoiseSVN clients though.

The command line client doesn't support server-side configuration of autoprops. There are some change requests related to this, e.g. issue 1974 and issue 1813.

like image 174
Wim Coenen Avatar answered Dec 24 '22 14:12

Wim Coenen


This depends on your client. In TortoiseSVN, for example, here are instructions for setting svn:eol-style on all .c, .cpp, and .h files:

  1. Go under the Start Menu, under TortoiseSVN, under Settings. Under the General tab, click Edit.
  2. Under [miscellany], uncomment enable-auto-props = yes
  3. Under [auto-props], add the following lines:
    *.c = svn:eol-style=native
    *.cpp = svn:eol-style=native
    *.h = svn:eol-style=native
    *.hpp = svn:eol-style=native
    

For the Subversion command-line client on Linux, edit ~/.subversion/config, then do steps #2 and #3 above.

like image 28
Josh Kelley Avatar answered Dec 24 '22 14:12

Josh Kelley