Author: mcbrown
Date: 2007-09-05 18:18:52 +0200 (Wed, 05 Sep 2007)
New Revision: 7694
Log:
Added --prefix option to specify directory prefix, defaults to refman-5.1
Modified:
trunk/tools/idtree.pl
Modified: trunk/tools/idtree.pl
===================================================================
--- trunk/tools/idtree.pl 2007-09-05 16:13:03 UTC (rev 7693)
+++ trunk/tools/idtree.pl 2007-09-05 16:18:52 UTC (rev 7694)
Changed blocks: 3, Lines Added: 8, Lines Deleted: 2; 1228 bytes
@@ -14,7 +14,7 @@
use Getopt::Long;
use Data::Dumper;
-my ($srcpathopt,$opt_showallchildren) = ('',0);
+my ($srcpathopt,$opt_showallchildren,$opt_version) = ('',0,'refman-5.1');
my @srcpaths = ('.',
'../refman-5.1',
'../refman-5.0',
@@ -43,7 +43,8 @@
);
GetOptions("srcpaths=s" => \$srcpathopt,
- "showallchildren" => \$opt_showallchildren);
+ "showallchildren" => \$opt_showallchildren,
+ "prefix=s" => \$opt_version);
if (defined($srcpathopt) && $srcpathopt ne '')
{
@@ -81,6 +82,11 @@
# next unless (exists($idmap->{$id}->{file}));
if (exists($idmap->{$id}->{parent}))
{
+ next unless (($idmap->{$id}->{prefix} =~ m/$opt_version/) ||
+ (exists($idmap->{$id}->{adds}) &&
+ (grep /$opt_version/,@{$idmap->{$id}->{adds}})
+ )
+ );
next if ($idmap->{$id}->{parent} eq $id);
$idtree->{$idmap->{$id}->{parent}}->{$id} = 1;
}
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r7694 - trunk/tools | mcbrown | 5 Sep |