Cathy Fitzpatrick <ca...@cathyjf.com> writes: > Currently the `svn patch` command changes the permissions on any file > it patches to 600. This occurs because it creates a file under the > system temporary directory for applying the patch, and then copies > this file to the final destination. `apr_file_mktemp` sensibly assigns > mode 600 to files created under the system temporary directory to > avoid them being exposed to the entire system. So the result is that > any file that `svn patch` patches ends up with 600 permissions rather > than whatever it had before.
Patch is no different from other commands like revert and update in this behaviour: $ ls -l wc/A/f -rw-r--r-- 1 pm pm 2 Nov 21 10:46 wc/A/f $ # change permissions with patch $ (umask 077 ; svn patch x.x wc) U wc/A/f $ ls -l wc/A/f -rw------- 1 pm pm 5 Nov 21 10:47 wc/A/f $ # change permissions with revert $ (umask 070 ; svn revert -R wc) Reverted 'wc/A/f' $ ls -l wc/A/f -rw----rw- 1 pm pm 2 Nov 21 10:50 wc/A/f $ # change permissions with update (umask 007 ; xsvn up wc) Updating 'wc': U wc/A/f Updated to revision 2. $ ls -l wc/A/f -rw-rw---- 1 pm pm 8 Nov 21 10:51 wc/A/f Is there some justification for changing patch so that it is different from the other commands? Should we change all commands? -- Philip Martin | Subversion Committer WANdisco // *Non-Stop Data*