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  f09696cfab5e20c73661d960275f128a2ea35edb (commit)
      from  b4eb26e7022562a52001bd9b655a2806d05062d2 (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=f09696cfab5e20c73661d960275f128a2ea35edb

commit f09696cfab5e20c73661d960275f128a2ea35edb
Author: Franck Villaume <franck.villa...@trivialdev.com>
Date:   Fri Mar 2 14:16:24 2018 +0000

    scmhg: migration scripts for multirepo support

diff --git a/src/db/20180302-scmhg-multirepository-support.php 
b/src/db/20180302-scmhg-multirepository-support.php
new file mode 100644
index 0000000..28de98e
--- /dev/null
+++ b/src/db/20180302-scmhg-multirepository-support.php
@@ -0,0 +1,54 @@
+<?php
+/**
+ * Move SVN repos to the new structure to support multi SVN repositories
+ * Copyright, 2016, Franck Villaume - TrivialDev
+ * http://fusionforge.org/
+ *
+ * This file is part of FusionForge.
+ *
+ * FusionForge is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+require_once dirname(__FILE__).'/../common/include/env.inc.php';
+require_once $gfcommon.'include/pre.php';
+
+$hg_root = forge_get_config('repos_path', 'scmhg');
+if (is_dir($hg_root) && ($hg_opendir = opendir($hg_root))) {
+       while (($hg_repodir = readdir($hg_opendir)) !== false) {
+               $keep = true;
+               //check if this is a real repo with a project. reponame = 
unix_group_name
+               $group = group_get_object_by_name($hg_repodir);
+               if (!$group || !is_object($group) || $group->isError()) {
+                       $keep = false;
+               }
+               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";
+                               }
+                       } else {
+                               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";
+                               $conf .= '/ = 
'.$hg_root.'/'.$hg_repodir.'/*'."\n";
+                               fwrite($f, $conf);
+                               fclose($f);
+                       }
+               }
+       }
+}
+echo "SUCCESS\n";

-----------------------------------------------------------------------

Summary of changes:
 src/db/20180302-scmhg-multirepository-support.php | 54 +++++++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 src/db/20180302-scmhg-multirepository-support.php


hooks/post-receive
-- 
FusionForge

_______________________________________________
Fusionforge-commits mailing list
Fusionforge-commits@lists.fusionforge.org
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits

Reply via email to