/[simile]/svn/index.cgi
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /svn/index.cgi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 30 by dpavlin, Mon Oct 20 19:41:49 2008 UTC revision 43 by dpavlin, Mon Oct 27 19:06:06 2008 UTC
# Line 9  use XML::Simple; Line 9  use XML::Simple;
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( @_ ) }
# Line 46  warn "# limit: ", $q->param('limit'); Line 43  warn "# limit: ", $q->param('limit');
43    
44  sub select_repository {  sub select_repository {
45          my $onChange = qq{document.getElementById('current_repository').submit();};          my $onChange = qq{document.getElementById('current_repository').submit();};
46            # we want to activete javascript magic refresh after we hit submit for the first time, and not always
47            $onChange = '' unless $q->param('did_submit');
48          return (          return (
49                  $q->start_form( -name => 'current_repository', -id => 'current_repository', -method => 'post' ),                  $q->start_form( -name => 'current_repository', -id => 'current_repository', -method => 'post' ),
50                  "From repository ",                  "From repository ",
51                  $q->popup_menu( -name => 'repository', -values => [ @repositories ], -onChange => $onChange ),                  $q->popup_menu( -name => 'repository', -values => [ @repositories ], -onChange => $onChange ),
52                  " show ",                  " show ",
53                  $q->popup_menu( -name => 'limit', -values => [ qw/100 500 1000 5000 10000/ ], -onChange => $onChange ),                  $q->popup_menu( -name => 'limit', -values => [ qw/100 500 1000 5000 10000/ ], -onChange => $onChange ),
54                  " revisions with ",                  " revisions and ",
55                  $q->checkbox(-name=>'path', -checked=>1, -value=>'ON', -label=>'path modifications', -onChange => $onChange ),                  $q->checkbox(-name=>'path', -checked=>1, -value=>'ON', -label=>'path modifications', -onChange => $onChange ),
56                  $q->submit,                  " ",
57                    $q->submit(-name=>'did_submit', -value=>'in Exhibit'),
58                  $q->end_form                  $q->end_form
59          );          );
60  }  }

Legend:
Removed from v.30  
changed lines
  Added in v.43

  ViewVC Help
Powered by ViewVC 1.1.26