List:Commits« Previous MessageNext Message »
From:mcbrown Date:May 4 2007 8:54am
Subject:svn commit - mysqldoc@docsrva: r6324 - trunk/tools
View as plain text  
Author: mcbrown
Date: 2007-05-04 08:54:13 +0200 (Fri, 04 May 2007)
New Revision: 6324

Log:
Numerous fixes: 

- Added blank output for parent to idmap2 for entities with no parent (i.e. toplevel)
- Fixed idremap to support linking to the top level of a manual
- Fixes to dynamic elements for version number identity



Modified:
   trunk/tools/dyndocs-opsfuncs-generate.pl
   trunk/tools/dyndocs-optvars-generate.pl
   trunk/tools/idmap2.pl
   trunk/tools/idremap.pl


Modified: trunk/tools/dyndocs-opsfuncs-generate.pl
===================================================================
--- trunk/tools/dyndocs-opsfuncs-generate.pl	2007-05-04 06:16:10 UTC (rev 6323)
+++ trunk/tools/dyndocs-opsfuncs-generate.pl	2007-05-04 06:54:13 UTC (rev 6324)
Changed blocks: 1, Lines Added: 4, Lines Deleted: 1; 559 bytes

@@ -461,8 +461,11 @@
 {
     my ($ver) = @_;
 
-    my ($a,$b,$c) = split(/\./,$ver);
+    my ($escs) = ($ver =~ m/(ES|CS)$/);
+    $ver =~ s/(ES|CS)$//;
 
+    my ($a,$b,$c) = split(/[\. -]/,$ver);
+
     $a = 0 unless defined($a);
     $b = 0 unless defined($b);
     $c = 0 unless defined($c);


Modified: trunk/tools/dyndocs-optvars-generate.pl
===================================================================
--- trunk/tools/dyndocs-optvars-generate.pl	2007-05-04 06:16:10 UTC (rev 6323)
+++ trunk/tools/dyndocs-optvars-generate.pl	2007-05-04 06:54:13 UTC (rev 6324)
Changed blocks: 2, Lines Added: 5, Lines Deleted: 2; 745 bytes

@@ -1238,8 +1238,11 @@
 {
     my ($ver) = @_;
 
-    my ($a,$b,$c,$ext) = split(/[\. ]/,$ver);
+    my ($escs) = ($ver =~ m/(ES|CS)$/);
+    $ver =~ s/(ES|CS)$//;
 
+    my ($a,$b,$c,$ext) = split(/[\. -]/,$ver);
+
     $a = 0 unless defined($a);
     $b = 0 unless defined($b);
     $c = 0 unless defined($c);

@@ -1252,7 +1255,7 @@
         $d = ord($d);
     }
 
-    return(($a*1000000)+($b*100000)+($c*100)+$d);
+    return(($a*1000000)+($b*10000)+($c*100)+$d);
 }
 
 package MySQLDocBook;


Modified: trunk/tools/idmap2.pl
===================================================================
--- trunk/tools/idmap2.pl	2007-05-04 06:16:10 UTC (rev 6323)
+++ trunk/tools/idmap2.pl	2007-05-04 06:54:13 UTC (rev 6324)
Changed blocks: 5, Lines Added: 5, Lines Deleted: 5; 1840 bytes

@@ -171,7 +171,7 @@
         foreach my $revlink (@{$my_handler->{revlink}})
         {
             print $dest (join(':',
-                              $revlink->{parent},
+                              $revlink->{parent} || '',
                               $revlink->{linkend}),
                          "\n");
         }

@@ -201,7 +201,7 @@
         foreach my $images (@{$my_handler->{images}})
         {
             print $dest (join(':',
-                              $images->{parent},
+                              $images->{parent} || '',
                               $images->{fileref}),
                          "\n");
         }

@@ -216,7 +216,7 @@
     {
         # Write out the xmlimports
 
-        ($mapfile) = sprintf('%s/%s/%s%s',$path,'metadata',$name,'xmlimports');
+        ($mapfile) = sprintf('%s/%s/%s%s',$path,'metadata',$name,'xincludes');
         ($maptempfile) = sprintf('%s-tmp',$mapfile);
         
         $dest = IO::File->new($maptempfile,'w');

@@ -231,7 +231,7 @@
         foreach my $xmlimport (@{$my_handler->{xmlimports}})
         {
             print $dest (join(':',
-                              $xmlimport->{parent},
+                              $xmlimport->{parent} || '',
                               $xmlimport->{href}),
                          "\n");
         }

@@ -261,7 +261,7 @@
         foreach my $dynimport (@{$my_handler->{dynimports}})
         {
             print $dest (join(':',
-                              $dynimport->{parent},
+                              $dynimport->{parent} || '',
                               $dynimport->{href}),
                          "\n");
         }


Modified: trunk/tools/idremap.pl
===================================================================
--- trunk/tools/idremap.pl	2007-05-04 06:16:10 UTC (rev 6323)
+++ trunk/tools/idremap.pl	2007-05-04 06:54:13 UTC (rev 6324)
Changed blocks: 1, Lines Added: 9, Lines Deleted: 1; 1376 bytes

@@ -126,7 +126,15 @@
                 print STDERR "Warning: Link text would be blank (???) because title text
for $idref is not defined\n";
             }
 
-            if (($idmap->{$idref}->{type} =~
m/^(appendix|article|book|part|chapter|example|glossary|preface|refentry|refsection|section)$/i)
&&
+            if (($idmap->{$idref}->{type} =~ m/^book$/i) &&
+                ($idmap->{$idref}->{parent} eq $idref))
+            {
+                print STDERR "Replacing $idref with
$urlcore/$idmap->{$idref}->{urlbase}/$idref.html
[$idmap->{$idref}->{title}](direct)\n"
+                    if ($warnings);
+                $url =
sprintf('%s%s/index.html',$urlcore,$idmap->{$idref}->{urlbase});
+                $title = $idmap->{$idref}->{title} || $idref;
+            }
+            elsif (($idmap->{$idref}->{type} =~
m/^(appendix|article|part|chapter|example|glossary|preface|refentry|refsection|section)$/i)
&&
                 (exists($idmap->{$idref}->{depth}) &&
($idmap->{$idref}->{depth} <= 3)))
             {
                 print STDERR "Replacing $idref with
$urlcore/$idmap->{$idref}->{urlbase}/$idref.html
[$idmap->{$idref}->{title}](direct)\n"


Thread
svn commit - mysqldoc@docsrva: r6324 - trunk/toolsmcbrown4 May