Re: Fwd: [PATCH] Fix for `svn patch` changing permissions of patched files
From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Fri, 22 Nov 2013 11:11:57 +0000 (GMT)
Cathy Fitzpatrick wrote:
> Hi again Philip,
Hi Cathy. I can confirm Philip's recipe behaves as he showed and yours behaves as you showed, also on my system (Ubuntu 12.04, svn trunk).
With your patch and your recipe above I get this result:
$ svn revert INSTALL && ls -l INSTALL && (umask 070 && svn patch patch) && ls -l INSTALL
Is that what you get?
> This is just a guess to be verified later: it may be that the bug only
That result is the same as in Philip's recipe (without keyword/eol-style). So that seems to me like a good fix.
I was a bit surprised at first because it *adds* world-writable permission, but maybe that's just fine given we specified a umask that allows this. At first I was expecting that it should never add permissions, but only take away any umasked-permissions and preserve the rest. But that's probably a question for another day.
One other thing. In your patch you use "svn_dirent_dirname(wcroot_abspath,)" for the temp-file directory. This puts the temp file *outside* the WC. I haven't checked what we do in other places but using 'wcroot_abspath' iteself would be less likely to fail, and probably even better is the directory where the to-be-patched filed itself is.
- Julian
[Philip's recipe results:]
|
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.