##// END OF EJS Templates
wireprotoserver: add version to HTTP protocol name (API)...
Gregory Szorc -
r36241:2e07dc51 default
parent child Browse files
Show More
@@ -778,7 +778,7 b' def _capabilities(repo, proto):'
778 caps.append('bundle2=' + urlreq.quote(capsblob))
778 caps.append('bundle2=' + urlreq.quote(capsblob))
779 caps.append('unbundle=%s' % ','.join(bundle2.bundlepriority))
779 caps.append('unbundle=%s' % ','.join(bundle2.bundlepriority))
780
780
781 if proto.name == 'http':
781 if proto.name == 'http-v1':
782 caps.append('httpheader=%d' %
782 caps.append('httpheader=%d' %
783 repo.ui.configint('server', 'maxhttpheaderlen'))
783 repo.ui.configint('server', 'maxhttpheaderlen'))
784 if repo.ui.configbool('experimental', 'httppostargs'):
784 if repo.ui.configbool('experimental', 'httppostargs'):
@@ -852,7 +852,7 b' def getbundle(repo, proto, others):'
852
852
853 if not bundle1allowed(repo, 'pull'):
853 if not bundle1allowed(repo, 'pull'):
854 if not exchange.bundle2requested(opts.get('bundlecaps')):
854 if not exchange.bundle2requested(opts.get('bundlecaps')):
855 if proto.name == 'http':
855 if proto.name == 'http-v1':
856 return ooberror(bundle2required)
856 return ooberror(bundle2required)
857 raise error.Abort(bundle2requiredmain,
857 raise error.Abort(bundle2requiredmain,
858 hint=bundle2requiredhint)
858 hint=bundle2requiredhint)
@@ -878,7 +878,7 b' def getbundle(repo, proto, others):'
878 except error.Abort as exc:
878 except error.Abort as exc:
879 # cleanly forward Abort error to the client
879 # cleanly forward Abort error to the client
880 if not exchange.bundle2requested(opts.get('bundlecaps')):
880 if not exchange.bundle2requested(opts.get('bundlecaps')):
881 if proto.name == 'http':
881 if proto.name == 'http-v1':
882 return ooberror(str(exc) + '\n')
882 return ooberror(str(exc) + '\n')
883 raise # cannot do better for bundle1 + ssh
883 raise # cannot do better for bundle1 + ssh
884 # bundle2 request expect a bundle2 reply
884 # bundle2 request expect a bundle2 reply
@@ -983,7 +983,7 b' def unbundle(repo, proto, heads):'
983 gen = exchange.readbundle(repo.ui, fp, None)
983 gen = exchange.readbundle(repo.ui, fp, None)
984 if (isinstance(gen, changegroupmod.cg1unpacker)
984 if (isinstance(gen, changegroupmod.cg1unpacker)
985 and not bundle1allowed(repo, 'push')):
985 and not bundle1allowed(repo, 'push')):
986 if proto.name == 'http':
986 if proto.name == 'http-v1':
987 # need to special case http because stderr do not get to
987 # need to special case http because stderr do not get to
988 # the http client on failed push so we need to abuse
988 # the http client on failed push so we need to abuse
989 # some other error type to make sure the message get to
989 # some other error type to make sure the message get to
@@ -112,7 +112,7 b' class httpv1protocolhandler(baseprotocol'
112
112
113 @property
113 @property
114 def name(self):
114 def name(self):
115 return 'http'
115 return 'http-v1'
116
116
117 def getargs(self, args):
117 def getargs(self, args):
118 knownargs = self._args()
118 knownargs = self._args()
General Comments 0
You need to be logged in to leave comments. Login now