/[SVNBrowser]/trunk/svn-indexer.pl
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 /trunk/svn-indexer.pl

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

revision 25 by dpavlin, Thu Dec 7 00:51:39 2006 UTC revision 26 by dpavlin, Sun Dec 10 00:01:33 2006 UTC
# Line 27  $rev_col->unlimit; Line 27  $rev_col->unlimit;
27  $rev_col->order_by({ column => 'revision', order => 'DES' });  $rev_col->order_by({ column => 'revision', order => 'DES' });
28  my $last_rev = $rev_col->first;  my $last_rev = $rev_col->first;
29    
30    my $branch_regex = Jifty->config->app('branch_regex');
31    
32  if ($last_rev) {  if ($last_rev) {
33          $start_rev = $last_rev->revision;          $start_rev = $last_rev->revision;
34          warn "Index $repository rev $start_rev - $end_rev\n";          warn "Index $repository rev $start_rev - $end_rev [branch regex: $branch_regex]\n";
35  }  }
36    
37  SVN::Log::retrieve({  SVN::Log::retrieve({
# Line 55  SVN::Log::retrieve({ Line 57  SVN::Log::retrieve({
57                          my $action = $paths->{$path}->{action} || die "no action in ", dump($path);                          my $action = $paths->{$path}->{action} || die "no action in ", dump($path);
58    
59                          my $branch = '/';                          my $branch = '/';
60                          ($branch,$path) = ($1,$2) if ($path =~ m!^(/[^/]+)(/.+)$!);                          ($branch,$path) = ($1,$2) if ($path =~ m/$branch_regex/);
61    
62                            my $b = SVNBrowser::Model::Branch->new(current_user => $system_user);
63                            $b->load_or_create(
64                                    path => $branch,
65                            );
66                            
67                            my $rb = SVNBrowser::Model::RevisionBranch->new(current_user => $system_user);
68                            $rb->load_or_create(
69                                    revision => $r,
70                                    branch => $b,
71                            );
72    
73                          my $a = SVNBrowser::Model::Action->new(current_user => $system_user);                          my $a = SVNBrowser::Model::Action->new(current_user => $system_user);
74                          $a->load_or_create(                          $a->load_or_create(
# Line 64  SVN::Log::retrieve({ Line 77  SVN::Log::retrieve({
77                                  branch => $branch,                                  branch => $branch,
78                                  rel_path => $path,                                  rel_path => $path,
79                          );                          );
80    
81                          print " $action | $branch | $path\n";                          print " $action | $branch | $path\n";
82                  }                  }
83          }          }

Legend:
Removed from v.25  
changed lines
  Added in v.26

  ViewVC Help
Powered by ViewVC 1.1.26