Mercurial > evolve
diff hgext3rd/topic/discovery.py @ 4743:92e3db149d7d
py3: call branchmap.items() on py3 and continue to call iteritems() on py2
Mercurial's source transformer also replaces the 'def iteritems(' in
branchmap by 'def items(', so we need to call whichever version is
there.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sat, 13 Jul 2019 00:17:03 -0700 |
parents | db3e7f6b5ceb |
children | 079dbf36e884 |
line wrap: on
line diff
--- a/hgext3rd/topic/discovery.py Fri Jul 12 23:24:04 2019 -0700 +++ b/hgext3rd/topic/discovery.py Sat Jul 13 00:17:03 2019 -0700 @@ -14,6 +14,7 @@ ) from . import ( common, + compat, ) try: @@ -49,7 +50,7 @@ def remotebranchmap(): # drop topic information from changeset about to be published result = collections.defaultdict(list) - for branch, heads in origremotebranchmap().iteritems(): + for branch, heads in compat.branchmapitems(origremotebranchmap()): if ':' not in branch: result[branch].extend(heads) else: