lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Nonfastforwarding push to staging


From: David Kastrup
Subject: Re: Nonfastforwarding push to staging
Date: Sun, 13 Nov 2011 20:10:06 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux)

Graham Percival <address@hidden> writes:

> On Sun, Nov 13, 2011 at 04:38:00PM +0100, David Kastrup wrote:
>> Does anybody even have access to the repo, or can one ask the Savannah
>> maintainers to install such a policing script?
>
> I spent a few minutes poking around as a lilypond admin on
> savannah, but didn't find anything that looked like direct access
> to the repo.  I think that asking the savannah maintainers would
> be the way to go.

It would look somewhat like the following (untested)

#!/bin/sh
case "$1" in refs/heads/dev/*)
        exit 0;;
    refs/heads/staging)
        if [ $3 == "0000000000000000000000000000000000000000" ]
        then echo "Deleting $1 not permitted.";exit 1
        fi
        exit 0;;
    *)
        if [ $3 == "0000000000000000000000000000000000000000" ]
        then echo "Deleting $1 not permitted.";exit 1
        elif [ $2 == "0000000000000000000000000000000000000000" ]
        then echo "Creating $1 not permitted.";exit 1
        elif [ "`git rev-list --count $3..$2`" -ne 0 ]
        then echo "Only fast forwards allowed on $1";exit 1
        fi
        exit 0;;
esac

However, in order not to give Savannah hackers too many headaches, I'd
recommend that you create a special user account for administration
(does not actually need to be privileged on the web interface), and we
let the script check for this account, and bypass all checks when called
by this user.  I assume that you would not want to have this behavior
for your normal account.

-- 
David Kastrup




reply via email to

[Prev in Thread] Current Thread [Next in Thread]