From owner-svn-ports-all@FreeBSD.ORG Wed Jan 8 14:38:44 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41305AAC; Wed, 8 Jan 2014 14:38:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2CF921F98; Wed, 8 Jan 2014 14:38:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s08Eciac015274; Wed, 8 Jan 2014 14:38:44 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s08Echha015272; Wed, 8 Jan 2014 14:38:43 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201401081438.s08Echha015272@svn.freebsd.org> From: Baptiste Daroussin Date: Wed, 8 Jan 2014 14:38:43 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-svnadmin@freebsd.org Subject: svn commit: r339139 - in svnadmin/hooks: . scripts X-SVN-Group: ports-svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jan 2014 14:38:44 -0000 Author: bapt Date: Wed Jan 8 14:38:43 2014 New Revision: 339139 URL: http://svnweb.freebsd.org/changeset/ports/339139 Log: Add a hook to capture the above comment and mail the request to portmgr MFH: 2014Q1 Submitted by: gahr Added: svnadmin/hooks/scripts/mfh.sh (contents, props changed) Modified: svnadmin/hooks/post-commit Modified: svnadmin/hooks/post-commit ============================================================================== --- svnadmin/hooks/post-commit Wed Jan 8 14:33:08 2014 (r339138) +++ svnadmin/hooks/post-commit Wed Jan 8 14:38:43 2014 (r339139) @@ -57,5 +57,9 @@ update-root.sh "$REPO" "$REV" # commit mail mailer.py commit "$REPO" "$REV" /s/svn/ports/conf/mailer.conf +# mfh + +mfh.sh "${REPO}" "${REV}" + #commit-email.pl "$REPO" "$REV" commit-watchers@example.org #log-commit.py --repository "$REPO" --revision "$REV" Added: svnadmin/hooks/scripts/mfh.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ svnadmin/hooks/scripts/mfh.sh Wed Jan 8 14:38:43 2014 (r339139) @@ -0,0 +1,35 @@ +#!/bin/sh +# $FreeBSD$ + +REPOS="$1" +REV="$2" +AUTHOR=$(svnlook author -r "$REV" "$REPOS") +LOG=$(svnlook log -r "$REV" "$REPOS") +DIFF=$(svnlook diff -r "$REV" "$REPOS") +MFH_LINE=$(echo "$LOG" | grep '^MFH:[[:space:]]*[[:alnum:]]') +if [ "$MFH_LINE" = "" ]; then + exit 0 +fi +BRANCH=$(echo "$MFH_LINE" | sed -e "s|MFH:[[:blank:]]*\(.*\)|\1|") + +echo " +Hello, + +Request from $AUTHOR to merge r$REV to branch $BRANCH + +http://svnweb.freebsd.org/changeset/ports/$REV + +Commit message follows: + +---------- +$LOG +---------- + +diff: + +---------- +$DIFF +---------- +" | mail -s "MFH request r$REV to $BRANCH" portmgr@FreeBSD.org + +