aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MGA
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mars-attacks.org>2013-07-15 19:14:36 +0200
committerNicolas Vigier <boklm@mars-attacks.org>2013-07-15 19:14:36 +0200
commit4aef35e7048286fc4f819b591948b4847ec3f97f (patch)
tree41c83e58531eff5e7142d95767a589e7642dc551 /lib/MGA
parent9205f1adf366d6c197d4bf0bc473f2cb408aef69 (diff)
downloadmgagit-4aef35e7048286fc4f819b591948b4847ec3f97f.tar
mgagit-4aef35e7048286fc4f819b591948b4847ec3f97f.tar.gz
mgagit-4aef35e7048286fc4f819b591948b4847ec3f97f.tar.bz2
mgagit-4aef35e7048286fc4f819b591948b4847ec3f97f.tar.xz
mgagit-4aef35e7048286fc4f819b591948b4847ec3f97f.zip
Dump repos db in a yaml file when running glrun
Diffstat (limited to 'lib/MGA')
-rw-r--r--lib/MGA/Git.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/MGA/Git.pm b/lib/MGA/Git.pm
index 6b8ac11..99d71d4 100644
--- a/lib/MGA/Git.pm
+++ b/lib/MGA/Git.pm
@@ -2,7 +2,7 @@ package MGA::Git;
use strict;
use Git;
-use YAML qw(LoadFile);
+use YAML qw(LoadFile DumpFile);
use Template;
use File::Slurp;
use File::Basename;
@@ -201,6 +201,11 @@ sub update_gitolite_keydir {
}
}
+sub dumpdb {
+ my ($r) = @_;
+ DumpFile($config->{www_dir} . '/repos.yaml', $r);
+}
+
sub update_gitolite_config {
my ($r) = @_;
my $oldconf = -f $config->{gitolite_config}