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

Ian Monroe ian.monroe at gmail.com
Fri Dec 4 15:24:37 CET 2009


2009/12/4 Oswald Buddenhagen <ossi at kde.org>:
> 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.
>

Ok now I kind of understand what you were talking about.

Note that in Amarok we do not have any feature branches in the main
repo. The main repo only has 'master' and in the future it will likely
have version branches. So basically I'm not sure the problem you are
trying to solve really exists. Feature branches occur in various
personal repos. It pretty much has to happen that way for all KDE
projects since we don't allow force pushes in the main repo, and there
are plenty of good reasons to force push in a feature branch. Also
creating a branch requires a force push. And of course only the main
repo will have email hooks.

Like I said though, version branches should be in the main repo and
there might be some cases where the same commit is pushed to master
and to an older version branch. That might produce the dup issue. But
don't worry about deleted branches and other really weird cases, they
just aren't going to happen.

Ian


More information about the Kde-scm-interest mailing list