[PATCH 6 of 7 bundle2] pull: use 'phase-heads' to retrieve phase information
Yuya Nishihara
yuya at tcha.org
Sat Sep 30 05:19:51 UTC 2017
On Thu, 28 Sep 2017 07:08:41 +0200, Boris Feld wrote:
> # HG changeset patch
> # User Boris Feld <boris.feld at octobus.net>
> # Date 1506281238 -7200
> # Sun Sep 24 21:27:18 2017 +0200
> # Node ID dca2166f424196e9b4b6ef9c6b0925f249c54682
> # Parent 7079b5aaf647e041e2dc8bc6526b9c7a2efbdc71
> # EXP-Topic b2.phases
> pull: use 'phase-heads' to retrieve phase information
> @@ -1349,12 +1350,20 @@
> kwargs['common'] = pullop.common
> kwargs['heads'] = pullop.heads or pullop.rheads
> kwargs['cg'] = pullop.fetch
> +
> + ui = pullop.repo.ui
> + legacyphase = 'phases' in ui.configlist('devel', 'legacy.exchange')
> + if (not legacyphase and 'heads' in pullop.remotebundle2caps.get('phases')):
> + kwargs['phases'] = True
> + pullop.stepsdone.add('phases')
Got the following exception while pulling. The local draft head would be
replaced with the remote public head if pull succeeded.
% hg id
74170e1610b0
% HGRCPATH=/dev/null hg pull committed
pulling from https://www.mercurial-scm.org/repo/hg-committed/
obsolete feature not enabled but 140047 markers found!
searching for changes
** unknown exception encountered, please report by visiting
** https://mercurial-scm.org/wiki/BugTracker
** Python 2.7.14 (default, Sep 17 2017, 18:50:44) [GCC 7.2.0]
** Mercurial Distributed SCM (version 4.3.2+659-ec769bba34d3)
** Extensions loaded:
Traceback (most recent call last):
File "hg", line 47, in <module>
dispatch.run()
File "mercurial/dispatch.py", line 81, in run
status = (dispatch(req) or 0) & 255
File "mercurial/dispatch.py", line 163, in dispatch
ret = _runcatch(req)
File "mercurial/dispatch.py", line 303, in _runcatch
return _callcatch(ui, _runcatchfunc)
File "mercurial/dispatch.py", line 311, in _callcatch
return scmutil.callcatch(ui, func)
File "mercurial/scmutil.py", line 150, in callcatch
return func()
File "mercurial/dispatch.py", line 293, in _runcatchfunc
return _dispatch(req)
File "mercurial/dispatch.py", line 929, in _dispatch
cmdpats, cmdoptions)
File "mercurial/dispatch.py", line 691, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "mercurial/dispatch.py", line 937, in _runcommand
return cmdfunc()
File "mercurial/dispatch.py", line 926, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
File "mercurial/util.py", line 1130, in check
return func(*args, **kwargs)
File "mercurial/commands.py", line 3935, in pull
opargs=pullopargs).cgresult
File "mercurial/exchange.py", line 1248, in pull
_pullbundle2(pullop)
File "mercurial/exchange.py", line 1356, in _pullbundle2
if (not legacyphase and 'heads' in pullop.remotebundle2caps.get('phases')):
TypeError: argument of type 'NoneType' is not iterable
More information about the Mercurial-devel
mailing list