unable to build docs on default

Adrian Buehlmann adrian at cadifra.com
Thu Jun 9 02:29:35 CDT 2011


(adding Yuya to cc)

On 2011-06-09 06:35, Steve Borho wrote:
>>  C:\Python26x64\python.exe gendoc.py > build-hg/doc/hg.1.gendoc.txt
> Traceback (most recent call last):
>   File "gendoc.py", line 167, in <module>
>     show_doc(sys.stdout)
>   File "gendoc.py", line 114, in show_doc
>     mod = extensions.load(None, extensionname, None)
>   File "..\mercurial\extensions.py", line 73, in load
>     mod = importh(name)
>   File "..\mercurial\extensions.py", line 65, in importh
>     mod = __import__(name)
>   File "..\mercurial\demandimport.py", line 85, in _demandimport
>     return _origimport(name, globals, locals, fromlist)
> ImportError: Import by filename is not supported.
> 
> build-hg/doc> C:\Python26x64\python.exe runrst html --link-stylesheet
> --stylesheet-path style.css hg.1.txt hg.1.html
> hg.1.gendoc.txt:2088: (SEVERE/4) Title level inconsistent:
> 
> Branch-based Access Control
> ...........................
> Exiting due to level-4 (SEVERE) system message.
> 
> 
> It looks like gendoc.py assumes Mercurial default (pre 1.9) is
> installed?  That's a nice chicken-egg loop.
> 

I ran into this as well when trying to build TortoiseHg with

  https://bitbucket.org/tortoisehg/thg-winbuild

I played with this a bit and I got the build working again by
backing out

changeset:   14540:558ec14ba6be
user:        Yuya Nishihara <yuya at tcha.org>
date:        Sat Jun 04 20:19:30 2011 +0900
summary:     extensions: make disabled()/disabledext() load prebuilt index if available


diff --git a/mercurial/extensions.py b/mercurial/extensions.py
--- a/mercurial/extensions.py
+++ b/mercurial/extensions.py
@@ -262,14 +262,6 @@
 
 def disabled():
     '''find disabled extensions from hgext. returns a dict of {name: desc}'''
-    try:
-        from hgext import __index__
-        return dict((name, gettext(desc))
-                    for name, desc in __index__.docs.iteritems()
-                    if name not in _order)
-    except ImportError:
-        pass
-
     paths = _disabledpaths()
     if not paths:
         return None
@@ -284,15 +276,6 @@
 
 def disabledext(name):
     '''find a specific disabled extension from hgext. returns desc'''
-    try:
-        from hgext import __index__
-        if name in _order:  # enabled
-            return
-        else:
-            return gettext(__index__.docs.get(name))
-    except ImportError:
-        pass
-
     paths = _disabledpaths()
     if name in paths:
         return _disabledhelp(paths[name])


More information about the Mercurial-devel mailing list