3 $WEB_ROOT_FS = realpath(dirname(__FILE__));
6 global $WEB_ROOT_FS, $BASE_URL, $IS_WEB_REQUEST, $data_directory, $db_type, $db_name, $db_username, $db_password, $IS_WEB_REQUEST, $cmd_line_tool;
7 $IS_WEB_REQUEST = false;
\r
9 if(file_exists("../www/config.php")) require_once("../www/config.php");
10 else if(file_exists("/etc/gwvpmini/config.php")) require_once("/etc/gwvpmini/config.php");
11 else $noconfig = true;
13 if(file_exists("../gwvpmini/gwvpmini.php")) require_once("../gwvpmini/gwvpmini.php");
14 else if(file_exists("/usr/share/gwvpmini/lib/gwvpmini/gwvpmini.php")) require_once("/usr/share/gwvpmini/lib/gwvpmini/gwvpmini.php");
16 if(isset($argv["1"])) {
19 gwvpcmdtool_UpdateHook();
22 gwvpcmdtool_PreReceive();
27 } else gwvpcmdtool_Usage();
32 function gwvpcmdtool_Usage()
36 echo "Usage: ".$argv[0]."\n";
37 echo "\tupdatehook <user> <ref> <firstupdate> <lastupdate>\n";
40 function gwvpcmdtool_UpdateHook()
43 echo "got ".$argv[2].", ".$argv[3].", ".$argv[4]."\n";
46 function gwvpcmdtool_PreReceive()
50 echo "got from prereceive ".$argv[2].", ".$argv[3].", ".$argv[4]."\n";
\r
52 passthru("git rev-list --reverse ".$argv[3]." --not --all ");