Re: [PATCH 07/13] remote-hg: redirect buggy mercurial output

2013-04-04 Thread Felipe Contreras
Junio C Hamano wrote:
 Felipe Contreras felipe.contre...@gmail.com writes:
 
  On Tue, Apr 2, 2013 at 1:58 PM, Junio C Hamano gits...@pobox.com wrote:
  Felipe Contreras felipe.contre...@gmail.com writes:
 
  We can't use stdout for that in remote helpers.
 
  Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
  ---
 
  You may want to clarify buggy output a bit.  Will mercurial
  forever be broken?  Some versions of Hg emit [[[it is unclear for
  Junio to tell what it is to fill this blank]]] to its output that
  we want to ignore?
 
  The problem is that mercurial's code is kind of hardcoded to run under
  mercurial's UI, so it throws messages around willynillingly, like:
 
  searching for changes
  no changes found
 
  And they can't be turned off. Theoretically we could override
  mercurial's UI class, but I think that has the potential to create
  more problems, it's not worth at this point in time.
 
 Oh, I totally agree with you _after_ reading that explanation.
 
 You just shouldn't let me waste your time to explain that to me in
 this exchange, and you could have done so by writing a clearer log
 message.  That's all.

I saw that you update the commit message without consulting here first to:

---
remote-hg: redirect unnecessary mercurial output

Mercurial emits messages like searching for changes, no changes
found, etc. meant for the use of its own UI layer, which is of no
use for our remote helper.  Squelch them.
---

This is not correct. This patch does _not_ squelch the output, it's redirecting
it to standard error, so the user actually sees it now, and we do that not
because the output is unnecessary, but because it *breaks* the pipe between
the transport helper and remote helper. I'll reroll with the updated commit 
message.

Cheers.

-- 
Felipe Contreras
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 07/13] remote-hg: redirect buggy mercurial output

2013-04-04 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes:

 I saw that you update the commit message without consulting here first to:

 ---
 remote-hg: redirect unnecessary mercurial output
 
 Mercurial emits messages like searching for changes, no changes
 found, etc. meant for the use of its own UI layer, which is of no
 use for our remote helper.  Squelch them.
 ---

 This is not correct. This patch does _not_ squelch the output, it's 
 redirecting
 it to standard error, so the user actually sees it now, and we do that not
 because the output is unnecessary, but because it *breaks* the pipe between
 the transport helper and remote helper. I'll reroll with the updated commit 
 message.

I actually consulted by asking you what you meant by buggy.  I
just misread/misunderstood your response in prose.

An update in the patch form obviously would not risk such a
misunderstanding ;-)

Thanks.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 07/13] remote-hg: redirect buggy mercurial output

2013-04-02 Thread Felipe Contreras
We can't use stdout for that in remote helpers.

Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
 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)
-- 
1.8.2

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 07/13] remote-hg: redirect buggy mercurial output

2013-04-02 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes:

 We can't use stdout for that in remote helpers.

 Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
 ---

You may want to clarify buggy output a bit.  Will mercurial
forever be broken?  Some versions of Hg emit [[[it is unclear for
Junio to tell what it is to fill this blank]]] to its output that
we want to ignore?

  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)
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 07/13] remote-hg: redirect buggy mercurial output

2013-04-02 Thread Felipe Contreras
On Tue, Apr 2, 2013 at 1:58 PM, Junio C Hamano gits...@pobox.com wrote:
 Felipe Contreras felipe.contre...@gmail.com writes:

 We can't use stdout for that in remote helpers.

 Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
 ---

 You may want to clarify buggy output a bit.  Will mercurial
 forever be broken?  Some versions of Hg emit [[[it is unclear for
 Junio to tell what it is to fill this blank]]] to its output that
 we want to ignore?

The problem is that mercurial's code is kind of hardcoded to run under
mercurial's UI, so it throws messages around willynillingly, like:

searching for changes
no changes found

And they can't be turned off. Theoretically we could override
mercurial's UI class, but I think that has the potential to create
more problems, it's not worth at this point in time.

Cheers.

-- 
Felipe Contreras
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 07/13] remote-hg: redirect buggy mercurial output

2013-04-02 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes:

 On Tue, Apr 2, 2013 at 1:58 PM, Junio C Hamano gits...@pobox.com wrote:
 Felipe Contreras felipe.contre...@gmail.com writes:

 We can't use stdout for that in remote helpers.

 Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
 ---

 You may want to clarify buggy output a bit.  Will mercurial
 forever be broken?  Some versions of Hg emit [[[it is unclear for
 Junio to tell what it is to fill this blank]]] to its output that
 we want to ignore?

 The problem is that mercurial's code is kind of hardcoded to run under
 mercurial's UI, so it throws messages around willynillingly, like:

 searching for changes
 no changes found

 And they can't be turned off. Theoretically we could override
 mercurial's UI class, but I think that has the potential to create
 more problems, it's not worth at this point in time.

Oh, I totally agree with you _after_ reading that explanation.

You just shouldn't let me waste your time to explain that to me in
this exchange, and you could have done so by writing a clearer log
message.  That's all.


 Cheers.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html