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

Re: How do I change file permissions?

From: Jeremy Pereira <jeremyp_at_jeremyp.net>
Date: 2007-10-12 10:39:56 CEST

On 11 Oct 2007, at 13:48, brian@enchanter.net wrote:

> Jeremy Pereira wrote:
>
>> On Unix systems, the eventual permissions of the reverted file is
>> determined by your umask setting. If you set umask to 007, the
>> reverted file will have rw-rw---- permissions. Otherwise you are
>> going to need to chmod it after the revert.
>
> That wasn't what was happening. 'svn revert' reverted files back to
> whatever permissions they had when they were first checked in, even
> if I
> did an 'svn remove' and then 'svn add'ded them back in.

I don't want to get into an "Oh no it isn't, oh yes it is" argument,
but I tested the behaviour before I posted my response, and it is as
I said, at least on OS X.

jeremyp@miranda:testperms $svnadmin create testperms-repo
jeremyp_at_miranda:testperms $svn co file:///`pwd`/testperms-repo
testperms-wc
Checked out revision 0.
jeremyp@miranda:testperms $cd testperms-wc
jeremyp@miranda:testperms-wc $echo foo >afile
jeremyp@miranda:testperms-wc $svn add afile
A afile
jeremyp@miranda:testperms-wc $ls -l
total 8
-rw-r--r-- 1 jeremyp jeremyp 4 Oct 12 09:33 afile
jeremyp@miranda:testperms-wc $svn commit -m "Initial commit"
Adding afile
Transmitting file data .
Committed revision 1.
jeremyp@miranda:testperms-wc $echo bar >>afile
jeremyp@miranda:testperms-wc $svn status
M afile
jeremyp@miranda:testperms-wc $ls -l
total 8
-rw-r--r-- 1 jeremyp jeremyp 8 Oct 12 09:34 afile
jeremyp@miranda:testperms-wc $umask 007
jeremyp@miranda:testperms-wc $svn revert afile
Reverted 'afile'
jeremyp@miranda:testperms-wc $ls -l
total 8
-rw-rw---- 1 jeremyp jeremyp 4 Oct 12 09:35 afile
jeremyp@miranda:testperms-wc $echo bar >>afile
jeremyp@miranda:testperms-wc $umask 077
jeremyp@miranda:testperms-wc $svn revert afile
Reverted 'afile'
jeremyp@miranda:testperms-wc $ls -l
total 8
-rw------- 1 jeremyp jeremyp 4 Oct 12 09:35 afile

>
> The solution we came up with was to chmod all the files to the
> permissions
> we wanted, then check them all in to a new repository.
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Oct 12 11:10:08 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.