push: print messages from the server

Some servers, for example, Bitbucket, output helpful messages. This patch
reports the output, if any exist, to the user.
This commit is contained in:
Sean Farley 2015-12-02 17:26:20 -08:00
parent fc82883494
commit 37c52e3cab

View File

@ -991,8 +991,15 @@ class GitHandler(object):
self.ui.status(_("adding objects\n"))
return self.git.object_store.generate_pack_contents(have, want)
def callback(remote_info):
if not remote_info:
remote_info = ''
for line in remote_info.split('\n'):
self.ui.status(_("remote: %s\n") % line)
try:
new_refs = client.send_pack(path, changed, genpack)
new_refs = client.send_pack(path, changed, genpack,
progress=callback)
if len(change_totals) > 0:
self.ui.status(_("added %d commits with %d trees"
" and %d blobs\n") %