hgext3rd/topic/discovery.py
changeset 5041 71cccd216b01
parent 4929 bb2b4f6c99dc
child 5180 515d425c0a05
child 5267 ba53591d4aab
equal deleted inserted replaced
5040:5b0f761fda9c 5041:71cccd216b01
    15 from . import (
    15 from . import (
    16     common,
    16     common,
    17     compat,
    17     compat,
    18 )
    18 )
    19 
    19 
       
    20 # hg <= 4.5 (b4d85bc122bd)
    20 try:
    21 try:
    21     from mercurial import wireproto
    22     from mercurial import wireproto  # pytype: disable=import-error
    22     wireproto.branchmap
    23     wireproto.branchmap
    23 except (AttributeError, ImportError): # <= hg-4.5
    24 except (AttributeError, ImportError):
    24     from mercurial import wireprotov1server as wireproto
    25     from mercurial import wireprotov1server as wireproto
    25 
    26 
    26 def _headssummary(orig, pushop, *args, **kwargs):
    27 def _headssummary(orig, pushop, *args, **kwargs):
    27     # In mercurial > 4.3, we receive the pushop as arguments
    28     # In mercurial > 4.3, we receive the pushop as arguments
    28     repo = pushop.repo.unfiltered()
    29     repo = pushop.repo.unfiltered()