Mercurial > public > mercurial-scm > hg-stable
diff mercurial/wireprotov2server.py @ 40175:6c42409691ec
wireprotov2: stop sending phase updates for base revisions
This feature is broken and doesn't work properly in all scenarios.
e.g. if we have the following DAGs:
client server
D draft
C draft C draft
B draft B public
A public A public
The current code would only send the phase data for C. The
client wouldn't see that B moved from draft to public.
This feature will be restored in a future commit. For now, it is
making refactoring of how revisions are specified in the wire protocol
a bit difficult...
Differential Revision: https://phab.mercurial-scm.org/D4978
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 08 Oct 2018 17:54:14 -0700 |
parents | 30f70d11c224 |
children | 41263df08109 |
line wrap: on
line diff
--- a/mercurial/wireprotov2server.py Thu Oct 11 09:47:52 2018 +0200 +++ b/mercurial/wireprotov2server.py Mon Oct 08 17:54:14 2018 -0700 @@ -875,15 +875,11 @@ # The phases of nodes already transferred to the client may have changed # since the client last requested data. We send phase-only records # for these revisions, if requested. - if b'phase' in fields and noderange is not None: - # TODO skip nodes whose phase will be reflected by a node in the - # outgoing set. This is purely an optimization to reduce data - # size. - for node in noderange[0]: - yield { - b'node': node, - b'phase': b'public' if publishing else repo[node].phasestr() - } + # TODO actually do this. We'll probably want to emit phase heads + # in the ancestry set of the outgoing revisions. This will ensure + # that phase updates within that set are seen. + if b'phase' in fields: + pass nodebookmarks = {} for mark, node in repo._bookmarks.items():