/util/hg_hooks: 3dc7cc423d8d: Prevent commits from being pulled ...

Daniel Atallah datallah at pidgin.im
Mon Mar 4 22:12:07 EST 2013


Changeset: 3dc7cc423d8d9f45d2578437f854b92bae7ec886
Author:	 Daniel Atallah <datallah at pidgin.im>
Date:	 2013-03-04 22:12 -0500
Branch:	 default
URL: https://hg.pidgin.im/util/hg_hooks/rev/3dc7cc423d8d

Description:

Prevent commits from being pulled into the notification repo from private repos
when the private repo has the hook accidentally enabled.

diffstat:

 notify_repo_sync.sh |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff --git a/notify_repo_sync.sh b/notify_repo_sync.sh
--- a/notify_repo_sync.sh
+++ b/notify_repo_sync.sh
@@ -3,7 +3,7 @@
 REPO=$1
 
 #Only trigger notification if it is repo that is accessible via hgweb
-if [[ $REPO == /srv/mercurial-server/repos/* ]]; then
+if [[ $REPO == /srv/mercurial-server/repos/* && $REPO != /srv/mercurial-server/repos/private/* ]]; then
 	#Strip off "/srv/mercurial-server/repos" as well as a trailing / if one exists
 	WEBROOT=`echo "$REPO" | sed -e "s/^\/srv\/mercurial-server\/repos\//\//" -e "s/\/$//"`
 	NOTIFICATION_REPO=/srv/mercurial-server/notification-repo



More information about the Commits mailing list