When update-webkit or resolve-ChangeLogs resolves a conflict in a ChangeLog, the file becomes read-only. This looks like a change between svn 1.5 and svn 1.7 - "older" and "newer" files that are created on conflict are read-only, and one of these becomes the resolved file. <rdar://problem/29491002>
Created attachment 296224 [details] naive fix It seems good enough to just use 0644 - I don't think that we need to preserve other bits here. I'm somewhat confused about how merging works on a read-only file up to this point, but it does. Perhaps the patch tool doesn't care about permissions when they can be automagically adjusted while patching?
Comment on attachment 296224 [details] naive fix View in context: https://bugs.webkit.org/attachment.cgi?id=296224&action=review > Tools/Scripts/resolve-ChangeLogs:451 > + chmod 0644, $fileNewer; This won't work well when applying a patch to a script that has execute (+x) permissions. Does Perl have a way to say, "chmod a+w" instead? Or does svn has a command-line switch to restore its previous behavior?
As this is resolve-ChangeLogs scripts, I assume that it won't be used to resolve conflicts in scripts. I didn't find such a switch for svn (nor any discussion of why the change was made).
Comment on attachment 296224 [details] naive fix View in context: https://bugs.webkit.org/attachment.cgi?id=296224&action=review I guess this is OK. I have suggestions though. >> Tools/Scripts/resolve-ChangeLogs:451 >> + chmod 0644, $fileNewer; > > This won't work well when applying a patch to a script that has execute (+x) permissions. > > Does Perl have a way to say, "chmod a+w" instead? > > Or does svn has a command-line switch to restore its previous behavior? I looked on the web a bit and I think this is a better version: chmod ((stat($file))[2] & 0777), $fileNewer; It tries to transfer the permissions the old file had, not including exotic permissions like setuid. Another way to do it is to simple read $fileNewer and overwrite the contents of $file and then unlink $fileNewer instead of $file. That code would not be hard to write.
Comment on attachment 296224 [details] naive fix Clearing flags on attachment: 296224 Committed r209714: <http://trac.webkit.org/changeset/209714>
All reviewed patches have been landed. Closing bug.