From 4aef35e7048286fc4f819b591948b4847ec3f97f Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Mon, 15 Jul 2013 19:14:36 +0200 Subject: Dump repos db in a yaml file when running glrun --- lib/MGA/Git.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/MGA') 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} -- cgit v1.2.1