Mercurial > hg
comparison mercurial/exchange.py @ 34365:cd3f39716fd3
exchange: fix test for remote support of binary phases
If the remote do not support phases, the "get" call will return None. We
change that default return to empty tuple to fix the membership testing.
This was a bug in the initial series. Thanks to yuja for catching this.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Sat, 30 Sep 2017 10:09:29 +0100 |
parents | ff406f3e57b2 |
children | 100814e14b77 |
comparison
equal
deleted
inserted
replaced
34364:ff406f3e57b2 | 34365:cd3f39716fd3 |
---|---|
1351 kwargs['heads'] = pullop.heads or pullop.rheads | 1351 kwargs['heads'] = pullop.heads or pullop.rheads |
1352 kwargs['cg'] = pullop.fetch | 1352 kwargs['cg'] = pullop.fetch |
1353 | 1353 |
1354 ui = pullop.repo.ui | 1354 ui = pullop.repo.ui |
1355 legacyphase = 'phases' in ui.configlist('devel', 'legacy.exchange') | 1355 legacyphase = 'phases' in ui.configlist('devel', 'legacy.exchange') |
1356 if (not legacyphase and 'heads' in pullop.remotebundle2caps.get('phases')): | 1356 hasbinaryphase = 'heads' in pullop.remotebundle2caps.get('phases', ()) |
1357 if (not legacyphase and hasbinaryphase): | |
1357 kwargs['phases'] = True | 1358 kwargs['phases'] = True |
1358 pullop.stepsdone.add('phases') | 1359 pullop.stepsdone.add('phases') |
1359 | 1360 |
1360 if 'listkeys' in pullop.remotebundle2caps: | 1361 if 'listkeys' in pullop.remotebundle2caps: |
1361 if 'phases' not in pullop.stepsdone: | 1362 if 'phases' not in pullop.stepsdone: |