On 22.11.2013 12:45, Philip Martin wrote:
> Cathy Fitzpatrick <cathy_at_cathyjf.com> writes:
>> A close look at `svn_subst_copy_and_translate4` confirms that my guess
>> was correct. If the file does not have an EOL property, then
>> `svn_subst_copy_and_translate4` behaves as you say. If, however, it
>> does have an EOL property, then the last thing that
>> `svn_subst_copy_and_translate4` does is copy the file permissions from
>> the file under /tmp to the final destination file (line 1818 of
>> libsvn_subr/subst.c in r1544295). You are correct that it is the file
>> with the correct permissions that is copied to the final destination,
>> but then `svn_subst_copy_and_translate4` overwrites those permissions
>> (if and only if the file has an EOL property). So that's why we were
>> seeing different things.
> That's ugly. I think svn_subst_copy_and_translate4 should have the same
> effect on permissions irrespective of keywords, eol, etc. I'm not sure
> which of the two behaviours is correct.
We're obviously making a lot of assumptions about which permissions are
correct. When we replace a file in the working copy, we should copy the
file's permissions, not invent new ones based on either the source
(which may be an arbitrary temporary file) or the umask.
Of course, this is moderately easy on Unix (ignoring filesystems that
support ACLs) and quite a major pain on Windows.
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
Received on 2013-11-22 12:58:04 CET