Bug 86973 - svn-apply fails to apply a patch that moves files from directory A to A/B
Summary: svn-apply fails to apply a patch that moves files from directory A to A/B
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords:
Depends on:
Blocks: 86138
  Show dependency treegraph
 
Reported: 2012-05-20 15:13 PDT by Daniel Bates
Modified: 2012-05-20 16:29 PDT (History)
4 users (show)

See Also:


Attachments
Patch (2.32 KB, patch)
2012-05-20 15:36 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2012-05-20 15:13:51 PDT
svn-apply fails to apply attachment 142343 [details] (bug #86138) with a Git checkout of WebKit:

[[
Last 500 characters of output:
n/storage/websql/transaction-error-callback-expected.txt
patching file LayoutTests/platform/chromium/storage/quota-tracking-expected.txt
rm 'LayoutTests/platform/chromium/storage/quota-tracking-expected.txt'
patching file LayoutTests/platform/chromium/storage/sql-error-codes-expected.txt
rm 'LayoutTests/platform/chromium/storage/sql-error-codes-expected.txt'
Failed to create required directory 'LayoutTests/platform/chromium/storage/websql' for path 'LayoutTests/platform/chromium/storage/websql'
]]

Notice that Git removes a directory when the last file in it is removed and moving a file F in directory A  to directory B in a version control system is equivalent to deleting F in A and adding F to B. With respect to moving files from A to A/B (i.e. B is a sub-directory in A), svn-apply assumes that A must exist. As of 05/20/2012 (*), the directory LayoutTests/platform/chromium/storage contains exactly two files: quota-tracking-expected.txt and sql-error-codes-expected.txt. 
When we apply attachment 142343 [details], we first remove both of these files from directory LayoutTests/platform/chromium/storage. Then Git removes the directory LayoutTests/platform/chromium/storage (since it's empty). Svn-apply then tries to create the directory LayoutTests/platform/chromium/storage/websql and fails (since it assumes that the directory LayoutTests/platform/chromium/storage exists).

(*) <http://trac.webkit.org/browser/trunk/LayoutTests/platform/chromium/storage?rev=62094>
Comment 1 Daniel Bates 2012-05-20 15:36:06 PDT
Created attachment 142920 [details]
Patch
Comment 2 Eric Seidel (no email) 2012-05-20 15:49:33 PDT
Comment on attachment 142920 [details]
Patch

So simple! :)
Comment 3 WebKit Review Bot 2012-05-20 16:29:14 PDT
Comment on attachment 142920 [details]
Patch

Clearing flags on attachment: 142920

Committed r117714: <http://trac.webkit.org/changeset/117714>
Comment 4 WebKit Review Bot 2012-05-20 16:29:19 PDT
All reviewed patches have been landed.  Closing bug.