How to set "execute" attribute to a file and check it in SVN from Windows?
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.
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
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.
精彩评论