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

Siddharth Agarwal sid at less-broken.com
Tue Oct 20 17:31:11 CDT 2015


On 10/14/15 20:40, Eric Sumner 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

Looks like this was already fixed with an earlier patch by Yuya.

>
> 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