mercurial/httprepo.py
changeset 14641 f2789767a2c4
parent 14509 4f695345979c
child 14648 ba3c36cea66e
--- a/mercurial/httprepo.py	Tue Jun 07 13:39:09 2011 +0300
+++ b/mercurial/httprepo.py	Thu Jun 16 13:24:42 2011 -0500
@@ -191,7 +191,10 @@
         try:
             try:
                 r = self._call(cmd, data=fp, headers=headers, **args)
-                return r.split('\n', 1)
+                vals = r.split('\n', 1)
+                if len(vals) < 2:
+                    raise error.ResponseError(_("unexpected response:"), d)
+                return vals
             except socket.error, err:
                 if err.args[0] in (errno.ECONNRESET, errno.EPIPE):
                     raise util.Abort(_('push failed: %s') % err.args[1])