<?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>49154</bug_id>
          
          <creation_ts>2010-11-07 19:57:39 -0800</creation_ts>
          <short_desc>patches uploaded from git (using webkit-patch) do not include moved files</short_desc>
          <delta_ts>2011-04-18 19:08:21 -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>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>48075</dup_id>
          
          <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="Eric Seidel (no email)">eric</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>aroben</cc>
    
    <cc>dbates</cc>
    
    <cc>ddkilzer</cc>
    
    <cc>evan</cc>
    
    <cc>mihaip</cc>
    
    <cc>rolandsteiner</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>305946</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-11-07 19:57:39 -0800</bug_when>
    <thetext>patches uploaded from git (using webkit-patch) do not include moved files

I ran into this while trying to work on bug 49153.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>305948</commentid>
    <comment_count>1</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-11-07 19:59:31 -0800</bug_when>
    <thetext>The command we&apos;re using is:

    def create_patch(self, git_commit=None, changed_files=[]):
...
        return self.run([&apos;git&apos;, &apos;diff&apos;, &apos;--binary&apos;, &quot;--no-ext-diff&quot;, &quot;--full-index&quot;, &quot;-M&quot;, self.merge_base(git_commit), &quot;--&quot;] + changed_files, decode_output=False)

It&apos;s possible this is recently broken by Adam&apos;s changed_files optimization, but I think git diff just doesn&apos;t include moved files!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>305950</commentid>
    <comment_count>2</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-11-07 20:00:45 -0800</bug_when>
    <thetext>Maybe we should be using some other command to generate the git diff?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>305957</commentid>
    <comment_count>3</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2010-11-07 20:17:57 -0800</bug_when>
    <thetext>If there are no changes to the renamed (moved) file, the diff content is blank, but there is a diff header noting the rename does exist in the patch.  This differs from svn-create-patch, though, in that the (unchanged) contents of the file aren&apos;t included in the patch itself.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>352595</commentid>
    <comment_count>4</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-02-16 21:00:35 -0800</bug_when>
    <thetext>We seem to run into this a lot, but I&apos;m not sure I have good suggestions as to how to fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>352947</commentid>
    <comment_count>5</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2011-02-17 08:56:04 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; We seem to run into this a lot, but I&apos;m not sure I have good suggestions as to how to fix.

git detects renames through content only.  Is the real issue that committing the patch back to svn (via &quot;git svn dcommit&quot;) doesn&apos;t represent the moved file like it would if &quot;svn mv&quot; were used?  If so, you may want to add this to the .git/config being used on the commit queue bots:

[diff]
	renames = true

If the bots are using an svn repo (not a git repo), then this issue becomes harder (unless everyone uses -M to make their patches so git includes &quot;rename&quot; metadata near the top of the patch.

This is completely orthogonal, but this should also be set (so that empty directories aren&apos;t left in svn by the bots):

[svn]
	rmdir = true</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>353113</commentid>
    <comment_count>6</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-02-17 12:48:15 -0800</bug_when>
    <thetext>Sounds like we should definitely add those to the git config page.

However I don&apos;t think this is a commit-side problem.  It seems that the patches uploaded have no move information.  Or at least if they do I don&apos;t remember seeing it in prettypatch and it must be ignored by svn-apply (maybe that&apos;s what the diff.rename=true option fixes?).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>353121</commentid>
    <comment_count>7</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-02-17 12:55:02 -0800</bug_when>
    <thetext>(In reply to comment #6)
&gt; Sounds like we should definitely add those to the git config page.
&gt; 
&gt; However I don&apos;t think this is a commit-side problem.  It seems that the patches uploaded have no move information.  Or at least if they do I don&apos;t remember seeing it in prettypatch and it must be ignored by svn-apply (maybe that&apos;s what the diff.rename=true option fixes?).

PrettyPatch will show file moves Do you have an example where the wrong thing happened for us to look at?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>353123</commentid>
    <comment_count>8</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2011-02-17 12:56:25 -0800</bug_when>
    <thetext>This might be a problem with the changed_files optimization.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>355444</commentid>
    <comment_count>9</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2011-02-22 11:35:39 -0800</bug_when>
    <thetext>*** Bug 54854 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>358089</commentid>
    <comment_count>10</comment_count>
    <who name="Mihai Parparita">mihaip</who>
    <bug_when>2011-02-25 11:36:43 -0800</bug_when>
    <thetext>I don&apos;t know if it&apos;s related to this, but ChangeLogs generated by webkit-patch land-cowboy also don&apos;t list moved files correctly, but prepare-ChangeLog does.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>358182</commentid>
    <comment_count>11</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2011-02-25 14:22:16 -0800</bug_when>
    <thetext>(In reply to comment #10)
&gt; I don&apos;t know if it&apos;s related to this, but ChangeLogs generated by webkit-patch land-cowboy also don&apos;t list moved files correctly, but prepare-ChangeLog does.

That&apos;s likely to be the same bug.  The difference is we keep around a list of changed files, which we use to avoid stating the whole file system.  It seems likely that moved files aren&apos;t represented correctly in that list.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>388222</commentid>
    <comment_count>12</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-04-18 19:08:21 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 48075 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>