[PATCH] mq: use correct ui instance for wrapped commands (issue2096)
Henrik Stuart
hg at hstuart.dk
Wed Jun 9 19:31:50 UTC 2010
On 09-06-2010 21:09, Henrik Stuart wrote:
> # HG changeset patch
> # User Henrik Stuart <hg at hstuart.dk>
> # Date 1276110437 -7200
> # Node ID 3e936106ced5bd32c96ef73fd5392fb915284214
> # Parent 666b62c527678b4655a7c293ee636eef25a65b8f
> mq: use correct ui instance for wrapped commands (issue2096)
>
> The current ui object passed to the original command that has been wrapped was
> the wrong one, cause e.g. the color extension to fail when wrapped commands
> were used with the --mq option.
>
> diff --git a/hgext/mq.py b/hgext/mq.py
> --- a/hgext/mq.py
> +++ b/hgext/mq.py
> @@ -2788,7 +2788,7 @@
> r = q.qrepo()
> if not r:
> raise util.Abort(_('no queue repository'))
> - return orig(r.ui, r, *args, **kwargs)
> + return orig(ui, r, *args, **kwargs)
>
> def summary(orig, ui, repo, *args, **kwargs):
> r = orig(ui, repo, *args, **kwargs)
This, of course, ignores any config elements in the mq repository. Just
disregard.
--
Kind regards,
Henrik
More information about the Mercurial-devel
mailing list