[projects/git-slug: 78/170] distfiles hook moved to gitolite-scripts

glen glen at pld-linux.org
Mon Sep 21 21:45:22 CEST 2015


commit 5164f429a438c903e20e6a6363badb9db0d38506
Author: Kacper Kornet <draenog at pld-linux.org>
Date:   Mon Dec 19 05:57:37 2011 +0000

    distfiles hook moved to gitolite-scripts

 post-receive.python.d/distfiles.py | 39 --------------------------------------
 1 file changed, 39 deletions(-)
---
diff --git a/post-receive.python.d/distfiles.py b/post-receive.python.d/distfiles.py
deleted file mode 100644
index 4281e6f..0000000
--- a/post-receive.python.d/distfiles.py
+++ /dev/null
@@ -1,39 +0,0 @@
-import os
-import subprocess
-from git_slug.gitconst import EMPTYSHA1
-
-DISTFILES_EMAIL = None
-MAILFROMHOST = 'pld-linux.org'
-MAILCOMMAND = '/usr/sbin/sendmail -t'.split()
-
-def distfiles_notification(login, package, branch):
-    if DISTFILES_EMAIL is None:
-        return
-    mailprocess = subprocess.Popen(MAILCOMMAND, stdin=subprocess.PIPE)
-    mailprocess.stdin.write(
-"""To: {distfiles_email}
-From: {login} <{login}@{MAILFROMHOST}>
-Subject: cvs to df notify
-X-distfiles-request: yes
-X-Login: {login}
-X-Package: {package}
-X-Branch: {branch}
-X-Flags: git-notify
-""".format(distfiles_email=DISTFILES_EMAIL,
-           login = login,
-           MAILFROMHOST = MAILFROMHOST,
-           package = package,
-           branch = branch).encode('utf-8')
-        )
-    mailprocess.communicate()
-
-def run(data):
-    gitrepo = os.environ.get('GL_REPO')
-    if gitrepo.startswith('packages/'):
-        gitrepo = gitrepo[len('packages/'):]
-    else:
-        return
-    for line in data:
-        (sha1old, sha1, ref) = line.split()
-        if ref.startswith('refs/heads/') and sha1old != EMPTYSHA1:
-            distfiles_notification(os.getenv('GL_USER'), gitrepo, ref)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/git-slug.git/commitdiff/4ed64f73960519a2f4fd04c42950b2c96ae795c5



More information about the pld-cvs-commit mailing list