[PATCH] gendoc: fall back to pure modules if C extensions are not available (issue1711)

Cédric Duval cedricduval at free.fr
Fri Jul 10 12:53:05 CDT 2009


# HG changeset patch
# User Cédric Duval <cedricduval at free.fr>
# Date 1247247931 -7200
# Node ID 78b2085313dd7144a65a14c2208942925d7372c3
# Parent  6e5d573c57821a6627c5812fa419737dba8afa44
gendoc: fall back to pure modules if C extensions are not available (issue1711)

diff --git a/doc/gendoc.py b/doc/gendoc.py
--- a/doc/gendoc.py
+++ b/doc/gendoc.py
@@ -1,6 +1,8 @@
-import sys, textwrap
+import os, sys, textwrap
 # import from the live mercurial repo
 sys.path.insert(0, "..")
+# fall back to pure modules if required C extensions are not available
+sys.path.append(os.path.join('..', 'mercurial', 'pure'))
 from mercurial import demandimport; demandimport.enable()
 from mercurial.commands import table, globalopts
 from mercurial.i18n import gettext, _



More information about the Mercurial-devel mailing list