wireproto: handle other server output in pushkey
Remote side may add useful information alongside failure return code. For
example "ssl is required". This patch mirror what is done for the unbundle
command.
--- a/mercurial/wireproto.py Thu Dec 15 11:45:01 2011 +0100
+++ b/mercurial/wireproto.py Mon Dec 12 15:16:58 2011 +0100
@@ -239,11 +239,14 @@
old=encoding.fromlocal(old),
new=encoding.fromlocal(new)), f
d = f.value
+ d, output = d.split('\n', 1)
try:
d = bool(int(d))
except ValueError:
raise error.ResponseError(
_('push failed (unexpected response):'), d)
+ for l in output.splitlines(True):
+ self.ui.status(_('remote: '), l)
yield d
@batchable