--- a/mercurial/exchange.py Fri May 05 17:09:47 2017 +0200
+++ b/mercurial/exchange.py Fri May 05 17:28:52 2017 +0200
@@ -28,7 +28,6 @@
scmutil,
sslutil,
streamclone,
- tags,
url as urlmod,
util,
)
@@ -1663,30 +1662,7 @@
return
outgoing = _computeoutgoing(repo, heads, common)
-
- if not outgoing.missingheads:
- return
-
- cache = tags.hgtagsfnodescache(repo.unfiltered())
- chunks = []
-
- # .hgtags fnodes are only relevant for head changesets. While we could
- # transfer values for all known nodes, there will likely be little to
- # no benefit.
- #
- # We don't bother using a generator to produce output data because
- # a) we only have 40 bytes per head and even esoteric numbers of heads
- # consume little memory (1M heads is 40MB) b) we don't want to send the
- # part if we don't have entries and knowing if we have entries requires
- # cache lookups.
- for node in outgoing.missingheads:
- # Don't compute missing, as this may slow down serving.
- fnode = cache.getfnode(node, computemissing=False)
- if fnode is not None:
- chunks.extend([node, fnode])
-
- if chunks:
- bundler.newpart('hgtagsfnodes', data=''.join(chunks))
+ bundle2.addparttagsfnodescache(repo, bundler, outgoing)
def _getbookmarks(repo, **kwargs):
"""Returns bookmark to node mapping.