Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Jan 2014 14:38:43 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-svnadmin@freebsd.org
Subject:   svn commit: r339139 - in svnadmin/hooks: . scripts
Message-ID:  <201401081438.s08Echha015272@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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
+
+



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401081438.s08Echha015272>