line |
true |
false |
branch |
687
|
346 |
3060 |
if (my $handler = delete $params{'handler'}) |
689
|
346 |
0 |
unless ($subclass eq $class) |
690
|
0 |
346 |
unless eval "require $subclass" |
697
|
716 |
2344 |
if (ref $params{'filters'} eq 'ARRAY') |
700
|
777 |
1 |
unless $pkg =~ /::/ |
701
|
308 |
470 |
if ($filters{$pkg}) { } |
707
|
0 |
470 |
unless eval "require $pkg" |
713
|
0 |
0 |
ref $v eq 'CODE' ? : |
|
885 |
0 |
ref \$v eq 'GLOB' ? : |
|
116 |
769 |
unless my $code = ref \$v eq 'GLOB' ? *{$v;}{'CODE'} : (ref $v eq 'CODE' ? $v : *{"${pkg}::$k";}{'CODE'}) |
724
|
966 |
2094 |
unless ref $params{'to'} |
728
|
3 |
3057 |
if $params{'verbose'} |
730
|
1 |
3059 |
unless $params{'repos_path'} |
732
|
1 |
3058 |
unless $params{'revision'} |
743
|
3050 |
8 |
unless $params{'smtp'} |
746
|
0 |
8 |
unless $params{'sendmail'} or $params{'smtp'} |
749
|
210 |
2848 |
if ($params{'language'} and not $ENV{'LANG'}) |
753
|
0 |
420 |
if uc $encoding ne 'UTF-8' |
762
|
0 |
3058 |
if ($params{'revision_url'} and not $params{'revision_url'} =~ /%s/) |
769
|
77 |
2981 |
if ($params{'ticket_regex'}) |
775
|
283 |
11949 |
if ($params{$param}) |
778
|
0 |
283 |
unless $track->{$system} =~ /%s/ |
781
|
77 |
2981 |
if $track |
784
|
3 |
3055 |
if $params{'verbose'} |
832
|
665 |
0 |
if (my $opt = shift()) |
922
|
0 |
4 |
unless Getopt::Long::GetOptions('repos-path|p=s', \$opts->{'repos_path'}, 'revision|r=s', \$opts->{'revision'}, 'to|t=s@', \$opts->{'to'}, 'to-regex-map|x=s%', \$opts->{'to_regex_map'}, 'to-email-map=s%', \$opts->{'to_email_map'}, 'from|f=s', \$opts->{'from'}, 'user-domain|D=s', \$opts->{'user_domain'}, 'svnlook|l=s', \$opts->{'svnlook'}, 'sendmail|s=s', \$opts->{'sendmail'}, 'set-sender|E', \$opts->{'set_sender'}, 'smtp=s', \$opts->{'smtp'}, 'smtp-port=i', \$opts->{'smtp_port'}, 'smtp-tls!', \$opts->{'smtp_tls'}, 'encoding|charset|c=s', \$opts->{'encoding'}, 'diff-encoding=s', \$opts->{'diff_encoding'}, 'svn-encoding=s', \$opts->{'svn_encoding'}, 'language|g=s', \$opts->{'language'}, 'with-diff|d', \$opts->{'with_diff'}, 'attach-diff|a', \$opts->{'attach_diff'}, 'diff-switches|w=s', \$opts->{'diff_switches'}, 'diff-content-type=s', \$opts->{'diff_content_type'}, 'reply-to|R=s', \$opts->{'reply_to'}, 'subject-prefix|P=s', \$opts->{'subject_prefix'}, 'subject-cx|C', \$opts->{'subject_cx'}, 'strip-cx-regex|X=s@', \$opts->{'strip_cx_regex'}, 'no-first-line|O', \$opts->{'no_first_line'}, 'max-sub-length|i=i', \$opts->{'max_sub_length'}, 'max-diff-length|e=i', \$opts->{'max_diff_length'}, 'handler|H=s', \$opts->{'handler'}, 'filter|F=s@', \$opts->{'filters'}, 'author-url|A=s', \$opts->{'author_url'}, 'ticket-regex=s', \$opts->{'ticket_regex'}, 'ticket-map=s%', \$opts->{'ticket_map'}, 'verbose|V+', \$opts->{'verbose'}, 'help|h', \$opts->{'help'}, 'man|m', \$opts->{'man'}, 'version|v', \$opts->{'version'}, 'header=s', \$opts->{'header'}, 'footer=s', \$opts->{'footer'}, 'smtp-user=s', \$opts->{'smtp_user'}, 'smtp-pass=s', \$opts->{'smtp_pass'}, 'smtp-authtype=s', \$opts->{'smtp_authtype'}, 'add-header=s%', sub {
shift();
push @{$opts->{'add_headers'}{shift()};}, shift();
}
, 'revision-url|U|svnweb-url|S|viewcvs-url=s', \$opts->{'revision_url'}, 'rt-url|T|bugzilla-url|B|jira-url|J|gnats-url|G|ticket-url=s', \$opts->{'ticket_url'}) |
925
|
1 |
3 |
if (my $hand = $opts->{'handler'}) |
926
|
0 |
1 |
unless eval 'require SVN::Notify' . "::$hand" |
927
|
0 |
1 |
if ($hand eq 'Alternative') |
932
|
0 |
0 |
unless $opts->{'alternatives'} |
933
|
0 |
0 |
unless eval 'require SVN::Notify' . "::$alt" |
939
|
1 |
3 |
if ($opts->{'filters'}) |
941
|
1 |
0 |
unless $pkg =~ /::/ |
942
|
0 |
1 |
unless eval "require $pkg" |
949
|
2 |
2 |
if (%OPTS) { } |
991
|
26 |
58 |
if $opts->{$opt} |
1049
|
1 |
2 |
if -f $file and -x _ |
1085
|
1 |
0 |
unless @{$self->{'to'};} or $self->{'to_regex_map'} or $self->{'to_email_map'} |
1087
|
0 |
2707 |
unless @{$self->{'to'};} |
1116
|
3 |
2796 |
if $self->{'verbose'} |
1117
|
2493 |
71 |
unless ($self->{'to_regex_map'} or $self->{'subject_cx'} or $self->{'to_email_map'}) |
1132
|
71 |
160 |
$self->{'to_email_map'} ? : |
|
75 |
231 |
$self->{'to_regex_map'} ? : |
|
0 |
306 |
$self->{'to_regex_map'} && $self->{'to_email_map'} ? : |
1135
|
146 |
160 |
if ($regexen) { } |
1137
|
0 |
146 |
if $self->{'verbose'} > 1 |
1139
|
0 |
438 |
if $self->{'verbose'} > 2 |
1148
|
0 |
306 |
if $self->{'svn_env_lang'} |
1165
|
2448 |
6192 |
if (/$rx/) |
1166
|
0 |
2448 |
if $self->{'verbose'} > 2 |
1167
|
288 |
2160 |
unless $seen{$email}++ |
1171
|
2113 |
2880 |
if ($self->{'subject_cx'}) |
1179
|
0 |
300 |
if $self->{'subject_cx'} and $self->{'verbose'} > 1 |
1180
|
0 |
300 |
unless close $fh |
1184
|
0 |
300 |
if $self->{'verbose'} > 1 |
1202
|
3 |
2790 |
if $self->{'verbose'} |
1203
|
210 |
2583 |
if $self->{'svn_env_lang'} |
1212
|
2709 |
0 |
unless ($self->{'from'}) |
1214
|
43 |
2666 |
$self->{'user_domain'} ? : |
1218
|
2 |
2707 |
if ($self->{'verbose'} > 1) |
1245
|
2 |
2707 |
if $self->{'verbose'} |
1247
|
207 |
2502 |
if $self->{'svn_env_lang'} |
1260
|
46761 |
0 |
if (s/^(.)(.)\s+//) |
1261
|
0 |
46761 |
if $self->{'verbose'} > 2 |
1263
|
2404 |
44357 |
if $2 ne ' ' and $1 ne '_' |
1267
|
51 |
2574 |
if ($self->{'subject_cx'} and $. == 1) |
1272
|
0 |
51 |
if $self->{'verbose'} > 1 |
1276
|
0 |
2625 |
unless close $fh |
1300
|
1 |
2624 |
if $self->{'verbose'} |
1305
|
127 |
2498 |
if (defined $self->{'subject_prefix'}) { } |
1306
|
59 |
68 |
if (index($self->{'subject_prefix'}, '%d') > 0) { } |
1318
|
148 |
2477 |
if ($self->{'cx'}) |
1319
|
42 |
106 |
if (my $rx = $self->{'strip_cx_regex'}) |
1322
|
42 |
106 |
$self->{'no_first_line'} ? : |
1323
|
148 |
0 |
if $self->{'cx'} |
1327
|
2583 |
42 |
unless ($self->{'no_first_line'}) |
1330
|
2583 |
0 |
if $min > 10 |
1334
|
2538 |
45 |
$i > 0 ? : |
1340
|
45 |
2580 |
if $self->{'max_sub_length'} and length $self->{'subject'} > $self->{'max_sub_length'} |
1344
|
1 |
2624 |
if $self->{'verbose'} |
1364
|
1 |
2624 |
if $self->{'verbose'} |
1366
|
0 |
2625 |
unless @{$self->{'to'};} |
1368
|
4 |
2621 |
$self->{'smtp'} ? : |
1369
|
204 |
2417 |
if $self->{'env_lang'} |
1374
|
0 |
2621 |
$self->{'set_sender'} ? : |
1381
|
0 |
2514 |
unless close $out |
1382
|
1 |
2513 |
if $self->{'verbose'} |
1426
|
1 |
2661 |
if $self->{'verbose'} > 1 |
1427
|
2434 |
228 |
unless $no_headers |
1433
|
704 |
1958 |
if ($self->{'with_diff'}) { } |
1436
|
155 |
520 |
if ($self->{'attach_diff'}) { } |
1464
|
0 |
2543 |
if $self->{'verbose'} > 2 |
1469
|
2155 |
388 |
$self->{'subject'} =~ /(?:\P{ASCII}|=)/s ? : |
1478
|
2932 |
2502 |
if ($addr->is_valid) { } |
1479
|
0 |
2932 |
if (my $phrase = $addr->phrase) |
1505
|
64 |
2479 |
if $self->{'reply_to'} |
1507
|
1 |
2542 |
if (my $heads = $self->{'add_headers'}) |
1509
|
1 |
1 |
ref $v ? : |
1538
|
0 |
2662 |
if $self->{'verbose'} > 2 |
1540
|
159 |
2503 |
if ($self->{'attach_diff'}) |
1548
|
159 |
2503 |
if $self->{'attach_diff'} |
1550
|
201 |
2461 |
$self->{'language'} ? : |
1569
|
15 |
1570 |
$self->{'header'} ? : |
1571
|
62 |
1523 |
if $start and @$start |
1591
|
103 |
1507 |
if (my $url = $self->{'revision_url'}) |
1597
|
32 |
1578 |
if (my $url = $self->{'author_url'}) |
1619
|
1 |
1584 |
if $self->{'verbose'} > 1 |
1627
|
103 |
1482 |
if (my $url = $self->{'revision_url'}) |
1628
|
103 |
0 |
if (my(@matches) = $msg =~ /\b(?:(?:rev(?:ision)?\s*#?\s*|r)(\d+))\b/gi) |
1635
|
26 |
1559 |
if (my $map = $self->ticket_map) |
1640
|
26 |
208 |
unless ($has_header) |
1666
|
0 |
1607 |
unless my $files = $self->{'files'} |
1667
|
1 |
1606 |
if $self->{'verbose'} > 1 |
1674
|
369 |
6059 |
unless $files->{$type} |
1676
|
0 |
6059 |
if $self->{'verbose'} > 2 |
1706
|
0 |
1576 |
if $self->{'verbose'} > 2 |
1707
|
15 |
1561 |
$self->{'footer'} ? : |
1709
|
62 |
1514 |
if $end and @$end |
1726
|
0 |
228 |
if $self->{'verbose'} > 1 |
1743
|
0 |
155 |
if $self->{'verbose'} > 2 |
1748
|
75 |
80 |
$self->{'language'} ? : |
1767
|
155 |
2478 |
if $self->{'attach_diff'} |
1787
|
0 |
65 |
unless my $map = $self->ticket_map |
1808
|
36852 |
1329 |
unless my $filters = $self->{'filters'}{$type} |
1855
|
48 |
0 |
if defined $_ |
1860
|
48 |
656 |
$self->{'diff_switches'} ? : |
1875
|
12 |
371 |
if (my $max = $self->{'max_diff_length'}) { } |
1879
|
276 |
12 |
if (($length += length $_) < $max) { } |
1896
|
0 |
383 |
unless close $diff |
1957
|
32729 |
53 |
unless @_ |
1975
|
156 |
0 |
unless @_ |
1976
|
0 |
0 |
if (my $url = shift()) { } |
1990
|
117 |
0 |
wantarray ? : |
|
117 |
0 |
unless @_ |
2335
|
5 |
9128 |
if $self->{'verbose'} |
2348
|
0 |
9133 |
unless defined $pid |
2350
|
8848 |
285 |
if ($pid) { } |
2352
|
8848 |
0 |
if $encode |
2356
|
0 |
0 |
unless exec @_ |
2372
|
0 |
2709 |
unless close $fh |
2391
|
3 |
0 |
unless $0 =~ /\bsvnnotify(?:[.]bat)?$/ |
2423
|
1 |
3 |
$notifier->{'smtp_port'} ? : |
|
0 |
4 |
$notifier->{'smtp_tls'} ? : |
|
1 |
3 |
$notifier->{'smtp_user'} ? : |
|
1 |
3 |
$notifier->{'smtp_pass'} ? : |
|
1 |
3 |
$notifier->{'verbose'} ? : |
|
0 |
4 |
unless my $smtp = 'Net::SMTP::TLS'->new($notifier->{'smtp'}, 'Hello', Sys::Hostname::hostname(), $notifier->{'smtp_port'} ? ('Port', $notifier->{'smtp_port'}) : (), $notifier->{'smtp_tls'} ? () : ('NoTLS', 1), $notifier->{'smtp_user'} ? ('User', $notifier->{'smtp_user'}) : (), $notifier->{'smtp_pass'} ? ('Password', $notifier->{'smtp_pass'}) : (), $notifier->{'verbose'} ? ('Debug', 1) : ()) |