On Mon, Aug 24, 2009 at 11:21:07AM -0700, Alan Irwin wrote:
> 
> Hazen is the one who wrote most of cairo.c so if this patch is okay with
> him, it is okay with me.
> 
> Hazen, I don't recall you have ever discussed patches before so you may not
> have much experience using the patch application. If you do have a lot
> of patch experience skip the next few paragraphs.  :-)
> 
> The key elements to pay attention to with the patch application are to make
> sure you are in the proper directory within the source tree, and the
> --dry-run and -p options for patch such as -p0, -p1, etc.  Basically, the
> number after the -p option is the number of subdirectory prefixes to strip
> off the file names in the patch. Hez's current patch has file names
> a/drivers/cairo.c and b/drivers/cairo.c so you apply -p1 to strip off just
> the a/ and b/ from the names and patch will find drivers/cairo.c to patch
> _IF_ you are in the top-level of the source tree. However, if you are in the
> drivers subdirectory of the source tree, then you have to use -p2 to strip
> off a/drivers/ and b/drivers from the cairo.c name. Hope that makes sense.
> The --dry-run option lets you know (a) whether the files to be patched can
> be found (i.e., whether you are in a directory that is consistent with the
> -p option you have used), and (b) whether the patch applies cleanly to those
> files (without actually applying the patch).  In any case just remember that
> --dry-run gives you a chance to experiment with different -p numbers until
> you discover the correct one for the directory that you are in.
> 
> Here is how I discovered that Hez's patch would apply cleanly (without
> actually patching cairo.c)
> 
> softw...@raven> patch --dry-run -p1 \
> < /home/irwin/cairo-xcairo-offscreen-rendering-v2.patch
> patching file drivers/cairo.c
> 
> The lack of further messages after the "patching file" message indicates the
> file was found and the patch would apply cleanly.  Remove the --dry-run
> option when you actually are ready to apply the patch.  After you apply the
> patch and evaluate it, you might want to remove it again from your source
> tree . For that, you use the --reverse option of patch (which reverses the
> effect of the patch).  Of course, again, you would first want to use the
> --dry-run and --reverse options combined to make sure you are in the right
> directory with a consistent -p number used before you remove the --dry-run
> option.
> 
> Please go ahead and apply Hez's patch to your local source tree, and let us
> know whether you like how that patch changes the -dev xcairo user
> experience. I assume Hez will commit the patch or hold off until
> post-release based mostly on your evaluation since I don't think anybody
> else has tried his patch yet.

While we're on the subject of patches, the svn patch command generates
headers like 

Index: examples/c/x29c.c
===================================================================
--- examples/c/x29c.c   (revision 10316)
+++ examples/c/x29c.c   (working copy)

for each file. This is not in the standard patch format (as described 
above by Alan). Does anyone have any neat way of applying these
patches without having to hand edit the patch first? This would be 
useful when people send patches from their working copy that I 
would like to test on my working copy before applying to svn. I can't
seem to find an easy way to do this with my version of patch, but I
can't believe there isn't a solution.

Andrew

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to