Re: [PATCH v2 07/13] remote-hg: redirect buggy mercurial output
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 4, 2013, 16:40 UTC
- Message-ID
- <7vmwtejlke.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1365089422-8250-8-git-send-email-felipe.contreras@gmail.com>
Felipe Contreras <felipe.contreras@gmail.com> writes:
Show 9 quoted lines
> Mercurial emits messages like "searching for changes", "no changes > found", etc. meant for the use of its own UI layer, which break the pipe > between transport helper and remote helper. > > Since there's no way to silence Mercurial, let's redirect to standard > error. > > Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> > ---
Thanks.
Let me suggest retitling it with s/buggy/unwanted/, because it is not a "bug" to have these output from Hg's point of view. It is just that this reading process does not want it.
Show 15 quoted lines
> contrib/remote-helpers/git-remote-hg | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg
> index b200e60..874ccd4 100755
> --- a/contrib/remote-helpers/git-remote-hg
> +++ b/contrib/remote-helpers/git-remote-hg
> @@ -271,6 +271,7 @@ def get_repo(url, alias):
>
> myui = ui.ui()
> myui.setconfig('ui', 'interactive', 'off')
> + myui.fout = sys.stderr
>
> if hg.islocal(url):
> repo = hg.repository(myui, url)