How to set "execute" attribute to a file and check it in SVN from Windows?

26,607

Solution 1

SVN ignores UNIX file permissions when commiting. The way that you set exec permissions on a file is to change the svn properties for that file. If you are on Windows, the easy way to do this is to install Tortoise SVN. Then after you have committed, use Tortoise to open the repo-browser. Find a file that needs to be executable and right-click it to open properties.

The dialog that appears is the SVN properties dialog. Click New to add a new property, select svn:executable from the dropdown list, and set the property value to *.

That's it. When you click OK, it is committed to the SVN repo. The next time you, or the build machine, do an svn update, that file will have executable permissions on Unix/Linux.

Solution 2

svn propset svn:executable "*" someScript

The syntax is propset key value so svn:executable is the key and "*" is the value

someScript is the filename

Share:
26,607
Mark
Author by

Mark

Updated on July 23, 2022

Comments

  • Mark
    Mark almost 2 years

    I have SVN configured in Linux at a different location and I need to check-in a shell script to SVN with executable attribute ON from Windows. I use Bamboo as CI, which checks out sources from SVN and does the periodic build. It throws error that shell script is not executable. (Bamboo run as root).

    What is the best way to set the executable permission?

    I don't use any SVN client and use eclipse to check-in and check-out. If SVN client is the only, how do I find a version that is compatible with SVN plugin that I use in eclipse. I had a compatibility problem earlier. When I checked-in a file from Tortoise, I couldn't checkout that file from Eclipse.