The Linux Page

SVN and executables

One of the annoying thing with Subversion (SVN) is that at times it will add a execute flags to your files and there does not seem to be a function to easily remove that execute flag.

Doing a chmod on your file and trying an update, status or commit does not work. One way is to (1) copy your file, (2) delete the file from your SVN, (3) re-add the file after you carefully changeed the mode with a "chmod 644" or something similar. But of course, that means you lose your history...

So? How does it works? The fact is that the execute flag is saved as a property in the SVN repository and is actually called svn:executable. That property can simply be deleted to remove the execute flag from your file. The following is how you can see the property:

  prompt> svn proplist filename.ext
  Properties on 'tableofcontents-module.pot':
    svn:executable

There we go! The svn command line knows to check for that special property and whenever it is set, it applies a chmod a+x on your files... So now use the propdel command to remove the property:

  prompt> svn propdel svn:executable filename.ext

You're done!

Hope this helps someone...