[PATCH hggit] help: accept a ui parameter to the help function

Eric Sumner ericsumner at fb.com
Wed Oct 14 19:40:32 UTC 2015


# HG changeset patch
# User Eric Sumner <ericsumner at fb.com>
# Date 1444851328 25200
#      Wed Oct 14 12:35:28 2015 -0700
# Node ID 710a67ccff472d5f613c57cf2ebbf5fe3db13a41
# Parent  ee587dc3e295d642d1919f6e7b73dc2c4747c9f3
help: accept a ui parameter to the help function

The latest version of Mercurial passes a ui argument to the functions stored
in the helptable; this patch accepts and ignores this parameter so that asking
for help doesn't abort.

diff --git a/hggit/__init__.py b/hggit/__init__.py
--- a/hggit/__init__.py
+++ b/hggit/__init__.py
@@ -169,7 +169,7 @@
     })
     helpdir = os.path.join(os.path.dirname(__file__), 'help')
     entry = (['git'], _("Working with Git Repositories"),
-             lambda: open(os.path.join(helpdir, 'git.rst')).read())
+             lambda ui=None: open(os.path.join(helpdir, 'git.rst')).read())
     insort(help.helptable, entry)
 
 def reposetup(ui, repo):


More information about the Mercurial-devel mailing list