Show More
@@ -1,338 +1,382 b'' | |||||
1 | # httppeer.py - HTTP repository proxy classes for mercurial |
|
1 | # httppeer.py - HTTP repository proxy classes for mercurial | |
2 | # |
|
2 | # | |
3 | # Copyright 2005, 2006 Matt Mackall <mpm@selenic.com> |
|
3 | # Copyright 2005, 2006 Matt Mackall <mpm@selenic.com> | |
4 | # Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com> |
|
4 | # Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com> | |
5 | # |
|
5 | # | |
6 | # This software may be used and distributed according to the terms of the |
|
6 | # This software may be used and distributed according to the terms of the | |
7 | # GNU General Public License version 2 or any later version. |
|
7 | # GNU General Public License version 2 or any later version. | |
8 |
|
8 | |||
9 | from __future__ import absolute_import |
|
9 | from __future__ import absolute_import | |
10 |
|
10 | |||
11 | import errno |
|
11 | import errno | |
12 | import os |
|
12 | import os | |
13 | import socket |
|
13 | import socket | |
|
14 | import struct | |||
14 | import tempfile |
|
15 | import tempfile | |
15 |
|
16 | |||
16 | from .i18n import _ |
|
17 | from .i18n import _ | |
17 | from .node import nullid |
|
18 | from .node import nullid | |
18 | from . import ( |
|
19 | from . import ( | |
19 | bundle2, |
|
20 | bundle2, | |
20 | error, |
|
21 | error, | |
21 | httpconnection, |
|
22 | httpconnection, | |
22 | statichttprepo, |
|
23 | statichttprepo, | |
23 | url, |
|
24 | url, | |
24 | util, |
|
25 | util, | |
25 | wireproto, |
|
26 | wireproto, | |
26 | ) |
|
27 | ) | |
27 |
|
28 | |||
28 | httplib = util.httplib |
|
29 | httplib = util.httplib | |
29 | urlerr = util.urlerr |
|
30 | urlerr = util.urlerr | |
30 | urlreq = util.urlreq |
|
31 | urlreq = util.urlreq | |
31 |
|
32 | |||
32 | # FUTURE: consider refactoring this API to use generators. This will |
|
33 | # FUTURE: consider refactoring this API to use generators. This will | |
33 | # require a compression engine API to emit generators. |
|
34 | # require a compression engine API to emit generators. | |
34 | def decompressresponse(response, engine): |
|
35 | def decompressresponse(response, engine): | |
35 | try: |
|
36 | try: | |
36 | reader = engine.decompressorreader(response) |
|
37 | reader = engine.decompressorreader(response) | |
37 | except httplib.HTTPException: |
|
38 | except httplib.HTTPException: | |
38 | raise IOError(None, _('connection ended unexpectedly')) |
|
39 | raise IOError(None, _('connection ended unexpectedly')) | |
39 |
|
40 | |||
40 | # We need to wrap reader.read() so HTTPException on subsequent |
|
41 | # We need to wrap reader.read() so HTTPException on subsequent | |
41 | # reads is also converted. |
|
42 | # reads is also converted. | |
42 | # Ideally we'd use super() here. However, if ``reader`` isn't a new-style |
|
43 | # Ideally we'd use super() here. However, if ``reader`` isn't a new-style | |
43 | # class, this can raise: |
|
44 | # class, this can raise: | |
44 | # TypeError: super() argument 1 must be type, not classobj |
|
45 | # TypeError: super() argument 1 must be type, not classobj | |
45 | origread = reader.read |
|
46 | origread = reader.read | |
46 | class readerproxy(reader.__class__): |
|
47 | class readerproxy(reader.__class__): | |
47 | def read(self, *args, **kwargs): |
|
48 | def read(self, *args, **kwargs): | |
48 | try: |
|
49 | try: | |
49 | return origread(*args, **kwargs) |
|
50 | return origread(*args, **kwargs) | |
50 | except httplib.HTTPException: |
|
51 | except httplib.HTTPException: | |
51 | raise IOError(None, _('connection ended unexpectedly')) |
|
52 | raise IOError(None, _('connection ended unexpectedly')) | |
52 |
|
53 | |||
53 | reader.__class__ = readerproxy |
|
54 | reader.__class__ = readerproxy | |
54 | return reader |
|
55 | return reader | |
55 |
|
56 | |||
56 | def encodevalueinheaders(value, header, limit): |
|
57 | def encodevalueinheaders(value, header, limit): | |
57 | """Encode a string value into multiple HTTP headers. |
|
58 | """Encode a string value into multiple HTTP headers. | |
58 |
|
59 | |||
59 | ``value`` will be encoded into 1 or more HTTP headers with the names |
|
60 | ``value`` will be encoded into 1 or more HTTP headers with the names | |
60 | ``header-<N>`` where ``<N>`` is an integer starting at 1. Each header |
|
61 | ``header-<N>`` where ``<N>`` is an integer starting at 1. Each header | |
61 | name + value will be at most ``limit`` bytes long. |
|
62 | name + value will be at most ``limit`` bytes long. | |
62 |
|
63 | |||
63 | Returns an iterable of 2-tuples consisting of header names and values. |
|
64 | Returns an iterable of 2-tuples consisting of header names and values. | |
64 | """ |
|
65 | """ | |
65 | fmt = header + '-%s' |
|
66 | fmt = header + '-%s' | |
66 | valuelen = limit - len(fmt % '000') - len(': \r\n') |
|
67 | valuelen = limit - len(fmt % '000') - len(': \r\n') | |
67 | result = [] |
|
68 | result = [] | |
68 |
|
69 | |||
69 | n = 0 |
|
70 | n = 0 | |
70 | for i in xrange(0, len(value), valuelen): |
|
71 | for i in xrange(0, len(value), valuelen): | |
71 | n += 1 |
|
72 | n += 1 | |
72 | result.append((fmt % str(n), value[i:i + valuelen])) |
|
73 | result.append((fmt % str(n), value[i:i + valuelen])) | |
73 |
|
74 | |||
74 | return result |
|
75 | return result | |
75 |
|
76 | |||
76 | class httppeer(wireproto.wirepeer): |
|
77 | class httppeer(wireproto.wirepeer): | |
77 | def __init__(self, ui, path): |
|
78 | def __init__(self, ui, path): | |
78 | self.path = path |
|
79 | self.path = path | |
79 | self.caps = None |
|
80 | self.caps = None | |
80 | self.handler = None |
|
81 | self.handler = None | |
81 | self.urlopener = None |
|
82 | self.urlopener = None | |
82 | self.requestbuilder = None |
|
83 | self.requestbuilder = None | |
83 | u = util.url(path) |
|
84 | u = util.url(path) | |
84 | if u.query or u.fragment: |
|
85 | if u.query or u.fragment: | |
85 | raise error.Abort(_('unsupported URL component: "%s"') % |
|
86 | raise error.Abort(_('unsupported URL component: "%s"') % | |
86 | (u.query or u.fragment)) |
|
87 | (u.query or u.fragment)) | |
87 |
|
88 | |||
88 | # urllib cannot handle URLs with embedded user or passwd |
|
89 | # urllib cannot handle URLs with embedded user or passwd | |
89 | self._url, authinfo = u.authinfo() |
|
90 | self._url, authinfo = u.authinfo() | |
90 |
|
91 | |||
91 | self.ui = ui |
|
92 | self.ui = ui | |
92 | self.ui.debug('using %s\n' % self._url) |
|
93 | self.ui.debug('using %s\n' % self._url) | |
93 |
|
94 | |||
94 | self.urlopener = url.opener(ui, authinfo) |
|
95 | self.urlopener = url.opener(ui, authinfo) | |
95 | self.requestbuilder = urlreq.request |
|
96 | self.requestbuilder = urlreq.request | |
96 |
|
97 | |||
97 | def __del__(self): |
|
98 | def __del__(self): | |
98 | urlopener = getattr(self, 'urlopener', None) |
|
99 | urlopener = getattr(self, 'urlopener', None) | |
99 | if urlopener: |
|
100 | if urlopener: | |
100 | for h in urlopener.handlers: |
|
101 | for h in urlopener.handlers: | |
101 | h.close() |
|
102 | h.close() | |
102 | getattr(h, "close_all", lambda : None)() |
|
103 | getattr(h, "close_all", lambda : None)() | |
103 |
|
104 | |||
104 | def url(self): |
|
105 | def url(self): | |
105 | return self.path |
|
106 | return self.path | |
106 |
|
107 | |||
107 | # look up capabilities only when needed |
|
108 | # look up capabilities only when needed | |
108 |
|
109 | |||
109 | def _fetchcaps(self): |
|
110 | def _fetchcaps(self): | |
110 | self.caps = set(self._call('capabilities').split()) |
|
111 | self.caps = set(self._call('capabilities').split()) | |
111 |
|
112 | |||
112 | def _capabilities(self): |
|
113 | def _capabilities(self): | |
113 | if self.caps is None: |
|
114 | if self.caps is None: | |
114 | try: |
|
115 | try: | |
115 | self._fetchcaps() |
|
116 | self._fetchcaps() | |
116 | except error.RepoError: |
|
117 | except error.RepoError: | |
117 | self.caps = set() |
|
118 | self.caps = set() | |
118 | self.ui.debug('capabilities: %s\n' % |
|
119 | self.ui.debug('capabilities: %s\n' % | |
119 | (' '.join(self.caps or ['none']))) |
|
120 | (' '.join(self.caps or ['none']))) | |
120 | return self.caps |
|
121 | return self.caps | |
121 |
|
122 | |||
122 | def lock(self): |
|
123 | def lock(self): | |
123 | raise error.Abort(_('operation not supported over http')) |
|
124 | raise error.Abort(_('operation not supported over http')) | |
124 |
|
125 | |||
125 | def _callstream(self, cmd, _compressible=False, **args): |
|
126 | def _callstream(self, cmd, _compressible=False, **args): | |
126 | if cmd == 'pushkey': |
|
127 | if cmd == 'pushkey': | |
127 | args['data'] = '' |
|
128 | args['data'] = '' | |
128 | data = args.pop('data', None) |
|
129 | data = args.pop('data', None) | |
129 | headers = args.pop('headers', {}) |
|
130 | headers = args.pop('headers', {}) | |
130 |
|
131 | |||
131 | self.ui.debug("sending %s command\n" % cmd) |
|
132 | self.ui.debug("sending %s command\n" % cmd) | |
132 | q = [('cmd', cmd)] |
|
133 | q = [('cmd', cmd)] | |
133 | headersize = 0 |
|
134 | headersize = 0 | |
134 | varyheaders = [] |
|
135 | varyheaders = [] | |
135 | # Important: don't use self.capable() here or else you end up |
|
136 | # Important: don't use self.capable() here or else you end up | |
136 | # with infinite recursion when trying to look up capabilities |
|
137 | # with infinite recursion when trying to look up capabilities | |
137 | # for the first time. |
|
138 | # for the first time. | |
138 | postargsok = self.caps is not None and 'httppostargs' in self.caps |
|
139 | postargsok = self.caps is not None and 'httppostargs' in self.caps | |
139 | # TODO: support for httppostargs when data is a file-like |
|
140 | # TODO: support for httppostargs when data is a file-like | |
140 | # object rather than a basestring |
|
141 | # object rather than a basestring | |
141 | canmungedata = not data or isinstance(data, basestring) |
|
142 | canmungedata = not data or isinstance(data, basestring) | |
142 | if postargsok and canmungedata: |
|
143 | if postargsok and canmungedata: | |
143 | strargs = urlreq.urlencode(sorted(args.items())) |
|
144 | strargs = urlreq.urlencode(sorted(args.items())) | |
144 | if strargs: |
|
145 | if strargs: | |
145 | if not data: |
|
146 | if not data: | |
146 | data = strargs |
|
147 | data = strargs | |
147 | elif isinstance(data, basestring): |
|
148 | elif isinstance(data, basestring): | |
148 | data = strargs + data |
|
149 | data = strargs + data | |
149 | headers['X-HgArgs-Post'] = len(strargs) |
|
150 | headers['X-HgArgs-Post'] = len(strargs) | |
150 | else: |
|
151 | else: | |
151 | if len(args) > 0: |
|
152 | if len(args) > 0: | |
152 | httpheader = self.capable('httpheader') |
|
153 | httpheader = self.capable('httpheader') | |
153 | if httpheader: |
|
154 | if httpheader: | |
154 | headersize = int(httpheader.split(',', 1)[0]) |
|
155 | headersize = int(httpheader.split(',', 1)[0]) | |
155 | if headersize > 0: |
|
156 | if headersize > 0: | |
156 | # The headers can typically carry more data than the URL. |
|
157 | # The headers can typically carry more data than the URL. | |
157 | encargs = urlreq.urlencode(sorted(args.items())) |
|
158 | encargs = urlreq.urlencode(sorted(args.items())) | |
158 | for header, value in encodevalueinheaders(encargs, 'X-HgArg', |
|
159 | for header, value in encodevalueinheaders(encargs, 'X-HgArg', | |
159 | headersize): |
|
160 | headersize): | |
160 | headers[header] = value |
|
161 | headers[header] = value | |
161 | varyheaders.append(header) |
|
162 | varyheaders.append(header) | |
162 | else: |
|
163 | else: | |
163 | q += sorted(args.items()) |
|
164 | q += sorted(args.items()) | |
164 | qs = '?%s' % urlreq.urlencode(q) |
|
165 | qs = '?%s' % urlreq.urlencode(q) | |
165 | cu = "%s%s" % (self._url, qs) |
|
166 | cu = "%s%s" % (self._url, qs) | |
166 | size = 0 |
|
167 | size = 0 | |
167 | if util.safehasattr(data, 'length'): |
|
168 | if util.safehasattr(data, 'length'): | |
168 | size = data.length |
|
169 | size = data.length | |
169 | elif data is not None: |
|
170 | elif data is not None: | |
170 | size = len(data) |
|
171 | size = len(data) | |
171 | if size and self.ui.configbool('ui', 'usehttp2', False): |
|
172 | if size and self.ui.configbool('ui', 'usehttp2', False): | |
172 | headers['Expect'] = '100-Continue' |
|
173 | headers['Expect'] = '100-Continue' | |
173 | headers['X-HgHttp2'] = '1' |
|
174 | headers['X-HgHttp2'] = '1' | |
174 | if data is not None and 'Content-Type' not in headers: |
|
175 | if data is not None and 'Content-Type' not in headers: | |
175 | headers['Content-Type'] = 'application/mercurial-0.1' |
|
176 | headers['Content-Type'] = 'application/mercurial-0.1' | |
176 |
|
177 | |||
|
178 | # Tell the server we accept application/mercurial-0.2 and multiple | |||
|
179 | # compression formats if the server is capable of emitting those | |||
|
180 | # payloads. | |||
|
181 | protoparams = [] | |||
|
182 | ||||
|
183 | mediatypes = set() | |||
|
184 | if self.caps is not None: | |||
|
185 | mt = self.capable('httpmediatype') | |||
|
186 | if mt: | |||
|
187 | protoparams.append('0.1') | |||
|
188 | mediatypes = set(mt.split(',')) | |||
|
189 | ||||
|
190 | if '0.2tx' in mediatypes: | |||
|
191 | protoparams.append('0.2') | |||
|
192 | ||||
|
193 | if '0.2tx' in mediatypes and self.capable('compression'): | |||
|
194 | # We /could/ compare supported compression formats and prune | |||
|
195 | # non-mutually supported or error if nothing is mutually supported. | |||
|
196 | # For now, send the full list to the server and have it error. | |||
|
197 | comps = [e.wireprotosupport().name for e in | |||
|
198 | util.compengines.supportedwireengines(util.CLIENTROLE)] | |||
|
199 | protoparams.append('comp=%s' % ','.join(comps)) | |||
|
200 | ||||
|
201 | if protoparams: | |||
|
202 | protoheaders = encodevalueinheaders(' '.join(protoparams), | |||
|
203 | 'X-HgProto', | |||
|
204 | headersize or 1024) | |||
|
205 | for header, value in protoheaders: | |||
|
206 | headers[header] = value | |||
|
207 | varyheaders.append(header) | |||
|
208 | ||||
177 | headers['Vary'] = ','.join(varyheaders) |
|
209 | headers['Vary'] = ','.join(varyheaders) | |
178 | req = self.requestbuilder(cu, data, headers) |
|
210 | req = self.requestbuilder(cu, data, headers) | |
179 |
|
211 | |||
180 | if data is not None: |
|
212 | if data is not None: | |
181 | self.ui.debug("sending %s bytes\n" % size) |
|
213 | self.ui.debug("sending %s bytes\n" % size) | |
182 | req.add_unredirected_header('Content-Length', '%d' % size) |
|
214 | req.add_unredirected_header('Content-Length', '%d' % size) | |
183 | try: |
|
215 | try: | |
184 | resp = self.urlopener.open(req) |
|
216 | resp = self.urlopener.open(req) | |
185 | except urlerr.httperror as inst: |
|
217 | except urlerr.httperror as inst: | |
186 | if inst.code == 401: |
|
218 | if inst.code == 401: | |
187 | raise error.Abort(_('authorization failed')) |
|
219 | raise error.Abort(_('authorization failed')) | |
188 | raise |
|
220 | raise | |
189 | except httplib.HTTPException as inst: |
|
221 | except httplib.HTTPException as inst: | |
190 | self.ui.debug('http error while sending %s command\n' % cmd) |
|
222 | self.ui.debug('http error while sending %s command\n' % cmd) | |
191 | self.ui.traceback() |
|
223 | self.ui.traceback() | |
192 | raise IOError(None, inst) |
|
224 | raise IOError(None, inst) | |
193 | # record the url we got redirected to |
|
225 | # record the url we got redirected to | |
194 | resp_url = resp.geturl() |
|
226 | resp_url = resp.geturl() | |
195 | if resp_url.endswith(qs): |
|
227 | if resp_url.endswith(qs): | |
196 | resp_url = resp_url[:-len(qs)] |
|
228 | resp_url = resp_url[:-len(qs)] | |
197 | if self._url.rstrip('/') != resp_url.rstrip('/'): |
|
229 | if self._url.rstrip('/') != resp_url.rstrip('/'): | |
198 | if not self.ui.quiet: |
|
230 | if not self.ui.quiet: | |
199 | self.ui.warn(_('real URL is %s\n') % resp_url) |
|
231 | self.ui.warn(_('real URL is %s\n') % resp_url) | |
200 | self._url = resp_url |
|
232 | self._url = resp_url | |
201 | try: |
|
233 | try: | |
202 | proto = resp.getheader('content-type') |
|
234 | proto = resp.getheader('content-type') | |
203 | except AttributeError: |
|
235 | except AttributeError: | |
204 | proto = resp.headers.get('content-type', '') |
|
236 | proto = resp.headers.get('content-type', '') | |
205 |
|
237 | |||
206 | safeurl = util.hidepassword(self._url) |
|
238 | safeurl = util.hidepassword(self._url) | |
207 | if proto.startswith('application/hg-error'): |
|
239 | if proto.startswith('application/hg-error'): | |
208 | raise error.OutOfBandError(resp.read()) |
|
240 | raise error.OutOfBandError(resp.read()) | |
209 | # accept old "text/plain" and "application/hg-changegroup" for now |
|
241 | # accept old "text/plain" and "application/hg-changegroup" for now | |
210 | if not (proto.startswith('application/mercurial-') or |
|
242 | if not (proto.startswith('application/mercurial-') or | |
211 | (proto.startswith('text/plain') |
|
243 | (proto.startswith('text/plain') | |
212 | and not resp.headers.get('content-length')) or |
|
244 | and not resp.headers.get('content-length')) or | |
213 | proto.startswith('application/hg-changegroup')): |
|
245 | proto.startswith('application/hg-changegroup')): | |
214 | self.ui.debug("requested URL: '%s'\n" % util.hidepassword(cu)) |
|
246 | self.ui.debug("requested URL: '%s'\n" % util.hidepassword(cu)) | |
215 | raise error.RepoError( |
|
247 | raise error.RepoError( | |
216 | _("'%s' does not appear to be an hg repository:\n" |
|
248 | _("'%s' does not appear to be an hg repository:\n" | |
217 | "---%%<--- (%s)\n%s\n---%%<---\n") |
|
249 | "---%%<--- (%s)\n%s\n---%%<---\n") | |
218 | % (safeurl, proto or 'no content-type', resp.read(1024))) |
|
250 | % (safeurl, proto or 'no content-type', resp.read(1024))) | |
219 |
|
251 | |||
220 | if proto.startswith('application/mercurial-'): |
|
252 | if proto.startswith('application/mercurial-'): | |
221 | try: |
|
253 | try: | |
222 | version = proto.split('-', 1)[1] |
|
254 | version = proto.split('-', 1)[1] | |
223 | version_info = tuple([int(n) for n in version.split('.')]) |
|
255 | version_info = tuple([int(n) for n in version.split('.')]) | |
224 | except ValueError: |
|
256 | except ValueError: | |
225 | raise error.RepoError(_("'%s' sent a broken Content-Type " |
|
257 | raise error.RepoError(_("'%s' sent a broken Content-Type " | |
226 | "header (%s)") % (safeurl, proto)) |
|
258 | "header (%s)") % (safeurl, proto)) | |
227 | if version_info > (0, 1): |
|
259 | ||
|
260 | if version_info == (0, 1): | |||
|
261 | if _compressible: | |||
|
262 | return decompressresponse(resp, util.compengines['zlib']) | |||
|
263 | return resp | |||
|
264 | elif version_info == (0, 2): | |||
|
265 | # application/mercurial-0.2 always identifies the compression | |||
|
266 | # engine in the payload header. | |||
|
267 | elen = struct.unpack('B', resp.read(1))[0] | |||
|
268 | ename = resp.read(elen) | |||
|
269 | engine = util.compengines.forwiretype(ename) | |||
|
270 | return decompressresponse(resp, engine) | |||
|
271 | else: | |||
228 | raise error.RepoError(_("'%s' uses newer protocol %s") % |
|
272 | raise error.RepoError(_("'%s' uses newer protocol %s") % | |
229 | (safeurl, version)) |
|
273 | (safeurl, version)) | |
230 |
|
274 | |||
231 | if _compressible: |
|
275 | if _compressible: | |
232 | return decompressresponse(resp, util.compengines['zlib']) |
|
276 | return decompressresponse(resp, util.compengines['zlib']) | |
233 |
|
277 | |||
234 | return resp |
|
278 | return resp | |
235 |
|
279 | |||
236 | def _call(self, cmd, **args): |
|
280 | def _call(self, cmd, **args): | |
237 | fp = self._callstream(cmd, **args) |
|
281 | fp = self._callstream(cmd, **args) | |
238 | try: |
|
282 | try: | |
239 | return fp.read() |
|
283 | return fp.read() | |
240 | finally: |
|
284 | finally: | |
241 | # if using keepalive, allow connection to be reused |
|
285 | # if using keepalive, allow connection to be reused | |
242 | fp.close() |
|
286 | fp.close() | |
243 |
|
287 | |||
244 | def _callpush(self, cmd, cg, **args): |
|
288 | def _callpush(self, cmd, cg, **args): | |
245 | # have to stream bundle to a temp file because we do not have |
|
289 | # have to stream bundle to a temp file because we do not have | |
246 | # http 1.1 chunked transfer. |
|
290 | # http 1.1 chunked transfer. | |
247 |
|
291 | |||
248 | types = self.capable('unbundle') |
|
292 | types = self.capable('unbundle') | |
249 | try: |
|
293 | try: | |
250 | types = types.split(',') |
|
294 | types = types.split(',') | |
251 | except AttributeError: |
|
295 | except AttributeError: | |
252 | # servers older than d1b16a746db6 will send 'unbundle' as a |
|
296 | # servers older than d1b16a746db6 will send 'unbundle' as a | |
253 | # boolean capability. They only support headerless/uncompressed |
|
297 | # boolean capability. They only support headerless/uncompressed | |
254 | # bundles. |
|
298 | # bundles. | |
255 | types = [""] |
|
299 | types = [""] | |
256 | for x in types: |
|
300 | for x in types: | |
257 | if x in bundle2.bundletypes: |
|
301 | if x in bundle2.bundletypes: | |
258 | type = x |
|
302 | type = x | |
259 | break |
|
303 | break | |
260 |
|
304 | |||
261 | tempname = bundle2.writebundle(self.ui, cg, None, type) |
|
305 | tempname = bundle2.writebundle(self.ui, cg, None, type) | |
262 | fp = httpconnection.httpsendfile(self.ui, tempname, "rb") |
|
306 | fp = httpconnection.httpsendfile(self.ui, tempname, "rb") | |
263 | headers = {'Content-Type': 'application/mercurial-0.1'} |
|
307 | headers = {'Content-Type': 'application/mercurial-0.1'} | |
264 |
|
308 | |||
265 | try: |
|
309 | try: | |
266 | r = self._call(cmd, data=fp, headers=headers, **args) |
|
310 | r = self._call(cmd, data=fp, headers=headers, **args) | |
267 | vals = r.split('\n', 1) |
|
311 | vals = r.split('\n', 1) | |
268 | if len(vals) < 2: |
|
312 | if len(vals) < 2: | |
269 | raise error.ResponseError(_("unexpected response:"), r) |
|
313 | raise error.ResponseError(_("unexpected response:"), r) | |
270 | return vals |
|
314 | return vals | |
271 | except socket.error as err: |
|
315 | except socket.error as err: | |
272 | if err.args[0] in (errno.ECONNRESET, errno.EPIPE): |
|
316 | if err.args[0] in (errno.ECONNRESET, errno.EPIPE): | |
273 | raise error.Abort(_('push failed: %s') % err.args[1]) |
|
317 | raise error.Abort(_('push failed: %s') % err.args[1]) | |
274 | raise error.Abort(err.args[1]) |
|
318 | raise error.Abort(err.args[1]) | |
275 | finally: |
|
319 | finally: | |
276 | fp.close() |
|
320 | fp.close() | |
277 | os.unlink(tempname) |
|
321 | os.unlink(tempname) | |
278 |
|
322 | |||
279 | def _calltwowaystream(self, cmd, fp, **args): |
|
323 | def _calltwowaystream(self, cmd, fp, **args): | |
280 | fh = None |
|
324 | fh = None | |
281 | fp_ = None |
|
325 | fp_ = None | |
282 | filename = None |
|
326 | filename = None | |
283 | try: |
|
327 | try: | |
284 | # dump bundle to disk |
|
328 | # dump bundle to disk | |
285 | fd, filename = tempfile.mkstemp(prefix="hg-bundle-", suffix=".hg") |
|
329 | fd, filename = tempfile.mkstemp(prefix="hg-bundle-", suffix=".hg") | |
286 | fh = os.fdopen(fd, "wb") |
|
330 | fh = os.fdopen(fd, "wb") | |
287 | d = fp.read(4096) |
|
331 | d = fp.read(4096) | |
288 | while d: |
|
332 | while d: | |
289 | fh.write(d) |
|
333 | fh.write(d) | |
290 | d = fp.read(4096) |
|
334 | d = fp.read(4096) | |
291 | fh.close() |
|
335 | fh.close() | |
292 | # start http push |
|
336 | # start http push | |
293 | fp_ = httpconnection.httpsendfile(self.ui, filename, "rb") |
|
337 | fp_ = httpconnection.httpsendfile(self.ui, filename, "rb") | |
294 | headers = {'Content-Type': 'application/mercurial-0.1'} |
|
338 | headers = {'Content-Type': 'application/mercurial-0.1'} | |
295 | return self._callstream(cmd, data=fp_, headers=headers, **args) |
|
339 | return self._callstream(cmd, data=fp_, headers=headers, **args) | |
296 | finally: |
|
340 | finally: | |
297 | if fp_ is not None: |
|
341 | if fp_ is not None: | |
298 | fp_.close() |
|
342 | fp_.close() | |
299 | if fh is not None: |
|
343 | if fh is not None: | |
300 | fh.close() |
|
344 | fh.close() | |
301 | os.unlink(filename) |
|
345 | os.unlink(filename) | |
302 |
|
346 | |||
303 | def _callcompressable(self, cmd, **args): |
|
347 | def _callcompressable(self, cmd, **args): | |
304 | return self._callstream(cmd, _compressible=True, **args) |
|
348 | return self._callstream(cmd, _compressible=True, **args) | |
305 |
|
349 | |||
306 | def _abort(self, exception): |
|
350 | def _abort(self, exception): | |
307 | raise exception |
|
351 | raise exception | |
308 |
|
352 | |||
309 | class httpspeer(httppeer): |
|
353 | class httpspeer(httppeer): | |
310 | def __init__(self, ui, path): |
|
354 | def __init__(self, ui, path): | |
311 | if not url.has_https: |
|
355 | if not url.has_https: | |
312 | raise error.Abort(_('Python support for SSL and HTTPS ' |
|
356 | raise error.Abort(_('Python support for SSL and HTTPS ' | |
313 | 'is not installed')) |
|
357 | 'is not installed')) | |
314 | httppeer.__init__(self, ui, path) |
|
358 | httppeer.__init__(self, ui, path) | |
315 |
|
359 | |||
316 | def instance(ui, path, create): |
|
360 | def instance(ui, path, create): | |
317 | if create: |
|
361 | if create: | |
318 | raise error.Abort(_('cannot create new http repository')) |
|
362 | raise error.Abort(_('cannot create new http repository')) | |
319 | try: |
|
363 | try: | |
320 | if path.startswith('https:'): |
|
364 | if path.startswith('https:'): | |
321 | inst = httpspeer(ui, path) |
|
365 | inst = httpspeer(ui, path) | |
322 | else: |
|
366 | else: | |
323 | inst = httppeer(ui, path) |
|
367 | inst = httppeer(ui, path) | |
324 | try: |
|
368 | try: | |
325 | # Try to do useful work when checking compatibility. |
|
369 | # Try to do useful work when checking compatibility. | |
326 | # Usually saves a roundtrip since we want the caps anyway. |
|
370 | # Usually saves a roundtrip since we want the caps anyway. | |
327 | inst._fetchcaps() |
|
371 | inst._fetchcaps() | |
328 | except error.RepoError: |
|
372 | except error.RepoError: | |
329 | # No luck, try older compatibility check. |
|
373 | # No luck, try older compatibility check. | |
330 | inst.between([(nullid, nullid)]) |
|
374 | inst.between([(nullid, nullid)]) | |
331 | return inst |
|
375 | return inst | |
332 | except error.RepoError as httpexception: |
|
376 | except error.RepoError as httpexception: | |
333 | try: |
|
377 | try: | |
334 | r = statichttprepo.instance(ui, "static-" + path, create) |
|
378 | r = statichttprepo.instance(ui, "static-" + path, create) | |
335 | ui.note(_('(falling back to static-http)\n')) |
|
379 | ui.note(_('(falling back to static-http)\n')) | |
336 | return r |
|
380 | return r | |
337 | except error.RepoError: |
|
381 | except error.RepoError: | |
338 | raise httpexception # use the original http RepoError instead |
|
382 | raise httpexception # use the original http RepoError instead |
@@ -1,481 +1,486 b'' | |||||
1 | # url.py - HTTP handling for mercurial |
|
1 | # url.py - HTTP handling for mercurial | |
2 | # |
|
2 | # | |
3 | # Copyright 2005, 2006, 2007, 2008 Matt Mackall <mpm@selenic.com> |
|
3 | # Copyright 2005, 2006, 2007, 2008 Matt Mackall <mpm@selenic.com> | |
4 | # Copyright 2006, 2007 Alexis S. L. Carvalho <alexis@cecm.usp.br> |
|
4 | # Copyright 2006, 2007 Alexis S. L. Carvalho <alexis@cecm.usp.br> | |
5 | # Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com> |
|
5 | # Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com> | |
6 | # |
|
6 | # | |
7 | # This software may be used and distributed according to the terms of the |
|
7 | # This software may be used and distributed according to the terms of the | |
8 | # GNU General Public License version 2 or any later version. |
|
8 | # GNU General Public License version 2 or any later version. | |
9 |
|
9 | |||
10 | from __future__ import absolute_import |
|
10 | from __future__ import absolute_import | |
11 |
|
11 | |||
12 | import base64 |
|
12 | import base64 | |
13 | import os |
|
13 | import os | |
14 | import socket |
|
14 | import socket | |
15 |
|
15 | |||
16 | from .i18n import _ |
|
16 | from .i18n import _ | |
17 | from . import ( |
|
17 | from . import ( | |
18 | error, |
|
18 | error, | |
19 | httpconnection as httpconnectionmod, |
|
19 | httpconnection as httpconnectionmod, | |
20 | keepalive, |
|
20 | keepalive, | |
21 | pycompat, |
|
21 | pycompat, | |
22 | sslutil, |
|
22 | sslutil, | |
23 | util, |
|
23 | util, | |
24 | ) |
|
24 | ) | |
25 |
|
25 | |||
26 | httplib = util.httplib |
|
26 | httplib = util.httplib | |
27 | stringio = util.stringio |
|
27 | stringio = util.stringio | |
28 | urlerr = util.urlerr |
|
28 | urlerr = util.urlerr | |
29 | urlreq = util.urlreq |
|
29 | urlreq = util.urlreq | |
30 |
|
30 | |||
31 | class passwordmgr(object): |
|
31 | class passwordmgr(object): | |
32 | def __init__(self, ui, passwddb): |
|
32 | def __init__(self, ui, passwddb): | |
33 | self.ui = ui |
|
33 | self.ui = ui | |
34 | self.passwddb = passwddb |
|
34 | self.passwddb = passwddb | |
35 |
|
35 | |||
36 | def add_password(self, realm, uri, user, passwd): |
|
36 | def add_password(self, realm, uri, user, passwd): | |
37 | return self.passwddb.add_password(realm, uri, user, passwd) |
|
37 | return self.passwddb.add_password(realm, uri, user, passwd) | |
38 |
|
38 | |||
39 | def find_user_password(self, realm, authuri): |
|
39 | def find_user_password(self, realm, authuri): | |
40 | authinfo = self.passwddb.find_user_password(realm, authuri) |
|
40 | authinfo = self.passwddb.find_user_password(realm, authuri) | |
41 | user, passwd = authinfo |
|
41 | user, passwd = authinfo | |
42 | if user and passwd: |
|
42 | if user and passwd: | |
43 | self._writedebug(user, passwd) |
|
43 | self._writedebug(user, passwd) | |
44 | return (user, passwd) |
|
44 | return (user, passwd) | |
45 |
|
45 | |||
46 | if not user or not passwd: |
|
46 | if not user or not passwd: | |
47 | res = httpconnectionmod.readauthforuri(self.ui, authuri, user) |
|
47 | res = httpconnectionmod.readauthforuri(self.ui, authuri, user) | |
48 | if res: |
|
48 | if res: | |
49 | group, auth = res |
|
49 | group, auth = res | |
50 | user, passwd = auth.get('username'), auth.get('password') |
|
50 | user, passwd = auth.get('username'), auth.get('password') | |
51 | self.ui.debug("using auth.%s.* for authentication\n" % group) |
|
51 | self.ui.debug("using auth.%s.* for authentication\n" % group) | |
52 | if not user or not passwd: |
|
52 | if not user or not passwd: | |
53 | u = util.url(authuri) |
|
53 | u = util.url(authuri) | |
54 | u.query = None |
|
54 | u.query = None | |
55 | if not self.ui.interactive(): |
|
55 | if not self.ui.interactive(): | |
56 | raise error.Abort(_('http authorization required for %s') % |
|
56 | raise error.Abort(_('http authorization required for %s') % | |
57 | util.hidepassword(str(u))) |
|
57 | util.hidepassword(str(u))) | |
58 |
|
58 | |||
59 | self.ui.write(_("http authorization required for %s\n") % |
|
59 | self.ui.write(_("http authorization required for %s\n") % | |
60 | util.hidepassword(str(u))) |
|
60 | util.hidepassword(str(u))) | |
61 | self.ui.write(_("realm: %s\n") % realm) |
|
61 | self.ui.write(_("realm: %s\n") % realm) | |
62 | if user: |
|
62 | if user: | |
63 | self.ui.write(_("user: %s\n") % user) |
|
63 | self.ui.write(_("user: %s\n") % user) | |
64 | else: |
|
64 | else: | |
65 | user = self.ui.prompt(_("user:"), default=None) |
|
65 | user = self.ui.prompt(_("user:"), default=None) | |
66 |
|
66 | |||
67 | if not passwd: |
|
67 | if not passwd: | |
68 | passwd = self.ui.getpass() |
|
68 | passwd = self.ui.getpass() | |
69 |
|
69 | |||
70 | self.passwddb.add_password(realm, authuri, user, passwd) |
|
70 | self.passwddb.add_password(realm, authuri, user, passwd) | |
71 | self._writedebug(user, passwd) |
|
71 | self._writedebug(user, passwd) | |
72 | return (user, passwd) |
|
72 | return (user, passwd) | |
73 |
|
73 | |||
74 | def _writedebug(self, user, passwd): |
|
74 | def _writedebug(self, user, passwd): | |
75 | msg = _('http auth: user %s, password %s\n') |
|
75 | msg = _('http auth: user %s, password %s\n') | |
76 | self.ui.debug(msg % (user, passwd and '*' * len(passwd) or 'not set')) |
|
76 | self.ui.debug(msg % (user, passwd and '*' * len(passwd) or 'not set')) | |
77 |
|
77 | |||
78 | def find_stored_password(self, authuri): |
|
78 | def find_stored_password(self, authuri): | |
79 | return self.passwddb.find_user_password(None, authuri) |
|
79 | return self.passwddb.find_user_password(None, authuri) | |
80 |
|
80 | |||
81 | class proxyhandler(urlreq.proxyhandler): |
|
81 | class proxyhandler(urlreq.proxyhandler): | |
82 | def __init__(self, ui): |
|
82 | def __init__(self, ui): | |
83 | proxyurl = (ui.config("http_proxy", "host") or |
|
83 | proxyurl = (ui.config("http_proxy", "host") or | |
84 | pycompat.osgetenv('http_proxy')) |
|
84 | pycompat.osgetenv('http_proxy')) | |
85 | # XXX proxyauthinfo = None |
|
85 | # XXX proxyauthinfo = None | |
86 |
|
86 | |||
87 | if proxyurl: |
|
87 | if proxyurl: | |
88 | # proxy can be proper url or host[:port] |
|
88 | # proxy can be proper url or host[:port] | |
89 | if not (proxyurl.startswith('http:') or |
|
89 | if not (proxyurl.startswith('http:') or | |
90 | proxyurl.startswith('https:')): |
|
90 | proxyurl.startswith('https:')): | |
91 | proxyurl = 'http://' + proxyurl + '/' |
|
91 | proxyurl = 'http://' + proxyurl + '/' | |
92 | proxy = util.url(proxyurl) |
|
92 | proxy = util.url(proxyurl) | |
93 | if not proxy.user: |
|
93 | if not proxy.user: | |
94 | proxy.user = ui.config("http_proxy", "user") |
|
94 | proxy.user = ui.config("http_proxy", "user") | |
95 | proxy.passwd = ui.config("http_proxy", "passwd") |
|
95 | proxy.passwd = ui.config("http_proxy", "passwd") | |
96 |
|
96 | |||
97 | # see if we should use a proxy for this url |
|
97 | # see if we should use a proxy for this url | |
98 | no_list = ["localhost", "127.0.0.1"] |
|
98 | no_list = ["localhost", "127.0.0.1"] | |
99 | no_list.extend([p.lower() for |
|
99 | no_list.extend([p.lower() for | |
100 | p in ui.configlist("http_proxy", "no")]) |
|
100 | p in ui.configlist("http_proxy", "no")]) | |
101 | no_list.extend([p.strip().lower() for |
|
101 | no_list.extend([p.strip().lower() for | |
102 | p in pycompat.osgetenv("no_proxy", '').split(',') |
|
102 | p in pycompat.osgetenv("no_proxy", '').split(',') | |
103 | if p.strip()]) |
|
103 | if p.strip()]) | |
104 | # "http_proxy.always" config is for running tests on localhost |
|
104 | # "http_proxy.always" config is for running tests on localhost | |
105 | if ui.configbool("http_proxy", "always"): |
|
105 | if ui.configbool("http_proxy", "always"): | |
106 | self.no_list = [] |
|
106 | self.no_list = [] | |
107 | else: |
|
107 | else: | |
108 | self.no_list = no_list |
|
108 | self.no_list = no_list | |
109 |
|
109 | |||
110 | proxyurl = str(proxy) |
|
110 | proxyurl = str(proxy) | |
111 | proxies = {'http': proxyurl, 'https': proxyurl} |
|
111 | proxies = {'http': proxyurl, 'https': proxyurl} | |
112 | ui.debug('proxying through http://%s:%s\n' % |
|
112 | ui.debug('proxying through http://%s:%s\n' % | |
113 | (proxy.host, proxy.port)) |
|
113 | (proxy.host, proxy.port)) | |
114 | else: |
|
114 | else: | |
115 | proxies = {} |
|
115 | proxies = {} | |
116 |
|
116 | |||
117 | urlreq.proxyhandler.__init__(self, proxies) |
|
117 | urlreq.proxyhandler.__init__(self, proxies) | |
118 | self.ui = ui |
|
118 | self.ui = ui | |
119 |
|
119 | |||
120 | def proxy_open(self, req, proxy, type_): |
|
120 | def proxy_open(self, req, proxy, type_): | |
121 | host = req.get_host().split(':')[0] |
|
121 | host = req.get_host().split(':')[0] | |
122 | for e in self.no_list: |
|
122 | for e in self.no_list: | |
123 | if host == e: |
|
123 | if host == e: | |
124 | return None |
|
124 | return None | |
125 | if e.startswith('*.') and host.endswith(e[2:]): |
|
125 | if e.startswith('*.') and host.endswith(e[2:]): | |
126 | return None |
|
126 | return None | |
127 | if e.startswith('.') and host.endswith(e[1:]): |
|
127 | if e.startswith('.') and host.endswith(e[1:]): | |
128 | return None |
|
128 | return None | |
129 |
|
129 | |||
130 | return urlreq.proxyhandler.proxy_open(self, req, proxy, type_) |
|
130 | return urlreq.proxyhandler.proxy_open(self, req, proxy, type_) | |
131 |
|
131 | |||
132 | def _gen_sendfile(orgsend): |
|
132 | def _gen_sendfile(orgsend): | |
133 | def _sendfile(self, data): |
|
133 | def _sendfile(self, data): | |
134 | # send a file |
|
134 | # send a file | |
135 | if isinstance(data, httpconnectionmod.httpsendfile): |
|
135 | if isinstance(data, httpconnectionmod.httpsendfile): | |
136 | # if auth required, some data sent twice, so rewind here |
|
136 | # if auth required, some data sent twice, so rewind here | |
137 | data.seek(0) |
|
137 | data.seek(0) | |
138 | for chunk in util.filechunkiter(data): |
|
138 | for chunk in util.filechunkiter(data): | |
139 | orgsend(self, chunk) |
|
139 | orgsend(self, chunk) | |
140 | else: |
|
140 | else: | |
141 | orgsend(self, data) |
|
141 | orgsend(self, data) | |
142 | return _sendfile |
|
142 | return _sendfile | |
143 |
|
143 | |||
144 | has_https = util.safehasattr(urlreq, 'httpshandler') |
|
144 | has_https = util.safehasattr(urlreq, 'httpshandler') | |
145 |
|
145 | |||
146 | class httpconnection(keepalive.HTTPConnection): |
|
146 | class httpconnection(keepalive.HTTPConnection): | |
147 | # must be able to send big bundle as stream. |
|
147 | # must be able to send big bundle as stream. | |
148 | send = _gen_sendfile(keepalive.HTTPConnection.send) |
|
148 | send = _gen_sendfile(keepalive.HTTPConnection.send) | |
149 |
|
149 | |||
150 | def getresponse(self): |
|
150 | def getresponse(self): | |
151 | proxyres = getattr(self, 'proxyres', None) |
|
151 | proxyres = getattr(self, 'proxyres', None) | |
152 | if proxyres: |
|
152 | if proxyres: | |
153 | if proxyres.will_close: |
|
153 | if proxyres.will_close: | |
154 | self.close() |
|
154 | self.close() | |
155 | self.proxyres = None |
|
155 | self.proxyres = None | |
156 | return proxyres |
|
156 | return proxyres | |
157 | return keepalive.HTTPConnection.getresponse(self) |
|
157 | return keepalive.HTTPConnection.getresponse(self) | |
158 |
|
158 | |||
159 | # general transaction handler to support different ways to handle |
|
159 | # general transaction handler to support different ways to handle | |
160 | # HTTPS proxying before and after Python 2.6.3. |
|
160 | # HTTPS proxying before and after Python 2.6.3. | |
161 | def _generic_start_transaction(handler, h, req): |
|
161 | def _generic_start_transaction(handler, h, req): | |
162 | tunnel_host = getattr(req, '_tunnel_host', None) |
|
162 | tunnel_host = getattr(req, '_tunnel_host', None) | |
163 | if tunnel_host: |
|
163 | if tunnel_host: | |
164 | if tunnel_host[:7] not in ['http://', 'https:/']: |
|
164 | if tunnel_host[:7] not in ['http://', 'https:/']: | |
165 | tunnel_host = 'https://' + tunnel_host |
|
165 | tunnel_host = 'https://' + tunnel_host | |
166 | new_tunnel = True |
|
166 | new_tunnel = True | |
167 | else: |
|
167 | else: | |
168 | tunnel_host = req.get_selector() |
|
168 | tunnel_host = req.get_selector() | |
169 | new_tunnel = False |
|
169 | new_tunnel = False | |
170 |
|
170 | |||
171 | if new_tunnel or tunnel_host == req.get_full_url(): # has proxy |
|
171 | if new_tunnel or tunnel_host == req.get_full_url(): # has proxy | |
172 | u = util.url(tunnel_host) |
|
172 | u = util.url(tunnel_host) | |
173 | if new_tunnel or u.scheme == 'https': # only use CONNECT for HTTPS |
|
173 | if new_tunnel or u.scheme == 'https': # only use CONNECT for HTTPS | |
174 | h.realhostport = ':'.join([u.host, (u.port or '443')]) |
|
174 | h.realhostport = ':'.join([u.host, (u.port or '443')]) | |
175 | h.headers = req.headers.copy() |
|
175 | h.headers = req.headers.copy() | |
176 | h.headers.update(handler.parent.addheaders) |
|
176 | h.headers.update(handler.parent.addheaders) | |
177 | return |
|
177 | return | |
178 |
|
178 | |||
179 | h.realhostport = None |
|
179 | h.realhostport = None | |
180 | h.headers = None |
|
180 | h.headers = None | |
181 |
|
181 | |||
182 | def _generic_proxytunnel(self): |
|
182 | def _generic_proxytunnel(self): | |
183 | proxyheaders = dict( |
|
183 | proxyheaders = dict( | |
184 | [(x, self.headers[x]) for x in self.headers |
|
184 | [(x, self.headers[x]) for x in self.headers | |
185 | if x.lower().startswith('proxy-')]) |
|
185 | if x.lower().startswith('proxy-')]) | |
186 | self.send('CONNECT %s HTTP/1.0\r\n' % self.realhostport) |
|
186 | self.send('CONNECT %s HTTP/1.0\r\n' % self.realhostport) | |
187 | for header in proxyheaders.iteritems(): |
|
187 | for header in proxyheaders.iteritems(): | |
188 | self.send('%s: %s\r\n' % header) |
|
188 | self.send('%s: %s\r\n' % header) | |
189 | self.send('\r\n') |
|
189 | self.send('\r\n') | |
190 |
|
190 | |||
191 | # majority of the following code is duplicated from |
|
191 | # majority of the following code is duplicated from | |
192 | # httplib.HTTPConnection as there are no adequate places to |
|
192 | # httplib.HTTPConnection as there are no adequate places to | |
193 | # override functions to provide the needed functionality |
|
193 | # override functions to provide the needed functionality | |
194 | res = self.response_class(self.sock, |
|
194 | res = self.response_class(self.sock, | |
195 | strict=self.strict, |
|
195 | strict=self.strict, | |
196 | method=self._method) |
|
196 | method=self._method) | |
197 |
|
197 | |||
198 | while True: |
|
198 | while True: | |
199 | version, status, reason = res._read_status() |
|
199 | version, status, reason = res._read_status() | |
200 | if status != httplib.CONTINUE: |
|
200 | if status != httplib.CONTINUE: | |
201 | break |
|
201 | break | |
202 | # skip lines that are all whitespace |
|
202 | # skip lines that are all whitespace | |
203 | list(iter(lambda: res.fp.readline().strip(), '')) |
|
203 | list(iter(lambda: res.fp.readline().strip(), '')) | |
204 | res.status = status |
|
204 | res.status = status | |
205 | res.reason = reason.strip() |
|
205 | res.reason = reason.strip() | |
206 |
|
206 | |||
207 | if res.status == 200: |
|
207 | if res.status == 200: | |
208 | # skip lines until we find a blank line |
|
208 | # skip lines until we find a blank line | |
209 | list(iter(res.fp.readline, '\r\n')) |
|
209 | list(iter(res.fp.readline, '\r\n')) | |
210 | return True |
|
210 | return True | |
211 |
|
211 | |||
212 | if version == 'HTTP/1.0': |
|
212 | if version == 'HTTP/1.0': | |
213 | res.version = 10 |
|
213 | res.version = 10 | |
214 | elif version.startswith('HTTP/1.'): |
|
214 | elif version.startswith('HTTP/1.'): | |
215 | res.version = 11 |
|
215 | res.version = 11 | |
216 | elif version == 'HTTP/0.9': |
|
216 | elif version == 'HTTP/0.9': | |
217 | res.version = 9 |
|
217 | res.version = 9 | |
218 | else: |
|
218 | else: | |
219 | raise httplib.UnknownProtocol(version) |
|
219 | raise httplib.UnknownProtocol(version) | |
220 |
|
220 | |||
221 | if res.version == 9: |
|
221 | if res.version == 9: | |
222 | res.length = None |
|
222 | res.length = None | |
223 | res.chunked = 0 |
|
223 | res.chunked = 0 | |
224 | res.will_close = 1 |
|
224 | res.will_close = 1 | |
225 | res.msg = httplib.HTTPMessage(stringio()) |
|
225 | res.msg = httplib.HTTPMessage(stringio()) | |
226 | return False |
|
226 | return False | |
227 |
|
227 | |||
228 | res.msg = httplib.HTTPMessage(res.fp) |
|
228 | res.msg = httplib.HTTPMessage(res.fp) | |
229 | res.msg.fp = None |
|
229 | res.msg.fp = None | |
230 |
|
230 | |||
231 | # are we using the chunked-style of transfer encoding? |
|
231 | # are we using the chunked-style of transfer encoding? | |
232 | trenc = res.msg.getheader('transfer-encoding') |
|
232 | trenc = res.msg.getheader('transfer-encoding') | |
233 | if trenc and trenc.lower() == "chunked": |
|
233 | if trenc and trenc.lower() == "chunked": | |
234 | res.chunked = 1 |
|
234 | res.chunked = 1 | |
235 | res.chunk_left = None |
|
235 | res.chunk_left = None | |
236 | else: |
|
236 | else: | |
237 | res.chunked = 0 |
|
237 | res.chunked = 0 | |
238 |
|
238 | |||
239 | # will the connection close at the end of the response? |
|
239 | # will the connection close at the end of the response? | |
240 | res.will_close = res._check_close() |
|
240 | res.will_close = res._check_close() | |
241 |
|
241 | |||
242 | # do we have a Content-Length? |
|
242 | # do we have a Content-Length? | |
243 | # NOTE: RFC 2616, section 4.4, #3 says we ignore this if |
|
243 | # NOTE: RFC 2616, section 4.4, #3 says we ignore this if | |
244 | # transfer-encoding is "chunked" |
|
244 | # transfer-encoding is "chunked" | |
245 | length = res.msg.getheader('content-length') |
|
245 | length = res.msg.getheader('content-length') | |
246 | if length and not res.chunked: |
|
246 | if length and not res.chunked: | |
247 | try: |
|
247 | try: | |
248 | res.length = int(length) |
|
248 | res.length = int(length) | |
249 | except ValueError: |
|
249 | except ValueError: | |
250 | res.length = None |
|
250 | res.length = None | |
251 | else: |
|
251 | else: | |
252 | if res.length < 0: # ignore nonsensical negative lengths |
|
252 | if res.length < 0: # ignore nonsensical negative lengths | |
253 | res.length = None |
|
253 | res.length = None | |
254 | else: |
|
254 | else: | |
255 | res.length = None |
|
255 | res.length = None | |
256 |
|
256 | |||
257 | # does the body have a fixed length? (of zero) |
|
257 | # does the body have a fixed length? (of zero) | |
258 | if (status == httplib.NO_CONTENT or status == httplib.NOT_MODIFIED or |
|
258 | if (status == httplib.NO_CONTENT or status == httplib.NOT_MODIFIED or | |
259 | 100 <= status < 200 or # 1xx codes |
|
259 | 100 <= status < 200 or # 1xx codes | |
260 | res._method == 'HEAD'): |
|
260 | res._method == 'HEAD'): | |
261 | res.length = 0 |
|
261 | res.length = 0 | |
262 |
|
262 | |||
263 | # if the connection remains open, and we aren't using chunked, and |
|
263 | # if the connection remains open, and we aren't using chunked, and | |
264 | # a content-length was not provided, then assume that the connection |
|
264 | # a content-length was not provided, then assume that the connection | |
265 | # WILL close. |
|
265 | # WILL close. | |
266 | if (not res.will_close and |
|
266 | if (not res.will_close and | |
267 | not res.chunked and |
|
267 | not res.chunked and | |
268 | res.length is None): |
|
268 | res.length is None): | |
269 | res.will_close = 1 |
|
269 | res.will_close = 1 | |
270 |
|
270 | |||
271 | self.proxyres = res |
|
271 | self.proxyres = res | |
272 |
|
272 | |||
273 | return False |
|
273 | return False | |
274 |
|
274 | |||
275 | class httphandler(keepalive.HTTPHandler): |
|
275 | class httphandler(keepalive.HTTPHandler): | |
276 | def http_open(self, req): |
|
276 | def http_open(self, req): | |
277 | return self.do_open(httpconnection, req) |
|
277 | return self.do_open(httpconnection, req) | |
278 |
|
278 | |||
279 | def _start_transaction(self, h, req): |
|
279 | def _start_transaction(self, h, req): | |
280 | _generic_start_transaction(self, h, req) |
|
280 | _generic_start_transaction(self, h, req) | |
281 | return keepalive.HTTPHandler._start_transaction(self, h, req) |
|
281 | return keepalive.HTTPHandler._start_transaction(self, h, req) | |
282 |
|
282 | |||
283 | if has_https: |
|
283 | if has_https: | |
284 | class httpsconnection(httplib.HTTPConnection): |
|
284 | class httpsconnection(httplib.HTTPConnection): | |
285 | response_class = keepalive.HTTPResponse |
|
285 | response_class = keepalive.HTTPResponse | |
286 | default_port = httplib.HTTPS_PORT |
|
286 | default_port = httplib.HTTPS_PORT | |
287 | # must be able to send big bundle as stream. |
|
287 | # must be able to send big bundle as stream. | |
288 | send = _gen_sendfile(keepalive.safesend) |
|
288 | send = _gen_sendfile(keepalive.safesend) | |
289 | getresponse = keepalive.wrapgetresponse(httplib.HTTPConnection) |
|
289 | getresponse = keepalive.wrapgetresponse(httplib.HTTPConnection) | |
290 |
|
290 | |||
291 | def __init__(self, host, port=None, key_file=None, cert_file=None, |
|
291 | def __init__(self, host, port=None, key_file=None, cert_file=None, | |
292 | *args, **kwargs): |
|
292 | *args, **kwargs): | |
293 | httplib.HTTPConnection.__init__(self, host, port, *args, **kwargs) |
|
293 | httplib.HTTPConnection.__init__(self, host, port, *args, **kwargs) | |
294 | self.key_file = key_file |
|
294 | self.key_file = key_file | |
295 | self.cert_file = cert_file |
|
295 | self.cert_file = cert_file | |
296 |
|
296 | |||
297 | def connect(self): |
|
297 | def connect(self): | |
298 | self.sock = socket.create_connection((self.host, self.port)) |
|
298 | self.sock = socket.create_connection((self.host, self.port)) | |
299 |
|
299 | |||
300 | host = self.host |
|
300 | host = self.host | |
301 | if self.realhostport: # use CONNECT proxy |
|
301 | if self.realhostport: # use CONNECT proxy | |
302 | _generic_proxytunnel(self) |
|
302 | _generic_proxytunnel(self) | |
303 | host = self.realhostport.rsplit(':', 1)[0] |
|
303 | host = self.realhostport.rsplit(':', 1)[0] | |
304 | self.sock = sslutil.wrapsocket( |
|
304 | self.sock = sslutil.wrapsocket( | |
305 | self.sock, self.key_file, self.cert_file, ui=self.ui, |
|
305 | self.sock, self.key_file, self.cert_file, ui=self.ui, | |
306 | serverhostname=host) |
|
306 | serverhostname=host) | |
307 | sslutil.validatesocket(self.sock) |
|
307 | sslutil.validatesocket(self.sock) | |
308 |
|
308 | |||
309 | class httpshandler(keepalive.KeepAliveHandler, urlreq.httpshandler): |
|
309 | class httpshandler(keepalive.KeepAliveHandler, urlreq.httpshandler): | |
310 | def __init__(self, ui): |
|
310 | def __init__(self, ui): | |
311 | keepalive.KeepAliveHandler.__init__(self) |
|
311 | keepalive.KeepAliveHandler.__init__(self) | |
312 | urlreq.httpshandler.__init__(self) |
|
312 | urlreq.httpshandler.__init__(self) | |
313 | self.ui = ui |
|
313 | self.ui = ui | |
314 | self.pwmgr = passwordmgr(self.ui, |
|
314 | self.pwmgr = passwordmgr(self.ui, | |
315 | self.ui.httppasswordmgrdb) |
|
315 | self.ui.httppasswordmgrdb) | |
316 |
|
316 | |||
317 | def _start_transaction(self, h, req): |
|
317 | def _start_transaction(self, h, req): | |
318 | _generic_start_transaction(self, h, req) |
|
318 | _generic_start_transaction(self, h, req) | |
319 | return keepalive.KeepAliveHandler._start_transaction(self, h, req) |
|
319 | return keepalive.KeepAliveHandler._start_transaction(self, h, req) | |
320 |
|
320 | |||
321 | def https_open(self, req): |
|
321 | def https_open(self, req): | |
322 | # req.get_full_url() does not contain credentials and we may |
|
322 | # req.get_full_url() does not contain credentials and we may | |
323 | # need them to match the certificates. |
|
323 | # need them to match the certificates. | |
324 | url = req.get_full_url() |
|
324 | url = req.get_full_url() | |
325 | user, password = self.pwmgr.find_stored_password(url) |
|
325 | user, password = self.pwmgr.find_stored_password(url) | |
326 | res = httpconnectionmod.readauthforuri(self.ui, url, user) |
|
326 | res = httpconnectionmod.readauthforuri(self.ui, url, user) | |
327 | if res: |
|
327 | if res: | |
328 | group, auth = res |
|
328 | group, auth = res | |
329 | self.auth = auth |
|
329 | self.auth = auth | |
330 | self.ui.debug("using auth.%s.* for authentication\n" % group) |
|
330 | self.ui.debug("using auth.%s.* for authentication\n" % group) | |
331 | else: |
|
331 | else: | |
332 | self.auth = None |
|
332 | self.auth = None | |
333 | return self.do_open(self._makeconnection, req) |
|
333 | return self.do_open(self._makeconnection, req) | |
334 |
|
334 | |||
335 | def _makeconnection(self, host, port=None, *args, **kwargs): |
|
335 | def _makeconnection(self, host, port=None, *args, **kwargs): | |
336 | keyfile = None |
|
336 | keyfile = None | |
337 | certfile = None |
|
337 | certfile = None | |
338 |
|
338 | |||
339 | if len(args) >= 1: # key_file |
|
339 | if len(args) >= 1: # key_file | |
340 | keyfile = args[0] |
|
340 | keyfile = args[0] | |
341 | if len(args) >= 2: # cert_file |
|
341 | if len(args) >= 2: # cert_file | |
342 | certfile = args[1] |
|
342 | certfile = args[1] | |
343 | args = args[2:] |
|
343 | args = args[2:] | |
344 |
|
344 | |||
345 | # if the user has specified different key/cert files in |
|
345 | # if the user has specified different key/cert files in | |
346 | # hgrc, we prefer these |
|
346 | # hgrc, we prefer these | |
347 | if self.auth and 'key' in self.auth and 'cert' in self.auth: |
|
347 | if self.auth and 'key' in self.auth and 'cert' in self.auth: | |
348 | keyfile = self.auth['key'] |
|
348 | keyfile = self.auth['key'] | |
349 | certfile = self.auth['cert'] |
|
349 | certfile = self.auth['cert'] | |
350 |
|
350 | |||
351 | conn = httpsconnection(host, port, keyfile, certfile, *args, |
|
351 | conn = httpsconnection(host, port, keyfile, certfile, *args, | |
352 | **kwargs) |
|
352 | **kwargs) | |
353 | conn.ui = self.ui |
|
353 | conn.ui = self.ui | |
354 | return conn |
|
354 | return conn | |
355 |
|
355 | |||
356 | class httpdigestauthhandler(urlreq.httpdigestauthhandler): |
|
356 | class httpdigestauthhandler(urlreq.httpdigestauthhandler): | |
357 | def __init__(self, *args, **kwargs): |
|
357 | def __init__(self, *args, **kwargs): | |
358 | urlreq.httpdigestauthhandler.__init__(self, *args, **kwargs) |
|
358 | urlreq.httpdigestauthhandler.__init__(self, *args, **kwargs) | |
359 | self.retried_req = None |
|
359 | self.retried_req = None | |
360 |
|
360 | |||
361 | def reset_retry_count(self): |
|
361 | def reset_retry_count(self): | |
362 | # Python 2.6.5 will call this on 401 or 407 errors and thus loop |
|
362 | # Python 2.6.5 will call this on 401 or 407 errors and thus loop | |
363 | # forever. We disable reset_retry_count completely and reset in |
|
363 | # forever. We disable reset_retry_count completely and reset in | |
364 | # http_error_auth_reqed instead. |
|
364 | # http_error_auth_reqed instead. | |
365 | pass |
|
365 | pass | |
366 |
|
366 | |||
367 | def http_error_auth_reqed(self, auth_header, host, req, headers): |
|
367 | def http_error_auth_reqed(self, auth_header, host, req, headers): | |
368 | # Reset the retry counter once for each request. |
|
368 | # Reset the retry counter once for each request. | |
369 | if req is not self.retried_req: |
|
369 | if req is not self.retried_req: | |
370 | self.retried_req = req |
|
370 | self.retried_req = req | |
371 | self.retried = 0 |
|
371 | self.retried = 0 | |
372 | return urlreq.httpdigestauthhandler.http_error_auth_reqed( |
|
372 | return urlreq.httpdigestauthhandler.http_error_auth_reqed( | |
373 | self, auth_header, host, req, headers) |
|
373 | self, auth_header, host, req, headers) | |
374 |
|
374 | |||
375 | class httpbasicauthhandler(urlreq.httpbasicauthhandler): |
|
375 | class httpbasicauthhandler(urlreq.httpbasicauthhandler): | |
376 | def __init__(self, *args, **kwargs): |
|
376 | def __init__(self, *args, **kwargs): | |
377 | self.auth = None |
|
377 | self.auth = None | |
378 | urlreq.httpbasicauthhandler.__init__(self, *args, **kwargs) |
|
378 | urlreq.httpbasicauthhandler.__init__(self, *args, **kwargs) | |
379 | self.retried_req = None |
|
379 | self.retried_req = None | |
380 |
|
380 | |||
381 | def http_request(self, request): |
|
381 | def http_request(self, request): | |
382 | if self.auth: |
|
382 | if self.auth: | |
383 | request.add_unredirected_header(self.auth_header, self.auth) |
|
383 | request.add_unredirected_header(self.auth_header, self.auth) | |
384 |
|
384 | |||
385 | return request |
|
385 | return request | |
386 |
|
386 | |||
387 | def https_request(self, request): |
|
387 | def https_request(self, request): | |
388 | if self.auth: |
|
388 | if self.auth: | |
389 | request.add_unredirected_header(self.auth_header, self.auth) |
|
389 | request.add_unredirected_header(self.auth_header, self.auth) | |
390 |
|
390 | |||
391 | return request |
|
391 | return request | |
392 |
|
392 | |||
393 | def reset_retry_count(self): |
|
393 | def reset_retry_count(self): | |
394 | # Python 2.6.5 will call this on 401 or 407 errors and thus loop |
|
394 | # Python 2.6.5 will call this on 401 or 407 errors and thus loop | |
395 | # forever. We disable reset_retry_count completely and reset in |
|
395 | # forever. We disable reset_retry_count completely and reset in | |
396 | # http_error_auth_reqed instead. |
|
396 | # http_error_auth_reqed instead. | |
397 | pass |
|
397 | pass | |
398 |
|
398 | |||
399 | def http_error_auth_reqed(self, auth_header, host, req, headers): |
|
399 | def http_error_auth_reqed(self, auth_header, host, req, headers): | |
400 | # Reset the retry counter once for each request. |
|
400 | # Reset the retry counter once for each request. | |
401 | if req is not self.retried_req: |
|
401 | if req is not self.retried_req: | |
402 | self.retried_req = req |
|
402 | self.retried_req = req | |
403 | self.retried = 0 |
|
403 | self.retried = 0 | |
404 | return urlreq.httpbasicauthhandler.http_error_auth_reqed( |
|
404 | return urlreq.httpbasicauthhandler.http_error_auth_reqed( | |
405 | self, auth_header, host, req, headers) |
|
405 | self, auth_header, host, req, headers) | |
406 |
|
406 | |||
407 | def retry_http_basic_auth(self, host, req, realm): |
|
407 | def retry_http_basic_auth(self, host, req, realm): | |
408 | user, pw = self.passwd.find_user_password(realm, req.get_full_url()) |
|
408 | user, pw = self.passwd.find_user_password(realm, req.get_full_url()) | |
409 | if pw is not None: |
|
409 | if pw is not None: | |
410 | raw = "%s:%s" % (user, pw) |
|
410 | raw = "%s:%s" % (user, pw) | |
411 | auth = 'Basic %s' % base64.b64encode(raw).strip() |
|
411 | auth = 'Basic %s' % base64.b64encode(raw).strip() | |
412 | if req.get_header(self.auth_header, None) == auth: |
|
412 | if req.get_header(self.auth_header, None) == auth: | |
413 | return None |
|
413 | return None | |
414 | self.auth = auth |
|
414 | self.auth = auth | |
415 | req.add_unredirected_header(self.auth_header, auth) |
|
415 | req.add_unredirected_header(self.auth_header, auth) | |
416 | return self.parent.open(req) |
|
416 | return self.parent.open(req) | |
417 | else: |
|
417 | else: | |
418 | return None |
|
418 | return None | |
419 |
|
419 | |||
420 | handlerfuncs = [] |
|
420 | handlerfuncs = [] | |
421 |
|
421 | |||
422 | def opener(ui, authinfo=None): |
|
422 | def opener(ui, authinfo=None): | |
423 | ''' |
|
423 | ''' | |
424 | construct an opener suitable for urllib2 |
|
424 | construct an opener suitable for urllib2 | |
425 | authinfo will be added to the password manager |
|
425 | authinfo will be added to the password manager | |
426 | ''' |
|
426 | ''' | |
427 | # experimental config: ui.usehttp2 |
|
427 | # experimental config: ui.usehttp2 | |
428 | if ui.configbool('ui', 'usehttp2', False): |
|
428 | if ui.configbool('ui', 'usehttp2', False): | |
429 | handlers = [ |
|
429 | handlers = [ | |
430 | httpconnectionmod.http2handler( |
|
430 | httpconnectionmod.http2handler( | |
431 | ui, |
|
431 | ui, | |
432 | passwordmgr(ui, ui.httppasswordmgrdb)) |
|
432 | passwordmgr(ui, ui.httppasswordmgrdb)) | |
433 | ] |
|
433 | ] | |
434 | else: |
|
434 | else: | |
435 | handlers = [httphandler()] |
|
435 | handlers = [httphandler()] | |
436 | if has_https: |
|
436 | if has_https: | |
437 | handlers.append(httpshandler(ui)) |
|
437 | handlers.append(httpshandler(ui)) | |
438 |
|
438 | |||
439 | handlers.append(proxyhandler(ui)) |
|
439 | handlers.append(proxyhandler(ui)) | |
440 |
|
440 | |||
441 | passmgr = passwordmgr(ui, ui.httppasswordmgrdb) |
|
441 | passmgr = passwordmgr(ui, ui.httppasswordmgrdb) | |
442 | if authinfo is not None: |
|
442 | if authinfo is not None: | |
443 | realm, uris, user, passwd = authinfo |
|
443 | realm, uris, user, passwd = authinfo | |
444 | saveduser, savedpass = passmgr.find_stored_password(uris[0]) |
|
444 | saveduser, savedpass = passmgr.find_stored_password(uris[0]) | |
445 | if user != saveduser or passwd: |
|
445 | if user != saveduser or passwd: | |
446 | passmgr.add_password(realm, uris, user, passwd) |
|
446 | passmgr.add_password(realm, uris, user, passwd) | |
447 | ui.debug('http auth: user %s, password %s\n' % |
|
447 | ui.debug('http auth: user %s, password %s\n' % | |
448 | (user, passwd and '*' * len(passwd) or 'not set')) |
|
448 | (user, passwd and '*' * len(passwd) or 'not set')) | |
449 |
|
449 | |||
450 | handlers.extend((httpbasicauthhandler(passmgr), |
|
450 | handlers.extend((httpbasicauthhandler(passmgr), | |
451 | httpdigestauthhandler(passmgr))) |
|
451 | httpdigestauthhandler(passmgr))) | |
452 | handlers.extend([h(ui, passmgr) for h in handlerfuncs]) |
|
452 | handlers.extend([h(ui, passmgr) for h in handlerfuncs]) | |
453 | opener = urlreq.buildopener(*handlers) |
|
453 | opener = urlreq.buildopener(*handlers) | |
454 |
|
454 | |||
455 | # The user agent should should *NOT* be used by servers for e.g. |
|
455 | # The user agent should should *NOT* be used by servers for e.g. | |
456 | # protocol detection or feature negotiation: there are other |
|
456 | # protocol detection or feature negotiation: there are other | |
457 | # facilities for that. |
|
457 | # facilities for that. | |
458 | # |
|
458 | # | |
459 | # "mercurial/proto-1.0" was the original user agent string and |
|
459 | # "mercurial/proto-1.0" was the original user agent string and | |
460 | # exists for backwards compatibility reasons. |
|
460 | # exists for backwards compatibility reasons. | |
461 | # |
|
461 | # | |
462 | # The "(Mercurial %s)" string contains the distribution |
|
462 | # The "(Mercurial %s)" string contains the distribution | |
463 | # name and version. Other client implementations should choose their |
|
463 | # name and version. Other client implementations should choose their | |
464 | # own distribution name. Since servers should not be using the user |
|
464 | # own distribution name. Since servers should not be using the user | |
465 | # agent string for anything, clients should be able to define whatever |
|
465 | # agent string for anything, clients should be able to define whatever | |
466 | # user agent they deem appropriate. |
|
466 | # user agent they deem appropriate. | |
467 | agent = 'mercurial/proto-1.0 (Mercurial %s)' % util.version() |
|
467 | agent = 'mercurial/proto-1.0 (Mercurial %s)' % util.version() | |
468 | opener.addheaders = [('User-agent', agent)] |
|
468 | opener.addheaders = [('User-agent', agent)] | |
|
469 | ||||
|
470 | # This header should only be needed by wire protocol requests. But it has | |||
|
471 | # been sent on all requests since forever. We keep sending it for backwards | |||
|
472 | # compatibility reasons. Modern versions of the wire protocol use | |||
|
473 | # X-HgProto-<N> for advertising client support. | |||
469 | opener.addheaders.append(('Accept', 'application/mercurial-0.1')) |
|
474 | opener.addheaders.append(('Accept', 'application/mercurial-0.1')) | |
470 | return opener |
|
475 | return opener | |
471 |
|
476 | |||
472 | def open(ui, url_, data=None): |
|
477 | def open(ui, url_, data=None): | |
473 | u = util.url(url_) |
|
478 | u = util.url(url_) | |
474 | if u.scheme: |
|
479 | if u.scheme: | |
475 | u.scheme = u.scheme.lower() |
|
480 | u.scheme = u.scheme.lower() | |
476 | url_, authinfo = u.authinfo() |
|
481 | url_, authinfo = u.authinfo() | |
477 | else: |
|
482 | else: | |
478 | path = util.normpath(os.path.abspath(url_)) |
|
483 | path = util.normpath(os.path.abspath(url_)) | |
479 | url_ = 'file://' + urlreq.pathname2url(path) |
|
484 | url_ = 'file://' + urlreq.pathname2url(path) | |
480 | authinfo = None |
|
485 | authinfo = None | |
481 | return opener(ui, authinfo).open(url_, data) |
|
486 | return opener(ui, authinfo).open(url_, data) |
@@ -1,432 +1,432 b'' | |||||
1 | Set up a server |
|
1 | Set up a server | |
2 |
|
2 | |||
3 | $ cat >> $HGRCPATH << EOF |
|
3 | $ cat >> $HGRCPATH << EOF | |
4 | > [format] |
|
4 | > [format] | |
5 | > usegeneraldelta=yes |
|
5 | > usegeneraldelta=yes | |
6 | > EOF |
|
6 | > EOF | |
7 | $ hg init server |
|
7 | $ hg init server | |
8 | $ cd server |
|
8 | $ cd server | |
9 | $ cat >> .hg/hgrc << EOF |
|
9 | $ cat >> .hg/hgrc << EOF | |
10 | > [extensions] |
|
10 | > [extensions] | |
11 | > clonebundles = |
|
11 | > clonebundles = | |
12 | > EOF |
|
12 | > EOF | |
13 |
|
13 | |||
14 | $ touch foo |
|
14 | $ touch foo | |
15 | $ hg -q commit -A -m 'add foo' |
|
15 | $ hg -q commit -A -m 'add foo' | |
16 | $ touch bar |
|
16 | $ touch bar | |
17 | $ hg -q commit -A -m 'add bar' |
|
17 | $ hg -q commit -A -m 'add bar' | |
18 |
|
18 | |||
19 | $ hg serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log |
|
19 | $ hg serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log | |
20 | $ cat hg.pid >> $DAEMON_PIDS |
|
20 | $ cat hg.pid >> $DAEMON_PIDS | |
21 | $ cd .. |
|
21 | $ cd .. | |
22 |
|
22 | |||
23 | Missing manifest should not result in server lookup |
|
23 | Missing manifest should not result in server lookup | |
24 |
|
24 | |||
25 | $ hg --verbose clone -U http://localhost:$HGPORT no-manifest |
|
25 | $ hg --verbose clone -U http://localhost:$HGPORT no-manifest | |
26 | requesting all changes |
|
26 | requesting all changes | |
27 | adding changesets |
|
27 | adding changesets | |
28 | adding manifests |
|
28 | adding manifests | |
29 | adding file changes |
|
29 | adding file changes | |
30 | added 2 changesets with 2 changes to 2 files |
|
30 | added 2 changesets with 2 changes to 2 files | |
31 |
|
31 | |||
32 | $ cat server/access.log |
|
32 | $ cat server/access.log | |
33 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
33 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
34 | * - - [*] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob) |
|
34 | * - - [*] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
35 | * - - [*] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=aaff8d2ffbbf07a46dd1f05d8ae7877e3f56e2a2&listkeys=phases%2Cbookmarks (glob) |
|
35 | * - - [*] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=aaff8d2ffbbf07a46dd1f05d8ae7877e3f56e2a2&listkeys=phases%2Cbookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
36 |
|
36 | |||
37 | Empty manifest file results in retrieval |
|
37 | Empty manifest file results in retrieval | |
38 | (the extension only checks if the manifest file exists) |
|
38 | (the extension only checks if the manifest file exists) | |
39 |
|
39 | |||
40 | $ touch server/.hg/clonebundles.manifest |
|
40 | $ touch server/.hg/clonebundles.manifest | |
41 | $ hg --verbose clone -U http://localhost:$HGPORT empty-manifest |
|
41 | $ hg --verbose clone -U http://localhost:$HGPORT empty-manifest | |
42 | no clone bundles available on remote; falling back to regular clone |
|
42 | no clone bundles available on remote; falling back to regular clone | |
43 | requesting all changes |
|
43 | requesting all changes | |
44 | adding changesets |
|
44 | adding changesets | |
45 | adding manifests |
|
45 | adding manifests | |
46 | adding file changes |
|
46 | adding file changes | |
47 | added 2 changesets with 2 changes to 2 files |
|
47 | added 2 changesets with 2 changes to 2 files | |
48 |
|
48 | |||
49 | Manifest file with invalid URL aborts |
|
49 | Manifest file with invalid URL aborts | |
50 |
|
50 | |||
51 | $ echo 'http://does.not.exist/bundle.hg' > server/.hg/clonebundles.manifest |
|
51 | $ echo 'http://does.not.exist/bundle.hg' > server/.hg/clonebundles.manifest | |
52 | $ hg clone http://localhost:$HGPORT 404-url |
|
52 | $ hg clone http://localhost:$HGPORT 404-url | |
53 | applying clone bundle from http://does.not.exist/bundle.hg |
|
53 | applying clone bundle from http://does.not.exist/bundle.hg | |
54 | error fetching bundle: (.* not known|getaddrinfo failed|No address associated with hostname) (re) |
|
54 | error fetching bundle: (.* not known|getaddrinfo failed|No address associated with hostname) (re) | |
55 | abort: error applying bundle |
|
55 | abort: error applying bundle | |
56 | (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false") |
|
56 | (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false") | |
57 | [255] |
|
57 | [255] | |
58 |
|
58 | |||
59 | Server is not running aborts |
|
59 | Server is not running aborts | |
60 |
|
60 | |||
61 | $ echo "http://localhost:$HGPORT1/bundle.hg" > server/.hg/clonebundles.manifest |
|
61 | $ echo "http://localhost:$HGPORT1/bundle.hg" > server/.hg/clonebundles.manifest | |
62 | $ hg clone http://localhost:$HGPORT server-not-runner |
|
62 | $ hg clone http://localhost:$HGPORT server-not-runner | |
63 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg |
|
63 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg | |
64 | error fetching bundle: (.* refused.*|Protocol not supported) (re) |
|
64 | error fetching bundle: (.* refused.*|Protocol not supported) (re) | |
65 | abort: error applying bundle |
|
65 | abort: error applying bundle | |
66 | (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false") |
|
66 | (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false") | |
67 | [255] |
|
67 | [255] | |
68 |
|
68 | |||
69 | Server returns 404 |
|
69 | Server returns 404 | |
70 |
|
70 | |||
71 | $ python $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid |
|
71 | $ python $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid | |
72 | $ cat http.pid >> $DAEMON_PIDS |
|
72 | $ cat http.pid >> $DAEMON_PIDS | |
73 | $ hg clone http://localhost:$HGPORT running-404 |
|
73 | $ hg clone http://localhost:$HGPORT running-404 | |
74 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg |
|
74 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg | |
75 | HTTP error fetching bundle: HTTP Error 404: File not found |
|
75 | HTTP error fetching bundle: HTTP Error 404: File not found | |
76 | abort: error applying bundle |
|
76 | abort: error applying bundle | |
77 | (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false") |
|
77 | (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false") | |
78 | [255] |
|
78 | [255] | |
79 |
|
79 | |||
80 | We can override failure to fall back to regular clone |
|
80 | We can override failure to fall back to regular clone | |
81 |
|
81 | |||
82 | $ hg --config ui.clonebundlefallback=true clone -U http://localhost:$HGPORT 404-fallback |
|
82 | $ hg --config ui.clonebundlefallback=true clone -U http://localhost:$HGPORT 404-fallback | |
83 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg |
|
83 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg | |
84 | HTTP error fetching bundle: HTTP Error 404: File not found |
|
84 | HTTP error fetching bundle: HTTP Error 404: File not found | |
85 | falling back to normal clone |
|
85 | falling back to normal clone | |
86 | requesting all changes |
|
86 | requesting all changes | |
87 | adding changesets |
|
87 | adding changesets | |
88 | adding manifests |
|
88 | adding manifests | |
89 | adding file changes |
|
89 | adding file changes | |
90 | added 2 changesets with 2 changes to 2 files |
|
90 | added 2 changesets with 2 changes to 2 files | |
91 |
|
91 | |||
92 | Bundle with partial content works |
|
92 | Bundle with partial content works | |
93 |
|
93 | |||
94 | $ hg -R server bundle --type gzip-v1 --base null -r 53245c60e682 partial.hg |
|
94 | $ hg -R server bundle --type gzip-v1 --base null -r 53245c60e682 partial.hg | |
95 | 1 changesets found |
|
95 | 1 changesets found | |
96 |
|
96 | |||
97 | We verify exact bundle content as an extra check against accidental future |
|
97 | We verify exact bundle content as an extra check against accidental future | |
98 | changes. If this output changes, we could break old clients. |
|
98 | changes. If this output changes, we could break old clients. | |
99 |
|
99 | |||
100 | $ f --size --hexdump partial.hg |
|
100 | $ f --size --hexdump partial.hg | |
101 | partial.hg: size=207 |
|
101 | partial.hg: size=207 | |
102 | 0000: 48 47 31 30 47 5a 78 9c 63 60 60 98 17 ac 12 93 |HG10GZx.c``.....| |
|
102 | 0000: 48 47 31 30 47 5a 78 9c 63 60 60 98 17 ac 12 93 |HG10GZx.c``.....| | |
103 | 0010: f0 ac a9 23 45 70 cb bf 0d 5f 59 4e 4a 7f 79 21 |...#Ep..._YNJ.y!| |
|
103 | 0010: f0 ac a9 23 45 70 cb bf 0d 5f 59 4e 4a 7f 79 21 |...#Ep..._YNJ.y!| | |
104 | 0020: 9b cc 40 24 20 a0 d7 ce 2c d1 38 25 cd 24 25 d5 |..@$ ...,.8%.$%.| |
|
104 | 0020: 9b cc 40 24 20 a0 d7 ce 2c d1 38 25 cd 24 25 d5 |..@$ ...,.8%.$%.| | |
105 | 0030: d8 c2 22 cd 38 d9 24 cd 22 d5 c8 22 cd 24 cd 32 |..".8.$."..".$.2| |
|
105 | 0030: d8 c2 22 cd 38 d9 24 cd 22 d5 c8 22 cd 24 cd 32 |..".8.$."..".$.2| | |
106 | 0040: d1 c2 d0 c4 c8 d2 32 d1 38 39 29 c9 34 cd d4 80 |......2.89).4...| |
|
106 | 0040: d1 c2 d0 c4 c8 d2 32 d1 38 39 29 c9 34 cd d4 80 |......2.89).4...| | |
107 | 0050: ab 24 b5 b8 84 cb 40 c1 80 2b 2d 3f 9f 8b 2b 31 |.$....@..+-?..+1| |
|
107 | 0050: ab 24 b5 b8 84 cb 40 c1 80 2b 2d 3f 9f 8b 2b 31 |.$....@..+-?..+1| | |
108 | 0060: 25 45 01 c8 80 9a d2 9b 65 fb e5 9e 45 bf 8d 7f |%E......e...E...| |
|
108 | 0060: 25 45 01 c8 80 9a d2 9b 65 fb e5 9e 45 bf 8d 7f |%E......e...E...| | |
109 | 0070: 9f c6 97 9f 2b 44 34 67 d9 ec 8e 0f a0 92 0b 75 |....+D4g.......u| |
|
109 | 0070: 9f c6 97 9f 2b 44 34 67 d9 ec 8e 0f a0 92 0b 75 |....+D4g.......u| | |
110 | 0080: 41 d6 24 59 18 a4 a4 9a a6 18 1a 5b 98 9b 5a 98 |A.$Y.......[..Z.| |
|
110 | 0080: 41 d6 24 59 18 a4 a4 9a a6 18 1a 5b 98 9b 5a 98 |A.$Y.......[..Z.| | |
111 | 0090: 9a 18 26 9b a6 19 98 1a 99 99 26 a6 18 9a 98 24 |..&.......&....$| |
|
111 | 0090: 9a 18 26 9b a6 19 98 1a 99 99 26 a6 18 9a 98 24 |..&.......&....$| | |
112 | 00a0: 26 59 a6 25 5a 98 a5 18 a6 24 71 41 35 b1 43 dc |&Y.%Z....$qA5.C.| |
|
112 | 00a0: 26 59 a6 25 5a 98 a5 18 a6 24 71 41 35 b1 43 dc |&Y.%Z....$qA5.C.| | |
113 | 00b0: 16 b2 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 d7 8a |.....E..V....R..| |
|
113 | 00b0: 16 b2 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 d7 8a |.....E..V....R..| | |
114 | 00c0: 78 ed fc d5 76 f1 36 35 dc 05 00 36 ed 5e c7 |x...v.65...6.^.| |
|
114 | 00c0: 78 ed fc d5 76 f1 36 35 dc 05 00 36 ed 5e c7 |x...v.65...6.^.| | |
115 |
|
115 | |||
116 | $ echo "http://localhost:$HGPORT1/partial.hg" > server/.hg/clonebundles.manifest |
|
116 | $ echo "http://localhost:$HGPORT1/partial.hg" > server/.hg/clonebundles.manifest | |
117 | $ hg clone -U http://localhost:$HGPORT partial-bundle |
|
117 | $ hg clone -U http://localhost:$HGPORT partial-bundle | |
118 | applying clone bundle from http://localhost:$HGPORT1/partial.hg |
|
118 | applying clone bundle from http://localhost:$HGPORT1/partial.hg | |
119 | adding changesets |
|
119 | adding changesets | |
120 | adding manifests |
|
120 | adding manifests | |
121 | adding file changes |
|
121 | adding file changes | |
122 | added 1 changesets with 1 changes to 1 files |
|
122 | added 1 changesets with 1 changes to 1 files | |
123 | finished applying clone bundle |
|
123 | finished applying clone bundle | |
124 | searching for changes |
|
124 | searching for changes | |
125 | adding changesets |
|
125 | adding changesets | |
126 | adding manifests |
|
126 | adding manifests | |
127 | adding file changes |
|
127 | adding file changes | |
128 | added 1 changesets with 1 changes to 1 files |
|
128 | added 1 changesets with 1 changes to 1 files | |
129 |
|
129 | |||
130 | Incremental pull doesn't fetch bundle |
|
130 | Incremental pull doesn't fetch bundle | |
131 |
|
131 | |||
132 | $ hg clone -r 53245c60e682 -U http://localhost:$HGPORT partial-clone |
|
132 | $ hg clone -r 53245c60e682 -U http://localhost:$HGPORT partial-clone | |
133 | adding changesets |
|
133 | adding changesets | |
134 | adding manifests |
|
134 | adding manifests | |
135 | adding file changes |
|
135 | adding file changes | |
136 | added 1 changesets with 1 changes to 1 files |
|
136 | added 1 changesets with 1 changes to 1 files | |
137 |
|
137 | |||
138 | $ cd partial-clone |
|
138 | $ cd partial-clone | |
139 | $ hg pull |
|
139 | $ hg pull | |
140 | pulling from http://localhost:$HGPORT/ |
|
140 | pulling from http://localhost:$HGPORT/ | |
141 | searching for changes |
|
141 | searching for changes | |
142 | adding changesets |
|
142 | adding changesets | |
143 | adding manifests |
|
143 | adding manifests | |
144 | adding file changes |
|
144 | adding file changes | |
145 | added 1 changesets with 1 changes to 1 files |
|
145 | added 1 changesets with 1 changes to 1 files | |
146 | (run 'hg update' to get a working copy) |
|
146 | (run 'hg update' to get a working copy) | |
147 | $ cd .. |
|
147 | $ cd .. | |
148 |
|
148 | |||
149 | Bundle with full content works |
|
149 | Bundle with full content works | |
150 |
|
150 | |||
151 | $ hg -R server bundle --type gzip-v2 --base null -r tip full.hg |
|
151 | $ hg -R server bundle --type gzip-v2 --base null -r tip full.hg | |
152 | 2 changesets found |
|
152 | 2 changesets found | |
153 |
|
153 | |||
154 | Again, we perform an extra check against bundle content changes. If this content |
|
154 | Again, we perform an extra check against bundle content changes. If this content | |
155 | changes, clone bundles produced by new Mercurial versions may not be readable |
|
155 | changes, clone bundles produced by new Mercurial versions may not be readable | |
156 | by old clients. |
|
156 | by old clients. | |
157 |
|
157 | |||
158 | $ f --size --hexdump full.hg |
|
158 | $ f --size --hexdump full.hg | |
159 | full.hg: size=396 |
|
159 | full.hg: size=396 | |
160 | 0000: 48 47 32 30 00 00 00 0e 43 6f 6d 70 72 65 73 73 |HG20....Compress| |
|
160 | 0000: 48 47 32 30 00 00 00 0e 43 6f 6d 70 72 65 73 73 |HG20....Compress| | |
161 | 0010: 69 6f 6e 3d 47 5a 78 9c 63 60 60 d0 e4 76 f6 70 |ion=GZx.c``..v.p| |
|
161 | 0010: 69 6f 6e 3d 47 5a 78 9c 63 60 60 d0 e4 76 f6 70 |ion=GZx.c``..v.p| | |
162 | 0020: f4 73 77 75 0f f2 0f 0d 60 00 02 46 46 76 26 4e |.swu....`..FFv&N| |
|
162 | 0020: f4 73 77 75 0f f2 0f 0d 60 00 02 46 46 76 26 4e |.swu....`..FFv&N| | |
163 | 0030: c6 b2 d4 a2 e2 cc fc 3c 03 a3 bc a4 e4 8c c4 bc |.......<........| |
|
163 | 0030: c6 b2 d4 a2 e2 cc fc 3c 03 a3 bc a4 e4 8c c4 bc |.......<........| | |
164 | 0040: f4 d4 62 23 06 06 e6 19 40 f9 4d c1 2a 31 09 cf |..b#....@.M.*1..| |
|
164 | 0040: f4 d4 62 23 06 06 e6 19 40 f9 4d c1 2a 31 09 cf |..b#....@.M.*1..| | |
165 | 0050: 9a 3a 52 04 b7 fc db f0 95 e5 a4 f4 97 17 b2 c9 |.:R.............| |
|
165 | 0050: 9a 3a 52 04 b7 fc db f0 95 e5 a4 f4 97 17 b2 c9 |.:R.............| | |
166 | 0060: 0c 14 00 02 e6 d9 99 25 1a a7 a4 99 a4 a4 1a 5b |.......%.......[| |
|
166 | 0060: 0c 14 00 02 e6 d9 99 25 1a a7 a4 99 a4 a4 1a 5b |.......%.......[| | |
167 | 0070: 58 a4 19 27 9b a4 59 a4 1a 59 a4 99 a4 59 26 5a |X..'..Y..Y...Y&Z| |
|
167 | 0070: 58 a4 19 27 9b a4 59 a4 1a 59 a4 99 a4 59 26 5a |X..'..Y..Y...Y&Z| | |
168 | 0080: 18 9a 18 59 5a 26 1a 27 27 25 99 a6 99 1a 70 95 |...YZ&.''%....p.| |
|
168 | 0080: 18 9a 18 59 5a 26 1a 27 27 25 99 a6 99 1a 70 95 |...YZ&.''%....p.| | |
169 | 0090: a4 16 97 70 19 28 18 70 a5 e5 e7 73 71 25 a6 a4 |...p.(.p...sq%..| |
|
169 | 0090: a4 16 97 70 19 28 18 70 a5 e5 e7 73 71 25 a6 a4 |...p.(.p...sq%..| | |
170 | 00a0: 28 00 19 20 17 af fa df ab ff 7b 3f fb 92 dc 8b |(.. ......{?....| |
|
170 | 00a0: 28 00 19 20 17 af fa df ab ff 7b 3f fb 92 dc 8b |(.. ......{?....| | |
171 | 00b0: 1f 62 bb 9e b7 d7 d9 87 3d 5a 44 89 2f b0 99 87 |.b......=ZD./...| |
|
171 | 00b0: 1f 62 bb 9e b7 d7 d9 87 3d 5a 44 89 2f b0 99 87 |.b......=ZD./...| | |
172 | 00c0: ec e2 54 63 43 e3 b4 64 43 73 23 33 43 53 0b 63 |..TcC..dCs#3CS.c| |
|
172 | 00c0: ec e2 54 63 43 e3 b4 64 43 73 23 33 43 53 0b 63 |..TcC..dCs#3CS.c| | |
173 | 00d0: d3 14 23 03 a0 fb 2c 2c 0c d3 80 1e 30 49 49 b1 |..#...,,....0II.| |
|
173 | 00d0: d3 14 23 03 a0 fb 2c 2c 0c d3 80 1e 30 49 49 b1 |..#...,,....0II.| | |
174 | 00e0: 4c 4a 32 48 33 30 b0 34 42 b8 38 29 b1 08 e2 62 |LJ2H30.4B.8)...b| |
|
174 | 00e0: 4c 4a 32 48 33 30 b0 34 42 b8 38 29 b1 08 e2 62 |LJ2H30.4B.8)...b| | |
175 | 00f0: 20 03 6a ca c2 2c db 2f f7 2c fa 6d fc fb 34 be | .j..,./.,.m..4.| |
|
175 | 00f0: 20 03 6a ca c2 2c db 2f f7 2c fa 6d fc fb 34 be | .j..,./.,.m..4.| | |
176 | 0100: fc 5c 21 a2 39 cb 66 77 7c 00 0d c3 59 17 14 58 |.\!.9.fw|...Y..X| |
|
176 | 0100: fc 5c 21 a2 39 cb 66 77 7c 00 0d c3 59 17 14 58 |.\!.9.fw|...Y..X| | |
177 | 0110: 49 16 06 29 a9 a6 29 86 c6 16 e6 a6 16 a6 26 86 |I..)..).......&.| |
|
177 | 0110: 49 16 06 29 a9 a6 29 86 c6 16 e6 a6 16 a6 26 86 |I..)..).......&.| | |
178 | 0120: c9 a6 69 06 a6 46 66 a6 89 29 86 26 26 89 49 96 |..i..Ff..).&&.I.| |
|
178 | 0120: c9 a6 69 06 a6 46 66 a6 89 29 86 26 26 89 49 96 |..i..Ff..).&&.I.| | |
179 | 0130: 69 89 16 66 29 86 29 49 5c 20 07 3e 16 fe 23 ae |i..f).)I\ .>..#.| |
|
179 | 0130: 69 89 16 66 29 86 29 49 5c 20 07 3e 16 fe 23 ae |i..f).)I\ .>..#.| | |
180 | 0140: 26 da 1c ab 10 1f d1 f8 e3 b3 ef cd dd fc 0c 93 |&...............| |
|
180 | 0140: 26 da 1c ab 10 1f d1 f8 e3 b3 ef cd dd fc 0c 93 |&...............| | |
181 | 0150: 88 75 34 36 75 04 82 55 17 14 36 a4 38 10 04 d8 |.u46u..U..6.8...| |
|
181 | 0150: 88 75 34 36 75 04 82 55 17 14 36 a4 38 10 04 d8 |.u46u..U..6.8...| | |
182 | 0160: 21 01 9a b1 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 |!......E..V....R| |
|
182 | 0160: 21 01 9a b1 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 |!......E..V....R| | |
183 | 0170: d7 8a 78 ed fc d5 76 f1 36 25 81 89 c7 ad ec 90 |..x...v.6%......| |
|
183 | 0170: d7 8a 78 ed fc d5 76 f1 36 25 81 89 c7 ad ec 90 |..x...v.6%......| | |
184 | 0180: 54 47 75 2b 89 49 b1 00 d2 8a eb 92 |TGu+.I......| |
|
184 | 0180: 54 47 75 2b 89 49 b1 00 d2 8a eb 92 |TGu+.I......| | |
185 |
|
185 | |||
186 | $ echo "http://localhost:$HGPORT1/full.hg" > server/.hg/clonebundles.manifest |
|
186 | $ echo "http://localhost:$HGPORT1/full.hg" > server/.hg/clonebundles.manifest | |
187 | $ hg clone -U http://localhost:$HGPORT full-bundle |
|
187 | $ hg clone -U http://localhost:$HGPORT full-bundle | |
188 | applying clone bundle from http://localhost:$HGPORT1/full.hg |
|
188 | applying clone bundle from http://localhost:$HGPORT1/full.hg | |
189 | adding changesets |
|
189 | adding changesets | |
190 | adding manifests |
|
190 | adding manifests | |
191 | adding file changes |
|
191 | adding file changes | |
192 | added 2 changesets with 2 changes to 2 files |
|
192 | added 2 changesets with 2 changes to 2 files | |
193 | finished applying clone bundle |
|
193 | finished applying clone bundle | |
194 | searching for changes |
|
194 | searching for changes | |
195 | no changes found |
|
195 | no changes found | |
196 |
|
196 | |||
197 | Feature works over SSH |
|
197 | Feature works over SSH | |
198 |
|
198 | |||
199 | $ hg clone -U -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/server ssh-full-clone |
|
199 | $ hg clone -U -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/server ssh-full-clone | |
200 | applying clone bundle from http://localhost:$HGPORT1/full.hg |
|
200 | applying clone bundle from http://localhost:$HGPORT1/full.hg | |
201 | adding changesets |
|
201 | adding changesets | |
202 | adding manifests |
|
202 | adding manifests | |
203 | adding file changes |
|
203 | adding file changes | |
204 | added 2 changesets with 2 changes to 2 files |
|
204 | added 2 changesets with 2 changes to 2 files | |
205 | finished applying clone bundle |
|
205 | finished applying clone bundle | |
206 | searching for changes |
|
206 | searching for changes | |
207 | no changes found |
|
207 | no changes found | |
208 |
|
208 | |||
209 | Entry with unknown BUNDLESPEC is filtered and not used |
|
209 | Entry with unknown BUNDLESPEC is filtered and not used | |
210 |
|
210 | |||
211 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
211 | $ cat > server/.hg/clonebundles.manifest << EOF | |
212 | > http://bad.entry1 BUNDLESPEC=UNKNOWN |
|
212 | > http://bad.entry1 BUNDLESPEC=UNKNOWN | |
213 | > http://bad.entry2 BUNDLESPEC=xz-v1 |
|
213 | > http://bad.entry2 BUNDLESPEC=xz-v1 | |
214 | > http://bad.entry3 BUNDLESPEC=none-v100 |
|
214 | > http://bad.entry3 BUNDLESPEC=none-v100 | |
215 | > http://localhost:$HGPORT1/full.hg BUNDLESPEC=gzip-v2 |
|
215 | > http://localhost:$HGPORT1/full.hg BUNDLESPEC=gzip-v2 | |
216 | > EOF |
|
216 | > EOF | |
217 |
|
217 | |||
218 | $ hg clone -U http://localhost:$HGPORT filter-unknown-type |
|
218 | $ hg clone -U http://localhost:$HGPORT filter-unknown-type | |
219 | applying clone bundle from http://localhost:$HGPORT1/full.hg |
|
219 | applying clone bundle from http://localhost:$HGPORT1/full.hg | |
220 | adding changesets |
|
220 | adding changesets | |
221 | adding manifests |
|
221 | adding manifests | |
222 | adding file changes |
|
222 | adding file changes | |
223 | added 2 changesets with 2 changes to 2 files |
|
223 | added 2 changesets with 2 changes to 2 files | |
224 | finished applying clone bundle |
|
224 | finished applying clone bundle | |
225 | searching for changes |
|
225 | searching for changes | |
226 | no changes found |
|
226 | no changes found | |
227 |
|
227 | |||
228 | Automatic fallback when all entries are filtered |
|
228 | Automatic fallback when all entries are filtered | |
229 |
|
229 | |||
230 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
230 | $ cat > server/.hg/clonebundles.manifest << EOF | |
231 | > http://bad.entry BUNDLESPEC=UNKNOWN |
|
231 | > http://bad.entry BUNDLESPEC=UNKNOWN | |
232 | > EOF |
|
232 | > EOF | |
233 |
|
233 | |||
234 | $ hg clone -U http://localhost:$HGPORT filter-all |
|
234 | $ hg clone -U http://localhost:$HGPORT filter-all | |
235 | no compatible clone bundles available on server; falling back to regular clone |
|
235 | no compatible clone bundles available on server; falling back to regular clone | |
236 | (you may want to report this to the server operator) |
|
236 | (you may want to report this to the server operator) | |
237 | requesting all changes |
|
237 | requesting all changes | |
238 | adding changesets |
|
238 | adding changesets | |
239 | adding manifests |
|
239 | adding manifests | |
240 | adding file changes |
|
240 | adding file changes | |
241 | added 2 changesets with 2 changes to 2 files |
|
241 | added 2 changesets with 2 changes to 2 files | |
242 |
|
242 | |||
243 | URLs requiring SNI are filtered in Python <2.7.9 |
|
243 | URLs requiring SNI are filtered in Python <2.7.9 | |
244 |
|
244 | |||
245 | $ cp full.hg sni.hg |
|
245 | $ cp full.hg sni.hg | |
246 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
246 | $ cat > server/.hg/clonebundles.manifest << EOF | |
247 | > http://localhost:$HGPORT1/sni.hg REQUIRESNI=true |
|
247 | > http://localhost:$HGPORT1/sni.hg REQUIRESNI=true | |
248 | > http://localhost:$HGPORT1/full.hg |
|
248 | > http://localhost:$HGPORT1/full.hg | |
249 | > EOF |
|
249 | > EOF | |
250 |
|
250 | |||
251 | #if sslcontext |
|
251 | #if sslcontext | |
252 | Python 2.7.9+ support SNI |
|
252 | Python 2.7.9+ support SNI | |
253 |
|
253 | |||
254 | $ hg clone -U http://localhost:$HGPORT sni-supported |
|
254 | $ hg clone -U http://localhost:$HGPORT sni-supported | |
255 | applying clone bundle from http://localhost:$HGPORT1/sni.hg |
|
255 | applying clone bundle from http://localhost:$HGPORT1/sni.hg | |
256 | adding changesets |
|
256 | adding changesets | |
257 | adding manifests |
|
257 | adding manifests | |
258 | adding file changes |
|
258 | adding file changes | |
259 | added 2 changesets with 2 changes to 2 files |
|
259 | added 2 changesets with 2 changes to 2 files | |
260 | finished applying clone bundle |
|
260 | finished applying clone bundle | |
261 | searching for changes |
|
261 | searching for changes | |
262 | no changes found |
|
262 | no changes found | |
263 | #else |
|
263 | #else | |
264 | Python <2.7.9 will filter SNI URLs |
|
264 | Python <2.7.9 will filter SNI URLs | |
265 |
|
265 | |||
266 | $ hg clone -U http://localhost:$HGPORT sni-unsupported |
|
266 | $ hg clone -U http://localhost:$HGPORT sni-unsupported | |
267 | applying clone bundle from http://localhost:$HGPORT1/full.hg |
|
267 | applying clone bundle from http://localhost:$HGPORT1/full.hg | |
268 | adding changesets |
|
268 | adding changesets | |
269 | adding manifests |
|
269 | adding manifests | |
270 | adding file changes |
|
270 | adding file changes | |
271 | added 2 changesets with 2 changes to 2 files |
|
271 | added 2 changesets with 2 changes to 2 files | |
272 | finished applying clone bundle |
|
272 | finished applying clone bundle | |
273 | searching for changes |
|
273 | searching for changes | |
274 | no changes found |
|
274 | no changes found | |
275 | #endif |
|
275 | #endif | |
276 |
|
276 | |||
277 | Stream clone bundles are supported |
|
277 | Stream clone bundles are supported | |
278 |
|
278 | |||
279 | $ hg -R server debugcreatestreamclonebundle packed.hg |
|
279 | $ hg -R server debugcreatestreamclonebundle packed.hg | |
280 | writing 613 bytes for 4 files |
|
280 | writing 613 bytes for 4 files | |
281 | bundle requirements: generaldelta, revlogv1 |
|
281 | bundle requirements: generaldelta, revlogv1 | |
282 |
|
282 | |||
283 | No bundle spec should work |
|
283 | No bundle spec should work | |
284 |
|
284 | |||
285 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
285 | $ cat > server/.hg/clonebundles.manifest << EOF | |
286 | > http://localhost:$HGPORT1/packed.hg |
|
286 | > http://localhost:$HGPORT1/packed.hg | |
287 | > EOF |
|
287 | > EOF | |
288 |
|
288 | |||
289 | $ hg clone -U http://localhost:$HGPORT stream-clone-no-spec |
|
289 | $ hg clone -U http://localhost:$HGPORT stream-clone-no-spec | |
290 | applying clone bundle from http://localhost:$HGPORT1/packed.hg |
|
290 | applying clone bundle from http://localhost:$HGPORT1/packed.hg | |
291 | 4 files to transfer, 613 bytes of data |
|
291 | 4 files to transfer, 613 bytes of data | |
292 | transferred 613 bytes in *.* seconds (*) (glob) |
|
292 | transferred 613 bytes in *.* seconds (*) (glob) | |
293 | finished applying clone bundle |
|
293 | finished applying clone bundle | |
294 | searching for changes |
|
294 | searching for changes | |
295 | no changes found |
|
295 | no changes found | |
296 |
|
296 | |||
297 | Bundle spec without parameters should work |
|
297 | Bundle spec without parameters should work | |
298 |
|
298 | |||
299 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
299 | $ cat > server/.hg/clonebundles.manifest << EOF | |
300 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1 |
|
300 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1 | |
301 | > EOF |
|
301 | > EOF | |
302 |
|
302 | |||
303 | $ hg clone -U http://localhost:$HGPORT stream-clone-vanilla-spec |
|
303 | $ hg clone -U http://localhost:$HGPORT stream-clone-vanilla-spec | |
304 | applying clone bundle from http://localhost:$HGPORT1/packed.hg |
|
304 | applying clone bundle from http://localhost:$HGPORT1/packed.hg | |
305 | 4 files to transfer, 613 bytes of data |
|
305 | 4 files to transfer, 613 bytes of data | |
306 | transferred 613 bytes in *.* seconds (*) (glob) |
|
306 | transferred 613 bytes in *.* seconds (*) (glob) | |
307 | finished applying clone bundle |
|
307 | finished applying clone bundle | |
308 | searching for changes |
|
308 | searching for changes | |
309 | no changes found |
|
309 | no changes found | |
310 |
|
310 | |||
311 | Bundle spec with format requirements should work |
|
311 | Bundle spec with format requirements should work | |
312 |
|
312 | |||
313 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
313 | $ cat > server/.hg/clonebundles.manifest << EOF | |
314 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1 |
|
314 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1 | |
315 | > EOF |
|
315 | > EOF | |
316 |
|
316 | |||
317 | $ hg clone -U http://localhost:$HGPORT stream-clone-supported-requirements |
|
317 | $ hg clone -U http://localhost:$HGPORT stream-clone-supported-requirements | |
318 | applying clone bundle from http://localhost:$HGPORT1/packed.hg |
|
318 | applying clone bundle from http://localhost:$HGPORT1/packed.hg | |
319 | 4 files to transfer, 613 bytes of data |
|
319 | 4 files to transfer, 613 bytes of data | |
320 | transferred 613 bytes in *.* seconds (*) (glob) |
|
320 | transferred 613 bytes in *.* seconds (*) (glob) | |
321 | finished applying clone bundle |
|
321 | finished applying clone bundle | |
322 | searching for changes |
|
322 | searching for changes | |
323 | no changes found |
|
323 | no changes found | |
324 |
|
324 | |||
325 | Stream bundle spec with unknown requirements should be filtered out |
|
325 | Stream bundle spec with unknown requirements should be filtered out | |
326 |
|
326 | |||
327 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
327 | $ cat > server/.hg/clonebundles.manifest << EOF | |
328 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42 |
|
328 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42 | |
329 | > EOF |
|
329 | > EOF | |
330 |
|
330 | |||
331 | $ hg clone -U http://localhost:$HGPORT stream-clone-unsupported-requirements |
|
331 | $ hg clone -U http://localhost:$HGPORT stream-clone-unsupported-requirements | |
332 | no compatible clone bundles available on server; falling back to regular clone |
|
332 | no compatible clone bundles available on server; falling back to regular clone | |
333 | (you may want to report this to the server operator) |
|
333 | (you may want to report this to the server operator) | |
334 | requesting all changes |
|
334 | requesting all changes | |
335 | adding changesets |
|
335 | adding changesets | |
336 | adding manifests |
|
336 | adding manifests | |
337 | adding file changes |
|
337 | adding file changes | |
338 | added 2 changesets with 2 changes to 2 files |
|
338 | added 2 changesets with 2 changes to 2 files | |
339 |
|
339 | |||
340 | Set up manifest for testing preferences |
|
340 | Set up manifest for testing preferences | |
341 | (Remember, the TYPE does not have to match reality - the URL is |
|
341 | (Remember, the TYPE does not have to match reality - the URL is | |
342 | important) |
|
342 | important) | |
343 |
|
343 | |||
344 | $ cp full.hg gz-a.hg |
|
344 | $ cp full.hg gz-a.hg | |
345 | $ cp full.hg gz-b.hg |
|
345 | $ cp full.hg gz-b.hg | |
346 | $ cp full.hg bz2-a.hg |
|
346 | $ cp full.hg bz2-a.hg | |
347 | $ cp full.hg bz2-b.hg |
|
347 | $ cp full.hg bz2-b.hg | |
348 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
348 | $ cat > server/.hg/clonebundles.manifest << EOF | |
349 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 extra=a |
|
349 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 extra=a | |
350 | > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 extra=a |
|
350 | > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 extra=a | |
351 | > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b |
|
351 | > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b | |
352 | > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b |
|
352 | > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b | |
353 | > EOF |
|
353 | > EOF | |
354 |
|
354 | |||
355 | Preferring an undefined attribute will take first entry |
|
355 | Preferring an undefined attribute will take first entry | |
356 |
|
356 | |||
357 | $ hg --config ui.clonebundleprefers=foo=bar clone -U http://localhost:$HGPORT prefer-foo |
|
357 | $ hg --config ui.clonebundleprefers=foo=bar clone -U http://localhost:$HGPORT prefer-foo | |
358 | applying clone bundle from http://localhost:$HGPORT1/gz-a.hg |
|
358 | applying clone bundle from http://localhost:$HGPORT1/gz-a.hg | |
359 | adding changesets |
|
359 | adding changesets | |
360 | adding manifests |
|
360 | adding manifests | |
361 | adding file changes |
|
361 | adding file changes | |
362 | added 2 changesets with 2 changes to 2 files |
|
362 | added 2 changesets with 2 changes to 2 files | |
363 | finished applying clone bundle |
|
363 | finished applying clone bundle | |
364 | searching for changes |
|
364 | searching for changes | |
365 | no changes found |
|
365 | no changes found | |
366 |
|
366 | |||
367 | Preferring bz2 type will download first entry of that type |
|
367 | Preferring bz2 type will download first entry of that type | |
368 |
|
368 | |||
369 | $ hg --config ui.clonebundleprefers=COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-bz |
|
369 | $ hg --config ui.clonebundleprefers=COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-bz | |
370 | applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg |
|
370 | applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg | |
371 | adding changesets |
|
371 | adding changesets | |
372 | adding manifests |
|
372 | adding manifests | |
373 | adding file changes |
|
373 | adding file changes | |
374 | added 2 changesets with 2 changes to 2 files |
|
374 | added 2 changesets with 2 changes to 2 files | |
375 | finished applying clone bundle |
|
375 | finished applying clone bundle | |
376 | searching for changes |
|
376 | searching for changes | |
377 | no changes found |
|
377 | no changes found | |
378 |
|
378 | |||
379 | Preferring multiple values of an option works |
|
379 | Preferring multiple values of an option works | |
380 |
|
380 | |||
381 | $ hg --config ui.clonebundleprefers=COMPRESSION=unknown,COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-multiple-bz |
|
381 | $ hg --config ui.clonebundleprefers=COMPRESSION=unknown,COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-multiple-bz | |
382 | applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg |
|
382 | applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg | |
383 | adding changesets |
|
383 | adding changesets | |
384 | adding manifests |
|
384 | adding manifests | |
385 | adding file changes |
|
385 | adding file changes | |
386 | added 2 changesets with 2 changes to 2 files |
|
386 | added 2 changesets with 2 changes to 2 files | |
387 | finished applying clone bundle |
|
387 | finished applying clone bundle | |
388 | searching for changes |
|
388 | searching for changes | |
389 | no changes found |
|
389 | no changes found | |
390 |
|
390 | |||
391 | Sorting multiple values should get us back to original first entry |
|
391 | Sorting multiple values should get us back to original first entry | |
392 |
|
392 | |||
393 | $ hg --config ui.clonebundleprefers=BUNDLESPEC=unknown,BUNDLESPEC=gzip-v2,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-multiple-gz |
|
393 | $ hg --config ui.clonebundleprefers=BUNDLESPEC=unknown,BUNDLESPEC=gzip-v2,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-multiple-gz | |
394 | applying clone bundle from http://localhost:$HGPORT1/gz-a.hg |
|
394 | applying clone bundle from http://localhost:$HGPORT1/gz-a.hg | |
395 | adding changesets |
|
395 | adding changesets | |
396 | adding manifests |
|
396 | adding manifests | |
397 | adding file changes |
|
397 | adding file changes | |
398 | added 2 changesets with 2 changes to 2 files |
|
398 | added 2 changesets with 2 changes to 2 files | |
399 | finished applying clone bundle |
|
399 | finished applying clone bundle | |
400 | searching for changes |
|
400 | searching for changes | |
401 | no changes found |
|
401 | no changes found | |
402 |
|
402 | |||
403 | Preferring multiple attributes has correct order |
|
403 | Preferring multiple attributes has correct order | |
404 |
|
404 | |||
405 | $ hg --config ui.clonebundleprefers=extra=b,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-separate-attributes |
|
405 | $ hg --config ui.clonebundleprefers=extra=b,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-separate-attributes | |
406 | applying clone bundle from http://localhost:$HGPORT1/bz2-b.hg |
|
406 | applying clone bundle from http://localhost:$HGPORT1/bz2-b.hg | |
407 | adding changesets |
|
407 | adding changesets | |
408 | adding manifests |
|
408 | adding manifests | |
409 | adding file changes |
|
409 | adding file changes | |
410 | added 2 changesets with 2 changes to 2 files |
|
410 | added 2 changesets with 2 changes to 2 files | |
411 | finished applying clone bundle |
|
411 | finished applying clone bundle | |
412 | searching for changes |
|
412 | searching for changes | |
413 | no changes found |
|
413 | no changes found | |
414 |
|
414 | |||
415 | Test where attribute is missing from some entries |
|
415 | Test where attribute is missing from some entries | |
416 |
|
416 | |||
417 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
417 | $ cat > server/.hg/clonebundles.manifest << EOF | |
418 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 |
|
418 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 | |
419 | > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 |
|
419 | > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 | |
420 | > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b |
|
420 | > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b | |
421 | > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b |
|
421 | > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b | |
422 | > EOF |
|
422 | > EOF | |
423 |
|
423 | |||
424 | $ hg --config ui.clonebundleprefers=extra=b clone -U http://localhost:$HGPORT prefer-partially-defined-attribute |
|
424 | $ hg --config ui.clonebundleprefers=extra=b clone -U http://localhost:$HGPORT prefer-partially-defined-attribute | |
425 | applying clone bundle from http://localhost:$HGPORT1/gz-b.hg |
|
425 | applying clone bundle from http://localhost:$HGPORT1/gz-b.hg | |
426 | adding changesets |
|
426 | adding changesets | |
427 | adding manifests |
|
427 | adding manifests | |
428 | adding file changes |
|
428 | adding file changes | |
429 | added 2 changesets with 2 changes to 2 files |
|
429 | added 2 changesets with 2 changes to 2 files | |
430 | finished applying clone bundle |
|
430 | finished applying clone bundle | |
431 | searching for changes |
|
431 | searching for changes | |
432 | no changes found |
|
432 | no changes found |
@@ -1,272 +1,272 b'' | |||||
1 | #require serve |
|
1 | #require serve | |
2 |
|
2 | |||
3 | = Test the getbundle() protocol function = |
|
3 | = Test the getbundle() protocol function = | |
4 |
|
4 | |||
5 | Create a test repository: |
|
5 | Create a test repository: | |
6 |
|
6 | |||
7 | $ hg init repo |
|
7 | $ hg init repo | |
8 | $ cd repo |
|
8 | $ cd repo | |
9 | $ hg debugbuilddag -n -m '+2 :fork +5 :p1 *fork +6 :p2 /p1 :m1 +3' > /dev/null |
|
9 | $ hg debugbuilddag -n -m '+2 :fork +5 :p1 *fork +6 :p2 /p1 :m1 +3' > /dev/null | |
10 | $ hg log -G --template '{node}\n' |
|
10 | $ hg log -G --template '{node}\n' | |
11 | o 10c14a2cc935e1d8c31f9e98587dcf27fb08a6da |
|
11 | o 10c14a2cc935e1d8c31f9e98587dcf27fb08a6da | |
12 | | |
|
12 | | | |
13 | o 4801a72e5d88cb515b0c7e40fae34180f3f837f2 |
|
13 | o 4801a72e5d88cb515b0c7e40fae34180f3f837f2 | |
14 | | |
|
14 | | | |
15 | o 0b2f73f04880d9cb6a5cd8a757f0db0ad01e32c3 |
|
15 | o 0b2f73f04880d9cb6a5cd8a757f0db0ad01e32c3 | |
16 | | |
|
16 | | | |
17 | o 8365676dbab05860ce0d9110f2af51368b961bbd |
|
17 | o 8365676dbab05860ce0d9110f2af51368b961bbd | |
18 | |\ |
|
18 | |\ | |
19 | | o 5686dbbd9fc46cb806599c878d02fe1cb56b83d3 |
|
19 | | o 5686dbbd9fc46cb806599c878d02fe1cb56b83d3 | |
20 | | | |
|
20 | | | | |
21 | | o 13c0170174366b441dc68e8e33757232fa744458 |
|
21 | | o 13c0170174366b441dc68e8e33757232fa744458 | |
22 | | | |
|
22 | | | | |
23 | | o 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 |
|
23 | | o 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 | |
24 | | | |
|
24 | | | | |
25 | | o 700b7e19db54103633c4bf4a6a6b6d55f4d50c03 |
|
25 | | o 700b7e19db54103633c4bf4a6a6b6d55f4d50c03 | |
26 | | | |
|
26 | | | | |
27 | | o 928b5f94cdb278bb536eba552de348a4e92ef24d |
|
27 | | o 928b5f94cdb278bb536eba552de348a4e92ef24d | |
28 | | | |
|
28 | | | | |
29 | | o f34414c64173e0ecb61b25dc55e116dbbcc89bee |
|
29 | | o f34414c64173e0ecb61b25dc55e116dbbcc89bee | |
30 | | | |
|
30 | | | | |
31 | | o 8931463777131cd73923e560b760061f2aa8a4bc |
|
31 | | o 8931463777131cd73923e560b760061f2aa8a4bc | |
32 | | | |
|
32 | | | | |
33 | o | 6621d79f61b23ec74cf4b69464343d9e0980ec8b |
|
33 | o | 6621d79f61b23ec74cf4b69464343d9e0980ec8b | |
34 | | | |
|
34 | | | | |
35 | o | bac16991d12ff45f9dc43c52da1946dfadb83e80 |
|
35 | o | bac16991d12ff45f9dc43c52da1946dfadb83e80 | |
36 | | | |
|
36 | | | | |
37 | o | ff42371d57168345fdf1a3aac66a51f6a45d41d2 |
|
37 | o | ff42371d57168345fdf1a3aac66a51f6a45d41d2 | |
38 | | | |
|
38 | | | | |
39 | o | d5f6e1ea452285324836a49d7d3c2a63cfed1d31 |
|
39 | o | d5f6e1ea452285324836a49d7d3c2a63cfed1d31 | |
40 | | | |
|
40 | | | | |
41 | o | 713346a995c363120712aed1aee7e04afd867638 |
|
41 | o | 713346a995c363120712aed1aee7e04afd867638 | |
42 | |/ |
|
42 | |/ | |
43 | o 29a4d1f17bd3f0779ca0525bebb1cfb51067c738 |
|
43 | o 29a4d1f17bd3f0779ca0525bebb1cfb51067c738 | |
44 | | |
|
44 | | | |
45 | o 7704483d56b2a7b5db54dcee7c62378ac629b348 |
|
45 | o 7704483d56b2a7b5db54dcee7c62378ac629b348 | |
46 |
|
46 | |||
47 | $ cd .. |
|
47 | $ cd .. | |
48 |
|
48 | |||
49 |
|
49 | |||
50 | = Test locally = |
|
50 | = Test locally = | |
51 |
|
51 | |||
52 | Get everything: |
|
52 | Get everything: | |
53 |
|
53 | |||
54 | $ hg debuggetbundle repo bundle |
|
54 | $ hg debuggetbundle repo bundle | |
55 | $ hg debugbundle bundle |
|
55 | $ hg debugbundle bundle | |
56 | 7704483d56b2a7b5db54dcee7c62378ac629b348 |
|
56 | 7704483d56b2a7b5db54dcee7c62378ac629b348 | |
57 | 29a4d1f17bd3f0779ca0525bebb1cfb51067c738 |
|
57 | 29a4d1f17bd3f0779ca0525bebb1cfb51067c738 | |
58 | 713346a995c363120712aed1aee7e04afd867638 |
|
58 | 713346a995c363120712aed1aee7e04afd867638 | |
59 | d5f6e1ea452285324836a49d7d3c2a63cfed1d31 |
|
59 | d5f6e1ea452285324836a49d7d3c2a63cfed1d31 | |
60 | ff42371d57168345fdf1a3aac66a51f6a45d41d2 |
|
60 | ff42371d57168345fdf1a3aac66a51f6a45d41d2 | |
61 | bac16991d12ff45f9dc43c52da1946dfadb83e80 |
|
61 | bac16991d12ff45f9dc43c52da1946dfadb83e80 | |
62 | 6621d79f61b23ec74cf4b69464343d9e0980ec8b |
|
62 | 6621d79f61b23ec74cf4b69464343d9e0980ec8b | |
63 | 8931463777131cd73923e560b760061f2aa8a4bc |
|
63 | 8931463777131cd73923e560b760061f2aa8a4bc | |
64 | f34414c64173e0ecb61b25dc55e116dbbcc89bee |
|
64 | f34414c64173e0ecb61b25dc55e116dbbcc89bee | |
65 | 928b5f94cdb278bb536eba552de348a4e92ef24d |
|
65 | 928b5f94cdb278bb536eba552de348a4e92ef24d | |
66 | 700b7e19db54103633c4bf4a6a6b6d55f4d50c03 |
|
66 | 700b7e19db54103633c4bf4a6a6b6d55f4d50c03 | |
67 | 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 |
|
67 | 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 | |
68 | 13c0170174366b441dc68e8e33757232fa744458 |
|
68 | 13c0170174366b441dc68e8e33757232fa744458 | |
69 | 5686dbbd9fc46cb806599c878d02fe1cb56b83d3 |
|
69 | 5686dbbd9fc46cb806599c878d02fe1cb56b83d3 | |
70 | 8365676dbab05860ce0d9110f2af51368b961bbd |
|
70 | 8365676dbab05860ce0d9110f2af51368b961bbd | |
71 | 0b2f73f04880d9cb6a5cd8a757f0db0ad01e32c3 |
|
71 | 0b2f73f04880d9cb6a5cd8a757f0db0ad01e32c3 | |
72 | 4801a72e5d88cb515b0c7e40fae34180f3f837f2 |
|
72 | 4801a72e5d88cb515b0c7e40fae34180f3f837f2 | |
73 | 10c14a2cc935e1d8c31f9e98587dcf27fb08a6da |
|
73 | 10c14a2cc935e1d8c31f9e98587dcf27fb08a6da | |
74 |
|
74 | |||
75 | Get part of linear run: |
|
75 | Get part of linear run: | |
76 |
|
76 | |||
77 | $ hg debuggetbundle repo bundle -H 4801a72e5d88cb515b0c7e40fae34180f3f837f2 -C 8365676dbab05860ce0d9110f2af51368b961bbd |
|
77 | $ hg debuggetbundle repo bundle -H 4801a72e5d88cb515b0c7e40fae34180f3f837f2 -C 8365676dbab05860ce0d9110f2af51368b961bbd | |
78 | $ hg debugbundle bundle |
|
78 | $ hg debugbundle bundle | |
79 | 0b2f73f04880d9cb6a5cd8a757f0db0ad01e32c3 |
|
79 | 0b2f73f04880d9cb6a5cd8a757f0db0ad01e32c3 | |
80 | 4801a72e5d88cb515b0c7e40fae34180f3f837f2 |
|
80 | 4801a72e5d88cb515b0c7e40fae34180f3f837f2 | |
81 |
|
81 | |||
82 | Get missing branch and merge: |
|
82 | Get missing branch and merge: | |
83 |
|
83 | |||
84 | $ hg debuggetbundle repo bundle -H 4801a72e5d88cb515b0c7e40fae34180f3f837f2 -C 13c0170174366b441dc68e8e33757232fa744458 |
|
84 | $ hg debuggetbundle repo bundle -H 4801a72e5d88cb515b0c7e40fae34180f3f837f2 -C 13c0170174366b441dc68e8e33757232fa744458 | |
85 | $ hg debugbundle bundle |
|
85 | $ hg debugbundle bundle | |
86 | 713346a995c363120712aed1aee7e04afd867638 |
|
86 | 713346a995c363120712aed1aee7e04afd867638 | |
87 | d5f6e1ea452285324836a49d7d3c2a63cfed1d31 |
|
87 | d5f6e1ea452285324836a49d7d3c2a63cfed1d31 | |
88 | ff42371d57168345fdf1a3aac66a51f6a45d41d2 |
|
88 | ff42371d57168345fdf1a3aac66a51f6a45d41d2 | |
89 | bac16991d12ff45f9dc43c52da1946dfadb83e80 |
|
89 | bac16991d12ff45f9dc43c52da1946dfadb83e80 | |
90 | 6621d79f61b23ec74cf4b69464343d9e0980ec8b |
|
90 | 6621d79f61b23ec74cf4b69464343d9e0980ec8b | |
91 | 5686dbbd9fc46cb806599c878d02fe1cb56b83d3 |
|
91 | 5686dbbd9fc46cb806599c878d02fe1cb56b83d3 | |
92 | 8365676dbab05860ce0d9110f2af51368b961bbd |
|
92 | 8365676dbab05860ce0d9110f2af51368b961bbd | |
93 | 0b2f73f04880d9cb6a5cd8a757f0db0ad01e32c3 |
|
93 | 0b2f73f04880d9cb6a5cd8a757f0db0ad01e32c3 | |
94 | 4801a72e5d88cb515b0c7e40fae34180f3f837f2 |
|
94 | 4801a72e5d88cb515b0c7e40fae34180f3f837f2 | |
95 |
|
95 | |||
96 | Get from only one head: |
|
96 | Get from only one head: | |
97 |
|
97 | |||
98 | $ hg debuggetbundle repo bundle -H 928b5f94cdb278bb536eba552de348a4e92ef24d -C 29a4d1f17bd3f0779ca0525bebb1cfb51067c738 |
|
98 | $ hg debuggetbundle repo bundle -H 928b5f94cdb278bb536eba552de348a4e92ef24d -C 29a4d1f17bd3f0779ca0525bebb1cfb51067c738 | |
99 | $ hg debugbundle bundle |
|
99 | $ hg debugbundle bundle | |
100 | 8931463777131cd73923e560b760061f2aa8a4bc |
|
100 | 8931463777131cd73923e560b760061f2aa8a4bc | |
101 | f34414c64173e0ecb61b25dc55e116dbbcc89bee |
|
101 | f34414c64173e0ecb61b25dc55e116dbbcc89bee | |
102 | 928b5f94cdb278bb536eba552de348a4e92ef24d |
|
102 | 928b5f94cdb278bb536eba552de348a4e92ef24d | |
103 |
|
103 | |||
104 | Get parts of two branches: |
|
104 | Get parts of two branches: | |
105 |
|
105 | |||
106 | $ hg debuggetbundle repo bundle -H 13c0170174366b441dc68e8e33757232fa744458 -C 700b7e19db54103633c4bf4a6a6b6d55f4d50c03 -H bac16991d12ff45f9dc43c52da1946dfadb83e80 -C d5f6e1ea452285324836a49d7d3c2a63cfed1d31 |
|
106 | $ hg debuggetbundle repo bundle -H 13c0170174366b441dc68e8e33757232fa744458 -C 700b7e19db54103633c4bf4a6a6b6d55f4d50c03 -H bac16991d12ff45f9dc43c52da1946dfadb83e80 -C d5f6e1ea452285324836a49d7d3c2a63cfed1d31 | |
107 | $ hg debugbundle bundle |
|
107 | $ hg debugbundle bundle | |
108 | ff42371d57168345fdf1a3aac66a51f6a45d41d2 |
|
108 | ff42371d57168345fdf1a3aac66a51f6a45d41d2 | |
109 | bac16991d12ff45f9dc43c52da1946dfadb83e80 |
|
109 | bac16991d12ff45f9dc43c52da1946dfadb83e80 | |
110 | 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 |
|
110 | 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 | |
111 | 13c0170174366b441dc68e8e33757232fa744458 |
|
111 | 13c0170174366b441dc68e8e33757232fa744458 | |
112 |
|
112 | |||
113 | Check that we get all needed file changes: |
|
113 | Check that we get all needed file changes: | |
114 |
|
114 | |||
115 | $ hg debugbundle bundle --all |
|
115 | $ hg debugbundle bundle --all | |
116 | format: id, p1, p2, cset, delta base, len(delta) |
|
116 | format: id, p1, p2, cset, delta base, len(delta) | |
117 |
|
117 | |||
118 | changelog |
|
118 | changelog | |
119 | ff42371d57168345fdf1a3aac66a51f6a45d41d2 d5f6e1ea452285324836a49d7d3c2a63cfed1d31 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 d5f6e1ea452285324836a49d7d3c2a63cfed1d31 99 |
|
119 | ff42371d57168345fdf1a3aac66a51f6a45d41d2 d5f6e1ea452285324836a49d7d3c2a63cfed1d31 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 d5f6e1ea452285324836a49d7d3c2a63cfed1d31 99 | |
120 | bac16991d12ff45f9dc43c52da1946dfadb83e80 ff42371d57168345fdf1a3aac66a51f6a45d41d2 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 ff42371d57168345fdf1a3aac66a51f6a45d41d2 99 |
|
120 | bac16991d12ff45f9dc43c52da1946dfadb83e80 ff42371d57168345fdf1a3aac66a51f6a45d41d2 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 ff42371d57168345fdf1a3aac66a51f6a45d41d2 99 | |
121 | 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 700b7e19db54103633c4bf4a6a6b6d55f4d50c03 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 bac16991d12ff45f9dc43c52da1946dfadb83e80 102 |
|
121 | 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 700b7e19db54103633c4bf4a6a6b6d55f4d50c03 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 bac16991d12ff45f9dc43c52da1946dfadb83e80 102 | |
122 | 13c0170174366b441dc68e8e33757232fa744458 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 102 |
|
122 | 13c0170174366b441dc68e8e33757232fa744458 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 102 | |
123 |
|
123 | |||
124 | manifest |
|
124 | manifest | |
125 | dac7984588fc4eea7acbf39693a9c1b06f5b175d 591f732a3faf1fb903815273f3c199a514a61ccb 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 591f732a3faf1fb903815273f3c199a514a61ccb 113 |
|
125 | dac7984588fc4eea7acbf39693a9c1b06f5b175d 591f732a3faf1fb903815273f3c199a514a61ccb 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 591f732a3faf1fb903815273f3c199a514a61ccb 113 | |
126 | 0772616e6b48a76afb6c1458e193cbb3dae2e4ff dac7984588fc4eea7acbf39693a9c1b06f5b175d 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 dac7984588fc4eea7acbf39693a9c1b06f5b175d 113 |
|
126 | 0772616e6b48a76afb6c1458e193cbb3dae2e4ff dac7984588fc4eea7acbf39693a9c1b06f5b175d 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 dac7984588fc4eea7acbf39693a9c1b06f5b175d 113 | |
127 | eb498cd9af6c44108e43041e951ce829e29f6c80 bff2f4817ced57b386caf7c4e3e36a4bc9af7e93 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 0772616e6b48a76afb6c1458e193cbb3dae2e4ff 295 |
|
127 | eb498cd9af6c44108e43041e951ce829e29f6c80 bff2f4817ced57b386caf7c4e3e36a4bc9af7e93 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 0772616e6b48a76afb6c1458e193cbb3dae2e4ff 295 | |
128 | b15709c071ddd2d93188508ba156196ab4f19620 eb498cd9af6c44108e43041e951ce829e29f6c80 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 eb498cd9af6c44108e43041e951ce829e29f6c80 114 |
|
128 | b15709c071ddd2d93188508ba156196ab4f19620 eb498cd9af6c44108e43041e951ce829e29f6c80 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 eb498cd9af6c44108e43041e951ce829e29f6c80 114 | |
129 |
|
129 | |||
130 | mf |
|
130 | mf | |
131 | 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 301ca08d026bb72cb4258a9d211bdf7ca0bcd810 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 301ca08d026bb72cb4258a9d211bdf7ca0bcd810 17 |
|
131 | 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 301ca08d026bb72cb4258a9d211bdf7ca0bcd810 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 301ca08d026bb72cb4258a9d211bdf7ca0bcd810 17 | |
132 | c7b583de053293870e145f45bd2d61643563fd06 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 18 |
|
132 | c7b583de053293870e145f45bd2d61643563fd06 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 18 | |
133 | 266ee3c0302a5a18f1cf96817ac79a51836179e9 edc0f6b8db80d68ae6aff2b19f7e5347ab68fa63 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 c7b583de053293870e145f45bd2d61643563fd06 149 |
|
133 | 266ee3c0302a5a18f1cf96817ac79a51836179e9 edc0f6b8db80d68ae6aff2b19f7e5347ab68fa63 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 c7b583de053293870e145f45bd2d61643563fd06 149 | |
134 | 698c6a36220548cd3903ca7dada27c59aa500c52 266ee3c0302a5a18f1cf96817ac79a51836179e9 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 266ee3c0302a5a18f1cf96817ac79a51836179e9 19 |
|
134 | 698c6a36220548cd3903ca7dada27c59aa500c52 266ee3c0302a5a18f1cf96817ac79a51836179e9 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 266ee3c0302a5a18f1cf96817ac79a51836179e9 19 | |
135 |
|
135 | |||
136 | nf11 |
|
136 | nf11 | |
137 | 33fbc651630ffa7ccbebfe4eb91320a873e7291c 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 0000000000000000000000000000000000000000 16 |
|
137 | 33fbc651630ffa7ccbebfe4eb91320a873e7291c 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 0000000000000000000000000000000000000000 16 | |
138 |
|
138 | |||
139 | nf12 |
|
139 | nf12 | |
140 | ddce0544363f037e9fb889faca058f52dc01c0a5 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 0000000000000000000000000000000000000000 16 |
|
140 | ddce0544363f037e9fb889faca058f52dc01c0a5 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 0000000000000000000000000000000000000000 16 | |
141 |
|
141 | |||
142 | nf4 |
|
142 | nf4 | |
143 | 3c1407305701051cbed9f9cb9a68bdfb5997c235 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 0000000000000000000000000000000000000000 15 |
|
143 | 3c1407305701051cbed9f9cb9a68bdfb5997c235 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 0000000000000000000000000000000000000000 15 | |
144 |
|
144 | |||
145 | nf5 |
|
145 | nf5 | |
146 | 0dbd89c185f53a1727c54cd1ce256482fa23968e 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 0000000000000000000000000000000000000000 15 |
|
146 | 0dbd89c185f53a1727c54cd1ce256482fa23968e 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 0000000000000000000000000000000000000000 15 | |
147 |
|
147 | |||
148 | Get branch and merge: |
|
148 | Get branch and merge: | |
149 |
|
149 | |||
150 | $ hg debuggetbundle repo bundle -C 7704483d56b2a7b5db54dcee7c62378ac629b348 -H 0b2f73f04880d9cb6a5cd8a757f0db0ad01e32c3 |
|
150 | $ hg debuggetbundle repo bundle -C 7704483d56b2a7b5db54dcee7c62378ac629b348 -H 0b2f73f04880d9cb6a5cd8a757f0db0ad01e32c3 | |
151 | $ hg debugbundle bundle |
|
151 | $ hg debugbundle bundle | |
152 | 29a4d1f17bd3f0779ca0525bebb1cfb51067c738 |
|
152 | 29a4d1f17bd3f0779ca0525bebb1cfb51067c738 | |
153 | 713346a995c363120712aed1aee7e04afd867638 |
|
153 | 713346a995c363120712aed1aee7e04afd867638 | |
154 | d5f6e1ea452285324836a49d7d3c2a63cfed1d31 |
|
154 | d5f6e1ea452285324836a49d7d3c2a63cfed1d31 | |
155 | ff42371d57168345fdf1a3aac66a51f6a45d41d2 |
|
155 | ff42371d57168345fdf1a3aac66a51f6a45d41d2 | |
156 | bac16991d12ff45f9dc43c52da1946dfadb83e80 |
|
156 | bac16991d12ff45f9dc43c52da1946dfadb83e80 | |
157 | 6621d79f61b23ec74cf4b69464343d9e0980ec8b |
|
157 | 6621d79f61b23ec74cf4b69464343d9e0980ec8b | |
158 | 8931463777131cd73923e560b760061f2aa8a4bc |
|
158 | 8931463777131cd73923e560b760061f2aa8a4bc | |
159 | f34414c64173e0ecb61b25dc55e116dbbcc89bee |
|
159 | f34414c64173e0ecb61b25dc55e116dbbcc89bee | |
160 | 928b5f94cdb278bb536eba552de348a4e92ef24d |
|
160 | 928b5f94cdb278bb536eba552de348a4e92ef24d | |
161 | 700b7e19db54103633c4bf4a6a6b6d55f4d50c03 |
|
161 | 700b7e19db54103633c4bf4a6a6b6d55f4d50c03 | |
162 | 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 |
|
162 | 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 | |
163 | 13c0170174366b441dc68e8e33757232fa744458 |
|
163 | 13c0170174366b441dc68e8e33757232fa744458 | |
164 | 5686dbbd9fc46cb806599c878d02fe1cb56b83d3 |
|
164 | 5686dbbd9fc46cb806599c878d02fe1cb56b83d3 | |
165 | 8365676dbab05860ce0d9110f2af51368b961bbd |
|
165 | 8365676dbab05860ce0d9110f2af51368b961bbd | |
166 | 0b2f73f04880d9cb6a5cd8a757f0db0ad01e32c3 |
|
166 | 0b2f73f04880d9cb6a5cd8a757f0db0ad01e32c3 | |
167 |
|
167 | |||
168 | = Test bundle2 = |
|
168 | = Test bundle2 = | |
169 |
|
169 | |||
170 | $ hg debuggetbundle repo bundle -t bundle2 |
|
170 | $ hg debuggetbundle repo bundle -t bundle2 | |
171 | $ hg debugbundle bundle |
|
171 | $ hg debugbundle bundle | |
172 | Stream params: {} |
|
172 | Stream params: {} | |
173 | changegroup -- "sortdict([('version', '01')])" |
|
173 | changegroup -- "sortdict([('version', '01')])" | |
174 | 7704483d56b2a7b5db54dcee7c62378ac629b348 |
|
174 | 7704483d56b2a7b5db54dcee7c62378ac629b348 | |
175 | 29a4d1f17bd3f0779ca0525bebb1cfb51067c738 |
|
175 | 29a4d1f17bd3f0779ca0525bebb1cfb51067c738 | |
176 | 713346a995c363120712aed1aee7e04afd867638 |
|
176 | 713346a995c363120712aed1aee7e04afd867638 | |
177 | d5f6e1ea452285324836a49d7d3c2a63cfed1d31 |
|
177 | d5f6e1ea452285324836a49d7d3c2a63cfed1d31 | |
178 | ff42371d57168345fdf1a3aac66a51f6a45d41d2 |
|
178 | ff42371d57168345fdf1a3aac66a51f6a45d41d2 | |
179 | bac16991d12ff45f9dc43c52da1946dfadb83e80 |
|
179 | bac16991d12ff45f9dc43c52da1946dfadb83e80 | |
180 | 6621d79f61b23ec74cf4b69464343d9e0980ec8b |
|
180 | 6621d79f61b23ec74cf4b69464343d9e0980ec8b | |
181 | 8931463777131cd73923e560b760061f2aa8a4bc |
|
181 | 8931463777131cd73923e560b760061f2aa8a4bc | |
182 | f34414c64173e0ecb61b25dc55e116dbbcc89bee |
|
182 | f34414c64173e0ecb61b25dc55e116dbbcc89bee | |
183 | 928b5f94cdb278bb536eba552de348a4e92ef24d |
|
183 | 928b5f94cdb278bb536eba552de348a4e92ef24d | |
184 | 700b7e19db54103633c4bf4a6a6b6d55f4d50c03 |
|
184 | 700b7e19db54103633c4bf4a6a6b6d55f4d50c03 | |
185 | 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 |
|
185 | 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 | |
186 | 13c0170174366b441dc68e8e33757232fa744458 |
|
186 | 13c0170174366b441dc68e8e33757232fa744458 | |
187 | 5686dbbd9fc46cb806599c878d02fe1cb56b83d3 |
|
187 | 5686dbbd9fc46cb806599c878d02fe1cb56b83d3 | |
188 | 8365676dbab05860ce0d9110f2af51368b961bbd |
|
188 | 8365676dbab05860ce0d9110f2af51368b961bbd | |
189 | 0b2f73f04880d9cb6a5cd8a757f0db0ad01e32c3 |
|
189 | 0b2f73f04880d9cb6a5cd8a757f0db0ad01e32c3 | |
190 | 4801a72e5d88cb515b0c7e40fae34180f3f837f2 |
|
190 | 4801a72e5d88cb515b0c7e40fae34180f3f837f2 | |
191 | 10c14a2cc935e1d8c31f9e98587dcf27fb08a6da |
|
191 | 10c14a2cc935e1d8c31f9e98587dcf27fb08a6da | |
192 | = Test via HTTP = |
|
192 | = Test via HTTP = | |
193 |
|
193 | |||
194 | Get everything: |
|
194 | Get everything: | |
195 |
|
195 | |||
196 | $ hg serve -R repo -p $HGPORT -d --pid-file=hg.pid -E error.log -A access.log |
|
196 | $ hg serve -R repo -p $HGPORT -d --pid-file=hg.pid -E error.log -A access.log | |
197 | $ cat hg.pid >> $DAEMON_PIDS |
|
197 | $ cat hg.pid >> $DAEMON_PIDS | |
198 | $ hg debuggetbundle http://localhost:$HGPORT/ bundle |
|
198 | $ hg debuggetbundle http://localhost:$HGPORT/ bundle | |
199 | $ hg debugbundle bundle |
|
199 | $ hg debugbundle bundle | |
200 | 7704483d56b2a7b5db54dcee7c62378ac629b348 |
|
200 | 7704483d56b2a7b5db54dcee7c62378ac629b348 | |
201 | 29a4d1f17bd3f0779ca0525bebb1cfb51067c738 |
|
201 | 29a4d1f17bd3f0779ca0525bebb1cfb51067c738 | |
202 | 713346a995c363120712aed1aee7e04afd867638 |
|
202 | 713346a995c363120712aed1aee7e04afd867638 | |
203 | d5f6e1ea452285324836a49d7d3c2a63cfed1d31 |
|
203 | d5f6e1ea452285324836a49d7d3c2a63cfed1d31 | |
204 | ff42371d57168345fdf1a3aac66a51f6a45d41d2 |
|
204 | ff42371d57168345fdf1a3aac66a51f6a45d41d2 | |
205 | bac16991d12ff45f9dc43c52da1946dfadb83e80 |
|
205 | bac16991d12ff45f9dc43c52da1946dfadb83e80 | |
206 | 6621d79f61b23ec74cf4b69464343d9e0980ec8b |
|
206 | 6621d79f61b23ec74cf4b69464343d9e0980ec8b | |
207 | 8931463777131cd73923e560b760061f2aa8a4bc |
|
207 | 8931463777131cd73923e560b760061f2aa8a4bc | |
208 | f34414c64173e0ecb61b25dc55e116dbbcc89bee |
|
208 | f34414c64173e0ecb61b25dc55e116dbbcc89bee | |
209 | 928b5f94cdb278bb536eba552de348a4e92ef24d |
|
209 | 928b5f94cdb278bb536eba552de348a4e92ef24d | |
210 | 700b7e19db54103633c4bf4a6a6b6d55f4d50c03 |
|
210 | 700b7e19db54103633c4bf4a6a6b6d55f4d50c03 | |
211 | 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 |
|
211 | 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 | |
212 | 13c0170174366b441dc68e8e33757232fa744458 |
|
212 | 13c0170174366b441dc68e8e33757232fa744458 | |
213 | 5686dbbd9fc46cb806599c878d02fe1cb56b83d3 |
|
213 | 5686dbbd9fc46cb806599c878d02fe1cb56b83d3 | |
214 | 8365676dbab05860ce0d9110f2af51368b961bbd |
|
214 | 8365676dbab05860ce0d9110f2af51368b961bbd | |
215 | 0b2f73f04880d9cb6a5cd8a757f0db0ad01e32c3 |
|
215 | 0b2f73f04880d9cb6a5cd8a757f0db0ad01e32c3 | |
216 | 4801a72e5d88cb515b0c7e40fae34180f3f837f2 |
|
216 | 4801a72e5d88cb515b0c7e40fae34180f3f837f2 | |
217 | 10c14a2cc935e1d8c31f9e98587dcf27fb08a6da |
|
217 | 10c14a2cc935e1d8c31f9e98587dcf27fb08a6da | |
218 |
|
218 | |||
219 | Get parts of two branches: |
|
219 | Get parts of two branches: | |
220 |
|
220 | |||
221 | $ hg debuggetbundle http://localhost:$HGPORT/ bundle -H 13c0170174366b441dc68e8e33757232fa744458 -C 700b7e19db54103633c4bf4a6a6b6d55f4d50c03 -H bac16991d12ff45f9dc43c52da1946dfadb83e80 -C d5f6e1ea452285324836a49d7d3c2a63cfed1d31 |
|
221 | $ hg debuggetbundle http://localhost:$HGPORT/ bundle -H 13c0170174366b441dc68e8e33757232fa744458 -C 700b7e19db54103633c4bf4a6a6b6d55f4d50c03 -H bac16991d12ff45f9dc43c52da1946dfadb83e80 -C d5f6e1ea452285324836a49d7d3c2a63cfed1d31 | |
222 | $ hg debugbundle bundle |
|
222 | $ hg debugbundle bundle | |
223 | ff42371d57168345fdf1a3aac66a51f6a45d41d2 |
|
223 | ff42371d57168345fdf1a3aac66a51f6a45d41d2 | |
224 | bac16991d12ff45f9dc43c52da1946dfadb83e80 |
|
224 | bac16991d12ff45f9dc43c52da1946dfadb83e80 | |
225 | 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 |
|
225 | 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 | |
226 | 13c0170174366b441dc68e8e33757232fa744458 |
|
226 | 13c0170174366b441dc68e8e33757232fa744458 | |
227 |
|
227 | |||
228 | Check that we get all needed file changes: |
|
228 | Check that we get all needed file changes: | |
229 |
|
229 | |||
230 | $ hg debugbundle bundle --all |
|
230 | $ hg debugbundle bundle --all | |
231 | format: id, p1, p2, cset, delta base, len(delta) |
|
231 | format: id, p1, p2, cset, delta base, len(delta) | |
232 |
|
232 | |||
233 | changelog |
|
233 | changelog | |
234 | ff42371d57168345fdf1a3aac66a51f6a45d41d2 d5f6e1ea452285324836a49d7d3c2a63cfed1d31 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 d5f6e1ea452285324836a49d7d3c2a63cfed1d31 99 |
|
234 | ff42371d57168345fdf1a3aac66a51f6a45d41d2 d5f6e1ea452285324836a49d7d3c2a63cfed1d31 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 d5f6e1ea452285324836a49d7d3c2a63cfed1d31 99 | |
235 | bac16991d12ff45f9dc43c52da1946dfadb83e80 ff42371d57168345fdf1a3aac66a51f6a45d41d2 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 ff42371d57168345fdf1a3aac66a51f6a45d41d2 99 |
|
235 | bac16991d12ff45f9dc43c52da1946dfadb83e80 ff42371d57168345fdf1a3aac66a51f6a45d41d2 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 ff42371d57168345fdf1a3aac66a51f6a45d41d2 99 | |
236 | 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 700b7e19db54103633c4bf4a6a6b6d55f4d50c03 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 bac16991d12ff45f9dc43c52da1946dfadb83e80 102 |
|
236 | 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 700b7e19db54103633c4bf4a6a6b6d55f4d50c03 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 bac16991d12ff45f9dc43c52da1946dfadb83e80 102 | |
237 | 13c0170174366b441dc68e8e33757232fa744458 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 102 |
|
237 | 13c0170174366b441dc68e8e33757232fa744458 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 102 | |
238 |
|
238 | |||
239 | manifest |
|
239 | manifest | |
240 | dac7984588fc4eea7acbf39693a9c1b06f5b175d 591f732a3faf1fb903815273f3c199a514a61ccb 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 591f732a3faf1fb903815273f3c199a514a61ccb 113 |
|
240 | dac7984588fc4eea7acbf39693a9c1b06f5b175d 591f732a3faf1fb903815273f3c199a514a61ccb 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 591f732a3faf1fb903815273f3c199a514a61ccb 113 | |
241 | 0772616e6b48a76afb6c1458e193cbb3dae2e4ff dac7984588fc4eea7acbf39693a9c1b06f5b175d 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 dac7984588fc4eea7acbf39693a9c1b06f5b175d 113 |
|
241 | 0772616e6b48a76afb6c1458e193cbb3dae2e4ff dac7984588fc4eea7acbf39693a9c1b06f5b175d 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 dac7984588fc4eea7acbf39693a9c1b06f5b175d 113 | |
242 | eb498cd9af6c44108e43041e951ce829e29f6c80 bff2f4817ced57b386caf7c4e3e36a4bc9af7e93 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 0772616e6b48a76afb6c1458e193cbb3dae2e4ff 295 |
|
242 | eb498cd9af6c44108e43041e951ce829e29f6c80 bff2f4817ced57b386caf7c4e3e36a4bc9af7e93 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 0772616e6b48a76afb6c1458e193cbb3dae2e4ff 295 | |
243 | b15709c071ddd2d93188508ba156196ab4f19620 eb498cd9af6c44108e43041e951ce829e29f6c80 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 eb498cd9af6c44108e43041e951ce829e29f6c80 114 |
|
243 | b15709c071ddd2d93188508ba156196ab4f19620 eb498cd9af6c44108e43041e951ce829e29f6c80 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 eb498cd9af6c44108e43041e951ce829e29f6c80 114 | |
244 |
|
244 | |||
245 | mf |
|
245 | mf | |
246 | 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 301ca08d026bb72cb4258a9d211bdf7ca0bcd810 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 301ca08d026bb72cb4258a9d211bdf7ca0bcd810 17 |
|
246 | 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 301ca08d026bb72cb4258a9d211bdf7ca0bcd810 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 301ca08d026bb72cb4258a9d211bdf7ca0bcd810 17 | |
247 | c7b583de053293870e145f45bd2d61643563fd06 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 18 |
|
247 | c7b583de053293870e145f45bd2d61643563fd06 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 18 | |
248 | 266ee3c0302a5a18f1cf96817ac79a51836179e9 edc0f6b8db80d68ae6aff2b19f7e5347ab68fa63 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 c7b583de053293870e145f45bd2d61643563fd06 149 |
|
248 | 266ee3c0302a5a18f1cf96817ac79a51836179e9 edc0f6b8db80d68ae6aff2b19f7e5347ab68fa63 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 c7b583de053293870e145f45bd2d61643563fd06 149 | |
249 | 698c6a36220548cd3903ca7dada27c59aa500c52 266ee3c0302a5a18f1cf96817ac79a51836179e9 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 266ee3c0302a5a18f1cf96817ac79a51836179e9 19 |
|
249 | 698c6a36220548cd3903ca7dada27c59aa500c52 266ee3c0302a5a18f1cf96817ac79a51836179e9 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 266ee3c0302a5a18f1cf96817ac79a51836179e9 19 | |
250 |
|
250 | |||
251 | nf11 |
|
251 | nf11 | |
252 | 33fbc651630ffa7ccbebfe4eb91320a873e7291c 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 0000000000000000000000000000000000000000 16 |
|
252 | 33fbc651630ffa7ccbebfe4eb91320a873e7291c 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 0000000000000000000000000000000000000000 16 | |
253 |
|
253 | |||
254 | nf12 |
|
254 | nf12 | |
255 | ddce0544363f037e9fb889faca058f52dc01c0a5 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 0000000000000000000000000000000000000000 16 |
|
255 | ddce0544363f037e9fb889faca058f52dc01c0a5 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 0000000000000000000000000000000000000000 16 | |
256 |
|
256 | |||
257 | nf4 |
|
257 | nf4 | |
258 | 3c1407305701051cbed9f9cb9a68bdfb5997c235 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 0000000000000000000000000000000000000000 15 |
|
258 | 3c1407305701051cbed9f9cb9a68bdfb5997c235 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 0000000000000000000000000000000000000000 15 | |
259 |
|
259 | |||
260 | nf5 |
|
260 | nf5 | |
261 | 0dbd89c185f53a1727c54cd1ce256482fa23968e 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 0000000000000000000000000000000000000000 15 |
|
261 | 0dbd89c185f53a1727c54cd1ce256482fa23968e 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 0000000000000000000000000000000000000000 15 | |
262 |
|
262 | |||
263 | Verify we hit the HTTP server: |
|
263 | Verify we hit the HTTP server: | |
264 |
|
264 | |||
265 | $ cat access.log |
|
265 | $ cat access.log | |
266 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
266 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
267 | * - - [*] "GET /?cmd=getbundle HTTP/1.1" 200 - (glob) |
|
267 | * - - [*] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
268 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
268 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
269 | * - - [*] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:common=700b7e19db54103633c4bf4a6a6b6d55f4d50c03+d5f6e1ea452285324836a49d7d3c2a63cfed1d31&heads=13c0170174366b441dc68e8e33757232fa744458+bac16991d12ff45f9dc43c52da1946dfadb83e80 (glob) |
|
269 | * - - [*] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:common=700b7e19db54103633c4bf4a6a6b6d55f4d50c03+d5f6e1ea452285324836a49d7d3c2a63cfed1d31&heads=13c0170174366b441dc68e8e33757232fa744458+bac16991d12ff45f9dc43c52da1946dfadb83e80 x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
270 |
|
270 | |||
271 | $ cat error.log |
|
271 | $ cat error.log | |
272 |
|
272 |
@@ -1,335 +1,335 b'' | |||||
1 | #require serve |
|
1 | #require serve | |
2 |
|
2 | |||
3 | This test is a duplicate of 'test-http.t', feel free to factor out |
|
3 | This test is a duplicate of 'test-http.t', feel free to factor out | |
4 | parts that are not bundle1/bundle2 specific. |
|
4 | parts that are not bundle1/bundle2 specific. | |
5 |
|
5 | |||
6 | $ cat << EOF >> $HGRCPATH |
|
6 | $ cat << EOF >> $HGRCPATH | |
7 | > [devel] |
|
7 | > [devel] | |
8 | > # This test is dedicated to interaction through old bundle |
|
8 | > # This test is dedicated to interaction through old bundle | |
9 | > legacy.exchange = bundle1 |
|
9 | > legacy.exchange = bundle1 | |
10 | > EOF |
|
10 | > EOF | |
11 |
|
11 | |||
12 | $ hg init test |
|
12 | $ hg init test | |
13 | $ cd test |
|
13 | $ cd test | |
14 | $ echo foo>foo |
|
14 | $ echo foo>foo | |
15 | $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg |
|
15 | $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg | |
16 | $ echo foo>foo.d/foo |
|
16 | $ echo foo>foo.d/foo | |
17 | $ echo bar>foo.d/bAr.hg.d/BaR |
|
17 | $ echo bar>foo.d/bAr.hg.d/BaR | |
18 | $ echo bar>foo.d/baR.d.hg/bAR |
|
18 | $ echo bar>foo.d/baR.d.hg/bAR | |
19 | $ hg commit -A -m 1 |
|
19 | $ hg commit -A -m 1 | |
20 | adding foo |
|
20 | adding foo | |
21 | adding foo.d/bAr.hg.d/BaR |
|
21 | adding foo.d/bAr.hg.d/BaR | |
22 | adding foo.d/baR.d.hg/bAR |
|
22 | adding foo.d/baR.d.hg/bAR | |
23 | adding foo.d/foo |
|
23 | adding foo.d/foo | |
24 | $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log |
|
24 | $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log | |
25 | $ hg serve --config server.uncompressed=False -p $HGPORT1 -d --pid-file=../hg2.pid |
|
25 | $ hg serve --config server.uncompressed=False -p $HGPORT1 -d --pid-file=../hg2.pid | |
26 |
|
26 | |||
27 | Test server address cannot be reused |
|
27 | Test server address cannot be reused | |
28 |
|
28 | |||
29 | #if windows |
|
29 | #if windows | |
30 | $ hg serve -p $HGPORT1 2>&1 |
|
30 | $ hg serve -p $HGPORT1 2>&1 | |
31 | abort: cannot start server at ':$HGPORT1': * (glob) |
|
31 | abort: cannot start server at ':$HGPORT1': * (glob) | |
32 | [255] |
|
32 | [255] | |
33 | #else |
|
33 | #else | |
34 | $ hg serve -p $HGPORT1 2>&1 |
|
34 | $ hg serve -p $HGPORT1 2>&1 | |
35 | abort: cannot start server at ':$HGPORT1': Address already in use |
|
35 | abort: cannot start server at ':$HGPORT1': Address already in use | |
36 | [255] |
|
36 | [255] | |
37 | #endif |
|
37 | #endif | |
38 | $ cd .. |
|
38 | $ cd .. | |
39 | $ cat hg1.pid hg2.pid >> $DAEMON_PIDS |
|
39 | $ cat hg1.pid hg2.pid >> $DAEMON_PIDS | |
40 |
|
40 | |||
41 | clone via stream |
|
41 | clone via stream | |
42 |
|
42 | |||
43 | $ hg clone --uncompressed http://localhost:$HGPORT/ copy 2>&1 |
|
43 | $ hg clone --uncompressed http://localhost:$HGPORT/ copy 2>&1 | |
44 | streaming all changes |
|
44 | streaming all changes | |
45 | 6 files to transfer, 606 bytes of data |
|
45 | 6 files to transfer, 606 bytes of data | |
46 | transferred * bytes in * seconds (*/sec) (glob) |
|
46 | transferred * bytes in * seconds (*/sec) (glob) | |
47 | searching for changes |
|
47 | searching for changes | |
48 | no changes found |
|
48 | no changes found | |
49 | updating to branch default |
|
49 | updating to branch default | |
50 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
50 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
51 | $ hg verify -R copy |
|
51 | $ hg verify -R copy | |
52 | checking changesets |
|
52 | checking changesets | |
53 | checking manifests |
|
53 | checking manifests | |
54 | crosschecking files in changesets and manifests |
|
54 | crosschecking files in changesets and manifests | |
55 | checking files |
|
55 | checking files | |
56 | 4 files, 1 changesets, 4 total revisions |
|
56 | 4 files, 1 changesets, 4 total revisions | |
57 |
|
57 | |||
58 | try to clone via stream, should use pull instead |
|
58 | try to clone via stream, should use pull instead | |
59 |
|
59 | |||
60 | $ hg clone --uncompressed http://localhost:$HGPORT1/ copy2 |
|
60 | $ hg clone --uncompressed http://localhost:$HGPORT1/ copy2 | |
61 | requesting all changes |
|
61 | requesting all changes | |
62 | adding changesets |
|
62 | adding changesets | |
63 | adding manifests |
|
63 | adding manifests | |
64 | adding file changes |
|
64 | adding file changes | |
65 | added 1 changesets with 4 changes to 4 files |
|
65 | added 1 changesets with 4 changes to 4 files | |
66 | updating to branch default |
|
66 | updating to branch default | |
67 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
67 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
68 |
|
68 | |||
69 | clone via pull |
|
69 | clone via pull | |
70 |
|
70 | |||
71 | $ hg clone http://localhost:$HGPORT1/ copy-pull |
|
71 | $ hg clone http://localhost:$HGPORT1/ copy-pull | |
72 | requesting all changes |
|
72 | requesting all changes | |
73 | adding changesets |
|
73 | adding changesets | |
74 | adding manifests |
|
74 | adding manifests | |
75 | adding file changes |
|
75 | adding file changes | |
76 | added 1 changesets with 4 changes to 4 files |
|
76 | added 1 changesets with 4 changes to 4 files | |
77 | updating to branch default |
|
77 | updating to branch default | |
78 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
78 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
79 | $ hg verify -R copy-pull |
|
79 | $ hg verify -R copy-pull | |
80 | checking changesets |
|
80 | checking changesets | |
81 | checking manifests |
|
81 | checking manifests | |
82 | crosschecking files in changesets and manifests |
|
82 | crosschecking files in changesets and manifests | |
83 | checking files |
|
83 | checking files | |
84 | 4 files, 1 changesets, 4 total revisions |
|
84 | 4 files, 1 changesets, 4 total revisions | |
85 | $ cd test |
|
85 | $ cd test | |
86 | $ echo bar > bar |
|
86 | $ echo bar > bar | |
87 | $ hg commit -A -d '1 0' -m 2 |
|
87 | $ hg commit -A -d '1 0' -m 2 | |
88 | adding bar |
|
88 | adding bar | |
89 | $ cd .. |
|
89 | $ cd .. | |
90 |
|
90 | |||
91 | clone over http with --update |
|
91 | clone over http with --update | |
92 |
|
92 | |||
93 | $ hg clone http://localhost:$HGPORT1/ updated --update 0 |
|
93 | $ hg clone http://localhost:$HGPORT1/ updated --update 0 | |
94 | requesting all changes |
|
94 | requesting all changes | |
95 | adding changesets |
|
95 | adding changesets | |
96 | adding manifests |
|
96 | adding manifests | |
97 | adding file changes |
|
97 | adding file changes | |
98 | added 2 changesets with 5 changes to 5 files |
|
98 | added 2 changesets with 5 changes to 5 files | |
99 | updating to branch default |
|
99 | updating to branch default | |
100 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
100 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
101 | $ hg log -r . -R updated |
|
101 | $ hg log -r . -R updated | |
102 | changeset: 0:8b6053c928fe |
|
102 | changeset: 0:8b6053c928fe | |
103 | user: test |
|
103 | user: test | |
104 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
104 | date: Thu Jan 01 00:00:00 1970 +0000 | |
105 | summary: 1 |
|
105 | summary: 1 | |
106 |
|
106 | |||
107 | $ rm -rf updated |
|
107 | $ rm -rf updated | |
108 |
|
108 | |||
109 | incoming via HTTP |
|
109 | incoming via HTTP | |
110 |
|
110 | |||
111 | $ hg clone http://localhost:$HGPORT1/ --rev 0 partial |
|
111 | $ hg clone http://localhost:$HGPORT1/ --rev 0 partial | |
112 | adding changesets |
|
112 | adding changesets | |
113 | adding manifests |
|
113 | adding manifests | |
114 | adding file changes |
|
114 | adding file changes | |
115 | added 1 changesets with 4 changes to 4 files |
|
115 | added 1 changesets with 4 changes to 4 files | |
116 | updating to branch default |
|
116 | updating to branch default | |
117 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
117 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
118 | $ cd partial |
|
118 | $ cd partial | |
119 | $ touch LOCAL |
|
119 | $ touch LOCAL | |
120 | $ hg ci -qAm LOCAL |
|
120 | $ hg ci -qAm LOCAL | |
121 | $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n' |
|
121 | $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n' | |
122 | comparing with http://localhost:$HGPORT1/ |
|
122 | comparing with http://localhost:$HGPORT1/ | |
123 | searching for changes |
|
123 | searching for changes | |
124 | 2 |
|
124 | 2 | |
125 | $ cd .. |
|
125 | $ cd .. | |
126 |
|
126 | |||
127 | pull |
|
127 | pull | |
128 |
|
128 | |||
129 | $ cd copy-pull |
|
129 | $ cd copy-pull | |
130 | $ cat >> .hg/hgrc <<EOF |
|
130 | $ cat >> .hg/hgrc <<EOF | |
131 | > [hooks] |
|
131 | > [hooks] | |
132 | > changegroup = sh -c "printenv.py changegroup" |
|
132 | > changegroup = sh -c "printenv.py changegroup" | |
133 | > EOF |
|
133 | > EOF | |
134 | $ hg pull |
|
134 | $ hg pull | |
135 | pulling from http://localhost:$HGPORT1/ |
|
135 | pulling from http://localhost:$HGPORT1/ | |
136 | searching for changes |
|
136 | searching for changes | |
137 | adding changesets |
|
137 | adding changesets | |
138 | adding manifests |
|
138 | adding manifests | |
139 | adding file changes |
|
139 | adding file changes | |
140 | added 1 changesets with 1 changes to 1 files |
|
140 | added 1 changesets with 1 changes to 1 files | |
141 | changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_NODE_LAST=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=http://localhost:$HGPORT1/ (glob) |
|
141 | changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_NODE_LAST=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=http://localhost:$HGPORT1/ (glob) | |
142 | (run 'hg update' to get a working copy) |
|
142 | (run 'hg update' to get a working copy) | |
143 | $ cd .. |
|
143 | $ cd .. | |
144 |
|
144 | |||
145 | clone from invalid URL |
|
145 | clone from invalid URL | |
146 |
|
146 | |||
147 | $ hg clone http://localhost:$HGPORT/bad |
|
147 | $ hg clone http://localhost:$HGPORT/bad | |
148 | abort: HTTP Error 404: Not Found |
|
148 | abort: HTTP Error 404: Not Found | |
149 | [255] |
|
149 | [255] | |
150 |
|
150 | |||
151 | test http authentication |
|
151 | test http authentication | |
152 | + use the same server to test server side streaming preference |
|
152 | + use the same server to test server side streaming preference | |
153 |
|
153 | |||
154 | $ cd test |
|
154 | $ cd test | |
155 | $ cat << EOT > userpass.py |
|
155 | $ cat << EOT > userpass.py | |
156 | > import base64 |
|
156 | > import base64 | |
157 | > from mercurial.hgweb import common |
|
157 | > from mercurial.hgweb import common | |
158 | > def perform_authentication(hgweb, req, op): |
|
158 | > def perform_authentication(hgweb, req, op): | |
159 | > auth = req.env.get('HTTP_AUTHORIZATION') |
|
159 | > auth = req.env.get('HTTP_AUTHORIZATION') | |
160 | > if not auth: |
|
160 | > if not auth: | |
161 | > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who', |
|
161 | > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who', | |
162 | > [('WWW-Authenticate', 'Basic Realm="mercurial"')]) |
|
162 | > [('WWW-Authenticate', 'Basic Realm="mercurial"')]) | |
163 | > if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']: |
|
163 | > if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']: | |
164 | > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no') |
|
164 | > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no') | |
165 | > def extsetup(): |
|
165 | > def extsetup(): | |
166 | > common.permhooks.insert(0, perform_authentication) |
|
166 | > common.permhooks.insert(0, perform_authentication) | |
167 | > EOT |
|
167 | > EOT | |
168 | $ hg serve --config extensions.x=userpass.py -p $HGPORT2 -d --pid-file=pid \ |
|
168 | $ hg serve --config extensions.x=userpass.py -p $HGPORT2 -d --pid-file=pid \ | |
169 | > --config server.preferuncompressed=True \ |
|
169 | > --config server.preferuncompressed=True \ | |
170 | > --config web.push_ssl=False --config web.allow_push=* -A ../access.log |
|
170 | > --config web.push_ssl=False --config web.allow_push=* -A ../access.log | |
171 | $ cat pid >> $DAEMON_PIDS |
|
171 | $ cat pid >> $DAEMON_PIDS | |
172 |
|
172 | |||
173 | $ cat << EOF > get_pass.py |
|
173 | $ cat << EOF > get_pass.py | |
174 | > import getpass |
|
174 | > import getpass | |
175 | > def newgetpass(arg): |
|
175 | > def newgetpass(arg): | |
176 | > return "pass" |
|
176 | > return "pass" | |
177 | > getpass.getpass = newgetpass |
|
177 | > getpass.getpass = newgetpass | |
178 | > EOF |
|
178 | > EOF | |
179 |
|
179 | |||
180 | $ hg id http://localhost:$HGPORT2/ |
|
180 | $ hg id http://localhost:$HGPORT2/ | |
181 | abort: http authorization required for http://localhost:$HGPORT2/ |
|
181 | abort: http authorization required for http://localhost:$HGPORT2/ | |
182 | [255] |
|
182 | [255] | |
183 | $ hg id http://localhost:$HGPORT2/ |
|
183 | $ hg id http://localhost:$HGPORT2/ | |
184 | abort: http authorization required for http://localhost:$HGPORT2/ |
|
184 | abort: http authorization required for http://localhost:$HGPORT2/ | |
185 | [255] |
|
185 | [255] | |
186 | $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/ |
|
186 | $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/ | |
187 | http authorization required for http://localhost:$HGPORT2/ |
|
187 | http authorization required for http://localhost:$HGPORT2/ | |
188 | realm: mercurial |
|
188 | realm: mercurial | |
189 | user: user |
|
189 | user: user | |
190 | password: 5fed3813f7f5 |
|
190 | password: 5fed3813f7f5 | |
191 | $ hg id http://user:pass@localhost:$HGPORT2/ |
|
191 | $ hg id http://user:pass@localhost:$HGPORT2/ | |
192 | 5fed3813f7f5 |
|
192 | 5fed3813f7f5 | |
193 | $ echo '[auth]' >> .hg/hgrc |
|
193 | $ echo '[auth]' >> .hg/hgrc | |
194 | $ echo 'l.schemes=http' >> .hg/hgrc |
|
194 | $ echo 'l.schemes=http' >> .hg/hgrc | |
195 | $ echo 'l.prefix=lo' >> .hg/hgrc |
|
195 | $ echo 'l.prefix=lo' >> .hg/hgrc | |
196 | $ echo 'l.username=user' >> .hg/hgrc |
|
196 | $ echo 'l.username=user' >> .hg/hgrc | |
197 | $ echo 'l.password=pass' >> .hg/hgrc |
|
197 | $ echo 'l.password=pass' >> .hg/hgrc | |
198 | $ hg id http://localhost:$HGPORT2/ |
|
198 | $ hg id http://localhost:$HGPORT2/ | |
199 | 5fed3813f7f5 |
|
199 | 5fed3813f7f5 | |
200 | $ hg id http://localhost:$HGPORT2/ |
|
200 | $ hg id http://localhost:$HGPORT2/ | |
201 | 5fed3813f7f5 |
|
201 | 5fed3813f7f5 | |
202 | $ hg id http://user@localhost:$HGPORT2/ |
|
202 | $ hg id http://user@localhost:$HGPORT2/ | |
203 | 5fed3813f7f5 |
|
203 | 5fed3813f7f5 | |
204 | $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1 |
|
204 | $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1 | |
205 | streaming all changes |
|
205 | streaming all changes | |
206 | 7 files to transfer, 916 bytes of data |
|
206 | 7 files to transfer, 916 bytes of data | |
207 | transferred * bytes in * seconds (*/sec) (glob) |
|
207 | transferred * bytes in * seconds (*/sec) (glob) | |
208 | searching for changes |
|
208 | searching for changes | |
209 | no changes found |
|
209 | no changes found | |
210 | updating to branch default |
|
210 | updating to branch default | |
211 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
211 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
212 | --pull should override server's preferuncompressed |
|
212 | --pull should override server's preferuncompressed | |
213 | $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1 |
|
213 | $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1 | |
214 | requesting all changes |
|
214 | requesting all changes | |
215 | adding changesets |
|
215 | adding changesets | |
216 | adding manifests |
|
216 | adding manifests | |
217 | adding file changes |
|
217 | adding file changes | |
218 | added 2 changesets with 5 changes to 5 files |
|
218 | added 2 changesets with 5 changes to 5 files | |
219 | updating to branch default |
|
219 | updating to branch default | |
220 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
220 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
221 |
|
221 | |||
222 | $ hg id http://user2@localhost:$HGPORT2/ |
|
222 | $ hg id http://user2@localhost:$HGPORT2/ | |
223 | abort: http authorization required for http://localhost:$HGPORT2/ |
|
223 | abort: http authorization required for http://localhost:$HGPORT2/ | |
224 | [255] |
|
224 | [255] | |
225 | $ hg id http://user:pass2@localhost:$HGPORT2/ |
|
225 | $ hg id http://user:pass2@localhost:$HGPORT2/ | |
226 | abort: HTTP Error 403: no |
|
226 | abort: HTTP Error 403: no | |
227 | [255] |
|
227 | [255] | |
228 |
|
228 | |||
229 | $ hg -R dest tag -r tip top |
|
229 | $ hg -R dest tag -r tip top | |
230 | $ hg -R dest push http://user:pass@localhost:$HGPORT2/ |
|
230 | $ hg -R dest push http://user:pass@localhost:$HGPORT2/ | |
231 | pushing to http://user:***@localhost:$HGPORT2/ |
|
231 | pushing to http://user:***@localhost:$HGPORT2/ | |
232 | searching for changes |
|
232 | searching for changes | |
233 | remote: adding changesets |
|
233 | remote: adding changesets | |
234 | remote: adding manifests |
|
234 | remote: adding manifests | |
235 | remote: adding file changes |
|
235 | remote: adding file changes | |
236 | remote: added 1 changesets with 1 changes to 1 files |
|
236 | remote: added 1 changesets with 1 changes to 1 files | |
237 | $ hg rollback -q |
|
237 | $ hg rollback -q | |
238 |
|
238 | |||
239 | $ sed 's/.*] "/"/' < ../access.log |
|
239 | $ sed 's/.*] "/"/' < ../access.log | |
240 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
240 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
241 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
241 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
242 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
242 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
243 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
243 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
244 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
244 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
245 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
245 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
246 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
246 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
247 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
247 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
248 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
248 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
249 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces |
|
249 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
250 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
250 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
251 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
251 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
252 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
252 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
253 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
253 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
254 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces |
|
254 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
255 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
255 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
256 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
256 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
257 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
257 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
258 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
258 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
259 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces |
|
259 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
260 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
260 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
261 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
261 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
262 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
262 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
263 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
263 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
264 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces |
|
264 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
265 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
265 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
266 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
266 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
267 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
267 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
268 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
268 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
269 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces |
|
269 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
270 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
270 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
271 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
271 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
272 | "GET /?cmd=branchmap HTTP/1.1" 200 - |
|
272 | "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
273 | "GET /?cmd=stream_out HTTP/1.1" 401 - |
|
273 | "GET /?cmd=stream_out HTTP/1.1" 401 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
274 | "GET /?cmd=stream_out HTTP/1.1" 200 - |
|
274 | "GET /?cmd=stream_out HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
275 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
275 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
276 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D5fed3813f7f5e1824344fdc9cf8f63bb662c292d |
|
276 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D5fed3813f7f5e1824344fdc9cf8f63bb662c292d x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
277 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases |
|
277 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
278 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
278 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
279 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=bookmarks |
|
279 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
280 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
280 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
281 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D |
|
281 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
282 | "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d |
|
282 | "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
283 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases |
|
283 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
284 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
284 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
285 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
285 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
286 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
286 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
287 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
287 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
288 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
288 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
289 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
289 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
290 | "GET /?cmd=listkeys HTTP/1.1" 403 - x-hgarg-1:namespace=namespaces |
|
290 | "GET /?cmd=listkeys HTTP/1.1" 403 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
291 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
291 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
292 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 |
|
292 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
293 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=phases |
|
293 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
294 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases |
|
294 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
295 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
295 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
296 | "GET /?cmd=branchmap HTTP/1.1" 200 - |
|
296 | "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
297 | "GET /?cmd=branchmap HTTP/1.1" 200 - |
|
297 | "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
298 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
298 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
299 | "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+5eb5abfefeea63c80dd7553bcc3783f37e0c5524* (glob) |
|
299 | "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+5eb5abfefeea63c80dd7553bcc3783f37e0c5524* (glob) | |
300 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases |
|
300 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
301 |
|
301 | |||
302 | $ cd .. |
|
302 | $ cd .. | |
303 |
|
303 | |||
304 | clone of serve with repo in root and unserved subrepo (issue2970) |
|
304 | clone of serve with repo in root and unserved subrepo (issue2970) | |
305 |
|
305 | |||
306 | $ hg --cwd test init sub |
|
306 | $ hg --cwd test init sub | |
307 | $ echo empty > test/sub/empty |
|
307 | $ echo empty > test/sub/empty | |
308 | $ hg --cwd test/sub add empty |
|
308 | $ hg --cwd test/sub add empty | |
309 | $ hg --cwd test/sub commit -qm 'add empty' |
|
309 | $ hg --cwd test/sub commit -qm 'add empty' | |
310 | $ hg --cwd test/sub tag -r 0 something |
|
310 | $ hg --cwd test/sub tag -r 0 something | |
311 | $ echo sub = sub > test/.hgsub |
|
311 | $ echo sub = sub > test/.hgsub | |
312 | $ hg --cwd test add .hgsub |
|
312 | $ hg --cwd test add .hgsub | |
313 | $ hg --cwd test commit -qm 'add subrepo' |
|
313 | $ hg --cwd test commit -qm 'add subrepo' | |
314 | $ hg clone http://localhost:$HGPORT noslash-clone |
|
314 | $ hg clone http://localhost:$HGPORT noslash-clone | |
315 | requesting all changes |
|
315 | requesting all changes | |
316 | adding changesets |
|
316 | adding changesets | |
317 | adding manifests |
|
317 | adding manifests | |
318 | adding file changes |
|
318 | adding file changes | |
319 | added 3 changesets with 7 changes to 7 files |
|
319 | added 3 changesets with 7 changes to 7 files | |
320 | updating to branch default |
|
320 | updating to branch default | |
321 | abort: HTTP Error 404: Not Found |
|
321 | abort: HTTP Error 404: Not Found | |
322 | [255] |
|
322 | [255] | |
323 | $ hg clone http://localhost:$HGPORT/ slash-clone |
|
323 | $ hg clone http://localhost:$HGPORT/ slash-clone | |
324 | requesting all changes |
|
324 | requesting all changes | |
325 | adding changesets |
|
325 | adding changesets | |
326 | adding manifests |
|
326 | adding manifests | |
327 | adding file changes |
|
327 | adding file changes | |
328 | added 3 changesets with 7 changes to 7 files |
|
328 | added 3 changesets with 7 changes to 7 files | |
329 | updating to branch default |
|
329 | updating to branch default | |
330 | abort: HTTP Error 404: Not Found |
|
330 | abort: HTTP Error 404: Not Found | |
331 | [255] |
|
331 | [255] | |
332 |
|
332 | |||
333 | check error log |
|
333 | check error log | |
334 |
|
334 | |||
335 | $ cat error.log |
|
335 | $ cat error.log |
@@ -1,119 +1,119 b'' | |||||
1 | #require serve |
|
1 | #require serve | |
2 |
|
2 | |||
3 | $ hg init a |
|
3 | $ hg init a | |
4 | $ cd a |
|
4 | $ cd a | |
5 | $ echo a > a |
|
5 | $ echo a > a | |
6 | $ hg ci -Ama -d '1123456789 0' |
|
6 | $ hg ci -Ama -d '1123456789 0' | |
7 | adding a |
|
7 | adding a | |
8 | $ hg serve --config server.uncompressed=True -p $HGPORT -d --pid-file=hg.pid |
|
8 | $ hg serve --config server.uncompressed=True -p $HGPORT -d --pid-file=hg.pid | |
9 | $ cat hg.pid >> $DAEMON_PIDS |
|
9 | $ cat hg.pid >> $DAEMON_PIDS | |
10 | $ cd .. |
|
10 | $ cd .. | |
11 | $ tinyproxy.py $HGPORT1 localhost >proxy.log 2>&1 </dev/null & |
|
11 | $ tinyproxy.py $HGPORT1 localhost >proxy.log 2>&1 </dev/null & | |
12 | $ while [ ! -f proxy.pid ]; do sleep 0; done |
|
12 | $ while [ ! -f proxy.pid ]; do sleep 0; done | |
13 | $ cat proxy.pid >> $DAEMON_PIDS |
|
13 | $ cat proxy.pid >> $DAEMON_PIDS | |
14 |
|
14 | |||
15 | url for proxy, stream |
|
15 | url for proxy, stream | |
16 |
|
16 | |||
17 | $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone --uncompressed http://localhost:$HGPORT/ b |
|
17 | $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone --uncompressed http://localhost:$HGPORT/ b | |
18 | streaming all changes |
|
18 | streaming all changes | |
19 | 3 files to transfer, 303 bytes of data |
|
19 | 3 files to transfer, 303 bytes of data | |
20 | transferred * bytes in * seconds (*/sec) (glob) |
|
20 | transferred * bytes in * seconds (*/sec) (glob) | |
21 | searching for changes |
|
21 | searching for changes | |
22 | no changes found |
|
22 | no changes found | |
23 | updating to branch default |
|
23 | updating to branch default | |
24 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
24 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
25 | $ cd b |
|
25 | $ cd b | |
26 | $ hg verify |
|
26 | $ hg verify | |
27 | checking changesets |
|
27 | checking changesets | |
28 | checking manifests |
|
28 | checking manifests | |
29 | crosschecking files in changesets and manifests |
|
29 | crosschecking files in changesets and manifests | |
30 | checking files |
|
30 | checking files | |
31 | 1 files, 1 changesets, 1 total revisions |
|
31 | 1 files, 1 changesets, 1 total revisions | |
32 | $ cd .. |
|
32 | $ cd .. | |
33 |
|
33 | |||
34 | url for proxy, pull |
|
34 | url for proxy, pull | |
35 |
|
35 | |||
36 | $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone http://localhost:$HGPORT/ b-pull |
|
36 | $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone http://localhost:$HGPORT/ b-pull | |
37 | requesting all changes |
|
37 | requesting all changes | |
38 | adding changesets |
|
38 | adding changesets | |
39 | adding manifests |
|
39 | adding manifests | |
40 | adding file changes |
|
40 | adding file changes | |
41 | added 1 changesets with 1 changes to 1 files |
|
41 | added 1 changesets with 1 changes to 1 files | |
42 | updating to branch default |
|
42 | updating to branch default | |
43 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
43 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
44 | $ cd b-pull |
|
44 | $ cd b-pull | |
45 | $ hg verify |
|
45 | $ hg verify | |
46 | checking changesets |
|
46 | checking changesets | |
47 | checking manifests |
|
47 | checking manifests | |
48 | crosschecking files in changesets and manifests |
|
48 | crosschecking files in changesets and manifests | |
49 | checking files |
|
49 | checking files | |
50 | 1 files, 1 changesets, 1 total revisions |
|
50 | 1 files, 1 changesets, 1 total revisions | |
51 | $ cd .. |
|
51 | $ cd .. | |
52 |
|
52 | |||
53 | host:port for proxy |
|
53 | host:port for proxy | |
54 |
|
54 | |||
55 | $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ c |
|
55 | $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ c | |
56 | requesting all changes |
|
56 | requesting all changes | |
57 | adding changesets |
|
57 | adding changesets | |
58 | adding manifests |
|
58 | adding manifests | |
59 | adding file changes |
|
59 | adding file changes | |
60 | added 1 changesets with 1 changes to 1 files |
|
60 | added 1 changesets with 1 changes to 1 files | |
61 | updating to branch default |
|
61 | updating to branch default | |
62 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
62 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
63 |
|
63 | |||
64 | proxy url with user name and password |
|
64 | proxy url with user name and password | |
65 |
|
65 | |||
66 | $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ d |
|
66 | $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ d | |
67 | requesting all changes |
|
67 | requesting all changes | |
68 | adding changesets |
|
68 | adding changesets | |
69 | adding manifests |
|
69 | adding manifests | |
70 | adding file changes |
|
70 | adding file changes | |
71 | added 1 changesets with 1 changes to 1 files |
|
71 | added 1 changesets with 1 changes to 1 files | |
72 | updating to branch default |
|
72 | updating to branch default | |
73 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
73 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
74 |
|
74 | |||
75 | url with user name and password |
|
75 | url with user name and password | |
76 |
|
76 | |||
77 | $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://user:passwd@localhost:$HGPORT/ e |
|
77 | $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://user:passwd@localhost:$HGPORT/ e | |
78 | requesting all changes |
|
78 | requesting all changes | |
79 | adding changesets |
|
79 | adding changesets | |
80 | adding manifests |
|
80 | adding manifests | |
81 | adding file changes |
|
81 | adding file changes | |
82 | added 1 changesets with 1 changes to 1 files |
|
82 | added 1 changesets with 1 changes to 1 files | |
83 | updating to branch default |
|
83 | updating to branch default | |
84 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
84 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
85 |
|
85 | |||
86 | bad host:port for proxy |
|
86 | bad host:port for proxy | |
87 |
|
87 | |||
88 | $ http_proxy=localhost:$HGPORT2 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ f |
|
88 | $ http_proxy=localhost:$HGPORT2 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ f | |
89 | abort: error: Connection refused |
|
89 | abort: error: Connection refused | |
90 | [255] |
|
90 | [255] | |
91 |
|
91 | |||
92 | do not use the proxy if it is in the no list |
|
92 | do not use the proxy if it is in the no list | |
93 |
|
93 | |||
94 | $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.no=localhost http://localhost:$HGPORT/ g |
|
94 | $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.no=localhost http://localhost:$HGPORT/ g | |
95 | requesting all changes |
|
95 | requesting all changes | |
96 | adding changesets |
|
96 | adding changesets | |
97 | adding manifests |
|
97 | adding manifests | |
98 | adding file changes |
|
98 | adding file changes | |
99 | added 1 changesets with 1 changes to 1 files |
|
99 | added 1 changesets with 1 changes to 1 files | |
100 | updating to branch default |
|
100 | updating to branch default | |
101 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
101 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
102 | $ cat proxy.log |
|
102 | $ cat proxy.log | |
103 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) |
|
103 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) | |
104 | * - - [*] "GET http://localhost:$HGPORT/?cmd=branchmap HTTP/1.1" - - (glob) |
|
104 | * - - [*] "GET http://localhost:$HGPORT/?cmd=branchmap HTTP/1.1" - - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
105 | * - - [*] "GET http://localhost:$HGPORT/?cmd=stream_out HTTP/1.1" - - (glob) |
|
105 | * - - [*] "GET http://localhost:$HGPORT/?cmd=stream_out HTTP/1.1" - - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
106 | * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D83180e7845de420a1bb46896fd5fe05294f8d629 (glob) |
|
106 | * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D83180e7845de420a1bb46896fd5fe05294f8d629 x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
107 | * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=0&common=83180e7845de420a1bb46896fd5fe05294f8d629&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=phases%2Cbookmarks (glob) |
|
107 | * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=0&common=83180e7845de420a1bb46896fd5fe05294f8d629&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=phases%2Cbookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
108 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) |
|
108 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) | |
109 | * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob) |
|
109 | * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
110 | * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=phases%2Cbookmarks (glob) |
|
110 | * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=phases%2Cbookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
111 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) |
|
111 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) | |
112 | * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob) |
|
112 | * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
113 | * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=phases%2Cbookmarks (glob) |
|
113 | * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=phases%2Cbookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
114 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) |
|
114 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) | |
115 | * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob) |
|
115 | * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
116 | * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=phases%2Cbookmarks (glob) |
|
116 | * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=phases%2Cbookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
117 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) |
|
117 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) | |
118 | * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob) |
|
118 | * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
119 | * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=phases%2Cbookmarks (glob) |
|
119 | * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=phases%2Cbookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) |
@@ -1,323 +1,323 b'' | |||||
1 | #require serve |
|
1 | #require serve | |
2 |
|
2 | |||
3 | $ hg init test |
|
3 | $ hg init test | |
4 | $ cd test |
|
4 | $ cd test | |
5 | $ echo foo>foo |
|
5 | $ echo foo>foo | |
6 | $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg |
|
6 | $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg | |
7 | $ echo foo>foo.d/foo |
|
7 | $ echo foo>foo.d/foo | |
8 | $ echo bar>foo.d/bAr.hg.d/BaR |
|
8 | $ echo bar>foo.d/bAr.hg.d/BaR | |
9 | $ echo bar>foo.d/baR.d.hg/bAR |
|
9 | $ echo bar>foo.d/baR.d.hg/bAR | |
10 | $ hg commit -A -m 1 |
|
10 | $ hg commit -A -m 1 | |
11 | adding foo |
|
11 | adding foo | |
12 | adding foo.d/bAr.hg.d/BaR |
|
12 | adding foo.d/bAr.hg.d/BaR | |
13 | adding foo.d/baR.d.hg/bAR |
|
13 | adding foo.d/baR.d.hg/bAR | |
14 | adding foo.d/foo |
|
14 | adding foo.d/foo | |
15 | $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log |
|
15 | $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log | |
16 | $ hg serve --config server.uncompressed=False -p $HGPORT1 -d --pid-file=../hg2.pid |
|
16 | $ hg serve --config server.uncompressed=False -p $HGPORT1 -d --pid-file=../hg2.pid | |
17 |
|
17 | |||
18 | Test server address cannot be reused |
|
18 | Test server address cannot be reused | |
19 |
|
19 | |||
20 | #if windows |
|
20 | #if windows | |
21 | $ hg serve -p $HGPORT1 2>&1 |
|
21 | $ hg serve -p $HGPORT1 2>&1 | |
22 | abort: cannot start server at ':$HGPORT1': * (glob) |
|
22 | abort: cannot start server at ':$HGPORT1': * (glob) | |
23 | [255] |
|
23 | [255] | |
24 | #else |
|
24 | #else | |
25 | $ hg serve -p $HGPORT1 2>&1 |
|
25 | $ hg serve -p $HGPORT1 2>&1 | |
26 | abort: cannot start server at ':$HGPORT1': Address already in use |
|
26 | abort: cannot start server at ':$HGPORT1': Address already in use | |
27 | [255] |
|
27 | [255] | |
28 | #endif |
|
28 | #endif | |
29 | $ cd .. |
|
29 | $ cd .. | |
30 | $ cat hg1.pid hg2.pid >> $DAEMON_PIDS |
|
30 | $ cat hg1.pid hg2.pid >> $DAEMON_PIDS | |
31 |
|
31 | |||
32 | clone via stream |
|
32 | clone via stream | |
33 |
|
33 | |||
34 | $ hg clone --uncompressed http://localhost:$HGPORT/ copy 2>&1 |
|
34 | $ hg clone --uncompressed http://localhost:$HGPORT/ copy 2>&1 | |
35 | streaming all changes |
|
35 | streaming all changes | |
36 | 6 files to transfer, 606 bytes of data |
|
36 | 6 files to transfer, 606 bytes of data | |
37 | transferred * bytes in * seconds (*/sec) (glob) |
|
37 | transferred * bytes in * seconds (*/sec) (glob) | |
38 | searching for changes |
|
38 | searching for changes | |
39 | no changes found |
|
39 | no changes found | |
40 | updating to branch default |
|
40 | updating to branch default | |
41 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
41 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
42 | $ hg verify -R copy |
|
42 | $ hg verify -R copy | |
43 | checking changesets |
|
43 | checking changesets | |
44 | checking manifests |
|
44 | checking manifests | |
45 | crosschecking files in changesets and manifests |
|
45 | crosschecking files in changesets and manifests | |
46 | checking files |
|
46 | checking files | |
47 | 4 files, 1 changesets, 4 total revisions |
|
47 | 4 files, 1 changesets, 4 total revisions | |
48 |
|
48 | |||
49 | try to clone via stream, should use pull instead |
|
49 | try to clone via stream, should use pull instead | |
50 |
|
50 | |||
51 | $ hg clone --uncompressed http://localhost:$HGPORT1/ copy2 |
|
51 | $ hg clone --uncompressed http://localhost:$HGPORT1/ copy2 | |
52 | requesting all changes |
|
52 | requesting all changes | |
53 | adding changesets |
|
53 | adding changesets | |
54 | adding manifests |
|
54 | adding manifests | |
55 | adding file changes |
|
55 | adding file changes | |
56 | added 1 changesets with 4 changes to 4 files |
|
56 | added 1 changesets with 4 changes to 4 files | |
57 | updating to branch default |
|
57 | updating to branch default | |
58 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
58 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
59 |
|
59 | |||
60 | clone via pull |
|
60 | clone via pull | |
61 |
|
61 | |||
62 | $ hg clone http://localhost:$HGPORT1/ copy-pull |
|
62 | $ hg clone http://localhost:$HGPORT1/ copy-pull | |
63 | requesting all changes |
|
63 | requesting all changes | |
64 | adding changesets |
|
64 | adding changesets | |
65 | adding manifests |
|
65 | adding manifests | |
66 | adding file changes |
|
66 | adding file changes | |
67 | added 1 changesets with 4 changes to 4 files |
|
67 | added 1 changesets with 4 changes to 4 files | |
68 | updating to branch default |
|
68 | updating to branch default | |
69 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
69 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
70 | $ hg verify -R copy-pull |
|
70 | $ hg verify -R copy-pull | |
71 | checking changesets |
|
71 | checking changesets | |
72 | checking manifests |
|
72 | checking manifests | |
73 | crosschecking files in changesets and manifests |
|
73 | crosschecking files in changesets and manifests | |
74 | checking files |
|
74 | checking files | |
75 | 4 files, 1 changesets, 4 total revisions |
|
75 | 4 files, 1 changesets, 4 total revisions | |
76 | $ cd test |
|
76 | $ cd test | |
77 | $ echo bar > bar |
|
77 | $ echo bar > bar | |
78 | $ hg commit -A -d '1 0' -m 2 |
|
78 | $ hg commit -A -d '1 0' -m 2 | |
79 | adding bar |
|
79 | adding bar | |
80 | $ cd .. |
|
80 | $ cd .. | |
81 |
|
81 | |||
82 | clone over http with --update |
|
82 | clone over http with --update | |
83 |
|
83 | |||
84 | $ hg clone http://localhost:$HGPORT1/ updated --update 0 |
|
84 | $ hg clone http://localhost:$HGPORT1/ updated --update 0 | |
85 | requesting all changes |
|
85 | requesting all changes | |
86 | adding changesets |
|
86 | adding changesets | |
87 | adding manifests |
|
87 | adding manifests | |
88 | adding file changes |
|
88 | adding file changes | |
89 | added 2 changesets with 5 changes to 5 files |
|
89 | added 2 changesets with 5 changes to 5 files | |
90 | updating to branch default |
|
90 | updating to branch default | |
91 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
91 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
92 | $ hg log -r . -R updated |
|
92 | $ hg log -r . -R updated | |
93 | changeset: 0:8b6053c928fe |
|
93 | changeset: 0:8b6053c928fe | |
94 | user: test |
|
94 | user: test | |
95 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
95 | date: Thu Jan 01 00:00:00 1970 +0000 | |
96 | summary: 1 |
|
96 | summary: 1 | |
97 |
|
97 | |||
98 | $ rm -rf updated |
|
98 | $ rm -rf updated | |
99 |
|
99 | |||
100 | incoming via HTTP |
|
100 | incoming via HTTP | |
101 |
|
101 | |||
102 | $ hg clone http://localhost:$HGPORT1/ --rev 0 partial |
|
102 | $ hg clone http://localhost:$HGPORT1/ --rev 0 partial | |
103 | adding changesets |
|
103 | adding changesets | |
104 | adding manifests |
|
104 | adding manifests | |
105 | adding file changes |
|
105 | adding file changes | |
106 | added 1 changesets with 4 changes to 4 files |
|
106 | added 1 changesets with 4 changes to 4 files | |
107 | updating to branch default |
|
107 | updating to branch default | |
108 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
108 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
109 | $ cd partial |
|
109 | $ cd partial | |
110 | $ touch LOCAL |
|
110 | $ touch LOCAL | |
111 | $ hg ci -qAm LOCAL |
|
111 | $ hg ci -qAm LOCAL | |
112 | $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n' |
|
112 | $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n' | |
113 | comparing with http://localhost:$HGPORT1/ |
|
113 | comparing with http://localhost:$HGPORT1/ | |
114 | searching for changes |
|
114 | searching for changes | |
115 | 2 |
|
115 | 2 | |
116 | $ cd .. |
|
116 | $ cd .. | |
117 |
|
117 | |||
118 | pull |
|
118 | pull | |
119 |
|
119 | |||
120 | $ cd copy-pull |
|
120 | $ cd copy-pull | |
121 | $ cat >> .hg/hgrc <<EOF |
|
121 | $ cat >> .hg/hgrc <<EOF | |
122 | > [hooks] |
|
122 | > [hooks] | |
123 | > changegroup = sh -c "printenv.py changegroup" |
|
123 | > changegroup = sh -c "printenv.py changegroup" | |
124 | > EOF |
|
124 | > EOF | |
125 | $ hg pull |
|
125 | $ hg pull | |
126 | pulling from http://localhost:$HGPORT1/ |
|
126 | pulling from http://localhost:$HGPORT1/ | |
127 | searching for changes |
|
127 | searching for changes | |
128 | adding changesets |
|
128 | adding changesets | |
129 | adding manifests |
|
129 | adding manifests | |
130 | adding file changes |
|
130 | adding file changes | |
131 | added 1 changesets with 1 changes to 1 files |
|
131 | added 1 changesets with 1 changes to 1 files | |
132 | changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_NODE_LAST=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=http://localhost:$HGPORT1/ (glob) |
|
132 | changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_NODE_LAST=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=http://localhost:$HGPORT1/ (glob) | |
133 | (run 'hg update' to get a working copy) |
|
133 | (run 'hg update' to get a working copy) | |
134 | $ cd .. |
|
134 | $ cd .. | |
135 |
|
135 | |||
136 | clone from invalid URL |
|
136 | clone from invalid URL | |
137 |
|
137 | |||
138 | $ hg clone http://localhost:$HGPORT/bad |
|
138 | $ hg clone http://localhost:$HGPORT/bad | |
139 | abort: HTTP Error 404: Not Found |
|
139 | abort: HTTP Error 404: Not Found | |
140 | [255] |
|
140 | [255] | |
141 |
|
141 | |||
142 | test http authentication |
|
142 | test http authentication | |
143 | + use the same server to test server side streaming preference |
|
143 | + use the same server to test server side streaming preference | |
144 |
|
144 | |||
145 | $ cd test |
|
145 | $ cd test | |
146 | $ cat << EOT > userpass.py |
|
146 | $ cat << EOT > userpass.py | |
147 | > import base64 |
|
147 | > import base64 | |
148 | > from mercurial.hgweb import common |
|
148 | > from mercurial.hgweb import common | |
149 | > def perform_authentication(hgweb, req, op): |
|
149 | > def perform_authentication(hgweb, req, op): | |
150 | > auth = req.env.get('HTTP_AUTHORIZATION') |
|
150 | > auth = req.env.get('HTTP_AUTHORIZATION') | |
151 | > if not auth: |
|
151 | > if not auth: | |
152 | > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who', |
|
152 | > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who', | |
153 | > [('WWW-Authenticate', 'Basic Realm="mercurial"')]) |
|
153 | > [('WWW-Authenticate', 'Basic Realm="mercurial"')]) | |
154 | > if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']: |
|
154 | > if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']: | |
155 | > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no') |
|
155 | > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no') | |
156 | > def extsetup(): |
|
156 | > def extsetup(): | |
157 | > common.permhooks.insert(0, perform_authentication) |
|
157 | > common.permhooks.insert(0, perform_authentication) | |
158 | > EOT |
|
158 | > EOT | |
159 | $ hg serve --config extensions.x=userpass.py -p $HGPORT2 -d --pid-file=pid \ |
|
159 | $ hg serve --config extensions.x=userpass.py -p $HGPORT2 -d --pid-file=pid \ | |
160 | > --config server.preferuncompressed=True \ |
|
160 | > --config server.preferuncompressed=True \ | |
161 | > --config web.push_ssl=False --config web.allow_push=* -A ../access.log |
|
161 | > --config web.push_ssl=False --config web.allow_push=* -A ../access.log | |
162 | $ cat pid >> $DAEMON_PIDS |
|
162 | $ cat pid >> $DAEMON_PIDS | |
163 |
|
163 | |||
164 | $ cat << EOF > get_pass.py |
|
164 | $ cat << EOF > get_pass.py | |
165 | > import getpass |
|
165 | > import getpass | |
166 | > def newgetpass(arg): |
|
166 | > def newgetpass(arg): | |
167 | > return "pass" |
|
167 | > return "pass" | |
168 | > getpass.getpass = newgetpass |
|
168 | > getpass.getpass = newgetpass | |
169 | > EOF |
|
169 | > EOF | |
170 |
|
170 | |||
171 | $ hg id http://localhost:$HGPORT2/ |
|
171 | $ hg id http://localhost:$HGPORT2/ | |
172 | abort: http authorization required for http://localhost:$HGPORT2/ |
|
172 | abort: http authorization required for http://localhost:$HGPORT2/ | |
173 | [255] |
|
173 | [255] | |
174 | $ hg id http://localhost:$HGPORT2/ |
|
174 | $ hg id http://localhost:$HGPORT2/ | |
175 | abort: http authorization required for http://localhost:$HGPORT2/ |
|
175 | abort: http authorization required for http://localhost:$HGPORT2/ | |
176 | [255] |
|
176 | [255] | |
177 | $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/ |
|
177 | $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/ | |
178 | http authorization required for http://localhost:$HGPORT2/ |
|
178 | http authorization required for http://localhost:$HGPORT2/ | |
179 | realm: mercurial |
|
179 | realm: mercurial | |
180 | user: user |
|
180 | user: user | |
181 | password: 5fed3813f7f5 |
|
181 | password: 5fed3813f7f5 | |
182 | $ hg id http://user:pass@localhost:$HGPORT2/ |
|
182 | $ hg id http://user:pass@localhost:$HGPORT2/ | |
183 | 5fed3813f7f5 |
|
183 | 5fed3813f7f5 | |
184 | $ echo '[auth]' >> .hg/hgrc |
|
184 | $ echo '[auth]' >> .hg/hgrc | |
185 | $ echo 'l.schemes=http' >> .hg/hgrc |
|
185 | $ echo 'l.schemes=http' >> .hg/hgrc | |
186 | $ echo 'l.prefix=lo' >> .hg/hgrc |
|
186 | $ echo 'l.prefix=lo' >> .hg/hgrc | |
187 | $ echo 'l.username=user' >> .hg/hgrc |
|
187 | $ echo 'l.username=user' >> .hg/hgrc | |
188 | $ echo 'l.password=pass' >> .hg/hgrc |
|
188 | $ echo 'l.password=pass' >> .hg/hgrc | |
189 | $ hg id http://localhost:$HGPORT2/ |
|
189 | $ hg id http://localhost:$HGPORT2/ | |
190 | 5fed3813f7f5 |
|
190 | 5fed3813f7f5 | |
191 | $ hg id http://localhost:$HGPORT2/ |
|
191 | $ hg id http://localhost:$HGPORT2/ | |
192 | 5fed3813f7f5 |
|
192 | 5fed3813f7f5 | |
193 | $ hg id http://user@localhost:$HGPORT2/ |
|
193 | $ hg id http://user@localhost:$HGPORT2/ | |
194 | 5fed3813f7f5 |
|
194 | 5fed3813f7f5 | |
195 | $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1 |
|
195 | $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1 | |
196 | streaming all changes |
|
196 | streaming all changes | |
197 | 7 files to transfer, 916 bytes of data |
|
197 | 7 files to transfer, 916 bytes of data | |
198 | transferred * bytes in * seconds (*/sec) (glob) |
|
198 | transferred * bytes in * seconds (*/sec) (glob) | |
199 | searching for changes |
|
199 | searching for changes | |
200 | no changes found |
|
200 | no changes found | |
201 | updating to branch default |
|
201 | updating to branch default | |
202 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
202 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
203 | --pull should override server's preferuncompressed |
|
203 | --pull should override server's preferuncompressed | |
204 | $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1 |
|
204 | $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1 | |
205 | requesting all changes |
|
205 | requesting all changes | |
206 | adding changesets |
|
206 | adding changesets | |
207 | adding manifests |
|
207 | adding manifests | |
208 | adding file changes |
|
208 | adding file changes | |
209 | added 2 changesets with 5 changes to 5 files |
|
209 | added 2 changesets with 5 changes to 5 files | |
210 | updating to branch default |
|
210 | updating to branch default | |
211 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
211 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
212 |
|
212 | |||
213 | $ hg id http://user2@localhost:$HGPORT2/ |
|
213 | $ hg id http://user2@localhost:$HGPORT2/ | |
214 | abort: http authorization required for http://localhost:$HGPORT2/ |
|
214 | abort: http authorization required for http://localhost:$HGPORT2/ | |
215 | [255] |
|
215 | [255] | |
216 | $ hg id http://user:pass2@localhost:$HGPORT2/ |
|
216 | $ hg id http://user:pass2@localhost:$HGPORT2/ | |
217 | abort: HTTP Error 403: no |
|
217 | abort: HTTP Error 403: no | |
218 | [255] |
|
218 | [255] | |
219 |
|
219 | |||
220 | $ hg -R dest tag -r tip top |
|
220 | $ hg -R dest tag -r tip top | |
221 | $ hg -R dest push http://user:pass@localhost:$HGPORT2/ |
|
221 | $ hg -R dest push http://user:pass@localhost:$HGPORT2/ | |
222 | pushing to http://user:***@localhost:$HGPORT2/ |
|
222 | pushing to http://user:***@localhost:$HGPORT2/ | |
223 | searching for changes |
|
223 | searching for changes | |
224 | remote: adding changesets |
|
224 | remote: adding changesets | |
225 | remote: adding manifests |
|
225 | remote: adding manifests | |
226 | remote: adding file changes |
|
226 | remote: adding file changes | |
227 | remote: added 1 changesets with 1 changes to 1 files |
|
227 | remote: added 1 changesets with 1 changes to 1 files | |
228 | $ hg rollback -q |
|
228 | $ hg rollback -q | |
229 |
|
229 | |||
230 | $ sed 's/.*] "/"/' < ../access.log |
|
230 | $ sed 's/.*] "/"/' < ../access.log | |
231 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
231 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
232 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
232 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
233 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
233 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
234 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
234 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
235 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
235 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
236 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
236 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
237 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
237 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
238 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
238 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
239 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
239 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
240 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces |
|
240 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
241 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
241 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
242 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
242 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
243 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
243 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
244 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
244 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
245 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces |
|
245 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
246 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
246 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
247 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
247 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
248 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
248 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
249 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
249 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
250 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces |
|
250 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
251 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
251 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
252 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
252 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
253 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
253 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
254 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
254 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
255 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces |
|
255 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
256 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
256 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
257 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
257 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
258 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
258 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
259 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
259 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
260 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces |
|
260 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
261 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
261 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
262 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
262 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
263 | "GET /?cmd=branchmap HTTP/1.1" 200 - |
|
263 | "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
264 | "GET /?cmd=stream_out HTTP/1.1" 401 - |
|
264 | "GET /?cmd=stream_out HTTP/1.1" 401 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
265 | "GET /?cmd=stream_out HTTP/1.1" 200 - |
|
265 | "GET /?cmd=stream_out HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
266 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D5fed3813f7f5e1824344fdc9cf8f63bb662c292d |
|
266 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D5fed3813f7f5e1824344fdc9cf8f63bb662c292d x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
267 | "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=0&common=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=phases%2Cbookmarks |
|
267 | "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=0&common=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=phases%2Cbookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
268 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
268 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
269 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D |
|
269 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
270 | "GET /?cmd=getbundle HTTP/1.1" 401 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=phases%2Cbookmarks |
|
270 | "GET /?cmd=getbundle HTTP/1.1" 401 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=phases%2Cbookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
271 | "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=phases%2Cbookmarks |
|
271 | "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=phases%2Cbookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
272 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
272 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
273 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
273 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
274 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
274 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
275 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
275 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
276 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
276 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
277 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
277 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
278 | "GET /?cmd=listkeys HTTP/1.1" 403 - x-hgarg-1:namespace=namespaces |
|
278 | "GET /?cmd=listkeys HTTP/1.1" 403 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
279 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
279 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
280 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 |
|
280 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
281 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=phases |
|
281 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
282 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases |
|
282 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
283 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
283 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
284 | "GET /?cmd=branchmap HTTP/1.1" 200 - |
|
284 | "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
285 | "GET /?cmd=branchmap HTTP/1.1" 200 - |
|
285 | "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
286 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
286 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
287 | "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365* (glob) |
|
287 | "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365* (glob) | |
288 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases |
|
288 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
289 |
|
289 | |||
290 | $ cd .. |
|
290 | $ cd .. | |
291 |
|
291 | |||
292 | clone of serve with repo in root and unserved subrepo (issue2970) |
|
292 | clone of serve with repo in root and unserved subrepo (issue2970) | |
293 |
|
293 | |||
294 | $ hg --cwd test init sub |
|
294 | $ hg --cwd test init sub | |
295 | $ echo empty > test/sub/empty |
|
295 | $ echo empty > test/sub/empty | |
296 | $ hg --cwd test/sub add empty |
|
296 | $ hg --cwd test/sub add empty | |
297 | $ hg --cwd test/sub commit -qm 'add empty' |
|
297 | $ hg --cwd test/sub commit -qm 'add empty' | |
298 | $ hg --cwd test/sub tag -r 0 something |
|
298 | $ hg --cwd test/sub tag -r 0 something | |
299 | $ echo sub = sub > test/.hgsub |
|
299 | $ echo sub = sub > test/.hgsub | |
300 | $ hg --cwd test add .hgsub |
|
300 | $ hg --cwd test add .hgsub | |
301 | $ hg --cwd test commit -qm 'add subrepo' |
|
301 | $ hg --cwd test commit -qm 'add subrepo' | |
302 | $ hg clone http://localhost:$HGPORT noslash-clone |
|
302 | $ hg clone http://localhost:$HGPORT noslash-clone | |
303 | requesting all changes |
|
303 | requesting all changes | |
304 | adding changesets |
|
304 | adding changesets | |
305 | adding manifests |
|
305 | adding manifests | |
306 | adding file changes |
|
306 | adding file changes | |
307 | added 3 changesets with 7 changes to 7 files |
|
307 | added 3 changesets with 7 changes to 7 files | |
308 | updating to branch default |
|
308 | updating to branch default | |
309 | abort: HTTP Error 404: Not Found |
|
309 | abort: HTTP Error 404: Not Found | |
310 | [255] |
|
310 | [255] | |
311 | $ hg clone http://localhost:$HGPORT/ slash-clone |
|
311 | $ hg clone http://localhost:$HGPORT/ slash-clone | |
312 | requesting all changes |
|
312 | requesting all changes | |
313 | adding changesets |
|
313 | adding changesets | |
314 | adding manifests |
|
314 | adding manifests | |
315 | adding file changes |
|
315 | adding file changes | |
316 | added 3 changesets with 7 changes to 7 files |
|
316 | added 3 changesets with 7 changes to 7 files | |
317 | updating to branch default |
|
317 | updating to branch default | |
318 | abort: HTTP Error 404: Not Found |
|
318 | abort: HTTP Error 404: Not Found | |
319 | [255] |
|
319 | [255] | |
320 |
|
320 | |||
321 | check error log |
|
321 | check error log | |
322 |
|
322 | |||
323 | $ cat error.log |
|
323 | $ cat error.log |
@@ -1,447 +1,447 b'' | |||||
1 | This file contains testcases that tend to be related to the wire protocol part |
|
1 | This file contains testcases that tend to be related to the wire protocol part | |
2 | of largefiles. |
|
2 | of largefiles. | |
3 |
|
3 | |||
4 | $ USERCACHE="$TESTTMP/cache"; export USERCACHE |
|
4 | $ USERCACHE="$TESTTMP/cache"; export USERCACHE | |
5 | $ mkdir "${USERCACHE}" |
|
5 | $ mkdir "${USERCACHE}" | |
6 | $ cat >> $HGRCPATH <<EOF |
|
6 | $ cat >> $HGRCPATH <<EOF | |
7 | > [extensions] |
|
7 | > [extensions] | |
8 | > largefiles= |
|
8 | > largefiles= | |
9 | > purge= |
|
9 | > purge= | |
10 | > rebase= |
|
10 | > rebase= | |
11 | > transplant= |
|
11 | > transplant= | |
12 | > [phases] |
|
12 | > [phases] | |
13 | > publish=False |
|
13 | > publish=False | |
14 | > [largefiles] |
|
14 | > [largefiles] | |
15 | > minsize=2 |
|
15 | > minsize=2 | |
16 | > patterns=glob:**.dat |
|
16 | > patterns=glob:**.dat | |
17 | > usercache=${USERCACHE} |
|
17 | > usercache=${USERCACHE} | |
18 | > [web] |
|
18 | > [web] | |
19 | > allow_archive = zip |
|
19 | > allow_archive = zip | |
20 | > [hooks] |
|
20 | > [hooks] | |
21 | > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status" |
|
21 | > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status" | |
22 | > EOF |
|
22 | > EOF | |
23 |
|
23 | |||
24 |
|
24 | |||
25 | #if serve |
|
25 | #if serve | |
26 | vanilla clients not locked out from largefiles servers on vanilla repos |
|
26 | vanilla clients not locked out from largefiles servers on vanilla repos | |
27 | $ mkdir r1 |
|
27 | $ mkdir r1 | |
28 | $ cd r1 |
|
28 | $ cd r1 | |
29 | $ hg init |
|
29 | $ hg init | |
30 | $ echo c1 > f1 |
|
30 | $ echo c1 > f1 | |
31 | $ hg add f1 |
|
31 | $ hg add f1 | |
32 | $ hg commit -m "m1" |
|
32 | $ hg commit -m "m1" | |
33 | Invoking status precommit hook |
|
33 | Invoking status precommit hook | |
34 | A f1 |
|
34 | A f1 | |
35 | $ cd .. |
|
35 | $ cd .. | |
36 | $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid |
|
36 | $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid | |
37 | $ cat hg.pid >> $DAEMON_PIDS |
|
37 | $ cat hg.pid >> $DAEMON_PIDS | |
38 | $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT r2 |
|
38 | $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT r2 | |
39 | requesting all changes |
|
39 | requesting all changes | |
40 | adding changesets |
|
40 | adding changesets | |
41 | adding manifests |
|
41 | adding manifests | |
42 | adding file changes |
|
42 | adding file changes | |
43 | added 1 changesets with 1 changes to 1 files |
|
43 | added 1 changesets with 1 changes to 1 files | |
44 | updating to branch default |
|
44 | updating to branch default | |
45 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
45 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
46 |
|
46 | |||
47 | largefiles clients still work with vanilla servers |
|
47 | largefiles clients still work with vanilla servers | |
48 | $ hg serve --config extensions.largefiles=! -R r1 -d -p $HGPORT1 --pid-file hg.pid |
|
48 | $ hg serve --config extensions.largefiles=! -R r1 -d -p $HGPORT1 --pid-file hg.pid | |
49 | $ cat hg.pid >> $DAEMON_PIDS |
|
49 | $ cat hg.pid >> $DAEMON_PIDS | |
50 | $ hg clone http://localhost:$HGPORT1 r3 |
|
50 | $ hg clone http://localhost:$HGPORT1 r3 | |
51 | requesting all changes |
|
51 | requesting all changes | |
52 | adding changesets |
|
52 | adding changesets | |
53 | adding manifests |
|
53 | adding manifests | |
54 | adding file changes |
|
54 | adding file changes | |
55 | added 1 changesets with 1 changes to 1 files |
|
55 | added 1 changesets with 1 changes to 1 files | |
56 | updating to branch default |
|
56 | updating to branch default | |
57 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
57 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
58 | #endif |
|
58 | #endif | |
59 |
|
59 | |||
60 | vanilla clients locked out from largefiles http repos |
|
60 | vanilla clients locked out from largefiles http repos | |
61 | $ mkdir r4 |
|
61 | $ mkdir r4 | |
62 | $ cd r4 |
|
62 | $ cd r4 | |
63 | $ hg init |
|
63 | $ hg init | |
64 | $ echo c1 > f1 |
|
64 | $ echo c1 > f1 | |
65 | $ hg add --large f1 |
|
65 | $ hg add --large f1 | |
66 | $ hg commit -m "m1" |
|
66 | $ hg commit -m "m1" | |
67 | Invoking status precommit hook |
|
67 | Invoking status precommit hook | |
68 | A f1 |
|
68 | A f1 | |
69 | $ cd .. |
|
69 | $ cd .. | |
70 |
|
70 | |||
71 | largefiles can be pushed locally (issue3583) |
|
71 | largefiles can be pushed locally (issue3583) | |
72 | $ hg init dest |
|
72 | $ hg init dest | |
73 | $ cd r4 |
|
73 | $ cd r4 | |
74 | $ hg outgoing ../dest |
|
74 | $ hg outgoing ../dest | |
75 | comparing with ../dest |
|
75 | comparing with ../dest | |
76 | searching for changes |
|
76 | searching for changes | |
77 | changeset: 0:639881c12b4c |
|
77 | changeset: 0:639881c12b4c | |
78 | tag: tip |
|
78 | tag: tip | |
79 | user: test |
|
79 | user: test | |
80 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
80 | date: Thu Jan 01 00:00:00 1970 +0000 | |
81 | summary: m1 |
|
81 | summary: m1 | |
82 |
|
82 | |||
83 | $ hg push ../dest |
|
83 | $ hg push ../dest | |
84 | pushing to ../dest |
|
84 | pushing to ../dest | |
85 | searching for changes |
|
85 | searching for changes | |
86 | adding changesets |
|
86 | adding changesets | |
87 | adding manifests |
|
87 | adding manifests | |
88 | adding file changes |
|
88 | adding file changes | |
89 | added 1 changesets with 1 changes to 1 files |
|
89 | added 1 changesets with 1 changes to 1 files | |
90 |
|
90 | |||
91 | exit code with nothing outgoing (issue3611) |
|
91 | exit code with nothing outgoing (issue3611) | |
92 | $ hg outgoing ../dest |
|
92 | $ hg outgoing ../dest | |
93 | comparing with ../dest |
|
93 | comparing with ../dest | |
94 | searching for changes |
|
94 | searching for changes | |
95 | no changes found |
|
95 | no changes found | |
96 | [1] |
|
96 | [1] | |
97 | $ cd .. |
|
97 | $ cd .. | |
98 |
|
98 | |||
99 | #if serve |
|
99 | #if serve | |
100 | $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid |
|
100 | $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid | |
101 | $ cat hg.pid >> $DAEMON_PIDS |
|
101 | $ cat hg.pid >> $DAEMON_PIDS | |
102 | $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT2 r5 |
|
102 | $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT2 r5 | |
103 | abort: remote error: |
|
103 | abort: remote error: | |
104 |
|
104 | |||
105 | This repository uses the largefiles extension. |
|
105 | This repository uses the largefiles extension. | |
106 |
|
106 | |||
107 | Please enable it in your Mercurial config file. |
|
107 | Please enable it in your Mercurial config file. | |
108 | [255] |
|
108 | [255] | |
109 |
|
109 | |||
110 | used all HGPORTs, kill all daemons |
|
110 | used all HGPORTs, kill all daemons | |
111 | $ killdaemons.py |
|
111 | $ killdaemons.py | |
112 | #endif |
|
112 | #endif | |
113 |
|
113 | |||
114 | vanilla clients locked out from largefiles ssh repos |
|
114 | vanilla clients locked out from largefiles ssh repos | |
115 | $ hg --config extensions.largefiles=! clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/r4 r5 |
|
115 | $ hg --config extensions.largefiles=! clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/r4 r5 | |
116 | remote: |
|
116 | remote: | |
117 | remote: This repository uses the largefiles extension. |
|
117 | remote: This repository uses the largefiles extension. | |
118 | remote: |
|
118 | remote: | |
119 | remote: Please enable it in your Mercurial config file. |
|
119 | remote: Please enable it in your Mercurial config file. | |
120 | remote: |
|
120 | remote: | |
121 | remote: - |
|
121 | remote: - | |
122 | abort: remote error |
|
122 | abort: remote error | |
123 | (check previous remote output) |
|
123 | (check previous remote output) | |
124 | [255] |
|
124 | [255] | |
125 |
|
125 | |||
126 | #if serve |
|
126 | #if serve | |
127 |
|
127 | |||
128 | largefiles clients refuse to push largefiles repos to vanilla servers |
|
128 | largefiles clients refuse to push largefiles repos to vanilla servers | |
129 | $ mkdir r6 |
|
129 | $ mkdir r6 | |
130 | $ cd r6 |
|
130 | $ cd r6 | |
131 | $ hg init |
|
131 | $ hg init | |
132 | $ echo c1 > f1 |
|
132 | $ echo c1 > f1 | |
133 | $ hg add f1 |
|
133 | $ hg add f1 | |
134 | $ hg commit -m "m1" |
|
134 | $ hg commit -m "m1" | |
135 | Invoking status precommit hook |
|
135 | Invoking status precommit hook | |
136 | A f1 |
|
136 | A f1 | |
137 | $ cat >> .hg/hgrc <<! |
|
137 | $ cat >> .hg/hgrc <<! | |
138 | > [web] |
|
138 | > [web] | |
139 | > push_ssl = false |
|
139 | > push_ssl = false | |
140 | > allow_push = * |
|
140 | > allow_push = * | |
141 | > ! |
|
141 | > ! | |
142 | $ cd .. |
|
142 | $ cd .. | |
143 | $ hg clone r6 r7 |
|
143 | $ hg clone r6 r7 | |
144 | updating to branch default |
|
144 | updating to branch default | |
145 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
145 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
146 | $ cd r7 |
|
146 | $ cd r7 | |
147 | $ echo c2 > f2 |
|
147 | $ echo c2 > f2 | |
148 | $ hg add --large f2 |
|
148 | $ hg add --large f2 | |
149 | $ hg commit -m "m2" |
|
149 | $ hg commit -m "m2" | |
150 | Invoking status precommit hook |
|
150 | Invoking status precommit hook | |
151 | A f2 |
|
151 | A f2 | |
152 | $ hg verify --large |
|
152 | $ hg verify --large | |
153 | checking changesets |
|
153 | checking changesets | |
154 | checking manifests |
|
154 | checking manifests | |
155 | crosschecking files in changesets and manifests |
|
155 | crosschecking files in changesets and manifests | |
156 | checking files |
|
156 | checking files | |
157 | 2 files, 2 changesets, 2 total revisions |
|
157 | 2 files, 2 changesets, 2 total revisions | |
158 | searching 1 changesets for largefiles |
|
158 | searching 1 changesets for largefiles | |
159 | verified existence of 1 revisions of 1 largefiles |
|
159 | verified existence of 1 revisions of 1 largefiles | |
160 | $ hg serve --config extensions.largefiles=! -R ../r6 -d -p $HGPORT --pid-file ../hg.pid |
|
160 | $ hg serve --config extensions.largefiles=! -R ../r6 -d -p $HGPORT --pid-file ../hg.pid | |
161 | $ cat ../hg.pid >> $DAEMON_PIDS |
|
161 | $ cat ../hg.pid >> $DAEMON_PIDS | |
162 | $ hg push http://localhost:$HGPORT |
|
162 | $ hg push http://localhost:$HGPORT | |
163 | pushing to http://localhost:$HGPORT/ |
|
163 | pushing to http://localhost:$HGPORT/ | |
164 | searching for changes |
|
164 | searching for changes | |
165 | abort: http://localhost:$HGPORT/ does not appear to be a largefile store |
|
165 | abort: http://localhost:$HGPORT/ does not appear to be a largefile store | |
166 | [255] |
|
166 | [255] | |
167 | $ cd .. |
|
167 | $ cd .. | |
168 |
|
168 | |||
169 | putlfile errors are shown (issue3123) |
|
169 | putlfile errors are shown (issue3123) | |
170 | Corrupt the cached largefile in r7 and move it out of the servers usercache |
|
170 | Corrupt the cached largefile in r7 and move it out of the servers usercache | |
171 | $ mv r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 . |
|
171 | $ mv r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 . | |
172 | $ echo 'client side corruption' > r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 |
|
172 | $ echo 'client side corruption' > r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 | |
173 | $ rm "$USERCACHE/4cdac4d8b084d0b599525cf732437fb337d422a8" |
|
173 | $ rm "$USERCACHE/4cdac4d8b084d0b599525cf732437fb337d422a8" | |
174 | $ hg init empty |
|
174 | $ hg init empty | |
175 | $ hg serve -R empty -d -p $HGPORT1 --pid-file hg.pid \ |
|
175 | $ hg serve -R empty -d -p $HGPORT1 --pid-file hg.pid \ | |
176 | > --config 'web.allow_push=*' --config web.push_ssl=False |
|
176 | > --config 'web.allow_push=*' --config web.push_ssl=False | |
177 | $ cat hg.pid >> $DAEMON_PIDS |
|
177 | $ cat hg.pid >> $DAEMON_PIDS | |
178 | $ hg push -R r7 http://localhost:$HGPORT1 |
|
178 | $ hg push -R r7 http://localhost:$HGPORT1 | |
179 | pushing to http://localhost:$HGPORT1/ |
|
179 | pushing to http://localhost:$HGPORT1/ | |
180 | searching for changes |
|
180 | searching for changes | |
181 | remote: largefiles: failed to put 4cdac4d8b084d0b599525cf732437fb337d422a8 into store: largefile contents do not match hash |
|
181 | remote: largefiles: failed to put 4cdac4d8b084d0b599525cf732437fb337d422a8 into store: largefile contents do not match hash | |
182 | abort: remotestore: could not put $TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 to remote store http://localhost:$HGPORT1/ (glob) |
|
182 | abort: remotestore: could not put $TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 to remote store http://localhost:$HGPORT1/ (glob) | |
183 | [255] |
|
183 | [255] | |
184 | $ mv 4cdac4d8b084d0b599525cf732437fb337d422a8 r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 |
|
184 | $ mv 4cdac4d8b084d0b599525cf732437fb337d422a8 r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 | |
185 | Push of file that exists on server but is corrupted - magic healing would be nice ... but too magic |
|
185 | Push of file that exists on server but is corrupted - magic healing would be nice ... but too magic | |
186 | $ echo "server side corruption" > empty/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 |
|
186 | $ echo "server side corruption" > empty/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 | |
187 | $ hg push -R r7 http://localhost:$HGPORT1 |
|
187 | $ hg push -R r7 http://localhost:$HGPORT1 | |
188 | pushing to http://localhost:$HGPORT1/ |
|
188 | pushing to http://localhost:$HGPORT1/ | |
189 | searching for changes |
|
189 | searching for changes | |
190 | remote: adding changesets |
|
190 | remote: adding changesets | |
191 | remote: adding manifests |
|
191 | remote: adding manifests | |
192 | remote: adding file changes |
|
192 | remote: adding file changes | |
193 | remote: added 2 changesets with 2 changes to 2 files |
|
193 | remote: added 2 changesets with 2 changes to 2 files | |
194 | $ cat empty/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 |
|
194 | $ cat empty/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 | |
195 | server side corruption |
|
195 | server side corruption | |
196 | $ rm -rf empty |
|
196 | $ rm -rf empty | |
197 |
|
197 | |||
198 | Push a largefiles repository to a served empty repository |
|
198 | Push a largefiles repository to a served empty repository | |
199 | $ hg init r8 |
|
199 | $ hg init r8 | |
200 | $ echo c3 > r8/f1 |
|
200 | $ echo c3 > r8/f1 | |
201 | $ hg add --large r8/f1 -R r8 |
|
201 | $ hg add --large r8/f1 -R r8 | |
202 | $ hg commit -m "m1" -R r8 |
|
202 | $ hg commit -m "m1" -R r8 | |
203 | Invoking status precommit hook |
|
203 | Invoking status precommit hook | |
204 | A f1 |
|
204 | A f1 | |
205 | $ hg init empty |
|
205 | $ hg init empty | |
206 | $ hg serve -R empty -d -p $HGPORT2 --pid-file hg.pid \ |
|
206 | $ hg serve -R empty -d -p $HGPORT2 --pid-file hg.pid \ | |
207 | > --config 'web.allow_push=*' --config web.push_ssl=False |
|
207 | > --config 'web.allow_push=*' --config web.push_ssl=False | |
208 | $ cat hg.pid >> $DAEMON_PIDS |
|
208 | $ cat hg.pid >> $DAEMON_PIDS | |
209 | $ rm "${USERCACHE}"/* |
|
209 | $ rm "${USERCACHE}"/* | |
210 | $ hg push -R r8 http://localhost:$HGPORT2/#default |
|
210 | $ hg push -R r8 http://localhost:$HGPORT2/#default | |
211 | pushing to http://localhost:$HGPORT2/ |
|
211 | pushing to http://localhost:$HGPORT2/ | |
212 | searching for changes |
|
212 | searching for changes | |
213 | remote: adding changesets |
|
213 | remote: adding changesets | |
214 | remote: adding manifests |
|
214 | remote: adding manifests | |
215 | remote: adding file changes |
|
215 | remote: adding file changes | |
216 | remote: added 1 changesets with 1 changes to 1 files |
|
216 | remote: added 1 changesets with 1 changes to 1 files | |
217 | $ [ -f "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] |
|
217 | $ [ -f "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] | |
218 | $ [ -f empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] |
|
218 | $ [ -f empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] | |
219 |
|
219 | |||
220 | Clone over http, no largefiles pulled on clone. |
|
220 | Clone over http, no largefiles pulled on clone. | |
221 |
|
221 | |||
222 | $ hg clone http://localhost:$HGPORT2/#default http-clone -U |
|
222 | $ hg clone http://localhost:$HGPORT2/#default http-clone -U | |
223 | adding changesets |
|
223 | adding changesets | |
224 | adding manifests |
|
224 | adding manifests | |
225 | adding file changes |
|
225 | adding file changes | |
226 | added 1 changesets with 1 changes to 1 files |
|
226 | added 1 changesets with 1 changes to 1 files | |
227 |
|
227 | |||
228 | Archive contains largefiles |
|
228 | Archive contains largefiles | |
229 | >>> import urllib2, os |
|
229 | >>> import urllib2, os | |
230 | >>> u = 'http://localhost:%s/archive/default.zip' % os.environ['HGPORT2'] |
|
230 | >>> u = 'http://localhost:%s/archive/default.zip' % os.environ['HGPORT2'] | |
231 | >>> with open('archive.zip', 'w') as f: |
|
231 | >>> with open('archive.zip', 'w') as f: | |
232 | ... f.write(urllib2.urlopen(u).read()) |
|
232 | ... f.write(urllib2.urlopen(u).read()) | |
233 | $ unzip -t archive.zip |
|
233 | $ unzip -t archive.zip | |
234 | Archive: archive.zip |
|
234 | Archive: archive.zip | |
235 | testing: empty-default/.hg_archival.txt*OK (glob) |
|
235 | testing: empty-default/.hg_archival.txt*OK (glob) | |
236 | testing: empty-default/f1*OK (glob) |
|
236 | testing: empty-default/f1*OK (glob) | |
237 | No errors detected in compressed data of archive.zip. |
|
237 | No errors detected in compressed data of archive.zip. | |
238 |
|
238 | |||
239 | test 'verify' with remotestore: |
|
239 | test 'verify' with remotestore: | |
240 |
|
240 | |||
241 | $ rm "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90 |
|
241 | $ rm "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90 | |
242 | $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 . |
|
242 | $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 . | |
243 | $ hg -R http-clone verify --large --lfa |
|
243 | $ hg -R http-clone verify --large --lfa | |
244 | checking changesets |
|
244 | checking changesets | |
245 | checking manifests |
|
245 | checking manifests | |
246 | crosschecking files in changesets and manifests |
|
246 | crosschecking files in changesets and manifests | |
247 | checking files |
|
247 | checking files | |
248 | 1 files, 1 changesets, 1 total revisions |
|
248 | 1 files, 1 changesets, 1 total revisions | |
249 | searching 1 changesets for largefiles |
|
249 | searching 1 changesets for largefiles | |
250 | changeset 0:cf03e5bb9936: f1 missing |
|
250 | changeset 0:cf03e5bb9936: f1 missing | |
251 | verified existence of 1 revisions of 1 largefiles |
|
251 | verified existence of 1 revisions of 1 largefiles | |
252 | [1] |
|
252 | [1] | |
253 | $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/ |
|
253 | $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/ | |
254 | $ hg -R http-clone -q verify --large --lfa |
|
254 | $ hg -R http-clone -q verify --large --lfa | |
255 |
|
255 | |||
256 | largefiles pulled on update - a largefile missing on the server: |
|
256 | largefiles pulled on update - a largefile missing on the server: | |
257 | $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 . |
|
257 | $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 . | |
258 | $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache |
|
258 | $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache | |
259 | getting changed largefiles |
|
259 | getting changed largefiles | |
260 | f1: largefile 02a439e5c31c526465ab1a0ca1f431f76b827b90 not available from http://localhost:$HGPORT2/ |
|
260 | f1: largefile 02a439e5c31c526465ab1a0ca1f431f76b827b90 not available from http://localhost:$HGPORT2/ | |
261 | 0 largefiles updated, 0 removed |
|
261 | 0 largefiles updated, 0 removed | |
262 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
262 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
263 | $ hg -R http-clone st |
|
263 | $ hg -R http-clone st | |
264 | ! f1 |
|
264 | ! f1 | |
265 | $ hg -R http-clone up -Cqr null |
|
265 | $ hg -R http-clone up -Cqr null | |
266 |
|
266 | |||
267 | largefiles pulled on update - a largefile corrupted on the server: |
|
267 | largefiles pulled on update - a largefile corrupted on the server: | |
268 | $ echo corruption > empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 |
|
268 | $ echo corruption > empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 | |
269 | $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache |
|
269 | $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache | |
270 | getting changed largefiles |
|
270 | getting changed largefiles | |
271 | f1: data corruption (expected 02a439e5c31c526465ab1a0ca1f431f76b827b90, got 6a7bb2556144babe3899b25e5428123735bb1e27) |
|
271 | f1: data corruption (expected 02a439e5c31c526465ab1a0ca1f431f76b827b90, got 6a7bb2556144babe3899b25e5428123735bb1e27) | |
272 | 0 largefiles updated, 0 removed |
|
272 | 0 largefiles updated, 0 removed | |
273 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
273 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
274 | $ hg -R http-clone st |
|
274 | $ hg -R http-clone st | |
275 | ! f1 |
|
275 | ! f1 | |
276 | $ [ ! -f http-clone/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] |
|
276 | $ [ ! -f http-clone/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] | |
277 | $ [ ! -f http-clone/f1 ] |
|
277 | $ [ ! -f http-clone/f1 ] | |
278 | $ [ ! -f http-clone-usercache ] |
|
278 | $ [ ! -f http-clone-usercache ] | |
279 | $ hg -R http-clone verify --large --lfc |
|
279 | $ hg -R http-clone verify --large --lfc | |
280 | checking changesets |
|
280 | checking changesets | |
281 | checking manifests |
|
281 | checking manifests | |
282 | crosschecking files in changesets and manifests |
|
282 | crosschecking files in changesets and manifests | |
283 | checking files |
|
283 | checking files | |
284 | 1 files, 1 changesets, 1 total revisions |
|
284 | 1 files, 1 changesets, 1 total revisions | |
285 | searching 1 changesets for largefiles |
|
285 | searching 1 changesets for largefiles | |
286 | verified contents of 1 revisions of 1 largefiles |
|
286 | verified contents of 1 revisions of 1 largefiles | |
287 | $ hg -R http-clone up -Cqr null |
|
287 | $ hg -R http-clone up -Cqr null | |
288 |
|
288 | |||
289 | largefiles pulled on update - no server side problems: |
|
289 | largefiles pulled on update - no server side problems: | |
290 | $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/ |
|
290 | $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/ | |
291 | $ hg -R http-clone --debug up --config largefiles.usercache=http-clone-usercache --config progress.debug=true |
|
291 | $ hg -R http-clone --debug up --config largefiles.usercache=http-clone-usercache --config progress.debug=true | |
292 | resolving manifests |
|
292 | resolving manifests | |
293 | branchmerge: False, force: False, partial: False |
|
293 | branchmerge: False, force: False, partial: False | |
294 | ancestor: 000000000000, local: 000000000000+, remote: cf03e5bb9936 |
|
294 | ancestor: 000000000000, local: 000000000000+, remote: cf03e5bb9936 | |
295 | .hglf/f1: remote created -> g |
|
295 | .hglf/f1: remote created -> g | |
296 | getting .hglf/f1 |
|
296 | getting .hglf/f1 | |
297 | updating: .hglf/f1 1/1 files (100.00%) |
|
297 | updating: .hglf/f1 1/1 files (100.00%) | |
298 | getting changed largefiles |
|
298 | getting changed largefiles | |
299 | using http://localhost:$HGPORT2/ |
|
299 | using http://localhost:$HGPORT2/ | |
300 | sending capabilities command |
|
300 | sending capabilities command | |
301 | sending batch command |
|
301 | sending batch command | |
302 | getting largefiles: 0/1 files (0.00%) |
|
302 | getting largefiles: 0/1 files (0.00%) | |
303 | getting f1:02a439e5c31c526465ab1a0ca1f431f76b827b90 |
|
303 | getting f1:02a439e5c31c526465ab1a0ca1f431f76b827b90 | |
304 | sending getlfile command |
|
304 | sending getlfile command | |
305 | found 02a439e5c31c526465ab1a0ca1f431f76b827b90 in store |
|
305 | found 02a439e5c31c526465ab1a0ca1f431f76b827b90 in store | |
306 | 1 largefiles updated, 0 removed |
|
306 | 1 largefiles updated, 0 removed | |
307 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
307 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
308 |
|
308 | |||
309 | $ ls http-clone-usercache/* |
|
309 | $ ls http-clone-usercache/* | |
310 | http-clone-usercache/02a439e5c31c526465ab1a0ca1f431f76b827b90 |
|
310 | http-clone-usercache/02a439e5c31c526465ab1a0ca1f431f76b827b90 | |
311 |
|
311 | |||
312 | $ rm -rf empty http-clone* |
|
312 | $ rm -rf empty http-clone* | |
313 |
|
313 | |||
314 | used all HGPORTs, kill all daemons |
|
314 | used all HGPORTs, kill all daemons | |
315 | $ killdaemons.py |
|
315 | $ killdaemons.py | |
316 |
|
316 | |||
317 | largefiles should batch verify remote calls |
|
317 | largefiles should batch verify remote calls | |
318 |
|
318 | |||
319 | $ hg init batchverifymain |
|
319 | $ hg init batchverifymain | |
320 | $ cd batchverifymain |
|
320 | $ cd batchverifymain | |
321 | $ echo "aaa" >> a |
|
321 | $ echo "aaa" >> a | |
322 | $ hg add --large a |
|
322 | $ hg add --large a | |
323 | $ hg commit -m "a" |
|
323 | $ hg commit -m "a" | |
324 | Invoking status precommit hook |
|
324 | Invoking status precommit hook | |
325 | A a |
|
325 | A a | |
326 | $ echo "bbb" >> b |
|
326 | $ echo "bbb" >> b | |
327 | $ hg add --large b |
|
327 | $ hg add --large b | |
328 | $ hg commit -m "b" |
|
328 | $ hg commit -m "b" | |
329 | Invoking status precommit hook |
|
329 | Invoking status precommit hook | |
330 | A b |
|
330 | A b | |
331 | $ cd .. |
|
331 | $ cd .. | |
332 | $ hg serve -R batchverifymain -d -p $HGPORT --pid-file hg.pid \ |
|
332 | $ hg serve -R batchverifymain -d -p $HGPORT --pid-file hg.pid \ | |
333 | > -A access.log |
|
333 | > -A access.log | |
334 | $ cat hg.pid >> $DAEMON_PIDS |
|
334 | $ cat hg.pid >> $DAEMON_PIDS | |
335 | $ hg clone --noupdate http://localhost:$HGPORT batchverifyclone |
|
335 | $ hg clone --noupdate http://localhost:$HGPORT batchverifyclone | |
336 | requesting all changes |
|
336 | requesting all changes | |
337 | adding changesets |
|
337 | adding changesets | |
338 | adding manifests |
|
338 | adding manifests | |
339 | adding file changes |
|
339 | adding file changes | |
340 | added 2 changesets with 2 changes to 2 files |
|
340 | added 2 changesets with 2 changes to 2 files | |
341 | $ hg -R batchverifyclone verify --large --lfa |
|
341 | $ hg -R batchverifyclone verify --large --lfa | |
342 | checking changesets |
|
342 | checking changesets | |
343 | checking manifests |
|
343 | checking manifests | |
344 | crosschecking files in changesets and manifests |
|
344 | crosschecking files in changesets and manifests | |
345 | checking files |
|
345 | checking files | |
346 | 2 files, 2 changesets, 2 total revisions |
|
346 | 2 files, 2 changesets, 2 total revisions | |
347 | searching 2 changesets for largefiles |
|
347 | searching 2 changesets for largefiles | |
348 | verified existence of 2 revisions of 2 largefiles |
|
348 | verified existence of 2 revisions of 2 largefiles | |
349 | $ tail -1 access.log |
|
349 | $ tail -1 access.log | |
350 | 127.0.0.1 - - [*] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=statlfile+sha%3D972a1a11f19934401291cc99117ec614933374ce%3Bstatlfile+sha%3Dc801c9cfe94400963fcb683246217d5db77f9a9a (glob) |
|
350 | 127.0.0.1 - - [*] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=statlfile+sha%3D972a1a11f19934401291cc99117ec614933374ce%3Bstatlfile+sha%3Dc801c9cfe94400963fcb683246217d5db77f9a9a x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
351 |
$ |
|
351 | $ hg -R batchverifyclone update | |
352 | getting changed largefiles |
|
352 | getting changed largefiles | |
353 | 2 largefiles updated, 0 removed |
|
353 | 2 largefiles updated, 0 removed | |
354 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
354 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
355 |
|
355 | |||
356 | Clear log file before next test |
|
356 | Clear log file before next test | |
357 |
|
357 | |||
358 | $ printf "" > access.log |
|
358 | $ printf "" > access.log | |
359 |
|
359 | |||
360 | Verify should check file on remote server only when file is not |
|
360 | Verify should check file on remote server only when file is not | |
361 | available locally. |
|
361 | available locally. | |
362 |
|
362 | |||
363 | $ echo "ccc" >> batchverifymain/c |
|
363 | $ echo "ccc" >> batchverifymain/c | |
364 | $ hg -R batchverifymain status |
|
364 | $ hg -R batchverifymain status | |
365 | ? c |
|
365 | ? c | |
366 | $ hg -R batchverifymain add --large batchverifymain/c |
|
366 | $ hg -R batchverifymain add --large batchverifymain/c | |
367 | $ hg -R batchverifymain commit -m "c" |
|
367 | $ hg -R batchverifymain commit -m "c" | |
368 | Invoking status precommit hook |
|
368 | Invoking status precommit hook | |
369 | A c |
|
369 | A c | |
370 | $ hg -R batchverifyclone pull |
|
370 | $ hg -R batchverifyclone pull | |
371 | pulling from http://localhost:$HGPORT/ |
|
371 | pulling from http://localhost:$HGPORT/ | |
372 | searching for changes |
|
372 | searching for changes | |
373 | adding changesets |
|
373 | adding changesets | |
374 | adding manifests |
|
374 | adding manifests | |
375 | adding file changes |
|
375 | adding file changes | |
376 | added 1 changesets with 1 changes to 1 files |
|
376 | added 1 changesets with 1 changes to 1 files | |
377 | (run 'hg update' to get a working copy) |
|
377 | (run 'hg update' to get a working copy) | |
378 | $ hg -R batchverifyclone verify --lfa |
|
378 | $ hg -R batchverifyclone verify --lfa | |
379 | checking changesets |
|
379 | checking changesets | |
380 | checking manifests |
|
380 | checking manifests | |
381 | crosschecking files in changesets and manifests |
|
381 | crosschecking files in changesets and manifests | |
382 | checking files |
|
382 | checking files | |
383 | 3 files, 3 changesets, 3 total revisions |
|
383 | 3 files, 3 changesets, 3 total revisions | |
384 | searching 3 changesets for largefiles |
|
384 | searching 3 changesets for largefiles | |
385 | verified existence of 3 revisions of 3 largefiles |
|
385 | verified existence of 3 revisions of 3 largefiles | |
386 | $ tail -1 access.log |
|
386 | $ tail -1 access.log | |
387 | 127.0.0.1 - - [*] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=statlfile+sha%3Dc8559c3c9cfb42131794b7d8009230403b9b454c (glob) |
|
387 | 127.0.0.1 - - [*] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=statlfile+sha%3Dc8559c3c9cfb42131794b7d8009230403b9b454c x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
388 |
|
388 | |||
389 |
$ |
|
389 | $ killdaemons.py | |
390 |
|
390 | |||
391 | largefiles should not ask for password again after successful authorization |
|
391 | largefiles should not ask for password again after successful authorization | |
392 |
|
392 | |||
393 | $ hg init credentialmain |
|
393 | $ hg init credentialmain | |
394 | $ cd credentialmain |
|
394 | $ cd credentialmain | |
395 | $ echo "aaa" >> a |
|
395 | $ echo "aaa" >> a | |
396 | $ hg add --large a |
|
396 | $ hg add --large a | |
397 | $ hg commit -m "a" |
|
397 | $ hg commit -m "a" | |
398 | Invoking status precommit hook |
|
398 | Invoking status precommit hook | |
399 | A a |
|
399 | A a | |
400 |
|
400 | |||
401 | Before running server clear the user cache to force clone to download |
|
401 | Before running server clear the user cache to force clone to download | |
402 | a large file from the server rather than to get it from the cache |
|
402 | a large file from the server rather than to get it from the cache | |
403 |
|
403 | |||
404 | $ rm "${USERCACHE}"/* |
|
404 | $ rm "${USERCACHE}"/* | |
405 |
|
405 | |||
406 | $ cd .. |
|
406 | $ cd .. | |
407 | $ cat << EOT > userpass.py |
|
407 | $ cat << EOT > userpass.py | |
408 | > import base64 |
|
408 | > import base64 | |
409 | > from mercurial.hgweb import common |
|
409 | > from mercurial.hgweb import common | |
410 | > def perform_authentication(hgweb, req, op): |
|
410 | > def perform_authentication(hgweb, req, op): | |
411 | > auth = req.env.get('HTTP_AUTHORIZATION') |
|
411 | > auth = req.env.get('HTTP_AUTHORIZATION') | |
412 | > if not auth: |
|
412 | > if not auth: | |
413 | > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who', |
|
413 | > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who', | |
414 | > [('WWW-Authenticate', 'Basic Realm="mercurial"')]) |
|
414 | > [('WWW-Authenticate', 'Basic Realm="mercurial"')]) | |
415 | > if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']: |
|
415 | > if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']: | |
416 | > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no') |
|
416 | > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no') | |
417 | > def extsetup(): |
|
417 | > def extsetup(): | |
418 | > common.permhooks.insert(0, perform_authentication) |
|
418 | > common.permhooks.insert(0, perform_authentication) | |
419 | > EOT |
|
419 | > EOT | |
420 | $ hg serve --config extensions.x=userpass.py -R credentialmain \ |
|
420 | $ hg serve --config extensions.x=userpass.py -R credentialmain \ | |
421 | > -d -p $HGPORT --pid-file hg.pid -A access.log |
|
421 | > -d -p $HGPORT --pid-file hg.pid -A access.log | |
422 | $ cat hg.pid >> $DAEMON_PIDS |
|
422 | $ cat hg.pid >> $DAEMON_PIDS | |
423 | $ cat << EOF > get_pass.py |
|
423 | $ cat << EOF > get_pass.py | |
424 | > import getpass |
|
424 | > import getpass | |
425 | > def newgetpass(arg): |
|
425 | > def newgetpass(arg): | |
426 | > return "pass" |
|
426 | > return "pass" | |
427 | > getpass.getpass = newgetpass |
|
427 | > getpass.getpass = newgetpass | |
428 | > EOF |
|
428 | > EOF | |
429 | $ hg clone --config ui.interactive=true --config extensions.getpass=get_pass.py \ |
|
429 | $ hg clone --config ui.interactive=true --config extensions.getpass=get_pass.py \ | |
430 | > http://user@localhost:$HGPORT credentialclone |
|
430 | > http://user@localhost:$HGPORT credentialclone | |
431 | requesting all changes |
|
431 | requesting all changes | |
432 | http authorization required for http://localhost:$HGPORT/ |
|
432 | http authorization required for http://localhost:$HGPORT/ | |
433 | realm: mercurial |
|
433 | realm: mercurial | |
434 | user: user |
|
434 | user: user | |
435 | password: adding changesets |
|
435 | password: adding changesets | |
436 | adding manifests |
|
436 | adding manifests | |
437 | adding file changes |
|
437 | adding file changes | |
438 | added 1 changesets with 1 changes to 1 files |
|
438 | added 1 changesets with 1 changes to 1 files | |
439 | updating to branch default |
|
439 | updating to branch default | |
440 | getting changed largefiles |
|
440 | getting changed largefiles | |
441 | 1 largefiles updated, 0 removed |
|
441 | 1 largefiles updated, 0 removed | |
442 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
442 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
443 |
|
443 | |||
444 | $ rm hg.pid access.log |
|
444 | $ rm hg.pid access.log | |
445 | $ killdaemons.py |
|
445 | $ killdaemons.py | |
446 |
|
446 | |||
447 | #endif |
|
447 | #endif |
@@ -1,406 +1,406 b'' | |||||
1 |
|
1 | |||
2 | Function to test discovery between two repos in both directions, using both the local shortcut |
|
2 | Function to test discovery between two repos in both directions, using both the local shortcut | |
3 | (which is currently not activated by default) and the full remotable protocol: |
|
3 | (which is currently not activated by default) and the full remotable protocol: | |
4 |
|
4 | |||
5 | $ testdesc() { # revs_a, revs_b, dagdesc |
|
5 | $ testdesc() { # revs_a, revs_b, dagdesc | |
6 | > if [ -d foo ]; then rm -rf foo; fi |
|
6 | > if [ -d foo ]; then rm -rf foo; fi | |
7 | > hg init foo |
|
7 | > hg init foo | |
8 | > cd foo |
|
8 | > cd foo | |
9 | > hg debugbuilddag "$3" |
|
9 | > hg debugbuilddag "$3" | |
10 | > hg clone . a $1 --quiet |
|
10 | > hg clone . a $1 --quiet | |
11 | > hg clone . b $2 --quiet |
|
11 | > hg clone . b $2 --quiet | |
12 | > echo |
|
12 | > echo | |
13 | > echo "% -- a -> b tree" |
|
13 | > echo "% -- a -> b tree" | |
14 | > hg -R a debugdiscovery b --verbose --old |
|
14 | > hg -R a debugdiscovery b --verbose --old | |
15 | > echo |
|
15 | > echo | |
16 | > echo "% -- a -> b set" |
|
16 | > echo "% -- a -> b set" | |
17 | > hg -R a debugdiscovery b --verbose --debug --config progress.debug=true |
|
17 | > hg -R a debugdiscovery b --verbose --debug --config progress.debug=true | |
18 | > echo |
|
18 | > echo | |
19 | > echo "% -- b -> a tree" |
|
19 | > echo "% -- b -> a tree" | |
20 | > hg -R b debugdiscovery a --verbose --old --config |
|
20 | > hg -R b debugdiscovery a --verbose --old --config | |
21 | > echo |
|
21 | > echo | |
22 | > echo "% -- b -> a set" |
|
22 | > echo "% -- b -> a set" | |
23 | > hg -R b debugdiscovery a --verbose --debug --config progress.debug=true |
|
23 | > hg -R b debugdiscovery a --verbose --debug --config progress.debug=true | |
24 | > cd .. |
|
24 | > cd .. | |
25 | > } |
|
25 | > } | |
26 |
|
26 | |||
27 |
|
27 | |||
28 | Small superset: |
|
28 | Small superset: | |
29 |
|
29 | |||
30 | $ testdesc '-ra1 -ra2' '-rb1 -rb2 -rb3' ' |
|
30 | $ testdesc '-ra1 -ra2' '-rb1 -rb2 -rb3' ' | |
31 | > +2:f +1:a1:b1 |
|
31 | > +2:f +1:a1:b1 | |
32 | > <f +4 :a2 |
|
32 | > <f +4 :a2 | |
33 | > +5 :b2 |
|
33 | > +5 :b2 | |
34 | > <f +3 :b3' |
|
34 | > <f +3 :b3' | |
35 |
|
35 | |||
36 | % -- a -> b tree |
|
36 | % -- a -> b tree | |
37 | comparing with b |
|
37 | comparing with b | |
38 | searching for changes |
|
38 | searching for changes | |
39 | unpruned common: 01241442b3c2 66f7d451a68b b5714e113bc0 |
|
39 | unpruned common: 01241442b3c2 66f7d451a68b b5714e113bc0 | |
40 | common heads: 01241442b3c2 b5714e113bc0 |
|
40 | common heads: 01241442b3c2 b5714e113bc0 | |
41 | local is subset |
|
41 | local is subset | |
42 |
|
42 | |||
43 | % -- a -> b set |
|
43 | % -- a -> b set | |
44 | comparing with b |
|
44 | comparing with b | |
45 | query 1; heads |
|
45 | query 1; heads | |
46 | searching for changes |
|
46 | searching for changes | |
47 | all local heads known remotely |
|
47 | all local heads known remotely | |
48 | common heads: 01241442b3c2 b5714e113bc0 |
|
48 | common heads: 01241442b3c2 b5714e113bc0 | |
49 | local is subset |
|
49 | local is subset | |
50 |
|
50 | |||
51 | % -- b -> a tree |
|
51 | % -- b -> a tree | |
52 | comparing with a |
|
52 | comparing with a | |
53 | searching for changes |
|
53 | searching for changes | |
54 | unpruned common: 01241442b3c2 b5714e113bc0 |
|
54 | unpruned common: 01241442b3c2 b5714e113bc0 | |
55 | common heads: 01241442b3c2 b5714e113bc0 |
|
55 | common heads: 01241442b3c2 b5714e113bc0 | |
56 | remote is subset |
|
56 | remote is subset | |
57 |
|
57 | |||
58 | % -- b -> a set |
|
58 | % -- b -> a set | |
59 | comparing with a |
|
59 | comparing with a | |
60 | query 1; heads |
|
60 | query 1; heads | |
61 | searching for changes |
|
61 | searching for changes | |
62 | all remote heads known locally |
|
62 | all remote heads known locally | |
63 | common heads: 01241442b3c2 b5714e113bc0 |
|
63 | common heads: 01241442b3c2 b5714e113bc0 | |
64 | remote is subset |
|
64 | remote is subset | |
65 |
|
65 | |||
66 |
|
66 | |||
67 | Many new: |
|
67 | Many new: | |
68 |
|
68 | |||
69 | $ testdesc '-ra1 -ra2' '-rb' ' |
|
69 | $ testdesc '-ra1 -ra2' '-rb' ' | |
70 | > +2:f +3:a1 +3:b |
|
70 | > +2:f +3:a1 +3:b | |
71 | > <f +30 :a2' |
|
71 | > <f +30 :a2' | |
72 |
|
72 | |||
73 | % -- a -> b tree |
|
73 | % -- a -> b tree | |
74 | comparing with b |
|
74 | comparing with b | |
75 | searching for changes |
|
75 | searching for changes | |
76 | unpruned common: bebd167eb94d |
|
76 | unpruned common: bebd167eb94d | |
77 | common heads: bebd167eb94d |
|
77 | common heads: bebd167eb94d | |
78 |
|
78 | |||
79 | % -- a -> b set |
|
79 | % -- a -> b set | |
80 | comparing with b |
|
80 | comparing with b | |
81 | query 1; heads |
|
81 | query 1; heads | |
82 | searching for changes |
|
82 | searching for changes | |
83 | taking initial sample |
|
83 | taking initial sample | |
84 | searching: 2 queries |
|
84 | searching: 2 queries | |
85 | query 2; still undecided: 29, sample size is: 29 |
|
85 | query 2; still undecided: 29, sample size is: 29 | |
86 | 2 total queries |
|
86 | 2 total queries | |
87 | common heads: bebd167eb94d |
|
87 | common heads: bebd167eb94d | |
88 |
|
88 | |||
89 | % -- b -> a tree |
|
89 | % -- b -> a tree | |
90 | comparing with a |
|
90 | comparing with a | |
91 | searching for changes |
|
91 | searching for changes | |
92 | unpruned common: 66f7d451a68b bebd167eb94d |
|
92 | unpruned common: 66f7d451a68b bebd167eb94d | |
93 | common heads: bebd167eb94d |
|
93 | common heads: bebd167eb94d | |
94 |
|
94 | |||
95 | % -- b -> a set |
|
95 | % -- b -> a set | |
96 | comparing with a |
|
96 | comparing with a | |
97 | query 1; heads |
|
97 | query 1; heads | |
98 | searching for changes |
|
98 | searching for changes | |
99 | taking initial sample |
|
99 | taking initial sample | |
100 | searching: 2 queries |
|
100 | searching: 2 queries | |
101 | query 2; still undecided: 2, sample size is: 2 |
|
101 | query 2; still undecided: 2, sample size is: 2 | |
102 | 2 total queries |
|
102 | 2 total queries | |
103 | common heads: bebd167eb94d |
|
103 | common heads: bebd167eb94d | |
104 |
|
104 | |||
105 |
|
105 | |||
106 | Both sides many new with stub: |
|
106 | Both sides many new with stub: | |
107 |
|
107 | |||
108 | $ testdesc '-ra1 -ra2' '-rb' ' |
|
108 | $ testdesc '-ra1 -ra2' '-rb' ' | |
109 | > +2:f +2:a1 +30 :b |
|
109 | > +2:f +2:a1 +30 :b | |
110 | > <f +30 :a2' |
|
110 | > <f +30 :a2' | |
111 |
|
111 | |||
112 | % -- a -> b tree |
|
112 | % -- a -> b tree | |
113 | comparing with b |
|
113 | comparing with b | |
114 | searching for changes |
|
114 | searching for changes | |
115 | unpruned common: 2dc09a01254d |
|
115 | unpruned common: 2dc09a01254d | |
116 | common heads: 2dc09a01254d |
|
116 | common heads: 2dc09a01254d | |
117 |
|
117 | |||
118 | % -- a -> b set |
|
118 | % -- a -> b set | |
119 | comparing with b |
|
119 | comparing with b | |
120 | query 1; heads |
|
120 | query 1; heads | |
121 | searching for changes |
|
121 | searching for changes | |
122 | taking initial sample |
|
122 | taking initial sample | |
123 | searching: 2 queries |
|
123 | searching: 2 queries | |
124 | query 2; still undecided: 29, sample size is: 29 |
|
124 | query 2; still undecided: 29, sample size is: 29 | |
125 | 2 total queries |
|
125 | 2 total queries | |
126 | common heads: 2dc09a01254d |
|
126 | common heads: 2dc09a01254d | |
127 |
|
127 | |||
128 | % -- b -> a tree |
|
128 | % -- b -> a tree | |
129 | comparing with a |
|
129 | comparing with a | |
130 | searching for changes |
|
130 | searching for changes | |
131 | unpruned common: 2dc09a01254d 66f7d451a68b |
|
131 | unpruned common: 2dc09a01254d 66f7d451a68b | |
132 | common heads: 2dc09a01254d |
|
132 | common heads: 2dc09a01254d | |
133 |
|
133 | |||
134 | % -- b -> a set |
|
134 | % -- b -> a set | |
135 | comparing with a |
|
135 | comparing with a | |
136 | query 1; heads |
|
136 | query 1; heads | |
137 | searching for changes |
|
137 | searching for changes | |
138 | taking initial sample |
|
138 | taking initial sample | |
139 | searching: 2 queries |
|
139 | searching: 2 queries | |
140 | query 2; still undecided: 29, sample size is: 29 |
|
140 | query 2; still undecided: 29, sample size is: 29 | |
141 | 2 total queries |
|
141 | 2 total queries | |
142 | common heads: 2dc09a01254d |
|
142 | common heads: 2dc09a01254d | |
143 |
|
143 | |||
144 |
|
144 | |||
145 | Both many new: |
|
145 | Both many new: | |
146 |
|
146 | |||
147 | $ testdesc '-ra' '-rb' ' |
|
147 | $ testdesc '-ra' '-rb' ' | |
148 | > +2:f +30 :b |
|
148 | > +2:f +30 :b | |
149 | > <f +30 :a' |
|
149 | > <f +30 :a' | |
150 |
|
150 | |||
151 | % -- a -> b tree |
|
151 | % -- a -> b tree | |
152 | comparing with b |
|
152 | comparing with b | |
153 | searching for changes |
|
153 | searching for changes | |
154 | unpruned common: 66f7d451a68b |
|
154 | unpruned common: 66f7d451a68b | |
155 | common heads: 66f7d451a68b |
|
155 | common heads: 66f7d451a68b | |
156 |
|
156 | |||
157 | % -- a -> b set |
|
157 | % -- a -> b set | |
158 | comparing with b |
|
158 | comparing with b | |
159 | query 1; heads |
|
159 | query 1; heads | |
160 | searching for changes |
|
160 | searching for changes | |
161 | taking quick initial sample |
|
161 | taking quick initial sample | |
162 | searching: 2 queries |
|
162 | searching: 2 queries | |
163 | query 2; still undecided: 31, sample size is: 31 |
|
163 | query 2; still undecided: 31, sample size is: 31 | |
164 | 2 total queries |
|
164 | 2 total queries | |
165 | common heads: 66f7d451a68b |
|
165 | common heads: 66f7d451a68b | |
166 |
|
166 | |||
167 | % -- b -> a tree |
|
167 | % -- b -> a tree | |
168 | comparing with a |
|
168 | comparing with a | |
169 | searching for changes |
|
169 | searching for changes | |
170 | unpruned common: 66f7d451a68b |
|
170 | unpruned common: 66f7d451a68b | |
171 | common heads: 66f7d451a68b |
|
171 | common heads: 66f7d451a68b | |
172 |
|
172 | |||
173 | % -- b -> a set |
|
173 | % -- b -> a set | |
174 | comparing with a |
|
174 | comparing with a | |
175 | query 1; heads |
|
175 | query 1; heads | |
176 | searching for changes |
|
176 | searching for changes | |
177 | taking quick initial sample |
|
177 | taking quick initial sample | |
178 | searching: 2 queries |
|
178 | searching: 2 queries | |
179 | query 2; still undecided: 31, sample size is: 31 |
|
179 | query 2; still undecided: 31, sample size is: 31 | |
180 | 2 total queries |
|
180 | 2 total queries | |
181 | common heads: 66f7d451a68b |
|
181 | common heads: 66f7d451a68b | |
182 |
|
182 | |||
183 |
|
183 | |||
184 | Both many new skewed: |
|
184 | Both many new skewed: | |
185 |
|
185 | |||
186 | $ testdesc '-ra' '-rb' ' |
|
186 | $ testdesc '-ra' '-rb' ' | |
187 | > +2:f +30 :b |
|
187 | > +2:f +30 :b | |
188 | > <f +50 :a' |
|
188 | > <f +50 :a' | |
189 |
|
189 | |||
190 | % -- a -> b tree |
|
190 | % -- a -> b tree | |
191 | comparing with b |
|
191 | comparing with b | |
192 | searching for changes |
|
192 | searching for changes | |
193 | unpruned common: 66f7d451a68b |
|
193 | unpruned common: 66f7d451a68b | |
194 | common heads: 66f7d451a68b |
|
194 | common heads: 66f7d451a68b | |
195 |
|
195 | |||
196 | % -- a -> b set |
|
196 | % -- a -> b set | |
197 | comparing with b |
|
197 | comparing with b | |
198 | query 1; heads |
|
198 | query 1; heads | |
199 | searching for changes |
|
199 | searching for changes | |
200 | taking quick initial sample |
|
200 | taking quick initial sample | |
201 | searching: 2 queries |
|
201 | searching: 2 queries | |
202 | query 2; still undecided: 51, sample size is: 51 |
|
202 | query 2; still undecided: 51, sample size is: 51 | |
203 | 2 total queries |
|
203 | 2 total queries | |
204 | common heads: 66f7d451a68b |
|
204 | common heads: 66f7d451a68b | |
205 |
|
205 | |||
206 | % -- b -> a tree |
|
206 | % -- b -> a tree | |
207 | comparing with a |
|
207 | comparing with a | |
208 | searching for changes |
|
208 | searching for changes | |
209 | unpruned common: 66f7d451a68b |
|
209 | unpruned common: 66f7d451a68b | |
210 | common heads: 66f7d451a68b |
|
210 | common heads: 66f7d451a68b | |
211 |
|
211 | |||
212 | % -- b -> a set |
|
212 | % -- b -> a set | |
213 | comparing with a |
|
213 | comparing with a | |
214 | query 1; heads |
|
214 | query 1; heads | |
215 | searching for changes |
|
215 | searching for changes | |
216 | taking quick initial sample |
|
216 | taking quick initial sample | |
217 | searching: 2 queries |
|
217 | searching: 2 queries | |
218 | query 2; still undecided: 31, sample size is: 31 |
|
218 | query 2; still undecided: 31, sample size is: 31 | |
219 | 2 total queries |
|
219 | 2 total queries | |
220 | common heads: 66f7d451a68b |
|
220 | common heads: 66f7d451a68b | |
221 |
|
221 | |||
222 |
|
222 | |||
223 | Both many new on top of long history: |
|
223 | Both many new on top of long history: | |
224 |
|
224 | |||
225 | $ testdesc '-ra' '-rb' ' |
|
225 | $ testdesc '-ra' '-rb' ' | |
226 | > +1000:f +30 :b |
|
226 | > +1000:f +30 :b | |
227 | > <f +50 :a' |
|
227 | > <f +50 :a' | |
228 |
|
228 | |||
229 | % -- a -> b tree |
|
229 | % -- a -> b tree | |
230 | comparing with b |
|
230 | comparing with b | |
231 | searching for changes |
|
231 | searching for changes | |
232 | unpruned common: 7ead0cba2838 |
|
232 | unpruned common: 7ead0cba2838 | |
233 | common heads: 7ead0cba2838 |
|
233 | common heads: 7ead0cba2838 | |
234 |
|
234 | |||
235 | % -- a -> b set |
|
235 | % -- a -> b set | |
236 | comparing with b |
|
236 | comparing with b | |
237 | query 1; heads |
|
237 | query 1; heads | |
238 | searching for changes |
|
238 | searching for changes | |
239 | taking quick initial sample |
|
239 | taking quick initial sample | |
240 | searching: 2 queries |
|
240 | searching: 2 queries | |
241 | query 2; still undecided: 1049, sample size is: 11 |
|
241 | query 2; still undecided: 1049, sample size is: 11 | |
242 | sampling from both directions |
|
242 | sampling from both directions | |
243 | searching: 3 queries |
|
243 | searching: 3 queries | |
244 | query 3; still undecided: 31, sample size is: 31 |
|
244 | query 3; still undecided: 31, sample size is: 31 | |
245 | 3 total queries |
|
245 | 3 total queries | |
246 | common heads: 7ead0cba2838 |
|
246 | common heads: 7ead0cba2838 | |
247 |
|
247 | |||
248 | % -- b -> a tree |
|
248 | % -- b -> a tree | |
249 | comparing with a |
|
249 | comparing with a | |
250 | searching for changes |
|
250 | searching for changes | |
251 | unpruned common: 7ead0cba2838 |
|
251 | unpruned common: 7ead0cba2838 | |
252 | common heads: 7ead0cba2838 |
|
252 | common heads: 7ead0cba2838 | |
253 |
|
253 | |||
254 | % -- b -> a set |
|
254 | % -- b -> a set | |
255 | comparing with a |
|
255 | comparing with a | |
256 | query 1; heads |
|
256 | query 1; heads | |
257 | searching for changes |
|
257 | searching for changes | |
258 | taking quick initial sample |
|
258 | taking quick initial sample | |
259 | searching: 2 queries |
|
259 | searching: 2 queries | |
260 | query 2; still undecided: 1029, sample size is: 11 |
|
260 | query 2; still undecided: 1029, sample size is: 11 | |
261 | sampling from both directions |
|
261 | sampling from both directions | |
262 | searching: 3 queries |
|
262 | searching: 3 queries | |
263 | query 3; still undecided: 15, sample size is: 15 |
|
263 | query 3; still undecided: 15, sample size is: 15 | |
264 | 3 total queries |
|
264 | 3 total queries | |
265 | common heads: 7ead0cba2838 |
|
265 | common heads: 7ead0cba2838 | |
266 |
|
266 | |||
267 |
|
267 | |||
268 | One with >200 heads, which used to use up all of the sample: |
|
268 | One with >200 heads, which used to use up all of the sample: | |
269 |
|
269 | |||
270 | $ hg init manyheads |
|
270 | $ hg init manyheads | |
271 | $ cd manyheads |
|
271 | $ cd manyheads | |
272 | $ echo "+300:r @a" >dagdesc |
|
272 | $ echo "+300:r @a" >dagdesc | |
273 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
273 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads | |
274 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
274 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads | |
275 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
275 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads | |
276 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
276 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads | |
277 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
277 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads | |
278 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
278 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads | |
279 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
279 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads | |
280 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
280 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads | |
281 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
281 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads | |
282 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
282 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads | |
283 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
283 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads | |
284 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
284 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads | |
285 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
285 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads | |
286 | $ echo "@b *r+3" >>dagdesc # one more head |
|
286 | $ echo "@b *r+3" >>dagdesc # one more head | |
287 | $ hg debugbuilddag <dagdesc |
|
287 | $ hg debugbuilddag <dagdesc | |
288 | reading DAG from stdin |
|
288 | reading DAG from stdin | |
289 |
|
289 | |||
290 | $ hg heads -t --template . | wc -c |
|
290 | $ hg heads -t --template . | wc -c | |
291 | \s*261 (re) |
|
291 | \s*261 (re) | |
292 |
|
292 | |||
293 | $ hg clone -b a . a |
|
293 | $ hg clone -b a . a | |
294 | adding changesets |
|
294 | adding changesets | |
295 | adding manifests |
|
295 | adding manifests | |
296 | adding file changes |
|
296 | adding file changes | |
297 | added 1340 changesets with 0 changes to 0 files (+259 heads) |
|
297 | added 1340 changesets with 0 changes to 0 files (+259 heads) | |
298 | updating to branch a |
|
298 | updating to branch a | |
299 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
299 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
300 | $ hg clone -b b . b |
|
300 | $ hg clone -b b . b | |
301 | adding changesets |
|
301 | adding changesets | |
302 | adding manifests |
|
302 | adding manifests | |
303 | adding file changes |
|
303 | adding file changes | |
304 | added 304 changesets with 0 changes to 0 files |
|
304 | added 304 changesets with 0 changes to 0 files | |
305 | updating to branch b |
|
305 | updating to branch b | |
306 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
306 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
307 |
|
307 | |||
308 | $ hg -R a debugdiscovery b --debug --verbose --config progress.debug=true |
|
308 | $ hg -R a debugdiscovery b --debug --verbose --config progress.debug=true | |
309 | comparing with b |
|
309 | comparing with b | |
310 | query 1; heads |
|
310 | query 1; heads | |
311 | searching for changes |
|
311 | searching for changes | |
312 | taking quick initial sample |
|
312 | taking quick initial sample | |
313 | searching: 2 queries |
|
313 | searching: 2 queries | |
314 | query 2; still undecided: 1240, sample size is: 100 |
|
314 | query 2; still undecided: 1240, sample size is: 100 | |
315 | sampling from both directions |
|
315 | sampling from both directions | |
316 | searching: 3 queries |
|
316 | searching: 3 queries | |
317 | query 3; still undecided: 1140, sample size is: 200 |
|
317 | query 3; still undecided: 1140, sample size is: 200 | |
318 | sampling from both directions |
|
318 | sampling from both directions | |
319 | searching: 4 queries |
|
319 | searching: 4 queries | |
320 | query 4; still undecided: \d+, sample size is: 200 (re) |
|
320 | query 4; still undecided: \d+, sample size is: 200 (re) | |
321 | sampling from both directions |
|
321 | sampling from both directions | |
322 | searching: 5 queries |
|
322 | searching: 5 queries | |
323 | query 5; still undecided: \d+, sample size is: 200 (re) |
|
323 | query 5; still undecided: \d+, sample size is: 200 (re) | |
324 | sampling from both directions |
|
324 | sampling from both directions | |
325 | searching: 6 queries |
|
325 | searching: 6 queries | |
326 | query 6; still undecided: \d+, sample size is: \d+ (re) |
|
326 | query 6; still undecided: \d+, sample size is: \d+ (re) | |
327 | 6 total queries |
|
327 | 6 total queries | |
328 | common heads: 3ee37d65064a |
|
328 | common heads: 3ee37d65064a | |
329 |
|
329 | |||
330 | Test actual protocol when pulling one new head in addition to common heads |
|
330 | Test actual protocol when pulling one new head in addition to common heads | |
331 |
|
331 | |||
332 | $ hg clone -U b c |
|
332 | $ hg clone -U b c | |
333 | $ hg -R c id -ir tip |
|
333 | $ hg -R c id -ir tip | |
334 | 513314ca8b3a |
|
334 | 513314ca8b3a | |
335 | $ hg -R c up -qr default |
|
335 | $ hg -R c up -qr default | |
336 | $ touch c/f |
|
336 | $ touch c/f | |
337 | $ hg -R c ci -Aqm "extra head" |
|
337 | $ hg -R c ci -Aqm "extra head" | |
338 | $ hg -R c id -i |
|
338 | $ hg -R c id -i | |
339 | e64a39e7da8b |
|
339 | e64a39e7da8b | |
340 |
|
340 | |||
341 | $ hg serve -R c -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
341 | $ hg serve -R c -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
342 | $ cat hg.pid >> $DAEMON_PIDS |
|
342 | $ cat hg.pid >> $DAEMON_PIDS | |
343 |
|
343 | |||
344 | $ hg -R b incoming http://localhost:$HGPORT/ -T '{node|short}\n' |
|
344 | $ hg -R b incoming http://localhost:$HGPORT/ -T '{node|short}\n' | |
345 | comparing with http://localhost:$HGPORT/ |
|
345 | comparing with http://localhost:$HGPORT/ | |
346 | searching for changes |
|
346 | searching for changes | |
347 | e64a39e7da8b |
|
347 | e64a39e7da8b | |
348 |
|
348 | |||
349 | $ killdaemons.py |
|
349 | $ killdaemons.py | |
350 | $ cut -d' ' -f6- access.log | grep -v cmd=known # cmd=known uses random sampling |
|
350 | $ cut -d' ' -f6- access.log | grep -v cmd=known # cmd=known uses random sampling | |
351 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
351 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
352 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D513314ca8b3ae4dac8eec56966265b00fcf866db |
|
352 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D513314ca8b3ae4dac8eec56966265b00fcf866db x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
353 | "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=513314ca8b3ae4dac8eec56966265b00fcf866db&heads=e64a39e7da8b0d54bc63e81169aff001c13b3477 |
|
353 | "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=513314ca8b3ae4dac8eec56966265b00fcf866db&heads=e64a39e7da8b0d54bc63e81169aff001c13b3477 x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
354 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases |
|
354 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
355 |
$ |
|
355 | $ cat errors.log | |
356 |
|
356 | |||
357 | $ cd .. |
|
357 | $ cd .. | |
358 |
|
358 | |||
359 |
|
359 | |||
360 | Issue 4438 - test coverage for 3ef893520a85 issues. |
|
360 | Issue 4438 - test coverage for 3ef893520a85 issues. | |
361 |
|
361 | |||
362 | $ mkdir issue4438 |
|
362 | $ mkdir issue4438 | |
363 | $ cd issue4438 |
|
363 | $ cd issue4438 | |
364 | #if false |
|
364 | #if false | |
365 | generate new bundles: |
|
365 | generate new bundles: | |
366 | $ hg init r1 |
|
366 | $ hg init r1 | |
367 | $ for i in `python $TESTDIR/seq.py 101`; do hg -R r1 up -qr null && hg -R r1 branch -q b$i && hg -R r1 ci -qmb$i; done |
|
367 | $ for i in `python $TESTDIR/seq.py 101`; do hg -R r1 up -qr null && hg -R r1 branch -q b$i && hg -R r1 ci -qmb$i; done | |
368 | $ hg clone -q r1 r2 |
|
368 | $ hg clone -q r1 r2 | |
369 | $ for i in `python $TESTDIR/seq.py 10`; do hg -R r1 up -qr null && hg -R r1 branch -q c$i && hg -R r1 ci -qmc$i; done |
|
369 | $ for i in `python $TESTDIR/seq.py 10`; do hg -R r1 up -qr null && hg -R r1 branch -q c$i && hg -R r1 ci -qmc$i; done | |
370 | $ hg -R r2 branch -q r2change && hg -R r2 ci -qmr2change |
|
370 | $ hg -R r2 branch -q r2change && hg -R r2 ci -qmr2change | |
371 | $ hg -R r1 bundle -qa $TESTDIR/bundles/issue4438-r1.hg |
|
371 | $ hg -R r1 bundle -qa $TESTDIR/bundles/issue4438-r1.hg | |
372 | $ hg -R r2 bundle -qa $TESTDIR/bundles/issue4438-r2.hg |
|
372 | $ hg -R r2 bundle -qa $TESTDIR/bundles/issue4438-r2.hg | |
373 | #else |
|
373 | #else | |
374 | use existing bundles: |
|
374 | use existing bundles: | |
375 | $ hg clone -q $TESTDIR/bundles/issue4438-r1.hg r1 |
|
375 | $ hg clone -q $TESTDIR/bundles/issue4438-r1.hg r1 | |
376 | $ hg clone -q $TESTDIR/bundles/issue4438-r2.hg r2 |
|
376 | $ hg clone -q $TESTDIR/bundles/issue4438-r2.hg r2 | |
377 | #endif |
|
377 | #endif | |
378 |
|
378 | |||
379 | Set iteration order could cause wrong and unstable results - fixed in 73cfaa348650: |
|
379 | Set iteration order could cause wrong and unstable results - fixed in 73cfaa348650: | |
380 |
|
380 | |||
381 | $ hg -R r1 outgoing r2 -T'{rev} ' |
|
381 | $ hg -R r1 outgoing r2 -T'{rev} ' | |
382 | comparing with r2 |
|
382 | comparing with r2 | |
383 | searching for changes |
|
383 | searching for changes | |
384 | 101 102 103 104 105 106 107 108 109 110 (no-eol) |
|
384 | 101 102 103 104 105 106 107 108 109 110 (no-eol) | |
385 |
|
385 | |||
386 | The case where all the 'initialsamplesize' samples already were common would |
|
386 | The case where all the 'initialsamplesize' samples already were common would | |
387 | give 'all remote heads known locally' without checking the remaining heads - |
|
387 | give 'all remote heads known locally' without checking the remaining heads - | |
388 | fixed in 86c35b7ae300: |
|
388 | fixed in 86c35b7ae300: | |
389 |
|
389 | |||
390 | $ cat >> $TESTTMP/unrandomsample.py << EOF |
|
390 | $ cat >> $TESTTMP/unrandomsample.py << EOF | |
391 | > import random |
|
391 | > import random | |
392 | > def sample(population, k): |
|
392 | > def sample(population, k): | |
393 | > return sorted(population)[:k] |
|
393 | > return sorted(population)[:k] | |
394 | > random.sample = sample |
|
394 | > random.sample = sample | |
395 | > EOF |
|
395 | > EOF | |
396 |
|
396 | |||
397 | $ cat >> r1/.hg/hgrc << EOF |
|
397 | $ cat >> r1/.hg/hgrc << EOF | |
398 | > [extensions] |
|
398 | > [extensions] | |
399 | > unrandomsample = $TESTTMP/unrandomsample.py |
|
399 | > unrandomsample = $TESTTMP/unrandomsample.py | |
400 | > EOF |
|
400 | > EOF | |
401 |
|
401 | |||
402 | $ hg -R r1 outgoing r2 -T'{rev} ' |
|
402 | $ hg -R r1 outgoing r2 -T'{rev} ' | |
403 | comparing with r2 |
|
403 | comparing with r2 | |
404 | searching for changes |
|
404 | searching for changes | |
405 | 101 102 103 104 105 106 107 108 109 110 (no-eol) |
|
405 | 101 102 103 104 105 106 107 108 109 110 (no-eol) | |
406 | $ cd .. |
|
406 | $ cd .. |
@@ -1,536 +1,536 b'' | |||||
1 | #require killdaemons |
|
1 | #require killdaemons | |
2 |
|
2 | |||
3 | Tests discovery against servers without getbundle support: |
|
3 | Tests discovery against servers without getbundle support: | |
4 |
|
4 | |||
5 | $ CAP="getbundle bundle2" |
|
5 | $ CAP="getbundle bundle2" | |
6 | $ . "$TESTDIR/notcapable" |
|
6 | $ . "$TESTDIR/notcapable" | |
7 | $ cat >> $HGRCPATH <<EOF |
|
7 | $ cat >> $HGRCPATH <<EOF | |
8 | > [ui] |
|
8 | > [ui] | |
9 | > logtemplate="{rev} {node|short}: {desc} {branches}\n" |
|
9 | > logtemplate="{rev} {node|short}: {desc} {branches}\n" | |
10 | > EOF |
|
10 | > EOF | |
11 |
|
11 | |||
12 | Setup HTTP server control: |
|
12 | Setup HTTP server control: | |
13 |
|
13 | |||
14 | $ remote=http://localhost:$HGPORT/ |
|
14 | $ remote=http://localhost:$HGPORT/ | |
15 | $ export remote |
|
15 | $ export remote | |
16 | $ tstart() { |
|
16 | $ tstart() { | |
17 | > echo '[web]' > $1/.hg/hgrc |
|
17 | > echo '[web]' > $1/.hg/hgrc | |
18 | > echo 'push_ssl = false' >> $1/.hg/hgrc |
|
18 | > echo 'push_ssl = false' >> $1/.hg/hgrc | |
19 | > echo 'allow_push = *' >> $1/.hg/hgrc |
|
19 | > echo 'allow_push = *' >> $1/.hg/hgrc | |
20 | > hg serve -R $1 -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
20 | > hg serve -R $1 -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
21 | > cat hg.pid >> $DAEMON_PIDS |
|
21 | > cat hg.pid >> $DAEMON_PIDS | |
22 | > } |
|
22 | > } | |
23 | $ tstop() { |
|
23 | $ tstop() { | |
24 | > killdaemons.py |
|
24 | > killdaemons.py | |
25 | > [ "$1" ] && cut -d' ' -f6- access.log && cat errors.log |
|
25 | > [ "$1" ] && cut -d' ' -f6- access.log && cat errors.log | |
26 | > rm access.log errors.log |
|
26 | > rm access.log errors.log | |
27 | > } |
|
27 | > } | |
28 |
|
28 | |||
29 | Both are empty: |
|
29 | Both are empty: | |
30 |
|
30 | |||
31 | $ hg init empty1 |
|
31 | $ hg init empty1 | |
32 | $ hg init empty2 |
|
32 | $ hg init empty2 | |
33 | $ tstart empty2 |
|
33 | $ tstart empty2 | |
34 | $ hg incoming -R empty1 $remote |
|
34 | $ hg incoming -R empty1 $remote | |
35 | comparing with http://localhost:$HGPORT/ |
|
35 | comparing with http://localhost:$HGPORT/ | |
36 | no changes found |
|
36 | no changes found | |
37 | [1] |
|
37 | [1] | |
38 | $ hg outgoing -R empty1 $remote |
|
38 | $ hg outgoing -R empty1 $remote | |
39 | comparing with http://localhost:$HGPORT/ |
|
39 | comparing with http://localhost:$HGPORT/ | |
40 | no changes found |
|
40 | no changes found | |
41 | [1] |
|
41 | [1] | |
42 | $ hg pull -R empty1 $remote |
|
42 | $ hg pull -R empty1 $remote | |
43 | pulling from http://localhost:$HGPORT/ |
|
43 | pulling from http://localhost:$HGPORT/ | |
44 | no changes found |
|
44 | no changes found | |
45 | $ hg push -R empty1 $remote |
|
45 | $ hg push -R empty1 $remote | |
46 | pushing to http://localhost:$HGPORT/ |
|
46 | pushing to http://localhost:$HGPORT/ | |
47 | no changes found |
|
47 | no changes found | |
48 | [1] |
|
48 | [1] | |
49 | $ tstop |
|
49 | $ tstop | |
50 |
|
50 | |||
51 | Base repo: |
|
51 | Base repo: | |
52 |
|
52 | |||
53 | $ hg init main |
|
53 | $ hg init main | |
54 | $ cd main |
|
54 | $ cd main | |
55 | $ hg debugbuilddag -mo '+2:tbase @name1 +3:thead1 <tbase @name2 +4:thead2 @both /thead1 +2:tmaintip' |
|
55 | $ hg debugbuilddag -mo '+2:tbase @name1 +3:thead1 <tbase @name2 +4:thead2 @both /thead1 +2:tmaintip' | |
56 | $ hg log -G |
|
56 | $ hg log -G | |
57 | o 11 a19bfa7e7328: r11 both |
|
57 | o 11 a19bfa7e7328: r11 both | |
58 | | |
|
58 | | | |
59 | o 10 8b6bad1512e1: r10 both |
|
59 | o 10 8b6bad1512e1: r10 both | |
60 | | |
|
60 | | | |
61 | o 9 025829e08038: r9 both |
|
61 | o 9 025829e08038: r9 both | |
62 | |\ |
|
62 | |\ | |
63 | | o 8 d8f638ac69e9: r8 name2 |
|
63 | | o 8 d8f638ac69e9: r8 name2 | |
64 | | | |
|
64 | | | | |
65 | | o 7 b6b4d315a2ac: r7 name2 |
|
65 | | o 7 b6b4d315a2ac: r7 name2 | |
66 | | | |
|
66 | | | | |
67 | | o 6 6c6f5d5f3c11: r6 name2 |
|
67 | | o 6 6c6f5d5f3c11: r6 name2 | |
68 | | | |
|
68 | | | | |
69 | | o 5 70314b29987d: r5 name2 |
|
69 | | o 5 70314b29987d: r5 name2 | |
70 | | | |
|
70 | | | | |
71 | o | 4 e71dbbc70e03: r4 name1 |
|
71 | o | 4 e71dbbc70e03: r4 name1 | |
72 | | | |
|
72 | | | | |
73 | o | 3 2c8d5d5ec612: r3 name1 |
|
73 | o | 3 2c8d5d5ec612: r3 name1 | |
74 | | | |
|
74 | | | | |
75 | o | 2 a7892891da29: r2 name1 |
|
75 | o | 2 a7892891da29: r2 name1 | |
76 | |/ |
|
76 | |/ | |
77 | o 1 0019a3b924fd: r1 |
|
77 | o 1 0019a3b924fd: r1 | |
78 | | |
|
78 | | | |
79 | o 0 d57206cc072a: r0 |
|
79 | o 0 d57206cc072a: r0 | |
80 |
|
80 | |||
81 | $ cd .. |
|
81 | $ cd .. | |
82 | $ tstart main |
|
82 | $ tstart main | |
83 |
|
83 | |||
84 | Full clone: |
|
84 | Full clone: | |
85 |
|
85 | |||
86 | $ hg clone main full |
|
86 | $ hg clone main full | |
87 | updating to branch default |
|
87 | updating to branch default | |
88 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
88 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
89 | $ cd full |
|
89 | $ cd full | |
90 | $ hg incoming $remote |
|
90 | $ hg incoming $remote | |
91 | comparing with http://localhost:$HGPORT/ |
|
91 | comparing with http://localhost:$HGPORT/ | |
92 | searching for changes |
|
92 | searching for changes | |
93 | no changes found |
|
93 | no changes found | |
94 | [1] |
|
94 | [1] | |
95 | $ hg outgoing $remote |
|
95 | $ hg outgoing $remote | |
96 | comparing with http://localhost:$HGPORT/ |
|
96 | comparing with http://localhost:$HGPORT/ | |
97 | searching for changes |
|
97 | searching for changes | |
98 | no changes found |
|
98 | no changes found | |
99 | [1] |
|
99 | [1] | |
100 | $ hg pull $remote |
|
100 | $ hg pull $remote | |
101 | pulling from http://localhost:$HGPORT/ |
|
101 | pulling from http://localhost:$HGPORT/ | |
102 | searching for changes |
|
102 | searching for changes | |
103 | no changes found |
|
103 | no changes found | |
104 | $ hg push $remote |
|
104 | $ hg push $remote | |
105 | pushing to http://localhost:$HGPORT/ |
|
105 | pushing to http://localhost:$HGPORT/ | |
106 | searching for changes |
|
106 | searching for changes | |
107 | no changes found |
|
107 | no changes found | |
108 | [1] |
|
108 | [1] | |
109 | $ cd .. |
|
109 | $ cd .. | |
110 |
|
110 | |||
111 | Local is empty: |
|
111 | Local is empty: | |
112 |
|
112 | |||
113 | $ cd empty1 |
|
113 | $ cd empty1 | |
114 | $ hg incoming $remote |
|
114 | $ hg incoming $remote | |
115 | comparing with http://localhost:$HGPORT/ |
|
115 | comparing with http://localhost:$HGPORT/ | |
116 | 0 d57206cc072a: r0 |
|
116 | 0 d57206cc072a: r0 | |
117 | 1 0019a3b924fd: r1 |
|
117 | 1 0019a3b924fd: r1 | |
118 | 2 a7892891da29: r2 name1 |
|
118 | 2 a7892891da29: r2 name1 | |
119 | 3 2c8d5d5ec612: r3 name1 |
|
119 | 3 2c8d5d5ec612: r3 name1 | |
120 | 4 e71dbbc70e03: r4 name1 |
|
120 | 4 e71dbbc70e03: r4 name1 | |
121 | 5 70314b29987d: r5 name2 |
|
121 | 5 70314b29987d: r5 name2 | |
122 | 6 6c6f5d5f3c11: r6 name2 |
|
122 | 6 6c6f5d5f3c11: r6 name2 | |
123 | 7 b6b4d315a2ac: r7 name2 |
|
123 | 7 b6b4d315a2ac: r7 name2 | |
124 | 8 d8f638ac69e9: r8 name2 |
|
124 | 8 d8f638ac69e9: r8 name2 | |
125 | 9 025829e08038: r9 both |
|
125 | 9 025829e08038: r9 both | |
126 | 10 8b6bad1512e1: r10 both |
|
126 | 10 8b6bad1512e1: r10 both | |
127 | 11 a19bfa7e7328: r11 both |
|
127 | 11 a19bfa7e7328: r11 both | |
128 | $ hg outgoing $remote |
|
128 | $ hg outgoing $remote | |
129 | comparing with http://localhost:$HGPORT/ |
|
129 | comparing with http://localhost:$HGPORT/ | |
130 | no changes found |
|
130 | no changes found | |
131 | [1] |
|
131 | [1] | |
132 | $ hg push $remote |
|
132 | $ hg push $remote | |
133 | pushing to http://localhost:$HGPORT/ |
|
133 | pushing to http://localhost:$HGPORT/ | |
134 | no changes found |
|
134 | no changes found | |
135 | [1] |
|
135 | [1] | |
136 | $ hg pull $remote |
|
136 | $ hg pull $remote | |
137 | pulling from http://localhost:$HGPORT/ |
|
137 | pulling from http://localhost:$HGPORT/ | |
138 | requesting all changes |
|
138 | requesting all changes | |
139 | adding changesets |
|
139 | adding changesets | |
140 | adding manifests |
|
140 | adding manifests | |
141 | adding file changes |
|
141 | adding file changes | |
142 | added 12 changesets with 24 changes to 2 files |
|
142 | added 12 changesets with 24 changes to 2 files | |
143 | (run 'hg update' to get a working copy) |
|
143 | (run 'hg update' to get a working copy) | |
144 | $ hg incoming $remote |
|
144 | $ hg incoming $remote | |
145 | comparing with http://localhost:$HGPORT/ |
|
145 | comparing with http://localhost:$HGPORT/ | |
146 | searching for changes |
|
146 | searching for changes | |
147 | no changes found |
|
147 | no changes found | |
148 | [1] |
|
148 | [1] | |
149 | $ cd .. |
|
149 | $ cd .. | |
150 |
|
150 | |||
151 | Local is subset: |
|
151 | Local is subset: | |
152 |
|
152 | |||
153 | $ hg clone main subset --rev name2 ; cd subset |
|
153 | $ hg clone main subset --rev name2 ; cd subset | |
154 | adding changesets |
|
154 | adding changesets | |
155 | adding manifests |
|
155 | adding manifests | |
156 | adding file changes |
|
156 | adding file changes | |
157 | added 6 changesets with 12 changes to 2 files |
|
157 | added 6 changesets with 12 changes to 2 files | |
158 | updating to branch name2 |
|
158 | updating to branch name2 | |
159 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
159 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
160 | $ hg incoming $remote |
|
160 | $ hg incoming $remote | |
161 | comparing with http://localhost:$HGPORT/ |
|
161 | comparing with http://localhost:$HGPORT/ | |
162 | searching for changes |
|
162 | searching for changes | |
163 | 6 a7892891da29: r2 name1 |
|
163 | 6 a7892891da29: r2 name1 | |
164 | 7 2c8d5d5ec612: r3 name1 |
|
164 | 7 2c8d5d5ec612: r3 name1 | |
165 | 8 e71dbbc70e03: r4 name1 |
|
165 | 8 e71dbbc70e03: r4 name1 | |
166 | 9 025829e08038: r9 both |
|
166 | 9 025829e08038: r9 both | |
167 | 10 8b6bad1512e1: r10 both |
|
167 | 10 8b6bad1512e1: r10 both | |
168 | 11 a19bfa7e7328: r11 both |
|
168 | 11 a19bfa7e7328: r11 both | |
169 | $ hg outgoing $remote |
|
169 | $ hg outgoing $remote | |
170 | comparing with http://localhost:$HGPORT/ |
|
170 | comparing with http://localhost:$HGPORT/ | |
171 | searching for changes |
|
171 | searching for changes | |
172 | no changes found |
|
172 | no changes found | |
173 | [1] |
|
173 | [1] | |
174 | $ hg push $remote |
|
174 | $ hg push $remote | |
175 | pushing to http://localhost:$HGPORT/ |
|
175 | pushing to http://localhost:$HGPORT/ | |
176 | searching for changes |
|
176 | searching for changes | |
177 | no changes found |
|
177 | no changes found | |
178 | [1] |
|
178 | [1] | |
179 | $ hg pull $remote |
|
179 | $ hg pull $remote | |
180 | pulling from http://localhost:$HGPORT/ |
|
180 | pulling from http://localhost:$HGPORT/ | |
181 | searching for changes |
|
181 | searching for changes | |
182 | adding changesets |
|
182 | adding changesets | |
183 | adding manifests |
|
183 | adding manifests | |
184 | adding file changes |
|
184 | adding file changes | |
185 | added 6 changesets with 12 changes to 2 files |
|
185 | added 6 changesets with 12 changes to 2 files | |
186 | (run 'hg update' to get a working copy) |
|
186 | (run 'hg update' to get a working copy) | |
187 | $ hg incoming $remote |
|
187 | $ hg incoming $remote | |
188 | comparing with http://localhost:$HGPORT/ |
|
188 | comparing with http://localhost:$HGPORT/ | |
189 | searching for changes |
|
189 | searching for changes | |
190 | no changes found |
|
190 | no changes found | |
191 | [1] |
|
191 | [1] | |
192 | $ cd .. |
|
192 | $ cd .. | |
193 | $ tstop |
|
193 | $ tstop | |
194 |
|
194 | |||
195 | Remote is empty: |
|
195 | Remote is empty: | |
196 |
|
196 | |||
197 | $ tstart empty2 |
|
197 | $ tstart empty2 | |
198 | $ cd main |
|
198 | $ cd main | |
199 | $ hg incoming $remote |
|
199 | $ hg incoming $remote | |
200 | comparing with http://localhost:$HGPORT/ |
|
200 | comparing with http://localhost:$HGPORT/ | |
201 | searching for changes |
|
201 | searching for changes | |
202 | no changes found |
|
202 | no changes found | |
203 | [1] |
|
203 | [1] | |
204 | $ hg outgoing $remote |
|
204 | $ hg outgoing $remote | |
205 | comparing with http://localhost:$HGPORT/ |
|
205 | comparing with http://localhost:$HGPORT/ | |
206 | searching for changes |
|
206 | searching for changes | |
207 | 0 d57206cc072a: r0 |
|
207 | 0 d57206cc072a: r0 | |
208 | 1 0019a3b924fd: r1 |
|
208 | 1 0019a3b924fd: r1 | |
209 | 2 a7892891da29: r2 name1 |
|
209 | 2 a7892891da29: r2 name1 | |
210 | 3 2c8d5d5ec612: r3 name1 |
|
210 | 3 2c8d5d5ec612: r3 name1 | |
211 | 4 e71dbbc70e03: r4 name1 |
|
211 | 4 e71dbbc70e03: r4 name1 | |
212 | 5 70314b29987d: r5 name2 |
|
212 | 5 70314b29987d: r5 name2 | |
213 | 6 6c6f5d5f3c11: r6 name2 |
|
213 | 6 6c6f5d5f3c11: r6 name2 | |
214 | 7 b6b4d315a2ac: r7 name2 |
|
214 | 7 b6b4d315a2ac: r7 name2 | |
215 | 8 d8f638ac69e9: r8 name2 |
|
215 | 8 d8f638ac69e9: r8 name2 | |
216 | 9 025829e08038: r9 both |
|
216 | 9 025829e08038: r9 both | |
217 | 10 8b6bad1512e1: r10 both |
|
217 | 10 8b6bad1512e1: r10 both | |
218 | 11 a19bfa7e7328: r11 both |
|
218 | 11 a19bfa7e7328: r11 both | |
219 | $ hg pull $remote |
|
219 | $ hg pull $remote | |
220 | pulling from http://localhost:$HGPORT/ |
|
220 | pulling from http://localhost:$HGPORT/ | |
221 | searching for changes |
|
221 | searching for changes | |
222 | no changes found |
|
222 | no changes found | |
223 | $ hg push $remote |
|
223 | $ hg push $remote | |
224 | pushing to http://localhost:$HGPORT/ |
|
224 | pushing to http://localhost:$HGPORT/ | |
225 | searching for changes |
|
225 | searching for changes | |
226 | remote: adding changesets |
|
226 | remote: adding changesets | |
227 | remote: adding manifests |
|
227 | remote: adding manifests | |
228 | remote: adding file changes |
|
228 | remote: adding file changes | |
229 | remote: added 12 changesets with 24 changes to 2 files |
|
229 | remote: added 12 changesets with 24 changes to 2 files | |
230 | $ hg outgoing $remote |
|
230 | $ hg outgoing $remote | |
231 | comparing with http://localhost:$HGPORT/ |
|
231 | comparing with http://localhost:$HGPORT/ | |
232 | searching for changes |
|
232 | searching for changes | |
233 | no changes found |
|
233 | no changes found | |
234 | [1] |
|
234 | [1] | |
235 | $ cd .. |
|
235 | $ cd .. | |
236 | $ tstop |
|
236 | $ tstop | |
237 |
|
237 | |||
238 | Local is superset: |
|
238 | Local is superset: | |
239 |
|
239 | |||
240 | $ hg clone main subset2 --rev name2 |
|
240 | $ hg clone main subset2 --rev name2 | |
241 | adding changesets |
|
241 | adding changesets | |
242 | adding manifests |
|
242 | adding manifests | |
243 | adding file changes |
|
243 | adding file changes | |
244 | added 6 changesets with 12 changes to 2 files |
|
244 | added 6 changesets with 12 changes to 2 files | |
245 | updating to branch name2 |
|
245 | updating to branch name2 | |
246 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
246 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
247 | $ tstart subset2 |
|
247 | $ tstart subset2 | |
248 | $ cd main |
|
248 | $ cd main | |
249 | $ hg incoming $remote |
|
249 | $ hg incoming $remote | |
250 | comparing with http://localhost:$HGPORT/ |
|
250 | comparing with http://localhost:$HGPORT/ | |
251 | searching for changes |
|
251 | searching for changes | |
252 | no changes found |
|
252 | no changes found | |
253 | [1] |
|
253 | [1] | |
254 | $ hg outgoing $remote |
|
254 | $ hg outgoing $remote | |
255 | comparing with http://localhost:$HGPORT/ |
|
255 | comparing with http://localhost:$HGPORT/ | |
256 | searching for changes |
|
256 | searching for changes | |
257 | 2 a7892891da29: r2 name1 |
|
257 | 2 a7892891da29: r2 name1 | |
258 | 3 2c8d5d5ec612: r3 name1 |
|
258 | 3 2c8d5d5ec612: r3 name1 | |
259 | 4 e71dbbc70e03: r4 name1 |
|
259 | 4 e71dbbc70e03: r4 name1 | |
260 | 9 025829e08038: r9 both |
|
260 | 9 025829e08038: r9 both | |
261 | 10 8b6bad1512e1: r10 both |
|
261 | 10 8b6bad1512e1: r10 both | |
262 | 11 a19bfa7e7328: r11 both |
|
262 | 11 a19bfa7e7328: r11 both | |
263 | $ hg pull $remote |
|
263 | $ hg pull $remote | |
264 | pulling from http://localhost:$HGPORT/ |
|
264 | pulling from http://localhost:$HGPORT/ | |
265 | searching for changes |
|
265 | searching for changes | |
266 | no changes found |
|
266 | no changes found | |
267 | $ hg push $remote |
|
267 | $ hg push $remote | |
268 | pushing to http://localhost:$HGPORT/ |
|
268 | pushing to http://localhost:$HGPORT/ | |
269 | searching for changes |
|
269 | searching for changes | |
270 | abort: push creates new remote branches: both, name1! |
|
270 | abort: push creates new remote branches: both, name1! | |
271 | (use 'hg push --new-branch' to create new remote branches) |
|
271 | (use 'hg push --new-branch' to create new remote branches) | |
272 | [255] |
|
272 | [255] | |
273 | $ hg push $remote --new-branch |
|
273 | $ hg push $remote --new-branch | |
274 | pushing to http://localhost:$HGPORT/ |
|
274 | pushing to http://localhost:$HGPORT/ | |
275 | searching for changes |
|
275 | searching for changes | |
276 | remote: adding changesets |
|
276 | remote: adding changesets | |
277 | remote: adding manifests |
|
277 | remote: adding manifests | |
278 | remote: adding file changes |
|
278 | remote: adding file changes | |
279 | remote: added 6 changesets with 12 changes to 2 files |
|
279 | remote: added 6 changesets with 12 changes to 2 files | |
280 | $ hg outgoing $remote |
|
280 | $ hg outgoing $remote | |
281 | comparing with http://localhost:$HGPORT/ |
|
281 | comparing with http://localhost:$HGPORT/ | |
282 | searching for changes |
|
282 | searching for changes | |
283 | no changes found |
|
283 | no changes found | |
284 | [1] |
|
284 | [1] | |
285 | $ cd .. |
|
285 | $ cd .. | |
286 | $ tstop |
|
286 | $ tstop | |
287 |
|
287 | |||
288 | Partial pull: |
|
288 | Partial pull: | |
289 |
|
289 | |||
290 | $ tstart main |
|
290 | $ tstart main | |
291 | $ hg clone $remote partial --rev name2 |
|
291 | $ hg clone $remote partial --rev name2 | |
292 | adding changesets |
|
292 | adding changesets | |
293 | adding manifests |
|
293 | adding manifests | |
294 | adding file changes |
|
294 | adding file changes | |
295 | added 6 changesets with 12 changes to 2 files |
|
295 | added 6 changesets with 12 changes to 2 files | |
296 | updating to branch name2 |
|
296 | updating to branch name2 | |
297 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
297 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
298 | $ cd partial |
|
298 | $ cd partial | |
299 | $ hg incoming $remote |
|
299 | $ hg incoming $remote | |
300 | comparing with http://localhost:$HGPORT/ |
|
300 | comparing with http://localhost:$HGPORT/ | |
301 | searching for changes |
|
301 | searching for changes | |
302 | 6 a7892891da29: r2 name1 |
|
302 | 6 a7892891da29: r2 name1 | |
303 | 7 2c8d5d5ec612: r3 name1 |
|
303 | 7 2c8d5d5ec612: r3 name1 | |
304 | 8 e71dbbc70e03: r4 name1 |
|
304 | 8 e71dbbc70e03: r4 name1 | |
305 | 9 025829e08038: r9 both |
|
305 | 9 025829e08038: r9 both | |
306 | 10 8b6bad1512e1: r10 both |
|
306 | 10 8b6bad1512e1: r10 both | |
307 | 11 a19bfa7e7328: r11 both |
|
307 | 11 a19bfa7e7328: r11 both | |
308 | $ hg incoming $remote --rev name1 |
|
308 | $ hg incoming $remote --rev name1 | |
309 | comparing with http://localhost:$HGPORT/ |
|
309 | comparing with http://localhost:$HGPORT/ | |
310 | searching for changes |
|
310 | searching for changes | |
311 | 6 a7892891da29: r2 name1 |
|
311 | 6 a7892891da29: r2 name1 | |
312 | 7 2c8d5d5ec612: r3 name1 |
|
312 | 7 2c8d5d5ec612: r3 name1 | |
313 | 8 e71dbbc70e03: r4 name1 |
|
313 | 8 e71dbbc70e03: r4 name1 | |
314 | $ hg pull $remote --rev name1 |
|
314 | $ hg pull $remote --rev name1 | |
315 | pulling from http://localhost:$HGPORT/ |
|
315 | pulling from http://localhost:$HGPORT/ | |
316 | searching for changes |
|
316 | searching for changes | |
317 | adding changesets |
|
317 | adding changesets | |
318 | adding manifests |
|
318 | adding manifests | |
319 | adding file changes |
|
319 | adding file changes | |
320 | added 3 changesets with 6 changes to 2 files (+1 heads) |
|
320 | added 3 changesets with 6 changes to 2 files (+1 heads) | |
321 | (run 'hg heads' to see heads) |
|
321 | (run 'hg heads' to see heads) | |
322 | $ hg incoming $remote |
|
322 | $ hg incoming $remote | |
323 | comparing with http://localhost:$HGPORT/ |
|
323 | comparing with http://localhost:$HGPORT/ | |
324 | searching for changes |
|
324 | searching for changes | |
325 | 9 025829e08038: r9 both |
|
325 | 9 025829e08038: r9 both | |
326 | 10 8b6bad1512e1: r10 both |
|
326 | 10 8b6bad1512e1: r10 both | |
327 | 11 a19bfa7e7328: r11 both |
|
327 | 11 a19bfa7e7328: r11 both | |
328 | $ cd .. |
|
328 | $ cd .. | |
329 | $ tstop |
|
329 | $ tstop | |
330 |
|
330 | |||
331 | Both have new stuff in new named branches: |
|
331 | Both have new stuff in new named branches: | |
332 |
|
332 | |||
333 | $ hg clone main repo1a --rev name1 -q |
|
333 | $ hg clone main repo1a --rev name1 -q | |
334 | $ hg clone repo1a repo1b -q |
|
334 | $ hg clone repo1a repo1b -q | |
335 | $ hg clone main repo2a --rev name2 -q |
|
335 | $ hg clone main repo2a --rev name2 -q | |
336 | $ hg clone repo2a repo2b -q |
|
336 | $ hg clone repo2a repo2b -q | |
337 | $ tstart repo1a |
|
337 | $ tstart repo1a | |
338 |
|
338 | |||
339 | $ cd repo2a |
|
339 | $ cd repo2a | |
340 | $ hg incoming $remote |
|
340 | $ hg incoming $remote | |
341 | comparing with http://localhost:$HGPORT/ |
|
341 | comparing with http://localhost:$HGPORT/ | |
342 | searching for changes |
|
342 | searching for changes | |
343 | 6 a7892891da29: r2 name1 |
|
343 | 6 a7892891da29: r2 name1 | |
344 | 7 2c8d5d5ec612: r3 name1 |
|
344 | 7 2c8d5d5ec612: r3 name1 | |
345 | 8 e71dbbc70e03: r4 name1 |
|
345 | 8 e71dbbc70e03: r4 name1 | |
346 | $ hg outgoing $remote |
|
346 | $ hg outgoing $remote | |
347 | comparing with http://localhost:$HGPORT/ |
|
347 | comparing with http://localhost:$HGPORT/ | |
348 | searching for changes |
|
348 | searching for changes | |
349 | 2 70314b29987d: r5 name2 |
|
349 | 2 70314b29987d: r5 name2 | |
350 | 3 6c6f5d5f3c11: r6 name2 |
|
350 | 3 6c6f5d5f3c11: r6 name2 | |
351 | 4 b6b4d315a2ac: r7 name2 |
|
351 | 4 b6b4d315a2ac: r7 name2 | |
352 | 5 d8f638ac69e9: r8 name2 |
|
352 | 5 d8f638ac69e9: r8 name2 | |
353 | $ hg push $remote --new-branch |
|
353 | $ hg push $remote --new-branch | |
354 | pushing to http://localhost:$HGPORT/ |
|
354 | pushing to http://localhost:$HGPORT/ | |
355 | searching for changes |
|
355 | searching for changes | |
356 | remote: adding changesets |
|
356 | remote: adding changesets | |
357 | remote: adding manifests |
|
357 | remote: adding manifests | |
358 | remote: adding file changes |
|
358 | remote: adding file changes | |
359 | remote: added 4 changesets with 8 changes to 2 files (+1 heads) |
|
359 | remote: added 4 changesets with 8 changes to 2 files (+1 heads) | |
360 | $ hg pull $remote |
|
360 | $ hg pull $remote | |
361 | pulling from http://localhost:$HGPORT/ |
|
361 | pulling from http://localhost:$HGPORT/ | |
362 | searching for changes |
|
362 | searching for changes | |
363 | adding changesets |
|
363 | adding changesets | |
364 | adding manifests |
|
364 | adding manifests | |
365 | adding file changes |
|
365 | adding file changes | |
366 | added 3 changesets with 6 changes to 2 files (+1 heads) |
|
366 | added 3 changesets with 6 changes to 2 files (+1 heads) | |
367 | (run 'hg heads' to see heads) |
|
367 | (run 'hg heads' to see heads) | |
368 | $ hg incoming $remote |
|
368 | $ hg incoming $remote | |
369 | comparing with http://localhost:$HGPORT/ |
|
369 | comparing with http://localhost:$HGPORT/ | |
370 | searching for changes |
|
370 | searching for changes | |
371 | no changes found |
|
371 | no changes found | |
372 | [1] |
|
372 | [1] | |
373 | $ hg outgoing $remote |
|
373 | $ hg outgoing $remote | |
374 | comparing with http://localhost:$HGPORT/ |
|
374 | comparing with http://localhost:$HGPORT/ | |
375 | searching for changes |
|
375 | searching for changes | |
376 | no changes found |
|
376 | no changes found | |
377 | [1] |
|
377 | [1] | |
378 | $ cd .. |
|
378 | $ cd .. | |
379 | $ tstop |
|
379 | $ tstop | |
380 |
|
380 | |||
381 | $ tstart repo1b |
|
381 | $ tstart repo1b | |
382 | $ cd repo2b |
|
382 | $ cd repo2b | |
383 | $ hg incoming $remote |
|
383 | $ hg incoming $remote | |
384 | comparing with http://localhost:$HGPORT/ |
|
384 | comparing with http://localhost:$HGPORT/ | |
385 | searching for changes |
|
385 | searching for changes | |
386 | 6 a7892891da29: r2 name1 |
|
386 | 6 a7892891da29: r2 name1 | |
387 | 7 2c8d5d5ec612: r3 name1 |
|
387 | 7 2c8d5d5ec612: r3 name1 | |
388 | 8 e71dbbc70e03: r4 name1 |
|
388 | 8 e71dbbc70e03: r4 name1 | |
389 | $ hg outgoing $remote |
|
389 | $ hg outgoing $remote | |
390 | comparing with http://localhost:$HGPORT/ |
|
390 | comparing with http://localhost:$HGPORT/ | |
391 | searching for changes |
|
391 | searching for changes | |
392 | 2 70314b29987d: r5 name2 |
|
392 | 2 70314b29987d: r5 name2 | |
393 | 3 6c6f5d5f3c11: r6 name2 |
|
393 | 3 6c6f5d5f3c11: r6 name2 | |
394 | 4 b6b4d315a2ac: r7 name2 |
|
394 | 4 b6b4d315a2ac: r7 name2 | |
395 | 5 d8f638ac69e9: r8 name2 |
|
395 | 5 d8f638ac69e9: r8 name2 | |
396 | $ hg pull $remote |
|
396 | $ hg pull $remote | |
397 | pulling from http://localhost:$HGPORT/ |
|
397 | pulling from http://localhost:$HGPORT/ | |
398 | searching for changes |
|
398 | searching for changes | |
399 | adding changesets |
|
399 | adding changesets | |
400 | adding manifests |
|
400 | adding manifests | |
401 | adding file changes |
|
401 | adding file changes | |
402 | added 3 changesets with 6 changes to 2 files (+1 heads) |
|
402 | added 3 changesets with 6 changes to 2 files (+1 heads) | |
403 | (run 'hg heads' to see heads) |
|
403 | (run 'hg heads' to see heads) | |
404 | $ hg push $remote --new-branch |
|
404 | $ hg push $remote --new-branch | |
405 | pushing to http://localhost:$HGPORT/ |
|
405 | pushing to http://localhost:$HGPORT/ | |
406 | searching for changes |
|
406 | searching for changes | |
407 | remote: adding changesets |
|
407 | remote: adding changesets | |
408 | remote: adding manifests |
|
408 | remote: adding manifests | |
409 | remote: adding file changes |
|
409 | remote: adding file changes | |
410 | remote: added 4 changesets with 8 changes to 2 files (+1 heads) |
|
410 | remote: added 4 changesets with 8 changes to 2 files (+1 heads) | |
411 | $ hg incoming $remote |
|
411 | $ hg incoming $remote | |
412 | comparing with http://localhost:$HGPORT/ |
|
412 | comparing with http://localhost:$HGPORT/ | |
413 | searching for changes |
|
413 | searching for changes | |
414 | no changes found |
|
414 | no changes found | |
415 | [1] |
|
415 | [1] | |
416 | $ hg outgoing $remote |
|
416 | $ hg outgoing $remote | |
417 | comparing with http://localhost:$HGPORT/ |
|
417 | comparing with http://localhost:$HGPORT/ | |
418 | searching for changes |
|
418 | searching for changes | |
419 | no changes found |
|
419 | no changes found | |
420 | [1] |
|
420 | [1] | |
421 | $ cd .. |
|
421 | $ cd .. | |
422 | $ tstop |
|
422 | $ tstop | |
423 |
|
423 | |||
424 | Both have new stuff in existing named branches: |
|
424 | Both have new stuff in existing named branches: | |
425 |
|
425 | |||
426 | $ rm -r repo1a repo1b repo2a repo2b |
|
426 | $ rm -r repo1a repo1b repo2a repo2b | |
427 | $ hg clone main repo1a --rev 3 --rev 8 -q |
|
427 | $ hg clone main repo1a --rev 3 --rev 8 -q | |
428 | $ hg clone repo1a repo1b -q |
|
428 | $ hg clone repo1a repo1b -q | |
429 | $ hg clone main repo2a --rev 4 --rev 7 -q |
|
429 | $ hg clone main repo2a --rev 4 --rev 7 -q | |
430 | $ hg clone repo2a repo2b -q |
|
430 | $ hg clone repo2a repo2b -q | |
431 | $ tstart repo1a |
|
431 | $ tstart repo1a | |
432 |
|
432 | |||
433 | $ cd repo2a |
|
433 | $ cd repo2a | |
434 | $ hg incoming $remote |
|
434 | $ hg incoming $remote | |
435 | comparing with http://localhost:$HGPORT/ |
|
435 | comparing with http://localhost:$HGPORT/ | |
436 | searching for changes |
|
436 | searching for changes | |
437 | 8 d8f638ac69e9: r8 name2 |
|
437 | 8 d8f638ac69e9: r8 name2 | |
438 | $ hg outgoing $remote |
|
438 | $ hg outgoing $remote | |
439 | comparing with http://localhost:$HGPORT/ |
|
439 | comparing with http://localhost:$HGPORT/ | |
440 | searching for changes |
|
440 | searching for changes | |
441 | 4 e71dbbc70e03: r4 name1 |
|
441 | 4 e71dbbc70e03: r4 name1 | |
442 | $ hg push $remote --new-branch |
|
442 | $ hg push $remote --new-branch | |
443 | pushing to http://localhost:$HGPORT/ |
|
443 | pushing to http://localhost:$HGPORT/ | |
444 | searching for changes |
|
444 | searching for changes | |
445 | remote: adding changesets |
|
445 | remote: adding changesets | |
446 | remote: adding manifests |
|
446 | remote: adding manifests | |
447 | remote: adding file changes |
|
447 | remote: adding file changes | |
448 | remote: added 1 changesets with 2 changes to 2 files |
|
448 | remote: added 1 changesets with 2 changes to 2 files | |
449 | $ hg pull $remote |
|
449 | $ hg pull $remote | |
450 | pulling from http://localhost:$HGPORT/ |
|
450 | pulling from http://localhost:$HGPORT/ | |
451 | searching for changes |
|
451 | searching for changes | |
452 | adding changesets |
|
452 | adding changesets | |
453 | adding manifests |
|
453 | adding manifests | |
454 | adding file changes |
|
454 | adding file changes | |
455 | added 1 changesets with 2 changes to 2 files |
|
455 | added 1 changesets with 2 changes to 2 files | |
456 | (run 'hg update' to get a working copy) |
|
456 | (run 'hg update' to get a working copy) | |
457 | $ hg incoming $remote |
|
457 | $ hg incoming $remote | |
458 | comparing with http://localhost:$HGPORT/ |
|
458 | comparing with http://localhost:$HGPORT/ | |
459 | searching for changes |
|
459 | searching for changes | |
460 | no changes found |
|
460 | no changes found | |
461 | [1] |
|
461 | [1] | |
462 | $ hg outgoing $remote |
|
462 | $ hg outgoing $remote | |
463 | comparing with http://localhost:$HGPORT/ |
|
463 | comparing with http://localhost:$HGPORT/ | |
464 | searching for changes |
|
464 | searching for changes | |
465 | no changes found |
|
465 | no changes found | |
466 | [1] |
|
466 | [1] | |
467 | $ cd .. |
|
467 | $ cd .. | |
468 | $ tstop |
|
468 | $ tstop | |
469 |
|
469 | |||
470 | $ tstart repo1b |
|
470 | $ tstart repo1b | |
471 | $ cd repo2b |
|
471 | $ cd repo2b | |
472 | $ hg incoming $remote |
|
472 | $ hg incoming $remote | |
473 | comparing with http://localhost:$HGPORT/ |
|
473 | comparing with http://localhost:$HGPORT/ | |
474 | searching for changes |
|
474 | searching for changes | |
475 | 8 d8f638ac69e9: r8 name2 |
|
475 | 8 d8f638ac69e9: r8 name2 | |
476 | $ hg outgoing $remote |
|
476 | $ hg outgoing $remote | |
477 | comparing with http://localhost:$HGPORT/ |
|
477 | comparing with http://localhost:$HGPORT/ | |
478 | searching for changes |
|
478 | searching for changes | |
479 | 4 e71dbbc70e03: r4 name1 |
|
479 | 4 e71dbbc70e03: r4 name1 | |
480 | $ hg pull $remote |
|
480 | $ hg pull $remote | |
481 | pulling from http://localhost:$HGPORT/ |
|
481 | pulling from http://localhost:$HGPORT/ | |
482 | searching for changes |
|
482 | searching for changes | |
483 | adding changesets |
|
483 | adding changesets | |
484 | adding manifests |
|
484 | adding manifests | |
485 | adding file changes |
|
485 | adding file changes | |
486 | added 1 changesets with 2 changes to 2 files |
|
486 | added 1 changesets with 2 changes to 2 files | |
487 | (run 'hg update' to get a working copy) |
|
487 | (run 'hg update' to get a working copy) | |
488 | $ hg push $remote --new-branch |
|
488 | $ hg push $remote --new-branch | |
489 | pushing to http://localhost:$HGPORT/ |
|
489 | pushing to http://localhost:$HGPORT/ | |
490 | searching for changes |
|
490 | searching for changes | |
491 | remote: adding changesets |
|
491 | remote: adding changesets | |
492 | remote: adding manifests |
|
492 | remote: adding manifests | |
493 | remote: adding file changes |
|
493 | remote: adding file changes | |
494 | remote: added 1 changesets with 2 changes to 2 files |
|
494 | remote: added 1 changesets with 2 changes to 2 files | |
495 | $ hg incoming $remote |
|
495 | $ hg incoming $remote | |
496 | comparing with http://localhost:$HGPORT/ |
|
496 | comparing with http://localhost:$HGPORT/ | |
497 | searching for changes |
|
497 | searching for changes | |
498 | no changes found |
|
498 | no changes found | |
499 | [1] |
|
499 | [1] | |
500 | $ hg outgoing $remote |
|
500 | $ hg outgoing $remote | |
501 | comparing with http://localhost:$HGPORT/ |
|
501 | comparing with http://localhost:$HGPORT/ | |
502 | searching for changes |
|
502 | searching for changes | |
503 | no changes found |
|
503 | no changes found | |
504 | [1] |
|
504 | [1] | |
505 | $ cd .. |
|
505 | $ cd .. | |
506 | $ tstop show |
|
506 | $ tstop show | |
507 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
507 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
508 | "GET /?cmd=heads HTTP/1.1" 200 - |
|
508 | "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2 | |
509 | "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961 |
|
509 | "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961 x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2 | |
510 | "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785 |
|
510 | "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785 x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2 | |
511 | "GET /?cmd=changegroupsubset HTTP/1.1" 200 - x-hgarg-1:bases=d8f638ac69e9ae8dea4f09f11d696546a912d961&heads=d8f638ac69e9ae8dea4f09f11d696546a912d961 |
|
511 | "GET /?cmd=changegroupsubset HTTP/1.1" 200 - x-hgarg-1:bases=d8f638ac69e9ae8dea4f09f11d696546a912d961&heads=d8f638ac69e9ae8dea4f09f11d696546a912d961 x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2 | |
512 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases |
|
512 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2 | |
513 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
513 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
514 | "GET /?cmd=heads HTTP/1.1" 200 - |
|
514 | "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2 | |
515 | "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961 |
|
515 | "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961 x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2 | |
516 | "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785 |
|
516 | "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785 x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2 | |
517 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
517 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
518 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
518 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2 | |
519 | "GET /?cmd=heads HTTP/1.1" 200 - |
|
519 | "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2 | |
520 | "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961 |
|
520 | "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961 x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2 | |
521 | "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785 |
|
521 | "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785 x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2 | |
522 | "GET /?cmd=changegroupsubset HTTP/1.1" 200 - x-hgarg-1:bases=d8f638ac69e9ae8dea4f09f11d696546a912d961&heads=d8f638ac69e9ae8dea4f09f11d696546a912d961 |
|
522 | "GET /?cmd=changegroupsubset HTTP/1.1" 200 - x-hgarg-1:bases=d8f638ac69e9ae8dea4f09f11d696546a912d961&heads=d8f638ac69e9ae8dea4f09f11d696546a912d961 x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2 | |
523 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases |
|
523 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2 | |
524 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
524 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
525 | "GET /?cmd=heads HTTP/1.1" 200 - |
|
525 | "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2 | |
526 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases |
|
526 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2 | |
527 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
527 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2 | |
528 | "GET /?cmd=branchmap HTTP/1.1" 200 - |
|
528 | "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2 | |
529 | "GET /?cmd=branchmap HTTP/1.1" 200 - |
|
529 | "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2 | |
530 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
530 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2 | |
531 | "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+1827a5bb63e602382eb89dd58f2ac9f3b007ad91* (glob) |
|
531 | "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+1827a5bb63e602382eb89dd58f2ac9f3b007ad91* (glob) | |
532 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases |
|
532 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2 | |
533 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
533 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
534 | "GET /?cmd=heads HTTP/1.1" 200 - |
|
534 | "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2 | |
535 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
535 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
536 | "GET /?cmd=heads HTTP/1.1" 200 - |
|
536 | "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2 |
@@ -1,162 +1,162 b'' | |||||
1 | #require killdaemons |
|
1 | #require killdaemons | |
2 |
|
2 | |||
3 | Test wire protocol argument passing |
|
3 | Test wire protocol argument passing | |
4 |
|
4 | |||
5 | Setup repo: |
|
5 | Setup repo: | |
6 |
|
6 | |||
7 | $ hg init repo |
|
7 | $ hg init repo | |
8 |
|
8 | |||
9 | Local: |
|
9 | Local: | |
10 |
|
10 | |||
11 | $ hg debugwireargs repo eins zwei --three drei --four vier |
|
11 | $ hg debugwireargs repo eins zwei --three drei --four vier | |
12 | eins zwei drei vier None |
|
12 | eins zwei drei vier None | |
13 | $ hg debugwireargs repo eins zwei --four vier |
|
13 | $ hg debugwireargs repo eins zwei --four vier | |
14 | eins zwei None vier None |
|
14 | eins zwei None vier None | |
15 | $ hg debugwireargs repo eins zwei |
|
15 | $ hg debugwireargs repo eins zwei | |
16 | eins zwei None None None |
|
16 | eins zwei None None None | |
17 | $ hg debugwireargs repo eins zwei --five fuenf |
|
17 | $ hg debugwireargs repo eins zwei --five fuenf | |
18 | eins zwei None None fuenf |
|
18 | eins zwei None None fuenf | |
19 |
|
19 | |||
20 | HTTP: |
|
20 | HTTP: | |
21 |
|
21 | |||
22 | $ hg serve -R repo -p $HGPORT -d --pid-file=hg1.pid \ |
|
22 | $ hg serve -R repo -p $HGPORT -d --pid-file=hg1.pid \ | |
23 | > -E error.log -A access.log \ |
|
23 | > -E error.log -A access.log \ | |
24 | > --config experimental.httppostargs=yes |
|
24 | > --config experimental.httppostargs=yes | |
25 | $ cat hg1.pid >> $DAEMON_PIDS |
|
25 | $ cat hg1.pid >> $DAEMON_PIDS | |
26 |
|
26 | |||
27 | $ hg debugwireargs http://localhost:$HGPORT/ un deux trois quatre |
|
27 | $ hg debugwireargs http://localhost:$HGPORT/ un deux trois quatre | |
28 | un deux trois quatre None |
|
28 | un deux trois quatre None | |
29 | $ hg debugwireargs http://localhost:$HGPORT/ \ un deux trois\ qu\ \ atre |
|
29 | $ hg debugwireargs http://localhost:$HGPORT/ \ un deux trois\ qu\ \ atre | |
30 | un deux trois qu atre None |
|
30 | un deux trois qu atre None | |
31 | $ hg debugwireargs http://localhost:$HGPORT/ eins zwei --four vier |
|
31 | $ hg debugwireargs http://localhost:$HGPORT/ eins zwei --four vier | |
32 | eins zwei None vier None |
|
32 | eins zwei None vier None | |
33 | $ hg debugwireargs http://localhost:$HGPORT/ eins zwei |
|
33 | $ hg debugwireargs http://localhost:$HGPORT/ eins zwei | |
34 | eins zwei None None None |
|
34 | eins zwei None None None | |
35 | $ hg debugwireargs http://localhost:$HGPORT/ eins zwei --five fuenf |
|
35 | $ hg debugwireargs http://localhost:$HGPORT/ eins zwei --five fuenf | |
36 | eins zwei None None None |
|
36 | eins zwei None None None | |
37 | $ hg debugwireargs http://localhost:$HGPORT/ un deux trois onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|
37 | $ hg debugwireargs http://localhost:$HGPORT/ un deux trois onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
38 | un deux trois onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx None |
|
38 | un deux trois onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx None | |
39 | $ cat error.log |
|
39 | $ cat error.log | |
40 | $ cat access.log |
|
40 | $ cat access.log | |
41 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
41 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
42 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:39* (glob) |
|
42 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:39* (glob) | |
43 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:39* (glob) |
|
43 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:39* (glob) | |
44 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
44 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
45 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:43* (glob) |
|
45 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:43* (glob) | |
46 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:43* (glob) |
|
46 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:43* (glob) | |
47 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
47 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
48 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:27* (glob) |
|
48 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:27* (glob) | |
49 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:27* (glob) |
|
49 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:27* (glob) | |
50 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
50 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
51 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob) |
|
51 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob) | |
52 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob) |
|
52 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob) | |
53 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
53 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
54 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob) |
|
54 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob) | |
55 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob) |
|
55 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob) | |
56 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
56 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
57 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:1033* (glob) |
|
57 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:1033* (glob) | |
58 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:1033* (glob) |
|
58 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:1033* (glob) | |
59 |
|
59 | |||
60 | HTTP without args-in-POST: |
|
60 | HTTP without args-in-POST: | |
61 | $ hg serve -R repo -p $HGPORT1 -d --pid-file=hg1.pid -E error.log -A access.log |
|
61 | $ hg serve -R repo -p $HGPORT1 -d --pid-file=hg1.pid -E error.log -A access.log | |
62 | $ cat hg1.pid >> $DAEMON_PIDS |
|
62 | $ cat hg1.pid >> $DAEMON_PIDS | |
63 |
|
63 | |||
64 | $ hg debugwireargs http://localhost:$HGPORT1/ un deux trois quatre |
|
64 | $ hg debugwireargs http://localhost:$HGPORT1/ un deux trois quatre | |
65 | un deux trois quatre None |
|
65 | un deux trois quatre None | |
66 | $ hg debugwireargs http://localhost:$HGPORT1/ \ un deux trois\ qu\ \ atre |
|
66 | $ hg debugwireargs http://localhost:$HGPORT1/ \ un deux trois\ qu\ \ atre | |
67 | un deux trois qu atre None |
|
67 | un deux trois qu atre None | |
68 | $ hg debugwireargs http://localhost:$HGPORT1/ eins zwei --four vier |
|
68 | $ hg debugwireargs http://localhost:$HGPORT1/ eins zwei --four vier | |
69 | eins zwei None vier None |
|
69 | eins zwei None vier None | |
70 | $ hg debugwireargs http://localhost:$HGPORT1/ eins zwei |
|
70 | $ hg debugwireargs http://localhost:$HGPORT1/ eins zwei | |
71 | eins zwei None None None |
|
71 | eins zwei None None None | |
72 | $ hg debugwireargs http://localhost:$HGPORT1/ eins zwei --five fuenf |
|
72 | $ hg debugwireargs http://localhost:$HGPORT1/ eins zwei --five fuenf | |
73 | eins zwei None None None |
|
73 | eins zwei None None None | |
74 | $ hg debugwireargs http://localhost:$HGPORT1/ un deux trois onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|
74 | $ hg debugwireargs http://localhost:$HGPORT1/ un deux trois onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
75 | un deux trois onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx None |
|
75 | un deux trois onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx None | |
76 | $ cat error.log |
|
76 | $ cat error.log | |
77 | $ cat access.log |
|
77 | $ cat access.log | |
78 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
78 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
79 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:39* (glob) |
|
79 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:39* (glob) | |
80 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:39* (glob) |
|
80 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:39* (glob) | |
81 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
81 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
82 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:43* (glob) |
|
82 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:43* (glob) | |
83 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:43* (glob) |
|
83 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:43* (glob) | |
84 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
84 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
85 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:27* (glob) |
|
85 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:27* (glob) | |
86 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:27* (glob) |
|
86 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:27* (glob) | |
87 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
87 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
88 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob) |
|
88 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob) | |
89 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob) |
|
89 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob) | |
90 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
90 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
91 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob) |
|
91 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob) | |
92 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob) |
|
92 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob) | |
93 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
93 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
94 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:1033* (glob) |
|
94 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:1033* (glob) | |
95 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:1033* (glob) |
|
95 | * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:1033* (glob) | |
96 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
96 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
97 | * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=quatre&one=un&three=trois&two=deux (glob) |
|
97 | * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=quatre&one=un&three=trois&two=deux x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
98 | * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=quatre&one=un&three=trois&two=deux (glob) |
|
98 | * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=quatre&one=un&three=trois&two=deux x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
99 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
99 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
100 | * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=qu++atre&one=+un&three=trois+&two=deux (glob) |
|
100 | * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=qu++atre&one=+un&three=trois+&two=deux x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
101 | * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=qu++atre&one=+un&three=trois+&two=deux (glob) |
|
101 | * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=qu++atre&one=+un&three=trois+&two=deux x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
102 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
102 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
103 | * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=vier&one=eins&two=zwei (glob) |
|
103 | * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=vier&one=eins&two=zwei x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
104 | * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=vier&one=eins&two=zwei (glob) |
|
104 | * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=vier&one=eins&two=zwei x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
105 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
105 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
106 | * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei (glob) |
|
106 | * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
107 | * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei (glob) |
|
107 | * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
108 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
108 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
109 | * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei (glob) |
|
109 | * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
110 | * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei (glob) |
|
110 | * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
111 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
111 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
112 | * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&one x-hgarg-2:=un&three=trois&two=deux (glob) |
|
112 | * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&one x-hgarg-2:=un&three=trois&two=deux x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
113 | * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&one x-hgarg-2:=un&three=trois&two=deux (glob) |
|
113 | * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&one x-hgarg-2:=un&three=trois&two=deux x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
114 |
|
114 | |||
115 | HTTP without the httpheader capability: |
|
115 | HTTP without the httpheader capability: | |
116 |
|
116 | |||
117 | $ HGRCPATH="`pwd`/repo/.hgrc" |
|
117 | $ HGRCPATH="`pwd`/repo/.hgrc" | |
118 | $ export HGRCPATH |
|
118 | $ export HGRCPATH | |
119 | $ CAP=httpheader |
|
119 | $ CAP=httpheader | |
120 | $ . "$TESTDIR/notcapable" |
|
120 | $ . "$TESTDIR/notcapable" | |
121 |
|
121 | |||
122 | $ hg serve -R repo -p $HGPORT2 -d --pid-file=hg2.pid -E error2.log -A access2.log |
|
122 | $ hg serve -R repo -p $HGPORT2 -d --pid-file=hg2.pid -E error2.log -A access2.log | |
123 | $ cat hg2.pid >> $DAEMON_PIDS |
|
123 | $ cat hg2.pid >> $DAEMON_PIDS | |
124 |
|
124 | |||
125 | $ hg debugwireargs http://localhost:$HGPORT2/ un deux trois quatre |
|
125 | $ hg debugwireargs http://localhost:$HGPORT2/ un deux trois quatre | |
126 | un deux trois quatre None |
|
126 | un deux trois quatre None | |
127 | $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei --four vier |
|
127 | $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei --four vier | |
128 | eins zwei None vier None |
|
128 | eins zwei None vier None | |
129 | $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei |
|
129 | $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei | |
130 | eins zwei None None None |
|
130 | eins zwei None None None | |
131 | $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei --five fuenf |
|
131 | $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei --five fuenf | |
132 | eins zwei None None None |
|
132 | eins zwei None None None | |
133 | $ cat error2.log |
|
133 | $ cat error2.log | |
134 | $ cat access2.log |
|
134 | $ cat access2.log | |
135 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
135 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
136 | * - - [*] "GET /?cmd=debugwireargs&four=quatre&one=un&three=trois&two=deux HTTP/1.1" 200 - (glob) |
|
136 | * - - [*] "GET /?cmd=debugwireargs&four=quatre&one=un&three=trois&two=deux HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
137 | * - - [*] "GET /?cmd=debugwireargs&four=quatre&one=un&three=trois&two=deux HTTP/1.1" 200 - (glob) |
|
137 | * - - [*] "GET /?cmd=debugwireargs&four=quatre&one=un&three=trois&two=deux HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
138 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
138 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
139 | * - - [*] "GET /?cmd=debugwireargs&four=vier&one=eins&two=zwei HTTP/1.1" 200 - (glob) |
|
139 | * - - [*] "GET /?cmd=debugwireargs&four=vier&one=eins&two=zwei HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
140 | * - - [*] "GET /?cmd=debugwireargs&four=vier&one=eins&two=zwei HTTP/1.1" 200 - (glob) |
|
140 | * - - [*] "GET /?cmd=debugwireargs&four=vier&one=eins&two=zwei HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
141 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
141 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
142 | * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob) |
|
142 | * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
143 | * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob) |
|
143 | * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
144 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
144 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
145 | * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob) |
|
145 | * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
146 | * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob) |
|
146 | * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
147 |
|
147 | |||
148 | SSH (try to exercise the ssh functionality with a dummy script): |
|
148 | SSH (try to exercise the ssh functionality with a dummy script): | |
149 |
|
149 | |||
150 | $ hg debugwireargs --ssh "python $TESTDIR/dummyssh" ssh://user@dummy/repo uno due tre quattro |
|
150 | $ hg debugwireargs --ssh "python $TESTDIR/dummyssh" ssh://user@dummy/repo uno due tre quattro | |
151 | uno due tre quattro None |
|
151 | uno due tre quattro None | |
152 | $ hg debugwireargs --ssh "python $TESTDIR/dummyssh" ssh://user@dummy/repo eins zwei --four vier |
|
152 | $ hg debugwireargs --ssh "python $TESTDIR/dummyssh" ssh://user@dummy/repo eins zwei --four vier | |
153 | eins zwei None vier None |
|
153 | eins zwei None vier None | |
154 | $ hg debugwireargs --ssh "python $TESTDIR/dummyssh" ssh://user@dummy/repo eins zwei |
|
154 | $ hg debugwireargs --ssh "python $TESTDIR/dummyssh" ssh://user@dummy/repo eins zwei | |
155 | eins zwei None None None |
|
155 | eins zwei None None None | |
156 | $ hg debugwireargs --ssh "python $TESTDIR/dummyssh" ssh://user@dummy/repo eins zwei --five fuenf |
|
156 | $ hg debugwireargs --ssh "python $TESTDIR/dummyssh" ssh://user@dummy/repo eins zwei --five fuenf | |
157 | eins zwei None None None |
|
157 | eins zwei None None None | |
158 |
|
158 | |||
159 | Explicitly kill daemons to let the test exit on Windows |
|
159 | Explicitly kill daemons to let the test exit on Windows | |
160 |
|
160 | |||
161 | $ killdaemons.py |
|
161 | $ killdaemons.py | |
162 |
|
162 |
General Comments 0
You need to be logged in to leave comments.
Login now