33

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.

Deduplicator
  • 44,692
  • 7
  • 66
  • 118
Mark
  • 335
  • 1
  • 3
  • 5
  • Does anything from this question help? http://stackoverflow.com/questions/56149/storing-file-permissions-in-subversion-repository – Chris Jul 29 '11 at 19:01
  • 2
    I don't see why this has so many close votes for "of topic" as SVN is clearly a programing tool. – Ian Ringrose Aug 01 '11 at 13:29
  • 1
    Thanks phasetwenty, it does help to understand the problem clearly. – Mark Aug 02 '11 at 09:23

2 Answers2

52

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

vinnyjames
  • 2,040
  • 18
  • 26
33

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.

Michael Dillon
  • 31,973
  • 6
  • 70
  • 106
  • Thanks Michael, its working. Same process I did last time but change the attribute and then checked it in with Tortoise client, so I had a compatibility issue. – Mark Aug 01 '11 at 11:10
  • Michael, I believe your first sentence, "SVN ignores UNIX file permissions when commiting" should be "SVN ignores changes in UNIX file permissions once a file has been added." – Mauritz Hansen Apr 10 '13 at 09:20