Consider the following change log patch: --- ChangeLog +++ ChangeLog @@ -70,6 +70,14 @@ 2010-09-18 Alice <alice@email.address> + Reviewed by NOBODY (OOPS!). + + Changed some more code on 2010-09-18. + + * File: + +2010-09-18 Alice <alice@email.address> + Reviewed by Ray. Changed some code on 2010-09-18. Suppose we apply this patch using svn-apply on 09/19/2010. Looking at the resulting ChangeLog, we have: 2010-09-18 Alice <alice@email.address> Reviewed by NOBODY (OOPS!). Changed some more code on 2010-09-18. * File: 2010-09-19 Alice <alice@email.address> Reviewed by Ray. Changed some code on 2010-09-18. Notice, the date of the earlier entry was changed.
Created attachment 68037 [details] Unit test
(In reply to comment #0) > Suppose we apply this patch using svn-apply on 09/19/2010. Looking at the resulting ChangeLog, we have: > I mean't to say: "Looking at the resulting ChangeLog and assuming the name of the reviewer(s) was not specified to svn-apply, we have:"
Created attachment 77480 [details] Patch with test cases Moved unit test into new file fixChangeLogPatchThenSetChangeLogDateAndReviewer.pl because it tests setChangeLogDateAndReviewer(fixChangeLogPatch()). Note, this patch modifies the functionality of fixChangeLogPatch() to move entries that are inserted earlier in a ChangeLog to the top of the file. Therefore, future patches that deliberately insert a change log entry earlier (why?) will not be landed by the commit-queue/webkit-patch as the author intended. Instead, the author will need to land such a patch by hand. Maybe we should consider outputting a warning message when svn-apply detects this?
Created attachment 77589 [details] Patch with test cases Removed extraneous comment in added unit test file fixChangeLogPatchThenSetChangeLogDateAndReviewer.pl. Strengthened for-loop for updating the date state index by noticing that if there exists a line L_i that matches the regular expression $dateStartRegEx after shifting the overlapping lines towards the front then i \in [$chunkStartIndex, $dateStartIndex - 1].
Comment on attachment 77589 [details] Patch with test cases Clearing flags on attachment: 77589 Committed r74780: <http://trac.webkit.org/changeset/74780>
All reviewed patches have been landed. Closing bug.