trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nottheoil...@apache.org
Subject git commit: TS-2832 docs: Fix links to the source code for right member of the wrong class
Date Mon, 01 Sep 2014 22:41:51 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/master 7abf83d69 -> f6f849830


TS-2832 docs: Fix links to the source code for right member of the wrong class


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/f6f84983
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/f6f84983
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/f6f84983

Branch: refs/heads/master
Commit: f6f8498306a1e02719fabab3bcc70178d0dbe17c
Parents: 7abf83d
Author: Jack Bates <jack@nottheoilrig.com>
Authored: Mon Sep 1 15:38:09 2014 -0700
Committer: Jack Bates <jack@nottheoilrig.com>
Committed: Mon Sep 1 15:38:09 2014 -0700

----------------------------------------------------------------------
 contrib/manifests/debian.pp |  6 +++++-
 doc/Makefile.am             |  3 +--
 doc/ext/doxygen.py          | 18 ++++++++++++++----
 doc/pip_requirements.txt    |  3 +++
 4 files changed, 23 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f6f84983/contrib/manifests/debian.pp
----------------------------------------------------------------------
diff --git a/contrib/manifests/debian.pp b/contrib/manifests/debian.pp
index c53b0a6..0e7d42e 100644
--- a/contrib/manifests/debian.pp
+++ b/contrib/manifests/debian.pp
@@ -28,7 +28,11 @@ package {[
 # Development extras.
 package {[
     'gdb', 'valgrind', 'git', 'ack-grep', 'curl', 'tmux', 'screen',
-    'ccache', 'python-sphinx', 'doxygen', 'python-lxml'
+    'ccache', 'python-sphinx', 'doxygen',
+
+    # For parsing Doxygen XML output, to add links from API descriptions
+    # to the source code for that object
+    'python-lxml'
   ]:
   ensure => latest
 }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f6f84983/doc/Makefile.am
----------------------------------------------------------------------
diff --git a/doc/Makefile.am b/doc/Makefile.am
index d1d2cd8..5e1e919 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -68,8 +68,7 @@ EXTRA_DIST = \
   $(dist_trafficshell_DATA)
 
 clean-local:
-	-rm -rf html warn.log
-	-rm -rf $(BUILDDIR)/doctrees $(BUILDDIR)/html $(BUILDDIR)/dirhtml $(BUILDDIR)/singlehtml
$(BUILDDIR)/epub $(BUILDDIR)/latex $(BUILDDIR)/man
+	-rm -rf $(BUILDDIR)/* _build/html/* xml
 
 doxygen: Doxyfile
 	$(DOXYGEN)

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f6f84983/doc/ext/doxygen.py
----------------------------------------------------------------------
diff --git a/doc/ext/doxygen.py b/doc/ext/doxygen.py
index 68a4c9f..c37745b 100644
--- a/doc/ext/doxygen.py
+++ b/doc/ext/doxygen.py
@@ -37,8 +37,11 @@ if etree and path.isfile('xml/index.xml'):
   # Doxygen index
   index = etree.parse('xml/index.xml')
 
-# Partial reimplementation in Python of Doxygen escapeCharsInString()
 def escape(name):
+  """
+  Partial reimplementation in Python of Doxygen escapeCharsInString()
+  """
+
   return name.replace('_', '__').replace(':', '_1').replace('/', '_2').replace('<', '_3').replace('>',
'_4').replace('*', '_5').replace('&', '_6').replace('|', '_7').replace('.', '_8').replace('!',
'_9').replace(',', '_00').replace(' ', '_01').replace('{', '_02').replace('}', '_03').replace('?',
'_04').replace('^', '_05').replace('%', '_06').replace('(', '_07').replace(')', '_08').replace('+',
'_09').replace('=', '_0A').replace('$', '_0B').replace('\\', '_0C')
 
 def doctree_resolved(app, doctree, docname):
@@ -52,16 +55,23 @@ def doctree_resolved(app, doctree, docname):
   if traverse:
     for signode in traverse:
 
-      # Get the name of the object
+      # Get the name of the object.  The C++ domain splits names into
+      # owner and name.
+      owner = None
       for child in signode:
-        if isinstance(child, addnodes.desc_name):
+        if isinstance(child, addnodes.desc_addname):
+
+          # The owner ends with ::
+          owner = child.astext()[:-2]
+
+        elif isinstance(child, addnodes.desc_name):
           name = child.astext()
 
           break
 
       # Lookup the object in the Doxygen index
       try:
-        compound, = index.xpath('descendant::compound[descendant::name[text() = $name]][1]',
name=name)
+        compound, = index.xpath('descendant::compound[(not($owner) or name[text() = $owner])
and descendant::name[text() = $name]][1]', owner=owner, name=name)
 
       except ValueError:
         continue

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f6f84983/doc/pip_requirements.txt
----------------------------------------------------------------------
diff --git a/doc/pip_requirements.txt b/doc/pip_requirements.txt
index 97720d7..099cf4a 100644
--- a/doc/pip_requirements.txt
+++ b/doc/pip_requirements.txt
@@ -1,2 +1,5 @@
+# For parsing Doxygen XML output, to add links from an API description
+# to the source code for that object
 lxml
+
 polib>=1.0.3


Mime
View raw message