Mercurial > evolve
comparison hgext3rd/topic/discovery.py @ 6745:71c4b6c2bcdc
topic: drop branchmap._entries compatibility for hg 4.9
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Thu, 11 Jan 2024 15:31:13 -0300 |
parents | a7d94f235488 |
children | afea2dd5e7b5 |
comparison
equal
deleted
inserted
replaced
6744:3076dba01b86 | 6745:71c4b6c2bcdc |
---|---|
180 def wireprotobranchmaptns(repo, proto): | 180 def wireprotobranchmaptns(repo, proto): |
181 """copied from wireprotov1server.branchmap()""" | 181 """copied from wireprotov1server.branchmap()""" |
182 if not common.hastopicext(repo): | 182 if not common.hastopicext(repo): |
183 return wireprotov1server.branchmap(repo, proto) | 183 return wireprotov1server.branchmap(repo, proto) |
184 heads = [] | 184 heads = [] |
185 entries = compat.bcentries(repo.branchmaptns()) | 185 entries = repo.branchmaptns()._entries |
186 for branch, nodes in compat.branchmapitems(entries): | 186 for branch, nodes in compat.branchmapitems(entries): |
187 branchname = urlreq.quote(encoding.fromlocal(branch)) | 187 branchname = urlreq.quote(encoding.fromlocal(branch)) |
188 branchnodes = wireprototypes.encodelist(nodes) | 188 branchnodes = wireprototypes.encodelist(nodes) |
189 heads.append(b'%s %s' % (branchname, branchnodes)) | 189 heads.append(b'%s %s' % (branchname, branchnodes)) |
190 | 190 |