This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Experimental Patchwork setup

On 06/09/2010 10:03 AM, Jeremy Kerr wrote:
Hi Manuel,

2) Use the command-line patchwork client to update patch state when a
patch is committed. People have done this with a git post-commit hook to
update the state of the patch in patchwork; I'm not sure if svn has
something equivalent.

Yes it does. If you tell us how the git pots-commit hook works, we could try to implement a version for svn and GCC.

This is what I've used for git:

	[jk@pororo helloworld]$ cat .git/hooks/post-applypatch

	sha=$(git rev-parse HEAD)
	hash=$(git show $sha | pwparser --hash)
	pwclient update -s Accepted -c $sha -h $hash

The hash would be different for git diff and svn diff due to the different headers. So, git people would have to add the hook themselves, while svn people could skip that step assuming that a centralized hook is running on the svn server.

On the other hand, svn patch ids are not stable, for two reasons. The first is the "(revision NNNN)" and "(working tree)" markers, which differ from the time the patch is made, to the time it is committed. These markers could be removed by pwparser using a simple regex.

The second is that paths in svn patches are relative, so people can run "svn diff" from the GCC directory and get a different patch id than if they ran "svn diff gcc". Certainly, we don't want to require svn people to run "svn diff" from the toplevel exclusively. So, maybe the commit hook would have to try removing common paths one by one and pass all the resulting hashes to pwclient...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]