Mercurial > hg
changeset 34822:c1e7ce11db9b
phase: isolate logic to update remote phrase through bundle2 pushkey
Move the logic to build bundle2 pushkey part into its dedicated function. It
will help to keep the logic clear when adding support for sending phases change
using 'phase-heads' part.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Wed, 20 Sep 2017 19:17:37 +0200 |
parents | aa5e7b4a3a01 |
children | 7891d243d821 |
files | mercurial/exchange.py |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/exchange.py Wed Oct 11 07:40:00 2017 +0200 +++ b/mercurial/exchange.py Wed Sep 20 19:17:37 2017 +0200 @@ -806,8 +806,11 @@ if 'phases' in pushop.stepsdone: return b2caps = bundle2.bundle2caps(pushop.remote) - if not 'pushkey' in b2caps: - return + if 'pushkey' in b2caps: + _pushb2phasespushkey(pushop, bundler) + +def _pushb2phasespushkey(pushop, bundler): + """push phase information through a bundle2 - pushkey part""" pushop.stepsdone.add('phases') part2node = []