Lines Matching full:my

16 my $P = $0;
17 my $V = '0.26';
25 my $cur_path = fastgetcwd() . '/';
26 my $lk_path = "./";
27 my $email = 1;
28 my $email_usename = 1;
29 my $email_maintainer = 1;
30 my $email_reviewer = 1;
31 my $email_fixes = 1;
32 my $email_list = 1;
33 my $email_moderated_list = 1;
34 my $email_subscriber_list = 0;
35 my $email_git_penguin_chiefs = 0;
36 my $email_git = 0;
37 my $email_git_all_signature_types = 0;
38 my $email_git_blame = 0;
39 my $email_git_blame_signatures = 1;
40 my $email_git_fallback = 1;
41 my $email_git_min_signatures = 1;
42 my $email_git_max_maintainers = 5;
43 my $email_git_min_percent = 5;
44 my $email_git_since = "1-year-ago";
45 my $email_hg_since = "-365";
46 my $interactive = 0;
47 my $email_remove_duplicates = 1;
48 my $email_use_mailmap = 1;
49 my $output_multiline = 1;
50 my $output_separator = ", ";
51 my $output_roles = 0;
52 my $output_rolestats = 1;
53 my $output_section_maxlen = 50;
54 my $scm = 0;
55 my $tree = 1;
56 my $web = 0;
57 my $bug = 0;
58 my $subsystem = 0;
59 my $status = 0;
60 my $letters = "";
61 my $keywords = 1;
62 my $keywords_in_file = 0;
63 my $sections = 0;
64 my $email_file_emails = 0;
65 my $from_filename = 0;
66 my $pattern_depth = 0;
67 my $self_test = undef;
68 my $version = 0;
69 my $help = 0;
70 my $find_maintainer_files = 0;
71 my $maintainer_path;
72 my $vcs_used = 0;
74 my $exit = 0;
76 my @files = ();
77 my @fixes = (); # If a patch description includes Fixes: lines
78 my @range = ();
79 my @keyword_tvi = ();
80 my @file_emails = ();
82 my %commit_author_hash;
83 my %commit_signer_hash;
85 my @penguin_chief = ();
90 my @penguin_chief_names = ();
91 foreach my $chief (@penguin_chief) {
93 my $chief_name = $1;
94 my $chief_addr = $2;
98 my $penguin_chiefs = "\(" . join("|", @penguin_chief_names) . "\)";
103 my @signature_tags = ();
108 my $signature_pattern = "\(" . join("|", @signature_tags) . "\)";
111 my $rfc822_lwsp = "(?:(?:\\r\\n)?[ \\t])";
112 my $rfc822_char = '[\\000-\\377]';
116 my %VCS_cmds;
118 my %VCS_cmds_git = (
158 my %VCS_cmds_hg = (
188 my $conf = which_conf(".get_maintainer.conf");
190 my @conf_args;
191 open(my $conffile, '<', "$conf")
195 my $line = $_;
204 my @words = split(" ", $line);
205 foreach my $word (@words) {
214 my @ignore_emails = ();
215 my $ignore_file = which_conf(".get_maintainer.ignore");
217 open(my $ignore, '<', "$ignore_file")
220 my $line = $_;
330 my $selections = $email + $scm + $status + $subsystem + $web + $bug;
350 my @typevalue = ();
351 my %keyword_hash;
352 my @mfiles = ();
353 my @self_test_info = ();
356 my ($file) = @_;
358 open (my $maint, '<', "$file")
360 my $i = 1;
362 my $line = $_;
366 my $type = $1;
367 my $value = $2;
394 my ($file) = $_;
408 my $path = "${lk_path}MAINTAINERS";
424 my @files = readdir(DIR);
426 foreach my $file (@files) {
436 foreach my $file (@mfiles) {
442 my ($file) = @_;
447 open(my $f, '<', $file)
449 my $text = do { local($/) ; <$f> };
452my @poss_addr = $text =~ m$[\p{L}\"\' \,\.\+-]*\s*[\,]*\s*[\(\<\{]{0,1}[A-Za-z0-9_\.\+-]+\@[A-Za-z…
461 my $mailmap;
473 open(my $mailmap_file, '<', "${lk_path}.mailmap")
489 my $real_name = $1;
490 my $address = $2;
497 my $real_address = $1;
498 my $wrong_address = $2;
503 my $real_name = $1;
504 my $real_address = $2;
505 my $wrong_address = $3;
514 my $real_name = $1;
515 my $real_address = $2;
516 my $wrong_name = $3;
517 my $wrong_address = $4;
527 my $wrong_email = format_email($wrong_name, $wrong_address, 1);
541 foreach my $file (@ARGV) {
559 open(my $f, '<', $file)
561 my $text = do { local($/) ; <$f> };
563 foreach my $line (keys %keyword_hash) {
570 my $file_cnt = @files;
571 my $lastfile;
573 open(my $patch, "< $file")
581 my $patch_prefix = ""; #Parsing the intro
584 my $patch_line = $_;
586 my $filename = $1;
589 my $filename = $1;
592 my $filename1 = $1;
593 my $filename2 = $2;
599 my $filename = $1;
610 foreach my $line (keys %keyword_hash) {
630 my %email_hash_name;
631 my %email_hash_address;
632 my @email_to = ();
633 my %hash_list_to;
634 my @list_to = ();
635 my @scm = ();
636 my @web = ();
637 my @bug = ();
638 my @subsystem = ();
639 my @status = ();
640 my %deduplicate_name_hash = ();
641 my %deduplicate_address_hash = ();
643 my @maintainers = get_maintainers();
677 my @lsfiles = ();
678 my @good_links = ();
679 my @bad_links = ();
680 my @section_headers = ();
681 my $index = 0;
685 for my $x (@self_test_info) {
693 my $has_S = 0;
694 my $has_F = 0;
695 my $has_ML = 0;
696 my $status = "";
702 my $nextline = $index;
705 my $type = $1;
706 my $value = $2;
730 my $type = $1;
731 my $value = $2;
752 my $isbad = 0;
756 my $output = `wget --spider -q --no-check-certificate --timeout 10 --tries 1 $value`;
772 my $isbad = 0;
778 my $url = $1;
779 my $branch = "";
781 my $output = `git ls-remote --exit-code -h "$url" $branch > /dev/null 2>&1`;
789 my $url = $1;
790 my $output = `wget --spider -q --no-check-certificate --timeout 10 --tries 1 $url`;
806 my ($address) = @_;
808 foreach my $ignore (@ignore_emails) {
816 my ($start, $end) = @_;
818 for (my $i = $start; $i < $end; $i++) {
819 my $line = $typevalue[$i];
821 my $type = $1;
822 my $value = $2;
834 my ($start, $end) = @_;
836 for (my $i = $start; $i < $end; $i++) {
837 my $line = $typevalue[$i];
839 my $type = $1;
840 my $value = $2;
872 my %exact_pattern_match_hash = ();
874 foreach my $file (@files) {
876 my %hash;
877 my $tvi = find_first_section();
879 my $start = find_starting_index($tvi);
880 my $end = find_ending_index($tvi);
881 my $exclude = 0;
882 my $i;
887 my $line = $typevalue[$i];
889 my $type = $1;
890 my $value = $2;
902 my $line = $typevalue[$i];
904 my $type = $1;
905 my $value = $2;
908 my $value_pd = ($value =~ tr@/@@);
909 my $file_pd = ($file =~ tr@/@@);
933 foreach my $line (sort {$hash{$b} <=> $hash{$a}} keys %hash) {
936 my $i;
937 my $start = find_starting_index($line);
938 my $end = find_ending_index($line);
940 my $line = $typevalue[$i];
947 my $count = $line =~ s/^([A-Z]):/$1:\t/g;
961 foreach my $line (@keyword_tvi) {
966 foreach my $email (@email_to, @list_to) {
970 foreach my $file (@files) {
984 foreach my $chief (@penguin_chief) {
986 my $email_address;
997 foreach my $email (@file_emails) {
999 my ($name, $address) = parse_email($email);
1001 my $tmp_email = format_email($name, $address, $email_usename);
1007 foreach my $fix (@fixes) {
1011 my @to = ();
1029 my ($file, $pattern) = @_;
1036 my $s1 = ($file =~ tr@/@@);
1037 my $s2 = ($pattern =~ tr@/@@);
1141 my ($lk_path) = @_;
1168 my ($name) = @_;
1179 my ($formatted_email) = @_;
1181 my $name = "";
1182 my $address = "";
1202 my ($name, $address, $usename) = @_;
1204 my $formatted_email;
1225 my $index = 0;
1228 my $tv = $typevalue[$index];
1239 my ($index) = @_;
1242 my $tv = $typevalue[$index];
1253 my ($index) = @_;
1256 my $tv = $typevalue[$index];
1267 my ($index) = @_;
1269 my $start = find_starting_index($index);
1271 my $subsystem = $typevalue[$start];
1281 my ($index) = @_;
1283 my $i;
1284 my $start = find_starting_index($index);
1285 my $end = find_ending_index($index);
1287 my $role = "unknown";
1288 my $subsystem = get_subsystem_name($index);
1291 my $tv = $typevalue[$i];
1293 my $ptype = $1;
1294 my $pvalue = $2;
1320 my ($index) = @_;
1322 my $subsystem = get_subsystem_name($index);
1332 my ($index, $suffix) = @_;
1334 my $i;
1335 my $start = find_starting_index($index);
1336 my $end = find_ending_index($index);
1341 my $tv = $typevalue[$i];
1343 my $ptype = $1;
1344 my $pvalue = $2;
1346 my $list_address = $pvalue;
1347 my $list_additional = "";
1348 my $list_role = get_list_role($i);
1384 my $role = get_maintainer_role($i);
1389 my $subsystem = get_subsystem_name($i);
1406 my ($name, $address) = @_;
1416 my ($line, $role) = @_;
1418 my ($name, $address) = parse_email($line);
1436 my ($address, $role) = @_;
1438 my @address_list = ();
1443 my $array_count = shift(@address_list);
1444 while (my $entry = shift(@address_list)) {
1455 my ($line, $role) = @_;
1457 my ($name, $address) = parse_email($line);
1458 my $email = format_email($name, $address, $email_usename);
1460 foreach my $entry (@email_to) {
1462 my ($entry_name, $entry_address) = parse_email($entry->[0]);
1487 my ($bin) = @_;
1489 foreach my $path (split(/:/, $ENV{PATH})) {
1499 my ($conf) = @_;
1501 foreach my $path (split(/:/, ".:$ENV{HOME}:.scripts")) {
1511 my ($line) = @_;
1513 my ($name, $address) = parse_email($line);
1514 my $email = format_email($name, $address, 1);
1515 my $real_name = $name;
1516 my $real_address = $address;
1538 my (@addresses) = @_;
1540 my @mapped_emails = ();
1541 foreach my $line (@addresses) {
1549 my %address_map;
1550 my (@emails) = @_;
1552 foreach my $email (@emails) {
1553 my ($name, $address) = parse_email($email);
1564 my ($cmd) = @_;
1565 my @lines = ();
1567 my $output = `$cmd`;
1575 my ($cmd) = @_;
1576 my @lines = ();
1578 my $output = `$cmd`;
1585 my (@signature_lines) = @_;
1587 my @type = @signature_lines;
1596 foreach my $signer (@signature_lines) {
1604 my ($cmd, $file) = @_;
1605 my $commits;
1606 my @lines = ();
1607 my @signatures = ();
1608 my @authors = ();
1609 my @stats = ();
1613 my $pattern = $VCS_cmds{"commit_pattern"};
1614 my $author_pattern = $VCS_cmds{"author_pattern"};
1615 my $stat_pattern = $VCS_cmds{"stat_pattern"};
1636 my ($author_ref, $authors_ref) = extract_formatted_signatures(@authors);
1637 my ($types_ref, $signers_ref) = extract_formatted_signatures(@signatures);
1643 my ($cmd) = @_;
1644 my @lines = ();
1654 my @authors = ();
1655 foreach my $line (@lines) {
1657 my $author = $1;
1658 my ($name, $address) = parse_email($author);
1671 my ($cmd) = @_;
1672 my @lines = ();
1673 my @commits = ();
1677 foreach my $line (@lines) {
1687 my ($file) = @_;
1688 my $cmd;
1689 my @commits = ();
1694 my @all_commits = ();
1700 foreach my $file_range_diff (@range) {
1702 my $diff_file = $1;
1703 my $diff_start = $2;
1704 my $diff_length = $3;
1706 for (my $i = $diff_start; $i < $diff_start + $diff_length; $i++) {
1711 foreach my $file_range_diff (@range) {
1713 my $diff_file = $1;
1714 my $diff_start = $2;
1715 my $diff_length = $3;
1727 foreach my $commit (@commits) {
1734 my $printed_novcs = 0;
1763 my ($commit, $desc) = @_;
1764 my $commit_count = 0;
1765 my $commit_authors_ref;
1766 my $commit_signers_ref;
1767 my $stats_ref;
1768 my @commit_authors = ();
1769 my @commit_signers = ();
1770 my $cmd;
1779 foreach my $signer (@commit_signers) {
1787 my ($list_ref) = @_;
1788 my @list = @$list_ref;
1792 my %selected;
1793 my %authored;
1794 my %signed;
1795 my $count = 0;
1796 my $maintained = 0;
1797 foreach my $entry (@list) {
1806 my $done = 0;
1807 my $print_options = 0;
1808 my $redraw = 1;
1820 foreach my $entry (@list) {
1821 my $email = $entry->[0];
1822 my $role = $entry->[1];
1823 my $sel = "";
1825 my $commit_author = $commit_author_hash{$email};
1826 my $commit_signer = $commit_signer_hash{$email};
1827 my $authored = 0;
1828 my $signed = 0;
1836 my $commit_author = $commit_author_hash{$email};
1837 foreach my $ref (@{$commit_author}) {
1842 my $commit_signer = $commit_signer_hash{$email};
1843 foreach my $ref (@{$commit_signer}) {
1851 my $date_ref = \$email_git_since;
1888 my $input = <STDIN>;
1892 my $rerun = 0;
1893 my @wish = split(/[, ]+/, $input);
1894 foreach my $nr (@wish) {
1896 my $sel = substr($nr, 0, 1);
1897 my $str = substr($nr, 1);
1898 my $val = 0;
1910 my $toggle = 0;
1912 for (my $i = 0; $i < $count; $i++) {
1916 for (my $i = 0; $i < $count; $i++) {
1921 for (my $i = 0; $i < $count; $i++) {
1926 for (my $i = 0; $i < $count; $i++) {
1931 for (my $i = 0; $i < $count; $i++) {
1936 for (my $i = 0; $i < $count; $i++) {
1945 my $toggle = 0;
1947 for (my $i = 0; $i < $count; $i++) {
1955 my $toggle = 0;
1957 for (my $i = 0; $i < $count; $i++) {
2056 my @new_emailto = ();
2057 foreach my $entry (@list) {
2067 my ($bool_ref) = @_;
2077 my ($email) = @_;
2079 my $matched = 0;
2080 my ($name, $address) = parse_email($email);
2107 my (@lines) = @_;
2109 my @authors = ();
2110 my @commits = ();
2111 my @subjects = ();
2113 foreach my $line (@lines) {
2115 my $author = $1;
2123 for (my $i = 0; $i < @authors; $i++) {
2124 my $exists = 0;
2125 foreach my $ref(@{$commit_author_hash{$authors[$i]}}) {
2140 my (@lines) = @_;
2142 my $commit = "";
2143 my $subject = "";
2145 foreach my $line (@lines) {
2149 my @signatures = ($line);
2150 my ($types_ref, $signers_ref) = extract_formatted_signatures(@signatures);
2151 my @types = @$types_ref;
2152 my @signers = @$signers_ref;
2154 my $type = $types[0];
2155 my $signer = $signers[0];
2159 my $exists = 0;
2160 foreach my $ref(@{$commit_signer_hash{$signer}}) {
2177 my ($role, $divisor, @lines) = @_;
2179 my %hash;
2180 my $count = 0;
2199 foreach my $line (sort {$hash{$b} <=> $hash{$a}} keys %hash) {
2200 my $sign_offs = $hash{$line};
2201 my $percent = $sign_offs * 100 / $divisor;
2211 my $fmt_percent = sprintf("%.0f", $percent);
2220 my ($file) = @_;
2222 my $authors_ref;
2223 my $signers_ref;
2224 my $stats_ref;
2225 my @authors = ();
2226 my @signers = ();
2227 my @stats = ();
2228 my $commits;
2233 my $cmd = $VCS_cmds{"find_signers_cmd"};
2244 foreach my $signer (@signers) {
2251 my $stat_pattern = $VCS_cmds{"stat_pattern"};
2254 my $added = 0;
2255 my $deleted = 0;
2256 for (my $i = 0; $i <= $#stats; $i++) {
2262 my @tmp_authors = uniq(@authors);
2263 foreach my $author (@tmp_authors) {
2267 my @list_added = ();
2268 my @list_deleted = ();
2269 foreach my $author (@tmp_authors) {
2270 my $auth_added = 0;
2271 my $auth_deleted = 0;
2272 for (my $i = 0; $i <= $#stats; $i++) {
2279 for (my $i = 0; $i < $auth_added; $i++) {
2282 for (my $i = 0; $i < $auth_deleted; $i++) {
2292 my ($file) = @_;
2294 my @signers = ();
2295 my @all_commits = ();
2296 my @commits = ();
2297 my $total_commits;
2298 my $total_lines;
2310 my $commit_count;
2311 my $commit_authors_ref;
2312 my $commit_signers_ref;
2313 my $stats_ref;
2314 my @commit_authors = ();
2315 my @commit_signers = ();
2316 my $commit = join(" -r ", @commits);
2317 my $cmd;
2328 foreach my $commit (@commits) {
2329 my $commit_count;
2330 my $commit_authors_ref;
2331 my $commit_signers_ref;
2332 my $stats_ref;
2333 my @commit_authors = ();
2334 my @commit_signers = ();
2335 my $cmd;
2351 my @blame_signers;
2353 my $commit_count;
2354 my @commit_signers = ();
2357 my $commit = join(" -r ", @commits);
2358 my $cmd;
2363 my @lines = ();
2373 my @authors = ();
2374 foreach my $line (@lines) {
2376 my $author = $1;
2388 foreach my $commit (@commits) {
2389 my $i;
2390 my $cmd = $VCS_cmds{"find_commit_author_cmd"};
2392 my @author = vcs_find_author($cmd);
2395 my $formatted_author = deduplicate_email($author[0]);
2397 my $count = grep(/$commit/, @all_commits);
2407 foreach my $signer (@signers) {
2412 foreach my $signer (@signers) {
2420 my ($file) = @_;
2422 my $exists;
2424 my $vcs_used = vcs_exists();
2427 my $cmd = $VCS_cmds{"file_exists_cmd"};
2438 my ($file) = @_;
2440 my @lsfiles = ();
2442 my $vcs_used = vcs_exists();
2445 my $cmd = $VCS_cmds{"list_files_cmd"};
2455 my (@parms) = @_;
2457 my %saw;
2463 my (@parms) = @_;
2465 my %saw;
2472 my (@file_emails) = @_;
2473 my @fmt_emails = ();
2475 foreach my $email (@file_emails) {
2477 my ($name, $address) = parse_email($email);
2483 my @nw = split(/[^\p{L}\'\,\.\+-]/, $name);
2490 my $first = $nw[@nw - 3];
2491 my $middle = $nw[@nw - 2];
2492 my $last = $nw[@nw - 1];
2514 my $fmt_email = format_email($name, $address, $email_usename);
2521 my @lines;
2522 my %saw;
2525 my ($address, $role) = @$_;
2540 my (@parms) = @_;
2543 foreach my $line (@parms) {
2552 my $rfc822re;
2560 my $specials = '()<>@,;:\\\\".\\[\\]';
2561 my $controls = '\\000-\\037\\177';
2563 my $dtext = "[^\\[\\]\\r\\\\]";
2564 my $domain_literal = "\\[(?:$dtext|\\\\.)*\\]$rfc822_lwsp*";
2566 my $quoted_string = "\"(?:[^\\\"\\r\\\\]|\\\\.|$rfc822_lwsp)*\"$rfc822_lwsp*";
2570 my $atom = "[^$specials $controls]+(?:$rfc822_lwsp+|\\Z|(?=[\\[\"$specials]))";
2571 my $word = "(?:$atom|$quoted_string)";
2572 my $localpart = "$word(?:\\.$rfc822_lwsp*$word)*";
2574 my $sub_domain = "(?:$atom|$domain_literal)";
2575 my $domain = "$sub_domain(?:\\.$rfc822_lwsp*$sub_domain)*";
2577 my $addr_spec = "$localpart\@$rfc822_lwsp*$domain";
2579 my $phrase = "$word*";
2580 my $route = "(?:\@$domain(?:,\@$rfc822_lwsp*$domain)*:$rfc822_lwsp*)";
2581 my $route_addr = "\\<$rfc822_lwsp*$route?$addr_spec\\>$rfc822_lwsp*";
2582 my $mailbox = "(?:$addr_spec|$phrase$route_addr)";
2584 my $group = "$phrase:$rfc822_lwsp*(?:$mailbox(?:,\\s*$mailbox)*)?;\\s*";
2585 my $address = "(?:$mailbox|$group)";
2591 my $s = shift;
2605 my $s = rfc822_strip_comments(shift);
2625 my $s = rfc822_strip_comments(shift);
2633 my @r;