changeset 10544:2e1a9b811d13 stable

httprepo: normalize output from unbundle with ssh Lines from the remote are prefixed with 'remote: ' and written locally using ui.status, similar to what sshrepo does.
author Sune Foldager <cryo@cyanite.org>
date Wed, 24 Feb 2010 12:35:26 -0500
parents dd3526162436
children b9e4a67329cd
files mercurial/httprepo.py tests/test-push-http.out
diffstat 2 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/httprepo.py	Wed Feb 24 18:35:05 2010 +0100
+++ b/mercurial/httprepo.py	Wed Feb 24 12:35:26 2010 -0500
@@ -239,7 +239,8 @@
                 except ValueError, err:
                     raise error.ResponseError(
                             _('push failed (unexpected response):'), resp)
-                self.ui.write(output)
+                for l in output.splitlines(True):
+                    self.ui.status(_('remote: '), l)
                 return ret
             except socket.error, err:
                 if err[0] in (errno.ECONNRESET, errno.EPIPE):
--- a/tests/test-push-http.out	Wed Feb 24 18:35:05 2010 +0100
+++ b/tests/test-push-http.out	Wed Feb 24 12:35:26 2010 -0500
@@ -4,7 +4,7 @@
 % expect ssl error
 pushing to http://localhost:$HGPORT/
 searching for changes
-ssl required
+remote: ssl required
 % serve errors
 % expect authorization error
 abort: authorization failed
@@ -19,10 +19,10 @@
 % expect success
 pushing to http://localhost:$HGPORT/
 searching for changes
-adding changesets
-adding manifests
-adding file changes
-added 1 changesets with 1 changes to 1 files
+remote: adding changesets
+remote: adding manifests
+remote: adding file changes
+remote: added 1 changesets with 1 changes to 1 files
 % serve errors
 changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http 
 rolling back last transaction