Patchwork [follow-up] exchange: propagate the subfunctions return

login
register
mail settings
Submitter Boris Feld
Date Oct. 19, 2017, 8:48 p.m.
Message ID <204165f5fc88a88ad45d.1508446092@FB>
Download mbox | patch
Permalink /patch/25256/
State Accepted
Headers show

Comments

Boris Feld - Oct. 19, 2017, 8:48 p.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1508442614 -7200
#      Thu Oct 19 21:50:14 2017 +0200
# Node ID 204165f5fc88a88ad45d5d8de1fd4631efb72166
# Parent  cc977ec0b8b9302bd6ad8e3eeacabb2776161492
# EXP-Topic b2.phases.follow-up
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 204165f5fc88
exchange: propagate the subfunctions return

The parts generator can return a callback to handle server reply. We should
propagate the return for correctness.

Patch

diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -813,9 +813,9 @@ 
     hasphaseheads = 'heads' in b2caps.get('phases', ())
 
     if hasphaseheads and not legacyphase:
-        _pushb2phaseheads(pushop, bundler)
+        return _pushb2phaseheads(pushop, bundler)
     elif haspushkey:
-        _pushb2phasespushkey(pushop, bundler)
+        return _pushb2phasespushkey(pushop, bundler)
 
 def _pushb2phaseheads(pushop, bundler):
     """push phase information through a bundle2 - binary part"""