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

Re: File permissions are incorrect after directory copy in 1.7

From: Fergus Slorach <sugref_at_gmail.com>
Date: Sun, 27 May 2012 11:41:04 +1200

Hi Bert,

Yes, the same recipe in 1.6.17 results in read-only files without the revert.

Actually, in that version, the files are read-only before the commit, which
isn't the desired behavior either - this thread seems to be related:

   http://svn.haxx.se/users/archive-2010-10/0228.shtml

fergus

On 05/27/2012 10:53 AM, Bert Huijben wrote:
>
>
>> -----Original Message-----
>> From: Fergus Slorach [mailto:sugref_at_gmail.com]
>> Sent: zaterdag 26 mei 2012 23:57
>> To: dev_at_subversion.apache.org
>> Subject: File permissions are incorrect after directory copy in 1.7
>>
>> In Subversion 1.7.5:
>>
>> If a directory containing svn:needs-lock files is copied and
>> committed, the needs-lock files are left writeable.
>>
>> The writeable state can be resolved by running 'svn revert' on
>> the files, even though the status indicates there is nothing to
>> revert.
>>
>> Recipe and run-through results below.
>
> Did you check if this is a regression.
>
> If it is not, I'm not sure if we should call it a bug.
>
> The copied files are no longer unmodified and have a new (future) URL that
> is not locked and can't be locked.
>
> I assume that they get the read only flag after a commit makes them
> 'unmodified'?
>
> Bert
>>
>> Thanks,
>>
>> fergus
>>
>>
>> Recipe:
>>
>> cd /tmp
>> svnadmin create repos
>> svn co file:///tmp/repos/ copy_test
>> cd copy_test
>> svn mkdir foo
>> touch foo/bar.txt
>> svn add foo/bar.txt
>> svn propset svn:needs-lock 1 foo/bar.txt
>> svn commit -m 'Added'
>> svn copy foo goo
>> svn commit -m 'Copied'
>> ls -l goo # goo/bar.txt is writeable
>> svn st -u -v goo # goo/bar.txt has no status
>> svn revert goo/bar.txt # goo/bar.txt is reverted
>> ls -l goo # goo/bar.txt is now read-only
>>
>> Run of the recipe:
>>
>> /tmp $ cd /tmp
>> /tmp $ svnadmin create repos
>> /tmp $ svn co file:///tmp/repos/ copy_test
>> Checked out revision 0.
>> /tmp $ cd copy_test
>> /tmp/copy_test $ svn mkdir foo
>> A foo
>> /tmp/copy_test $ touch foo/bar.txt
>> /tmp/copy_test $ svn add foo/bar.txt
>> A foo/bar.txt
>> /tmp/copy_test $ svn propset svn:needs-lock 1 foo/bar.txt
>> property 'svn:needs-lock' set on 'foo/bar.txt'
>> /tmp/copy_test $ svn commit -m 'Added'
>> Adding foo
>> Adding foo/bar.txt
>> Transmitting file data .
>> Committed revision 1.
>> /tmp/copy_test $ svn copy foo goo
>> A goo
>> /tmp/copy_test $ svn commit -m 'Copied'
>> Adding goo
>>
>> Committed revision 2.
>> /tmp/copy_test $ ls -l goo
>> total 0
>> -rw-rw-r-- 1 fergus fergus 0 May 27 09:45 bar.txt
>> /tmp/copy_test $ svn revert goo/bar.txt
>> Reverted 'goo/bar.txt'
>> /tmp/copy_test $ ls -l goo
>> total 0
>> -r--r--r-- 1 fergus fergus 0 May 27 09:45 bar.txt
>> /tmp/copy_test $ svn revert goo/bar.txt
>
>
Received on 2012-05-27 01:41:41 CEST

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

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