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

Re: Fwd: [PATCH] Fix for `svn patch` changing permissions of patched files

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Fri, 22 Nov 2013 11:27:59 +0000

Cathy Fitzpatrick <cathy_at_cathyjf.com> writes:

> As for why it's different on different machines -- it probably depends
> on some details in APR. As I mentioned several times, the way the `svn
> patch` code works is that it creates a file under /tmp and then copies
> it to the final destination. The reason that gives 600 permissions on
> the machines I've tried is that `apr_file_mktemp` creates files under
> /tmp with 600 permissions.

A new file is initially created in the system temp dir with permissions
600. However libsvn_client/patch.c:install_patched_target calls
svn_subst_copy_and_translate4 and that creates a second temporary file
in the working copy with permissions that respect umask. The content of
the 600 file is copied into the umask file and it is the umask file that
gets renamed to the working file. Why are you seeing something

Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*
Received on 2013-11-22 12:28:34 CET

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