9 |
use Data::Dump qw/dump/; |
use Data::Dump qw/dump/; |
10 |
use JSON; |
use JSON; |
11 |
use CGI; |
use CGI; |
12 |
|
use File::Slurp; |
13 |
|
|
14 |
my $debug = $ENV{'DEBUG'} || 0; |
my $debug = $ENV{'DEBUG'} || 0; |
15 |
|
|
16 |
my $limit = 1000; |
my $config_path = $0; |
17 |
|
$config_path =~ s/.cgi/.js/; |
18 |
my $repository_dir = '/srv/svn'; |
my $config = from_json( read_file( $config_path ) ); |
19 |
my $svnweb = 'https://svn-strix.carnet.hr/private/svnweb/index.cgi/%s/revision?rev=%d'; |
my $repository_dir = $config->{repository_dir} || die "no repository_dir in $config_path"; |
20 |
|
my $svnweb = $config->{svnweb} || die "no svnweb in $config_path"; |
21 |
|
|
22 |
# my local config for development |
my $limit = 1000; |
|
$repository_dir = '/home/dpavlin/private/svn'; |
|
|
$svnweb = 'http://localhost/svnweb/index.cgi/%s/revision?rev=%d'; |
|
|
# my local svk mirrors |
|
|
$repository_dir = '/home/dpavlin/.svk'; |
|
|
$svnweb = 'http://localhost/svnweb/svk/index.cgi/%s/revision?rev=%d'; |
|
23 |
|
|
24 |
# for older JSON |
# for older JSON |
25 |
#sub encode_json { objToJson( @_ ) } |
#sub encode_json { objToJson( @_ ) } |