[Kde-scm-interest] Post-commit hooks script

Oswald Buddenhagen ossi at kde.org
Fri Dec 4 09:41:49 CET 2009


On Fri, Dec 04, 2009 at 08:23:39AM +0100, Johannes Sixt wrote:
> Since you are using post-receive, you can use this strategy:
> 
you really don't have to explain the simple stuff to me. ;)

> If you furthermore iterate over the refs in "logical" order (4.3.0
> 4.3.1 4.4.0 ... master), you can add $new to $all_old, then in the
> next iteration you will visit only commits that have not been
> attributed to an earlier ref.
> 
i considered such an approach. i don't like it too much, as it requires
specific knowledge of the repository. and it should be really not
necessary, after all - the really weird stuff is not expected to happen
on the standardized main branches.

i'm attaching the current version. it doesn't work yet (it's in the
middle of the second rewrite), but it should illustrate the ideas.

it occurred to me that the duplicate commits problem (both the inherent
problem stated in the script and the pushing from one public repo to the
other one as explained to chani) can be solved via some external state
management (database of seen sha1s). that's a tad ugly, though.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ossis-post-receive-email.pl
Type: text/x-perl
Size: 12955 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-scm-interest/attachments/20091204/6e0778bf/attachment.bin 


More information about the Kde-scm-interest mailing list