<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>159067</bug_id>
          
          <creation_ts>2016-06-23 12:16:21 -0700</creation_ts>
          <short_desc>prepare-ChangeLog lists methods that were not modified when deleting other methods</short_desc>
          <delta_ts>2016-08-16 19:44:37 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>148437</dup_id>
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=158819</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=144829</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=148437</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=137889</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Kilzer (:ddkilzer)">ddkilzer</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>aakash_jain</cc>
    
    <cc>achristensen</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>dbates</cc>
    
    <cc>lforschler</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1204898</commentid>
    <comment_count>0</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2016-06-23 12:16:21 -0700</bug_when>
    <thetext>In the patch for Bug 158819 (Attachment #281464), 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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1204946</commentid>
    <comment_count>1</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2016-06-23 15:17:02 -0700</bug_when>
    <thetext>Also, this issue appears to only happen on Subversion repositories.  When I applied the patch in Bug 158819 (Attachment #281464) on a git-svn repository at r202384, then ran prepare-ChangeLog, I didn&apos;t get the extraneous functions listed in the commit log.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1205001</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2016-06-23 19:30:47 -0700</bug_when>
    <thetext>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&apos;t need compiling.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1205002</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2016-06-23 19:32:09 -0700</bug_when>
    <thetext>Some interesting options mentioned in discussion here: https://news.ycombinator.com/item?id=11915287</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1205107</commentid>
    <comment_count>4</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2016-06-24 09:46:16 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; Also, this issue appears to only happen on Subversion repositories.  When I
&gt; applied the patch in Bug 158819 (Attachment #281464 [details]) on a git-svn
&gt; repository at r202384, then ran prepare-ChangeLog, I didn&apos;t get the
&gt; 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 &quot;pristine&quot; (unmodified) source to determine the line ranges for functions (to compare to the local modified copy), it&apos;s actually grabbing the trunk (-rHEAD) from the svn server, where line numbers have shifted since the local working copy&apos;s revision, and that causes prepare-ChangeLog to list methods that weren&apos;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&apos;s grabbing the pristine source relative to the local working copy (not to trunk on the svn server).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1220705</commentid>
    <comment_count>5</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2016-08-16 18:24:13 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; Also, this issue appears to only happen on Subversion repositories.  When I
&gt; applied the patch in Bug 158819 (Attachment #281464 [details]) on a git-svn
&gt; repository at r202384, then ran prepare-ChangeLog, I didn&apos;t get the
&gt; extraneous functions listed in the commit log.

Notice that prepare-ChangeLog&apos;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 &lt;https://trac.webkit.org/browser/trunk/Tools/Scripts/prepare-ChangeLog?rev=204544#L1973&gt;. 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 &lt;https://trac.webkit.org/browser/trunk/Tools/Scripts/prepare-ChangeLog?rev=204544#L1970&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1220706</commentid>
    <comment_count>6</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2016-08-16 18:26:14 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 148437 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1220708</commentid>
    <comment_count>7</comment_count>
    <who name="Aakash Jain">aakash_jain</who>
    <bug_when>2016-08-16 18:39:10 -0700</bug_when>
    <thetext>This issue doesn&apos;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 &quot;unified diff with 3 lines of context&quot; might explain it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1220732</commentid>
    <comment_count>8</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2016-08-16 19:44:37 -0700</bug_when>
    <thetext>(In reply to comment #7)
&gt; This issue doesn&apos;t look Duplicate of 148437 to me. Bug 148437 list modified
&gt; methods incorrectly (as deleted), but this bug is about methods which were
&gt; not at all modified.
&gt; 
&gt; I hit this issue almost every single time while running prepare-ChangeLog
&gt; (even when I do not delete any method). prepare-ChangeLog creates a lot more
&gt; entries then the functions I modify. Usually all the nearby functions from
&gt; the function which I modify are listed by prepare-ChangeLog as modified.
&gt; Probably your logic about &quot;unified diff with 3 lines of context&quot; might
&gt; 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 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>