Bug 159067 - prepare-ChangeLog lists methods that were not modified when deleting other methods
Summary: prepare-ChangeLog lists methods that were not modified when deleting other me...
Status: RESOLVED DUPLICATE of bug 148437
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-23 12:16 PDT by David Kilzer (:ddkilzer)
Modified: 2016-08-16 19:44 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2016-06-23 12:16:21 PDT
In the patch for Bug 158819 (Attachment #281464 [details]), many methods are listed in the ChangeLog as having been modified when they were not.

This appears to be a bug in prepare-ChangeLog that occurs when an adjacent method is deleted in full.

See also:
Bug 144829: prepare-ChangeLog lists renamed functions and methods as having been deleted
Bug 148437: prepare-ChangeLog lists modified methods as having been deleted
Comment 1 David Kilzer (:ddkilzer) 2016-06-23 15:17:02 PDT
Also, this issue appears to only happen on Subversion repositories.  When I applied the patch in Bug 158819 (Attachment #281464 [details]) on a git-svn repository at r202384, then ran prepare-ChangeLog, I didn't get the extraneous functions listed in the commit log.
Comment 2 Alexey Proskuryakov 2016-06-23 19:30:47 PDT
Related to this, we may want to consider using a better diff tool in svn-create-patch and in webkit-patch. There must be something written in a scripting language, so that it doesn't need compiling.
Comment 3 Alexey Proskuryakov 2016-06-23 19:32:09 PDT
Some interesting options mentioned in discussion here: https://news.ycombinator.com/item?id=11915287
Comment 4 David Kilzer (:ddkilzer) 2016-06-24 09:46:16 PDT
(In reply to comment #1)
> Also, this issue appears to only happen on Subversion repositories.  When I
> applied the patch in Bug 158819 (Attachment #281464 [details]) on a git-svn
> repository at r202384, then ran prepare-ChangeLog, I didn't get the
> extraneous functions listed in the commit log.

I have an untested hypothesis:

What could be happening is that when prepare-ChangeLog tries to grab the "pristine" (unmodified) source to determine the line ranges for functions (to compare to the local modified copy), it's actually grabbing the trunk (-rHEAD) from the svn server, where line numbers have shifted since the local working copy's revision, and that causes prepare-ChangeLog to list methods that weren't actually changed.

If this is the case, then we just need to check how prepare-ChangeLog is grating the pristine source version, and make sure it's grabbing the pristine source relative to the local working copy (not to trunk on the svn server).
Comment 5 Daniel Bates 2016-08-16 18:24:13 PDT
(In reply to comment #1)
> Also, this issue appears to only happen on Subversion repositories.  When I
> applied the patch in Bug 158819 (Attachment #281464 [details]) on a git-svn
> repository at r202384, then ran prepare-ChangeLog, I didn't get the
> extraneous functions listed in the commit log.

Notice that prepare-ChangeLog's function overlap logic of assumes a unified diff with 0 lines of context. When using a Git checkout, prepare-ChangeLog generates such a diff by <https://trac.webkit.org/browser/trunk/Tools/Scripts/prepare-ChangeLog?rev=204544#L1973>. But when using a Subversion checkout, prepare-ChangeLog generates a unified diff with 3 lines of context per the default behavior of svn diff and by <https://trac.webkit.org/browser/trunk/Tools/Scripts/prepare-ChangeLog?rev=204544#L1970>.
Comment 6 Daniel Bates 2016-08-16 18:26:14 PDT

*** This bug has been marked as a duplicate of bug 148437 ***
Comment 7 Aakash Jain 2016-08-16 18:39:10 PDT
This issue doesn't look Duplicate of 148437 to me. Bug 148437 list modified methods incorrectly (as deleted), but this bug is about methods which were not at all modified.

I hit this issue almost every single time while running prepare-ChangeLog (even when I do not delete any method). prepare-ChangeLog creates a lot more entries then the functions I modify. Usually all the nearby functions from the function which I modify are listed by prepare-ChangeLog as modified. Probably your logic about "unified diff with 3 lines of context" might explain it.
Comment 8 Daniel Bates 2016-08-16 19:44:37 PDT
(In reply to comment #7)
> This issue doesn't look Duplicate of 148437 to me. Bug 148437 list modified
> methods incorrectly (as deleted), but this bug is about methods which were
> not at all modified.
> 
> I hit this issue almost every single time while running prepare-ChangeLog
> (even when I do not delete any method). prepare-ChangeLog creates a lot more
> entries then the functions I modify. Usually all the nearby functions from
> the function which I modify are listed by prepare-ChangeLog as modified.
> Probably your logic about "unified diff with 3 lines of context" might
> explain it.

I suspect that the root cause of both this bug and bug #148437 are the same. Therefore, I duped this bug to bug #148437.

*** This bug has been marked as a duplicate of bug 148437 ***