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({ |
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( |
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 |
} |
} |