hgext3rd/topic/discovery.py
changeset 4743 92e3db149d7d
parent 4742 db3e7f6b5ceb
child 4804 079dbf36e884
equal deleted inserted replaced
4742:db3e7f6b5ceb 4743:92e3db149d7d
    12     extensions,
    12     extensions,
    13     util,
    13     util,
    14 )
    14 )
    15 from . import (
    15 from . import (
    16     common,
    16     common,
       
    17     compat,
    17 )
    18 )
    18 
    19 
    19 try:
    20 try:
    20     from mercurial import wireproto
    21     from mercurial import wireproto
    21     wireproto.branchmap
    22     wireproto.branchmap
    47     rev = repo.unfiltered().changelog.nodemap.get
    48     rev = repo.unfiltered().changelog.nodemap.get
    48 
    49 
    49     def remotebranchmap():
    50     def remotebranchmap():
    50         # drop topic information from changeset about to be published
    51         # drop topic information from changeset about to be published
    51         result = collections.defaultdict(list)
    52         result = collections.defaultdict(list)
    52         for branch, heads in origremotebranchmap().iteritems():
    53         for branch, heads in compat.branchmapitems(origremotebranchmap()):
    53             if ':' not in branch:
    54             if ':' not in branch:
    54                 result[branch].extend(heads)
    55                 result[branch].extend(heads)
    55             else:
    56             else:
    56                 namedbranch = branch.split(':', 1)[0]
    57                 namedbranch = branch.split(':', 1)[0]
    57                 for h in heads:
    58                 for h in heads: