This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "FusionForge".
The branch, 6.1 has been updated via f221922334b13852439954c1e47b207e11c8504f (commit) from bf637ac0299c33e09fae071a7ebc51ffa55812e3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=f221922334b13852439954c1e47b207e11c8504f commit f221922334b13852439954c1e47b207e11c8504f Author: Franck Villaume <franck.villa...@trivialdev.com> Date: Sun Mar 4 15:23:13 2018 +0100 scmhg: multirepo migration, fix config file creation, include hgweb cgi rewrite diff --git a/src/db/20180302-scmhg-multirepository-support.php b/src/db/20180302-scmhg-multirepository-support.php index d96fa34..2a3e689 100644 --- a/src/db/20180302-scmhg-multirepository-support.php +++ b/src/db/20180302-scmhg-multirepository-support.php @@ -25,6 +25,7 @@ require_once dirname(__FILE__).'/../common/include/env.inc.php'; require_once $gfcommon.'include/pre.php'; $hg_root = forge_get_config('repos_path', 'scmhg'); +$hgweb = forge_get_config('source_path').'/plugins/scmhg/cgi-bin/hgweb.cgi'; if (is_dir($hg_root) && ($hg_opendir = opendir($hg_root))) { while (($hg_repodir = readdir($hg_opendir)) !== false) { $keep = true; @@ -36,18 +37,35 @@ if (is_dir($hg_root) && ($hg_opendir = opendir($hg_root))) { if ($keep && is_dir($hg_root.'/'.$hg_repodir.'/.hg')) { if (mkdir($hg_root.'/'.$hg_repodir.'/'.$hg_repodir)) { if (!rename($hg_root.'/'.$hg_repodir.'/.hg', $hg_root.'/'.$hg_repodir.'/'.$hg_repodir.'/.hg')) { - echo "UNABLE TO MOVE TO FINAL DESTINATION REPO: ".$hg_repodir."\n"; + echo 'UNABLE TO MOVE TO FINAL DESTINATION REPO: '.$hg_repodir."\n"; } } else { - echo "UNABLE TO CREATE TARGET DIR FOR REPO: ".$hg_repodir."\n"; + echo 'UNABLE TO CREATE TARGET DIR FOR REPO: '.$hg_repodir."\n"; } - if (!is_file("$hg_root/$hg_repodir/config")) { - $f = fopen("$hg_root/$hg_repodirconfig", 'w'); - $conf = "[paths]\n"; + if (!is_file($hg_root.'/'.$hg_repodir.'/config')) { + $f = fopen($hg_root.'/'.$hg_repodir.'/config', 'w'); + $conf = '[paths]'."\n"; $conf .= '/ = '.$hg_root.'/'.$hg_repodir.'/*'."\n"; fwrite($f, $conf); fclose($f); } + $project_hgweb = forge_get_config('source_path').'/www/plugins/scmhg/cgi-bin/'.$hg_repodir; + $lines = file($hgweb); + $repo_config = ""; + foreach ($lines as $line) { + if (preg_match("/\Aconfig = /",$line)) { + $repo_config .= 'config = "'.$hg_root.'/'.$hg_repodir.'/config"'."\n"; + } else { + $repo_config .= $line; + } + } + $f = fopen($project_hgweb, 'w'); + fwrite($f, $repo_config); + fclose($f); + $apache_user = forge_get_config('apache_user'); + $apache_group = forge_get_config('apache_group'); + system("chown $apache_user:$apache_group $project_hgweb"); + system("chmod 755 $project_hgweb"); } } } ----------------------------------------------------------------------- Summary of changes: src/db/20180302-scmhg-multirepository-support.php | 28 +++++++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) hooks/post-receive -- FusionForge _______________________________________________ Fusionforge-commits mailing list Fusionforge-commits@lists.fusionforge.org http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits