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

Augie Fackler raf at durin42.com
Thu Oct 15 14:17:45 CDT 2015


(+sid0 so this doesn't get lost in noise)

On Wed, Oct 14, 2015 at 3:40 PM, Eric Sumner <ericsumner at fb.com> wrote:
> # 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):
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list