WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
165440
ChangeLogs become readonly after resolving a conflict
https://bugs.webkit.org/show_bug.cgi?id=165440
Summary
ChangeLogs become readonly after resolving a conflict
Alexey Proskuryakov
Reported
2016-12-05 17:05:08 PST
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
>
Attachments
naive fix
(1.10 KB, patch)
2016-12-05 17:10 PST
,
Alexey Proskuryakov
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2016-12-05 17:10:34 PST
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?
David Kilzer (:ddkilzer)
Comment 2
2016-12-05 20:15:43 PST
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?
Alexey Proskuryakov
Comment 3
2016-12-05 20:53:09 PST
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).
Darin Adler
Comment 4
2016-12-11 18:40:50 PST
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.
WebKit Commit Bot
Comment 5
2016-12-12 10:18:35 PST
Comment on
attachment 296224
[details]
naive fix Clearing flags on attachment: 296224 Committed
r209714
: <
http://trac.webkit.org/changeset/209714
>
WebKit Commit Bot
Comment 6
2016-12-12 10:18:39 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug