1 |
use warnings; |
2 |
use strict; |
3 |
|
4 |
package SVNBrowser::Bootstrap; |
5 |
use base qw(Jifty::Bootstrap); |
6 |
|
7 |
=head1 Bootstrap application data |
8 |
|
9 |
Create initial data |
10 |
|
11 |
=cut |
12 |
|
13 |
sub run { |
14 |
my $self = shift; |
15 |
|
16 |
$self->log->info("creating initial repository data"); |
17 |
|
18 |
my $system_user = SVNBrowser::CurrentUser->superuser( _bootstrap => 1 ); |
19 |
|
20 |
my $db = SVNBrowser::Model::Repository->new(current_user => $system_user); |
21 |
|
22 |
$db->create( |
23 |
uri => 'file:///home/dpavlin/.svk/bioserv', |
24 |
branch_regex => '/upstream(/[^/]+)(/.*)$', |
25 |
); |
26 |
|
27 |
$db->create( |
28 |
uri => 'file:///home/dpavlin/.svk/pliva', |
29 |
branch_regex => '(/(?:BackupPC|strix)/[^/]+|/[^/]+)(/?.*)$', |
30 |
); |
31 |
} |
32 |
|
33 |
1; |