diff --git a/mercurial/httppeer.py b/mercurial/httppeer.py --- a/mercurial/httppeer.py +++ b/mercurial/httppeer.py @@ -33,7 +33,6 @@ url as urlmod, util, wireprotoframing, - wireprototypes, wireprotov1peer, wireprotov2peer, wireprotov2server, @@ -815,7 +814,7 @@ # Integer priority for the service. If we could choose from multiple # services, we choose the one with the highest priority. API_PEERS = { - wireprototypes.HTTP_WIREPROTO_V2: { + wireprotov2server.HTTP_WIREPROTO_V2: { 'init': httpv2peer, 'priority': 50, }, diff --git a/mercurial/wireprototypes.py b/mercurial/wireprototypes.py --- a/mercurial/wireprototypes.py +++ b/mercurial/wireprototypes.py @@ -22,7 +22,6 @@ # These are advertised over the wire. Increment the counters at the end # to reflect BC breakages. SSHV2 = 'exp-ssh-v2-0001' -HTTP_WIREPROTO_V2 = 'exp-http-v2-0001' # All available wire protocol transports. TRANSPORTS = { @@ -39,7 +38,7 @@ 'transport': 'http', 'version': 1, }, - HTTP_WIREPROTO_V2: { + 'http-v2': { 'transport': 'http', 'version': 2, } diff --git a/mercurial/wireprotov2server.py b/mercurial/wireprotov2server.py --- a/mercurial/wireprotov2server.py +++ b/mercurial/wireprotov2server.py @@ -27,7 +27,7 @@ FRAMINGTYPE = b'application/mercurial-exp-framing-0005' -HTTP_WIREPROTO_V2 = wireprototypes.HTTP_WIREPROTO_V2 +HTTP_WIREPROTO_V2 = b'exp-http-v2-0001' COMMANDS = wireprototypes.commanddict()