<?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>16052</bug_id>
          
          <creation_ts>2007-11-19 10:30:09 -0800</creation_ts>
          <short_desc>prepare-ChangeLog doesn&apos;t report deleted files</short_desc>
          <delta_ts>2007-11-25 23:07:11 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <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="Kevin Ollivier">kevino</reporter>
          <assigned_to name="David Kilzer (:ddkilzer)">ddkilzer</assigned_to>
          <cc>aroben</cc>
    
    <cc>ddkilzer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>61693</commentid>
    <comment_count>0</comment_count>
    <who name="Kevin Ollivier">kevino</who>
    <bug_when>2007-11-19 10:30:09 -0800</bug_when>
    <thetext>prepare-ChangeLog currently only reports added or modified files, so any deleted files won&apos;t be in the ChangeLog unless manually added.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61694</commentid>
    <comment_count>1</comment_count>
      <attachid>17402</attachid>
    <who name="Kevin Ollivier">kevino</who>
    <bug_when>2007-11-19 10:30:43 -0800</bug_when>
    <thetext>Created attachment 17402
Patch to get prepare-ChangeLog to report deleted files</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61743</commentid>
    <comment_count>2</comment_count>
      <attachid>17402</attachid>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-11-19 22:43:30 -0800</bug_when>
    <thetext>Comment on attachment 17402
Patch to get prepare-ChangeLog to report deleted files

Marking r- since this is the wrong fix.

The prepare-ChangeLog script already reports removed files for svn.

I just realized that the actual bug is that prepare-ChangeLog ignores changes staged to the index for git.  For example, if you use &quot;git rm path/to/file&quot; instead of &quot;rm path/to/file&quot;, the prepare-ChangeLog script ignores this change since it doesn&apos;t use the --cached switch on git-diff.

Also, if you git-add changed files before running prepare-ChangeLog, those changes won&apos;t be seen, either.

Should we be running git-diff with and without &quot;--cached&quot;, or should we be looking at the output of git-status and parsing both of its sections?

Kevin, are you using svn or git?  Does the above explain the issue you&apos;re seeing?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61744</commentid>
    <comment_count>3</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-11-19 22:44:12 -0800</bug_when>
    <thetext>Confirming issue with git and changes staged to index.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61750</commentid>
    <comment_count>4</comment_count>
    <who name="Kevin Ollivier">kevino</who>
    <bug_when>2007-11-19 23:01:25 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 17402 [edit])
&gt; Marking r- since this is the wrong fix.
&gt; 
&gt; The prepare-ChangeLog script already reports removed files for svn.
&gt; 
&gt; I just realized that the actual bug is that prepare-ChangeLog ignores changes
&gt; staged to the index for git.  For example, if you use &quot;git rm path/to/file&quot;
&gt; instead of &quot;rm path/to/file&quot;, the prepare-ChangeLog script ignores this change
&gt; since it doesn&apos;t use the --cached switch on git-diff.
&gt; 
&gt; Also, if you git-add changed files before running prepare-ChangeLog, those
&gt; changes won&apos;t be seen, either.
&gt; 
&gt; Should we be running git-diff with and without &quot;--cached&quot;, or should we be
&gt; looking at the output of git-status and parsing both of its sections?
&gt; 
&gt; Kevin, are you using svn or git?  Does the above explain the issue you&apos;re
&gt; seeing?
&gt; 

I&apos;m using svn. I don&apos;t have git on my machine, and I removed the files with svn remove path/to/file, so I&apos;m not sure how it could be an issue with git in my case. Are you sure it handles files removed in svn correctly? Because neither the isAdded or isModified functions check for the &quot;D&quot; status, and if those functions don&apos;t return true, then how is the file added to @changedFiles?
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61753</commentid>
    <comment_count>5</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2007-11-19 23:12:46 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; Should we be running git-diff with and without &quot;--cached&quot;, or should we be
&gt; looking at the output of git-status and parsing both of its sections?

I think we want to stay away from git-status since it operates over the whole repository. I&apos;m surprised there isn&apos;t a way to get git-diff to do what we want in a single invocation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61754</commentid>
    <comment_count>6</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-11-19 23:33:56 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; I&apos;m using svn. I don&apos;t have git on my machine, and I removed the files with svn
&gt; remove path/to/file, so I&apos;m not sure how it could be an issue with git in my
&gt; case. Are you sure it handles files removed in svn correctly? Because neither
&gt; the isAdded or isModified functions check for the &quot;D&quot; status, and if those
&gt; functions don&apos;t return true, then how is the file added to @changedFiles?

I see the issue now.  (I&apos;ll file a separate bug on the git issue.)

If you only have deleted files in the tree, then generateFileList() returns no changes and the script exits.

1. svn rm WebKitTools/mangleme/README
2. ./WebKitTools/Scripts/prepare-ChangeLog WebKitTools

To undo these changes (for any new svn users reading this):
svn revert WebKitTools/ChangeLog  WebKitTools/mangleme/README

However, we don&apos;t want to add removed (deleted) files to @changed_files since this is used to create a list of added/changed method names for source files.

After playing with the script for a while, I think the &quot;No changes found.&quot; test is broken.  It currently reads:

if (!@changed_files &amp;&amp; !@conflict_files || !%function_lists) {

I think it should read:

if (!@changed_files &amp;&amp; !@conflict_files &amp;&amp; !scalar keys %function_lists) {

I believe that should fix the issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61756</commentid>
    <comment_count>7</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-11-19 23:38:25 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; I think we want to stay away from git-status since it operates over the whole
&gt; repository. I&apos;m surprised there isn&apos;t a way to get git-diff to do what we want
&gt; in a single invocation.

(In reply to comment #6)
&gt; I see the issue now.  (I&apos;ll file a separate bug on the git issue.)

Bug 16060

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61757</commentid>
    <comment_count>8</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-11-19 23:39:56 -0800</bug_when>
    <thetext>(In reply to comment #6)
&gt; if (!@changed_files &amp;&amp; !@conflict_files &amp;&amp; !scalar keys %function_lists) {

Or just:

&gt; if (!@changed_files &amp;&amp; !@conflict_files &amp;&amp; !keys %function_lists) {

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62349</commentid>
    <comment_count>9</comment_count>
      <attachid>17523</attachid>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-11-25 22:36:45 -0800</bug_when>
    <thetext>Created attachment 17523
Patch v2

Simpler fix.

If there were only removed files, the prepare-ChangeLog script would always report no changes because the check for !%function_lists did not work as expected.  We now check for !keys %function_lists instead, and make sure there are no changed files (added, modified), no conflicted files and no removed files.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62361</commentid>
    <comment_count>10</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-11-25 23:07:11 -0800</bug_when>
    <thetext>Committed revision 28037.

</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>17402</attachid>
            <date>2007-11-19 10:30:43 -0800</date>
            <delta_ts>2007-11-25 22:36:45 -0800</delta_ts>
            <desc>Patch to get prepare-ChangeLog to report deleted files</desc>
            <filename>prepare-changelog-deletedfiles.patch</filename>
            <type>text/plain</type>
            <size>1362</size>
            <attacher name="Kevin Ollivier">kevino</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYktpdFRvb2xzL1NjcmlwdHMvcHJlcGFyZS1DaGFuZ2VMb2cKPT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQot
LS0gV2ViS2l0VG9vbHMvU2NyaXB0cy9wcmVwYXJlLUNoYW5nZUxvZwkocmV2aXNpb24gMjc5MDYp
CisrKyBXZWJLaXRUb29scy9TY3JpcHRzL3ByZXBhcmUtQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkp
CkBAIC0xMDU0LDcgKzEwNTQsNyBAQAogCiAgICAgICAgICRmaWxlID0gbWFrZUZpbGVQYXRoUmVs
YXRpdmUoJGZpbGUpOwogCi0gICAgICAgIGlmIChpc01vZGlmaWVkU3RhdHVzKCRzdGF0dXMpIHx8
IGlzQWRkZWRTdGF0dXMoJHN0YXR1cykpIHsKKyAgICAgICAgaWYgKGlzTW9kaWZpZWRTdGF0dXMo
JHN0YXR1cykgfHwgaXNBZGRlZFN0YXR1cygkc3RhdHVzKSB8fCBpc1JlbW92ZWRTdGF0dXMoJHN0
YXR1cykpIHsKICAgICAgICAgICAgIG15IEBjb21wb25lbnRzID0gRmlsZTo6U3BlYy0+c3BsaXRk
aXIoJGZpbGUpOwogICAgICAgICAgICAgaWYgKCRjb21wb25lbnRzWzBdIGVxICJMYXlvdXRUZXN0
cyIpIHsKICAgICAgICAgICAgICAgICAkZGlkQ2hhbmdlUmVncmVzc2lvblRlc3RzID0gMTsKQEAg
LTEwOTksNiArMTA5OSwxNyBAQAogICAgIHJldHVybiAkc3RhdHVzQ29kZXN7JHN0YXR1c307CiB9
CiAKK3N1YiBpc1JlbW92ZWRTdGF0dXMoJCkKK3sKKyAgICBteSAoJHN0YXR1cykgPSBAXzsKKwor
ICAgIG15ICVzdGF0dXNDb2RlcyA9ICgKKyAgICAgICAgIkQiID0+IDEsCisgICAgKTsKKworICAg
IHJldHVybiAkc3RhdHVzQ29kZXN7JHN0YXR1c307Cit9CisKIHN1YiBpc0FkZGVkU3RhdHVzKCQp
CiB7CiAgICAgbXkgKCRzdGF0dXMpID0gQF87CkluZGV4OiBXZWJLaXRUb29scy9DaGFuZ2VMb2cK
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PQotLS0gV2ViS2l0VG9vbHMvQ2hhbmdlTG9nCShyZXZpc2lvbiAyNzkxMCkKKysr
IFdlYktpdFRvb2xzL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDExIEBACisy
MDA3LTExLTE5ICBLZXZpbiBPbGxpdmllciAgPGtldmlub0B0aGVvbGxpdmllcnMuY29tPgorCisg
ICAgICAgIE1ha2Ugc3VyZSBwcmVwYXJlLUNoYW5nZUxvZyBoYW5kbGVzIGRlbGV0ZWQgZmlsZXMg
YXMgd2VsbC4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAg
ICAqIFNjcmlwdHMvcHJlcGFyZS1DaGFuZ2VMb2c6CisKIDIwMDctMTEtMTkgIEFscCBUb2tlciAg
PGFscEBhdG9rZXIuY29tPgogCiAgICAgICAgIFJldmlld2VkIGJ5IE1hcmsgUm93ZS4K
</data>
<flag name="review"
          id="7457"
          type_id="1"
          status="-"
          setter="ddkilzer"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>17523</attachid>
            <date>2007-11-25 22:36:45 -0800</date>
            <delta_ts>2007-11-25 22:43:45 -0800</delta_ts>
            <desc>Patch v2</desc>
            <filename>bug-16052-v2.diff</filename>
            <type>text/plain</type>
            <size>1166</size>
            <attacher name="David Kilzer (:ddkilzer)">ddkilzer</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYktpdFRvb2xzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBXZWJLaXRUb29scy9D
aGFuZ2VMb2cJKHJldmlzaW9uIDI4MDM1KQorKysgV2ViS2l0VG9vbHMvQ2hhbmdlTG9nCSh3b3Jr
aW5nIGNvcHkpCkBAIC0xLDMgKzEsMTIgQEAKKzIwMDctMTEtMjUgIERhdmlkIEQuIEtpbHplciAg
PGRka2lsemVyQHdlYmtpdC5vcmc+CisKKyAgICAgICAgQnVnIDE2MDUyOiBwcmVwYXJlLUNoYW5n
ZUxvZyBkb2Vzbid0IHJlcG9ydCBkZWxldGVkIGZpbGVzCisgICAgICAgIDxodHRwOi8vYnVncy53
ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0xNjA1Mj4KKworICAgICAgICBSZXZpZXdlZCBieSBO
T0JPRFkgKE9PUFMhKS4KKworICAgICAgICAqIFNjcmlwdHMvcHJlcGFyZS1DaGFuZ2VMb2c6IEZp
eGVkIGxvZ2ljIHRoYXQgY2hlY2tzIGZvciByZW1vdmVkIGZpbGVzLgorCiAyMDA3LTExLTI1ICBE
YXZpZCBLaWx6ZXIgIDxkZGtpbHplckB3ZWJraXQub3JnPgogCiAgICAgICAgIEJ1ZyAxNTg2NDog
UmVwbGFjZSBtZXJnZS1jaGFuZ2Vsb2cgd2l0aCByZXNvbHZlLUNoYW5nZUxvZ3MKSW5kZXg6IFdl
YktpdFRvb2xzL1NjcmlwdHMvcHJlcGFyZS1DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gV2ViS2l0
VG9vbHMvU2NyaXB0cy9wcmVwYXJlLUNoYW5nZUxvZwkocmV2aXNpb24gMjgwMzQpCisrKyBXZWJL
aXRUb29scy9TY3JpcHRzL3ByZXBhcmUtQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xMzcs
NyArMTM3LDcgQEAgbXkgJGRpZENoYW5nZVJlZ3Jlc3Npb25UZXN0cyA9IDA7CiAKIGdlbmVyYXRl
RmlsZUxpc3QoQGNoYW5nZWRfZmlsZXMsIEBjb25mbGljdF9maWxlcywgJWZ1bmN0aW9uX2xpc3Rz
KTsKIAotaWYgKCFAY2hhbmdlZF9maWxlcyAmJiAhQGNvbmZsaWN0X2ZpbGVzIHx8ICElZnVuY3Rp
b25fbGlzdHMpIHsKK2lmICghQGNoYW5nZWRfZmlsZXMgJiYgIUBjb25mbGljdF9maWxlcyAmJiAh
a2V5cyAlZnVuY3Rpb25fbGlzdHMpIHsKICAgICBwcmludCBTVERFUlIgIiAgTm8gY2hhbmdlcyBm
b3VuZC5cbiI7CiAgICAgZXhpdCAxOwogfQo=
</data>
<flag name="review"
          id="7534"
          type_id="1"
          status="+"
          setter="sam"
    />
          </attachment>
      

    </bug>

</bugzilla>