[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: how to perverse file permission in subversion

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: 2007-08-16 09:32:00 CEST

On Aug 15, 2007, at 20:52, ying lcs wrote:

> On 8/15/07, Ryan Schmidt wrote:
>
>> On Aug 15, 2007, at 18:42, ying lcs wrote:
>>
>>> When I check in files to subversion (with executable.
>>> permission), and
>>> then check them out again, they are no long executable.
>>>
>>> Can you please tell me if/how can i check the file permission when
>>> checking in/out of subversion?
>>
>> In general, Subversion does not preserve file permissions.
>>
>> There is a special case for the executable bit, however. If a file is
>> executable when checked into a Subversion repository, Subversion will
>> add the svn:executable property to the file. On checkout, if a file
>> has the svn:executable property, it will set the executable bit. You
>> can also set the svn:executable property manually for files that do
>> not already have it.
>
> But how can take advantage of this 'executable bit' feature in
> subversion?
>
> For example, how can I verify which files under the trunk has this
> 'executable bit' set? and than do a 'chmod +x' for all the files
> which has this 'executable bit' set?

Subversion handles everything automatically. As I said, if you "svn
add" a file which has the OS executable bit set (i.e. you have
previously done "chmod +x <file>") then Subversion automatically adds
the svn:executable property to the file. And if you check out a new
working copy (or updating an existing one), Subversion will
automatically set the OS executable bit on the newly-checked-out
files because it sees the Subversion svn:executable property on the
file.

If you have existing files in a working copy which do not have
svn:executable or the OS executable bit set, and you would like them
to, then "svn propset svn:executable '*' <file>" and commit it, and
Subversion will add the OS executable bit.

If there are certain file types which you would like to always have
as executable, define your auto-props in your ~/.subversion/config file.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Aug 16 09:30:55 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.