~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to scripts/get_maintainer.pl

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
420
420
 
421
421
        open(my $patch, "< $file")
422
422
            or die "$P: Can't open $file: $!\n";
 
423
 
 
424
        # We can check arbitrary information before the patch
 
425
        # like the commit message, mail headers, etc...
 
426
        # This allows us to match arbitrary keywords against any part
 
427
        # of a git format-patch generated file (subject tags, etc...)
 
428
 
 
429
        my $patch_prefix = "";                  #Parsing the intro
 
430
 
423
431
        while (<$patch>) {
424
432
            my $patch_line = $_;
425
433
            if (m/^\+\+\+\s+(\S+)/) {
428
436
                $filename =~ s@\n@@;
429
437
                $lastfile = $filename;
430
438
                push(@files, $filename);
 
439
                $patch_prefix = "^[+-].*";      #Now parsing the actual patch
431
440
            } elsif (m/^\@\@ -(\d+),(\d+)/) {
432
441
                if ($email_git_blame) {
433
442
                    push(@range, "$lastfile:$1:$2");
434
443
                }
435
444
            } elsif ($keywords) {
436
445
                foreach my $line (keys %keyword_hash) {
437
 
                    if ($patch_line =~ m/^[+-].*$keyword_hash{$line}/x) {
 
446
                    if ($patch_line =~ m/${patch_prefix}$keyword_hash{$line}/x) {
438
447
                        push(@keyword_tvi, $line);
439
448
                    }
440
449
                }