History

scripts: get_abi.pl: prevent duplicated file names

The same filename may exist on multiple directories within ABI. Create separate entries at the internal database for each of them.

Mauro Carvalho Chehab committed 6 years ago

Commit a4ea67b1 parent a16ab141 file · +10 −5Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/get_abi.pl+10−5
@@ -65,7 +65,10 @@ sub parse_abi { · 64 unmodified lines
65 my $name = $file;65 my $name = $file;
66 $name =~ s,.*/,,;66 $name =~ s,.*/,,;
67 67
68 my $nametag = "File $name";68 my $fn = $file;
69 $fn =~ s,Documentation/ABI/,,;
70
71 my $nametag = "File $fn";
69 $data{$nametag}->{what} = "File $name";72 $data{$nametag}->{what} = "File $name";
70 $data{$nametag}->{type} = "File";73 $data{$nametag}->{type} = "File";
71 $data{$nametag}->{file} = $name;74 $data{$nametag}->{file} = $name;
@@ -320,16 +323,18 @@ sub output_rest { · 248 unmodified lines
320 my $fileref = "abi_file_".$path;323 my $fileref = "abi_file_".$path;
321 324
322 if ($type eq "File") {325 if ($type eq "File") {
323 my $bar = $w;
324 $bar =~ s/./-/g;
325
326 print ".. _$fileref:\n\n";326 print ".. _$fileref:\n\n";
327 print "$w\n$bar\n\n";
328 } else {327 } else {
329 print "Defined on file :ref:`$f <$fileref>`\n\n";328 print "Defined on file :ref:`$f <$fileref>`\n\n";
330 }329 }
331 }330 }
332 331
332 if ($type eq "File") {
333 my $bar = $w;
334 $bar =~ s/./-/g;
335 print "$w\n$bar\n\n";
336 }
337
333 my $desc = "";338 my $desc = "";
334 $desc = $data{$what}->{description} if (defined($data{$what}->{description}));339 $desc = $data{$what}->{description} if (defined($data{$what}->{description}));
335 $desc =~ s/\s+$/\n/;340 $desc =~ s/\s+$/\n/;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t