diff -r ebd225311eccf65b75664d32626314a60c73f40a -r df93056f98c86dfb6bac1e39a0e1a434840c84a8 indefero/scripts/SyncMercurial.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/indefero/scripts/SyncMercurial.sh Wed Jul 24 22:47:45 2013 -0500 @@ -0,0 +1,11 @@ +#!/bin/sh + +private_notify="/home/mercurial/tmp/notify.tmp" +# reload_cmd="/usr/sbin/apachectl -k graceful" +reload_cmd="sudo /etc/init.d/apache2 reload" + +if [ -e $private_notify ]; then + rm -f $private_notify + $reload_cmd +fi + diff -r ebd225311eccf65b75664d32626314a60c73f40a -r df93056f98c86dfb6bac1e39a0e1a434840c84a8 indefero/scripts/activitycron.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/indefero/scripts/activitycron.php Wed Jul 24 22:47:45 2013 -0500 @@ -0,0 +1,48 @@ + 1) { + $date = new DateTime($_SERVER['argv'][1]); +} + +echo 'recalculating project activity for '.$date->format('Y-m-d')."\n"; +IDF_ActivityTaxonomy::recalculateTaxnomies($date); + diff -r ebd225311eccf65b75664d32626314a60c73f40a -r df93056f98c86dfb6bac1e39a0e1a434840c84a8 indefero/scripts/git-post-update --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/indefero/scripts/git-post-update Wed Jul 24 22:47:45 2013 -0500 @@ -0,0 +1,24 @@ +#!/bin/sh +# +# This hook does only one thing: +# +# 1. It calls the gitpostupdate.php script with the current $GIT_DIR +# as argument. The gitpostupdate.php script will then trigger +# the 'gitpostupdate.php::run' event with the $GIT_DIR as argument +# together with merged $_ENV and $_SERVER array. +# +# This hook is normally installed automatically at the creation of your +# repository if you have everything configured correctly. If you want +# to enable it later, you need to symlink it as "post-update" in your +# $GIT_DIR/hooks folder. +# +# www$ chmod +x /home/www/indefero/scripts/git-post-update +# git$ cd /home/git/repositories/project.git/hooks +# git$ ln -s /home/www/indefero/scripts/git-post-update post-update +# + +SCRIPTDIR=$(dirname $(readlink $0)) +FULL_GIT_DIR=$(cd "$GIT_DIR" && /bin/pwd || "$GIT_DIR") +PHP_POST_UPDATE=$SCRIPTDIR/gitpostupdate.php + +echo php $PHP_POST_UPDATE $FULL_GIT_DIR | at now > /dev/null 2>&1 diff -r ebd225311eccf65b75664d32626314a60c73f40a -r df93056f98c86dfb6bac1e39a0e1a434840c84a8 indefero/scripts/gitcron.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/indefero/scripts/gitcron.php Wed Jul 24 22:47:45 2013 -0500 @@ -0,0 +1,35 @@ + '/path/to/git/repository.git', + * 'env' => array_merge($_ENV, $_SERVER)); + * + */ +$params = array('git_dir' => $argv[1], + 'env' => array_merge($_ENV, $_SERVER)); +Pluf_Log::event(array('gitpostupdate.php', 'Send run signal.', $params)); +Pluf_Signal::send('gitpostupdate.php::run', 'gitpostupdate.php', $params); + + diff -r ebd225311eccf65b75664d32626314a60c73f40a -r df93056f98c86dfb6bac1e39a0e1a434840c84a8 indefero/scripts/gitserve.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/indefero/scripts/gitserve.php Wed Jul 24 22:47:45 2013 -0500 @@ -0,0 +1,36 @@ + '/relative/path/to/hg/repository', + * 'env' => array_merge($_ENV, $_SERVER)); + * + */ +#$params = array('rel_dir' => $_ENV['PATH_INFO'], +# 'env' => array_merge($_ENV, $_SERVER)); +$params = array('rel_dir' => '/home/mercurial/repositories', + 'env' => array_merge($_ENV, $_SERVER)); + +Pluf_Signal::send('hgchangegroup.php::run', 'hgchangegroup.php', $params); + + diff -r ebd225311eccf65b75664d32626314a60c73f40a -r df93056f98c86dfb6bac1e39a0e1a434840c84a8 indefero/scripts/hgweb.cgi --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/indefero/scripts/hgweb.cgi Wed Jul 24 22:47:45 2013 -0500 @@ -0,0 +1,20 @@ +#!/usr/bin/env python +# +# An example hgweb CGI script, edit as necessary +# See also http://mercurial.selenic.com/wiki/PublishingRepositories + +# Path to repo or hgweb config to serve (see 'hg help hgweb') +# config = "/path/to/repo/or/config" +config = "/home/www/indefero/scripts/hgweb.config" + +# Uncomment and adjust if Mercurial is not installed system-wide +# (consult "installed modules" path from 'hg debuginstall'): +#import sys; sys.path.insert(0, "/path/to/python/lib") + +# Uncomment to send python tracebacks to the browser if an error occurs: +#import cgitb; cgitb.enable() + +from mercurial import demandimport; demandimport.enable() +from mercurial.hgweb import hgwebdir, wsgicgi +application = hgwebdir(config) +wsgicgi.launch(application) diff -r ebd225311eccf65b75664d32626314a60c73f40a -r df93056f98c86dfb6bac1e39a0e1a434840c84a8 indefero/scripts/hgweb.cgi.old --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/indefero/scripts/hgweb.cgi.old Wed Jul 24 22:47:45 2013 -0500 @@ -0,0 +1,127 @@ + + + + + + + + +Mercurial (stable branch): 04eb7d7e115b hgweb.cgi + + + +
+ + +
+ +

view hgweb.cgi @ 19161:04eb7d7e115b

+ + + +
Added signature for changeset cceaf7af4c9e
+ + + + + + + + + + + + + + + + + + + +
authorMatt Mackall <mpm@selenic.com>
dateSat, 01 Jun 2013 17:10:24 -0500
parents227b9f13db13
children
+ +
+
line source
+ +
1 #!/usr/bin/env python +
+
2 # +
+
3 # An example hgweb CGI script, edit as necessary +
+
4 # See also http://mercurial.selenic.com/wiki/PublishingRepositories +
+
5 +
+
6 # Path to repo or hgweb config to serve (see 'hg help hgweb') +
+
7 config = "/path/to/repo/or/config" +
+
8 +
+
9 # Uncomment and adjust if Mercurial is not installed system-wide +
+
10 # (consult "installed modules" path from 'hg debuginstall'): +
+
11 #import sys; sys.path.insert(0, "/path/to/python/lib") +
+
12 +
+
13 # Uncomment to send python tracebacks to the browser if an error occurs: +
+
14 #import cgitb; cgitb.enable() +
+
15 +
+
16 from mercurial import demandimport; demandimport.enable() +
+
17 from mercurial.hgweb import hgweb, wsgicgi +
+
18 application = hgweb(config) +
+
19 wsgicgi.launch(application) +
+
+
+
+
+ + + + + + + diff -r ebd225311eccf65b75664d32626314a60c73f40a -r df93056f98c86dfb6bac1e39a0e1a434840c84a8 indefero/scripts/hgweb.config --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/indefero/scripts/hgweb.config Wed Jul 24 22:47:45 2013 -0500 @@ -0,0 +1,2 @@ +[collections] +/home/mercurial/repositories = /home/mercurial/repositories diff -r ebd225311eccf65b75664d32626314a60c73f40a -r df93056f98c86dfb6bac1e39a0e1a434840c84a8 indefero/scripts/mtn-post-push --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/indefero/scripts/mtn-post-push Wed Jul 24 22:47:45 2013 -0500 @@ -0,0 +1,22 @@ +#!/bin/sh +# +# This hook informs IDF that new revisions arrived in the database +# of the specified project. +# +# This hook is normally installed automatically at the creation of your +# repository if you have everything configured correctly. If you want +# to enable it later, you need to call it into your monotonerc file +# from the hook "note_netsync_end". (See chapter "Event Notifications +# and Triggers" on .) +# + +dir=$(dirname "$0") +res=$(cd "$dir" && /bin/pwd || "$dir") +SCRIPTDIR="$res/$(readlink $0)" +PHP_POST_PUSH=$SCRIPTDIR/mtnpostpush.php + +TMPFILE=$(mktemp /tmp/mtn-post-push.XXXXXX) || exit 1 +while read rev; do echo $rev >> $TMPFILE; done + +echo php $PHP_POST_PUSH "$1" \< $TMPFILE \&\& rm -f $TMPFILE |\ + at now > /dev/null 2>&1 diff -r ebd225311eccf65b75664d32626314a60c73f40a -r df93056f98c86dfb6bac1e39a0e1a434840c84a8 indefero/scripts/mtnpostpush.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/indefero/scripts/mtnpostpush.php Wed Jul 24 22:47:45 2013 -0500 @@ -0,0 +1,63 @@ + 'name-of-the-project', + * 'revisions' => array('123abc...', '456def...', ...)); + * + */ + +fwrite(STDERR, "waiting for revisions on STDIN...\n"); +$stdin = file_get_contents('php://stdin'); + +$params = array('project' => $argv[1], + 'revisions' => explode("\n", chop($stdin))); +Pluf_Signal::send('mtnpostpush.php::run', 'mtnpostpush.php', $params); + + + diff -r ebd225311eccf65b75664d32626314a60c73f40a -r df93056f98c86dfb6bac1e39a0e1a434840c84a8 indefero/scripts/queuecron.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/indefero/scripts/queuecron.php Wed Jul 24 22:47:45 2013 -0500 @@ -0,0 +1,69 @@ + /dev/null 2>&1 diff -r ebd225311eccf65b75664d32626314a60c73f40a -r df93056f98c86dfb6bac1e39a0e1a434840c84a8 indefero/scripts/svn-post-revprop-change --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/indefero/scripts/svn-post-revprop-change Wed Jul 24 22:47:45 2013 -0500 @@ -0,0 +1,29 @@ +#!/bin/sh +# +# This hook does only one thing: +# +# 1. It calls the svnpostrevpropchange.php script with the current repository +# and revision as argument. The svnpostrevpropchange.php script will then +# trigger the 'svnpostrevpropchange.php::run' event with the repository +# path, revision, username, property name and action as arguments together +# with merged $_ENV and $_SERVER array. +# +# This hook is normally installed automatically at the creation of your +# repository if you have everything configured correctly. If you want +# to enable it later, you need to symlink it as "post-revprop-change" in your +# $REPOSITORY/hooks folder. It needs to be executable. +# +# www$ chmod +x /home/www/indefero/scripts/svn-post-revprop-change +# www$ cd /home/svn/repositories/project/hooks +# www$ ln -s /home/www/indefero/scripts/svn-post-revprop-change post-revprop-change +# + +SCRIPTDIR=$(dirname $(readlink $0)) +PHP_POST_REVPROP=$SCRIPTDIR/svnpostrevpropchange.php + +echo php $PHP_POST_REVPROP "$1" "$2" "$3" "$4" "$5" | at now > /dev/null 2>&1 +REPOS="$1" +REV="$2" +USER="$3" +PROPNAME="$4" +ACTION="$5" diff -r ebd225311eccf65b75664d32626314a60c73f40a -r df93056f98c86dfb6bac1e39a0e1a434840c84a8 indefero/scripts/svnpostcommit.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/indefero/scripts/svnpostcommit.php Wed Jul 24 22:47:45 2013 -0500 @@ -0,0 +1,62 @@ + '/path/to/subversion/repository', + * 'revision' => 1234, + * 'env' => array_merge($_ENV, $_SERVER)); + * + */ +$params = array('repo_dir' => $argv[1], + 'revision' => $argv[2], + 'env' => array_merge($_ENV, $_SERVER)); +Pluf_Log::event(array('svnpostcommit.php', 'Send run signal.', $params)); +Pluf_Signal::send('svnpostcommit.php::run', 'svnpostcommit.php', $params); + + + diff -r ebd225311eccf65b75664d32626314a60c73f40a -r df93056f98c86dfb6bac1e39a0e1a434840c84a8 indefero/scripts/svnpostrevpropchange.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/indefero/scripts/svnpostrevpropchange.php Wed Jul 24 22:47:45 2013 -0500 @@ -0,0 +1,70 @@ + '/path/to/subversion/repository', + * 'revision' => 1234, + * 'user' => 'username', + * 'propname' => 'changed-property', + * 'action' => 'the action M, A or D', + * 'env' => array_merge($_ENV, $_SERVER)); + * + */ + +$params = array('repo_dir' => $argv[1], + 'revision' => $argv[2], + 'user' => $argv[3], + 'propname' => $argv[4], + 'action' => $argv[5], + 'env' => array_merge($_ENV, $_SERVER)); +Pluf_Signal::send('svnpostrevpropchange.php::run', 'svnpostrevpropchange.php', + $params); + + +