You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by no...@apache.org on 2014/08/31 20:41:56 UTC

[1/2] git commit: Clarify changes that are to the docs only

Repository: trafficserver
Updated Branches:
  refs/heads/master b4316ea63 -> afa90d0f1


Clarify changes that are to the docs only


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

Branch: refs/heads/master
Commit: f5a549d777a2e690e73bab4c88b5a2c6d53b1735
Parents: b4316ea
Author: Jack Bates <ja...@nottheoilrig.com>
Authored: Sun Aug 31 09:09:48 2014 -0700
Committer: Jack Bates <ja...@nottheoilrig.com>
Committed: Sun Aug 31 09:09:48 2014 -0700

----------------------------------------------------------------------
 CHANGES | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f5a549d7/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index f3d534a..3c22094 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,8 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 5.2.0
 
-  *) [TS-2832] Add links from an API description to the code for that
-   object
+  *) [TS-2832] docs: Add links from an API description to the code for
+   that object
 
   *) [TS-3020] Blind Tunnel fake request URL is IPv4 only.
    Author: Patrick McGleenon <Pa...@openwave.com>
@@ -400,7 +400,8 @@ Changes with Apache Traffic Server 5.0.0
    accommodate bit-masks. Also changed TSRecordType enums to hexidecimal, as
    this is easier to read for bit arguments.
 
-  *) [TS-2797] Build all manual pages in the doc/reference/api directory.
+  *) [TS-2797] docs: Build all manual pages in the doc/reference/api
+   directory.
 
   *) [TS-2733] Do not build the old SPDY plugin.
 
@@ -731,8 +732,8 @@ Changes with Apache Traffic Server 5.0.0
 
   *) [TS-2556] Fix ink_hrtime_diff_msec.
 
-  *) [TS-2553] Fix a segfault in the Metalink plugin reported by Faysal Banna
-   and preserve the Content-Length header
+  *) [TS-2553] Metalink: Fix a segfault reported by Faysal Banna and
+   preserve the Content-Length header
    Author: Jack Bates <ja...@nottheoilrig.com>
 
   *) [TS-2195] Remove the (deprecated) TSHttpTxnCacheLookupSkip API.
@@ -1605,7 +1606,7 @@ Changes with Apache Traffic Server 3.3.3 (never released)
 
   *) [TS-1925] Remove obsolete MMH hash API.
 
-  *) [TS-1924] Add Metalink plugin documentation.
+  *) [TS-1924] Metalink: Add plugin documentation.
     Author: Jack Bates <ja...@nottheoilrig.com>
 
   *) [TS-1913] Fix memory issue caused by resolve_logfield_string()


[2/2] git commit: TS-2832 docs: Fix links to source code for e.g. a struct

Posted by no...@apache.org.
TS-2832 docs: Fix links to source code for e.g. a struct


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

Branch: refs/heads/master
Commit: afa90d0f1e3451cf27a09178f2ceddb90a858f6e
Parents: f5a549d
Author: Jack Bates <ja...@nottheoilrig.com>
Authored: Sun Aug 31 11:36:49 2014 -0700
Committer: Jack Bates <ja...@nottheoilrig.com>
Committed: Sun Aug 31 11:36:49 2014 -0700

----------------------------------------------------------------------
 CHANGES            |  4 ++--
 doc/ext/doxygen.py | 31 ++++++++++++++++++++-----------
 2 files changed, 22 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/afa90d0f/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 3c22094..aa2f7fa 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,8 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 5.2.0
 
-  *) [TS-2832] docs: Add links from an API description to the code for
-   that object
+  *) [TS-2832] docs: Add links from an API description to the source
+   code for that object
 
   *) [TS-3020] Blind Tunnel fake request URL is IPv4 only.
    Author: Patrick McGleenon <Pa...@openwave.com>

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/afa90d0f/doc/ext/doxygen.py
----------------------------------------------------------------------
diff --git a/doc/ext/doxygen.py b/doc/ext/doxygen.py
index b4e7741..0cc651f 100644
--- a/doc/ext/doxygen.py
+++ b/doc/ext/doxygen.py
@@ -37,11 +37,15 @@ 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):
+  return name.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):
   """
-  Add links from an API description to the code for that object.
-  Doxygen knows where in the code objects are located.  Based on the
-  sphinx.ext.viewcode and sphinx.ext.linkcode extensions.
+  Add links from an API description to the source code for that object.
+  Doxygen knows where in the source code objects are located.  Based on
+  the sphinx.ext.viewcode and sphinx.ext.linkcode extensions.
   """
 
   traverse = doctree.traverse(addnodes.desc_signature)
@@ -74,18 +78,23 @@ def doctree_resolved(app, doctree, docname):
       # link.
       location = memberdef.find('location')
 
-      emphasis = nodes.emphasis('', ' ' + path.basename(location.get('file')) + ' line ' + location.get('line'))
+      filename = path.basename(location.get('file'))
+      line = location.get('bodystart')
+
+      emphasis = nodes.emphasis('', ' ' + filename + ' line ' + line)
 
       # Use a relative link if the output is HTML, otherwise fall back
-      # on an absolute link to Read the Docs
-      refuri = 'api/' + compound.get('refid') + '_source.html#l' + location.get('line').rjust(5, '0')
+      # on an absolute link to Read the Docs.  I can't figure out how to
+      # get the highlighted source file for e.g. a struct from Doxygen
+      # so ape Doxygen escapeCharsInString() instead.
+      refuri = 'api/' + escape(filename) + '_source.html#l' + line.rjust(5, '0')
       if app.builder.name == 'html':
         refuri = osutil.relative_uri(app.builder.get_target_uri(docname), refuri)
 
       else:
         refuri = 'http://docs.trafficserver.apache.org/en/latest/' + refuri
 
-      reference = nodes.reference('', '', emphasis, classes=['viewcode-link'], reftitle='Code', refuri=refuri)
+      reference = nodes.reference('', '', emphasis, classes=['viewcode-link'], reftitle='Source code', refuri=refuri)
       signode += reference
 
     # Style the links
@@ -99,12 +108,12 @@ def setup(app):
   else:
     if not etree:
       app.warn('''Python lxml library not found
-  The library is used to add links from an API description to the code
-  for that object.
+  The library is used to add links from an API description to the source
+  code for that object.
   Depending on your system, try installing the python-lxml package.''')
 
     if not path.isfile('xml/index.xml'):
       app.warn('''Doxygen files not found: xml/index.xml
-  The files are used to add links from an API description to the code
-  for that object.
+  The files are used to add links from an API description to the source
+  code for that object.
   Run "$ make doxygen" to generate these XML files.''')