Bug 15041 - svn-create-patch should support pulling patches out of Subversion (-c NNNNN)
Summary: svn-create-patch should support pulling patches out of Subversion (-c NNNNN)
Status: RESOLVED DUPLICATE of bug 13349
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-21 13:40 PDT by David Kilzer (:ddkilzer)
Modified: 2009-05-24 07:01 PDT (History)
1 user (show)

See Also:


Attachments
WIP v1 (15.72 KB, patch)
2007-08-21 13:47 PDT, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2007-08-21 13:40:25 PDT
* SUMMARY
The svn-create-patch should support pulling patches out of a Subversion repository (in addition to the local working copy).  It should use a "-c NNNNN" switch that will take a single revision which the patch will represent.  This mimics "svn diff -c NNNNN" in svn-1.4 and later.
Comment 1 David Kilzer (:ddkilzer) 2007-08-21 13:47:35 PDT
Created attachment 16063 [details]
WIP v1

This is a work-in-progress patch that I don't like very much (it's too slow).  It also hasn't been tested enough (especially on copied/moved/replaced files and directories).

The current approach is to get a list of changed files (via svn log), then iterate over each of them individually to generate a patch.  This has numerous issues:

- It's terribly slow.
- Added files don't work with "svn diff -r (N-1):N" or "svn diff -c N", so I have to play tricks by walking up the directory tree until I find a directory that DID exist at revision (N-1).  At this point, I'm wasting bandwidth by getting patches I don't need.  (See <http://subversion.tigris.org/issues/show_bug.cgi?id=2873> for the issue about "svn diff -c N" not working for added files.)

A better approach is to do a full "svn diff -r (N-1):N" on the entire WebKit directory, then order/fix-up the patches as needed.  I may still need to do an "svn log" to find out copied/moved/replaced files as well since the raw diff from svn won't give me that information.  My only concern here is that I would be loading the entire patch into memory, although I could mitigate that by saving it to a temp file, then saving offsets into the file for later retrieval.
Comment 2 David Kilzer (:ddkilzer) 2009-05-24 07:01:35 PDT

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