remote-hg: redirect buggy mercurial output
authorFelipe Contreras <felipe.contreras@gmail.com>
Thu, 11 Apr 2013 12:23:03 +0000 (07:23 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 11 Apr 2013 17:46:46 +0000 (10:46 -0700)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/remote-helpers/git-remote-hg
index b200e60c7031656c465b0ab988a23f3148cf4a90..874ccd4e23c677c99690d8ba36095c8d6278b91c 100755 (executable)
@@ -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)