Experimental Patchwork setup

Paolo Bonzini bonzini@gnu.org
Thu Jun 10 08:27:00 GMT 2010


On 06/10/2010 06:28 AM, Jeremy Kerr wrote:
> Hi Paolo,
>
>> The hash would be different for git diff and svn diff due to the
>> different headers.
>
> The headers are not included in the hash. However, the filenames will need to
> be the same - patchwork expects '-p1' patches, but normalises the top-level
> directory.
>
> For example, at http://patchwork.ozlabs.org/patch/55140/
>
> --- gcc/config/rs6000/e500.h    (revision 160245)
> +++ gcc/config/rs6000/e500.h    (working copy)
>
> The parser normalises this to:
>
> --- a/config/rs6000/e500.h
> +++ b/config/rs6000/e500.h
>
> which may or may not be what you want here (svn outputs -p0?).

svn outputs relative to where you invoke "svn diff" so it can be -p0 but 
also "-p minus something" (i.e. -p0 _and_ you have to invoke patch from 
the right point in the tree).  But this fine, I think, coupled maybe 
with some magic in the hook.

However, it never emits -p1.  What does the parser do for

--- configure    (revision blah)
+++ configure    (working copy)

?  Maybe for svn patches (detected through the ======= line) it's better 
to *prepend* a/ b/ instead of replacing it...

> The only difficulty is that the parser does not specify an order for the files
> in a patch; I believe git orders the file changes alphabetically by filename,
> but svn does not. This may cause different hashes.

Yes, that's basically why git users likely will have to put in place 
their own post-commit hook.

Thanks for the information!

Paolo



More information about the Gcc mailing list