comparison hgext3rd/topic/discovery.py @ 3678:d725fe3e3989

topic: handle wireproto module change from b4d85bc122bd This module have been scattered in other place, so we need to detect and handle this for 4.6+
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 19 Apr 2018 10:50:24 +0200
parents 9d9ff55d1bb1
children 415c872d3308
comparison
equal deleted inserted replaced
3677:60d396d3da80 3678:d725fe3e3989
9 discovery, 9 discovery,
10 error, 10 error,
11 exchange, 11 exchange,
12 extensions, 12 extensions,
13 util, 13 util,
14 wireproto,
15 ) 14 )
15
16 try:
17 from mercurial import wireproto
18 wireproto.branchmap
19 except ImportError: # <= hg-4.5
20 from mercurial import wireprotov1server as wireproto
16 21
17 def _headssummary(orig, *args): 22 def _headssummary(orig, *args):
18 # In mercurial < 4.2, we receive repo, remote and outgoing as arguments 23 # In mercurial < 4.2, we receive repo, remote and outgoing as arguments
19 pushop = None 24 pushop = None
20 if len(args) == 3: 25 if len(args) == 3: