Mercurial > evolve
diff hgext3rd/topic/discovery.py @ 6573:d511eba4cdb0
topic: compatibility for branchmaptns with branchmap from hg 5.0
Since our new branchmaptns so heavily reuses the core branchmap, we need to
make sure to use all the compatibility function with it as well, even though it
lives completely in topic extension.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sun, 15 Oct 2023 16:59:25 -0300 |
parents | cb009f13126a |
children | ff2ba083f8b4 cf1e854f50e9 |
line wrap: on
line diff
--- a/hgext3rd/topic/discovery.py Fri Oct 13 15:16:18 2023 -0300 +++ b/hgext3rd/topic/discovery.py Sun Oct 15 16:59:25 2023 -0300 @@ -184,9 +184,9 @@ """copied from wireprotov1server.branchmap()""" if not common.hastopicext(repo): return wireprotov1server.branchmap(repo, proto) - branchmaptns = repo.branchmaptns() heads = [] - for branch, nodes in branchmaptns.items(): + entries = compat.bcentries(repo.branchmaptns()) + for branch, nodes in compat.branchmapitems(entries): branchname = urlreq.quote(encoding.fromlocal(branch)) branchnodes = wireprototypes.encodelist(nodes) heads.append(b'%s %s' % (branchname, branchnodes))