changeset 660:67b54cb38843

__init__: activate & advertise the new help topic.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Wed, 11 Aug 2010 19:57:34 +0200
parents 55d6697b975a
children d0692ce98ea6
files hgsubversion/__init__.py
diffstat 1 files changed, 14 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/__init__.py
+++ b/hgsubversion/__init__.py
@@ -12,13 +12,8 @@ Before using hgsubversion, we *strongly*
 automated tests. See 'README' in the hgsubversion directory for
 details.
 
-The operation of hgsubversion can be customised with the following variables:
-
-<list not written yet>
-
+For more information and instructions, see :hg:`help subversion`.
 '''
-# TODO: The docstring should be slightly more helpful, and at least mention all
-#       configuration settings we support
 
 import os
 import sys
@@ -26,6 +21,7 @@ import traceback
 
 from mercurial import commands
 from mercurial import extensions
+from mercurial import help
 from mercurial import hg
 from mercurial import util as hgutil
 from mercurial import demandimport
@@ -122,7 +118,19 @@ def uisetup(ui):
     except:
         pass
 
+    helpdir = os.path.join(os.path.dirname(__file__), 'help')
 
+    entries = (
+        (['subversion'],
+         "Working with Subversion Repositories",
+         lambda: open(os.path.join(helpdir, 'subversion.rst')).read()),
+    )
+
+    # in 1.6 and earler the help table is a tuple
+    if getattr(help.helptable, 'extend', None):
+        help.helptable.extend(entries)
+    else:
+        help.helptable = help.helptable + entries
 
 def reposetup(ui, repo):
     if repo.local():