Subversion hosting, CVS hosting, Bugzilla hosting and software collaboration Providing hosted Subversion, CVS and Bugzilla repositories

Ask The Source

Go To My Account
Bugbox Icon


This month's question - Summer 2008

Q: Hi Greg,

Hi Greg, I committed a Perl script to my Subversion repository and want to check it out on a Linux machine and run it.

When I check it out, its execute bit isn't set, so I have to set it manually. Is there a way to configure Subversion to do that automatically? -- D.F.

A: Subversion includes a feature to do exactly what you want. Here is an example session with a non-executable Perl script. Notice that I use the svn propset command to set the svn:executable property on the file. Once this property is set, when Subversion checks the file out of the repository, it will set its execute bit automatically.

$ ls -l
total 2
-rw-r--r--  1 glarkin  glarkin  209 Jul 23 18:01
$ svn propset svn:executable yes
property 'svn:executable' set on ''
$ svn commit -m "Added exec prop"
Committed revision 2.
$ ls -l
-rwxr-xr-x  1 glarkin  glarkin  209 Jul 23 18:01
$ svn propget svn:executable
Finally, keep the following caveats in mind:
  • This only works on filesystems that honor the executable bit, i.e. not NTFS, FAT32, etc.
  • File properties are versioned, so don't forget to commit after changing them.


Ask the Source is a regular feature of the email newsletter,

Do you have a question for The Source? Submit one today, and we'll review it for inclusion in a future edition of!

For a complete list of all "Ask The Source" questions and answers, please visit the archives page.



News (more...)

Articles (more...)

Sign up for or view archives




hosted solutions | pro servs | company | sales | support | resources
home | contact | client login

Copyright © 1999-2023, LLC. All Rights Reserved.
usage agreement | policies