Bug 1474746 - [docs] Fix firefox-source-docs url regression by removing redundant "docs" directory; r=gps
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Wed, 11 Jul 2018 14:52:33 +0000
changeset 426591 abc9aece7e63
parent 426590 b3eb58b5214a
child 426592 2f80a6085cbb
push id34276
push userncsoregi@mozilla.com
push dateSat, 14 Jul 2018 09:41:08 +0000
treeherdermozilla-central@04dd259d71db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1474746, 1454640
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1474746 - [docs] Fix firefox-source-docs url regression by removing redundant "docs" directory; r=gps This fixes a regression from bug 1454640 where urls had an extra 'docs' path inserted into them, e.g: toolkit/components/telemetry/telemetry/index.html became: toolkit/components/telemetry/docs/telemetry/index.html Differential Revision: https://phabricator.services.mozilla.com/D2079
tools/docs/moztreedocs/__init__.py
--- a/tools/docs/moztreedocs/__init__.py
+++ b/tools/docs/moztreedocs/__init__.py
@@ -36,36 +36,36 @@ def read_build_config(docdir):
 
     # Reading the Sphinx variables doesn't require a full build context.
     # Only define the parts we need.
     class fakeconfig(object):
         topsrcdir = build.topsrcdir
 
     reader = BuildReader(fakeconfig())
     for path, name, key, value in reader.find_sphinx_variables(relevant_mozbuild_path):
-        reldir = os.path.join(os.path.dirname(path), value)
+        reldir = os.path.dirname(path)
 
         if name == 'SPHINX_TREES':
             # If we're building a subtree, only process that specific subtree.
-            absdir = os.path.join(build.topsrcdir, reldir)
+            absdir = os.path.join(build.topsrcdir, reldir, value)
             if not is_main and absdir not in (docdir, MAIN_DOC_PATH):
                 continue
 
             assert key
             if key.startswith('/'):
                 key = key[1:]
             else:
                 key = os.path.join(reldir, key)
 
             if key in trees:
                 raise Exception('%s has already been registered as a destination.' % key)
-            trees[key] = reldir
+            trees[key] = os.path.join(reldir, value)
 
         if name == 'SPHINX_PYTHON_PACKAGE_DIRS':
-            python_package_dirs.add(reldir)
+            python_package_dirs.add(os.path.join(reldir, value))
 
     return trees, python_package_dirs
 
 
 class _SphinxManager(object):
     """Manages the generation of Sphinx documentation for the tree."""
 
     def __init__(self, topsrcdir, main_path):