##// END OF EJS Templates
httppeer: only advertise partial-pull if capabilities are known...
Gregory Szorc -
r37574:b77aa48b default
parent child Browse files
Show More
@@ -1,660 +1,664 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 io
12 import io
13 import os
13 import os
14 import socket
14 import socket
15 import struct
15 import struct
16 import tempfile
16 import tempfile
17
17
18 from .i18n import _
18 from .i18n import _
19 from .thirdparty import (
19 from .thirdparty import (
20 cbor,
20 cbor,
21 )
21 )
22 from . import (
22 from . import (
23 bundle2,
23 bundle2,
24 error,
24 error,
25 httpconnection,
25 httpconnection,
26 pycompat,
26 pycompat,
27 statichttprepo,
27 statichttprepo,
28 url as urlmod,
28 url as urlmod,
29 util,
29 util,
30 wireproto,
30 wireproto,
31 wireprotoframing,
31 wireprotoframing,
32 wireprotov2server,
32 wireprotov2server,
33 )
33 )
34
34
35 httplib = util.httplib
35 httplib = util.httplib
36 urlerr = util.urlerr
36 urlerr = util.urlerr
37 urlreq = util.urlreq
37 urlreq = util.urlreq
38
38
39 def encodevalueinheaders(value, header, limit):
39 def encodevalueinheaders(value, header, limit):
40 """Encode a string value into multiple HTTP headers.
40 """Encode a string value into multiple HTTP headers.
41
41
42 ``value`` will be encoded into 1 or more HTTP headers with the names
42 ``value`` will be encoded into 1 or more HTTP headers with the names
43 ``header-<N>`` where ``<N>`` is an integer starting at 1. Each header
43 ``header-<N>`` where ``<N>`` is an integer starting at 1. Each header
44 name + value will be at most ``limit`` bytes long.
44 name + value will be at most ``limit`` bytes long.
45
45
46 Returns an iterable of 2-tuples consisting of header names and
46 Returns an iterable of 2-tuples consisting of header names and
47 values as native strings.
47 values as native strings.
48 """
48 """
49 # HTTP Headers are ASCII. Python 3 requires them to be unicodes,
49 # HTTP Headers are ASCII. Python 3 requires them to be unicodes,
50 # not bytes. This function always takes bytes in as arguments.
50 # not bytes. This function always takes bytes in as arguments.
51 fmt = pycompat.strurl(header) + r'-%s'
51 fmt = pycompat.strurl(header) + r'-%s'
52 # Note: it is *NOT* a bug that the last bit here is a bytestring
52 # Note: it is *NOT* a bug that the last bit here is a bytestring
53 # and not a unicode: we're just getting the encoded length anyway,
53 # and not a unicode: we're just getting the encoded length anyway,
54 # and using an r-string to make it portable between Python 2 and 3
54 # and using an r-string to make it portable between Python 2 and 3
55 # doesn't work because then the \r is a literal backslash-r
55 # doesn't work because then the \r is a literal backslash-r
56 # instead of a carriage return.
56 # instead of a carriage return.
57 valuelen = limit - len(fmt % r'000') - len(': \r\n')
57 valuelen = limit - len(fmt % r'000') - len(': \r\n')
58 result = []
58 result = []
59
59
60 n = 0
60 n = 0
61 for i in xrange(0, len(value), valuelen):
61 for i in xrange(0, len(value), valuelen):
62 n += 1
62 n += 1
63 result.append((fmt % str(n), pycompat.strurl(value[i:i + valuelen])))
63 result.append((fmt % str(n), pycompat.strurl(value[i:i + valuelen])))
64
64
65 return result
65 return result
66
66
67 def _wraphttpresponse(resp):
67 def _wraphttpresponse(resp):
68 """Wrap an HTTPResponse with common error handlers.
68 """Wrap an HTTPResponse with common error handlers.
69
69
70 This ensures that any I/O from any consumer raises the appropriate
70 This ensures that any I/O from any consumer raises the appropriate
71 error and messaging.
71 error and messaging.
72 """
72 """
73 origread = resp.read
73 origread = resp.read
74
74
75 class readerproxy(resp.__class__):
75 class readerproxy(resp.__class__):
76 def read(self, size=None):
76 def read(self, size=None):
77 try:
77 try:
78 return origread(size)
78 return origread(size)
79 except httplib.IncompleteRead as e:
79 except httplib.IncompleteRead as e:
80 # e.expected is an integer if length known or None otherwise.
80 # e.expected is an integer if length known or None otherwise.
81 if e.expected:
81 if e.expected:
82 msg = _('HTTP request error (incomplete response; '
82 msg = _('HTTP request error (incomplete response; '
83 'expected %d bytes got %d)') % (e.expected,
83 'expected %d bytes got %d)') % (e.expected,
84 len(e.partial))
84 len(e.partial))
85 else:
85 else:
86 msg = _('HTTP request error (incomplete response)')
86 msg = _('HTTP request error (incomplete response)')
87
87
88 raise error.PeerTransportError(
88 raise error.PeerTransportError(
89 msg,
89 msg,
90 hint=_('this may be an intermittent network failure; '
90 hint=_('this may be an intermittent network failure; '
91 'if the error persists, consider contacting the '
91 'if the error persists, consider contacting the '
92 'network or server operator'))
92 'network or server operator'))
93 except httplib.HTTPException as e:
93 except httplib.HTTPException as e:
94 raise error.PeerTransportError(
94 raise error.PeerTransportError(
95 _('HTTP request error (%s)') % e,
95 _('HTTP request error (%s)') % e,
96 hint=_('this may be an intermittent network failure; '
96 hint=_('this may be an intermittent network failure; '
97 'if the error persists, consider contacting the '
97 'if the error persists, consider contacting the '
98 'network or server operator'))
98 'network or server operator'))
99
99
100 resp.__class__ = readerproxy
100 resp.__class__ = readerproxy
101
101
102 class _multifile(object):
102 class _multifile(object):
103 def __init__(self, *fileobjs):
103 def __init__(self, *fileobjs):
104 for f in fileobjs:
104 for f in fileobjs:
105 if not util.safehasattr(f, 'length'):
105 if not util.safehasattr(f, 'length'):
106 raise ValueError(
106 raise ValueError(
107 '_multifile only supports file objects that '
107 '_multifile only supports file objects that '
108 'have a length but this one does not:', type(f), f)
108 'have a length but this one does not:', type(f), f)
109 self._fileobjs = fileobjs
109 self._fileobjs = fileobjs
110 self._index = 0
110 self._index = 0
111
111
112 @property
112 @property
113 def length(self):
113 def length(self):
114 return sum(f.length for f in self._fileobjs)
114 return sum(f.length for f in self._fileobjs)
115
115
116 def read(self, amt=None):
116 def read(self, amt=None):
117 if amt <= 0:
117 if amt <= 0:
118 return ''.join(f.read() for f in self._fileobjs)
118 return ''.join(f.read() for f in self._fileobjs)
119 parts = []
119 parts = []
120 while amt and self._index < len(self._fileobjs):
120 while amt and self._index < len(self._fileobjs):
121 parts.append(self._fileobjs[self._index].read(amt))
121 parts.append(self._fileobjs[self._index].read(amt))
122 got = len(parts[-1])
122 got = len(parts[-1])
123 if got < amt:
123 if got < amt:
124 self._index += 1
124 self._index += 1
125 amt -= got
125 amt -= got
126 return ''.join(parts)
126 return ''.join(parts)
127
127
128 def seek(self, offset, whence=os.SEEK_SET):
128 def seek(self, offset, whence=os.SEEK_SET):
129 if whence != os.SEEK_SET:
129 if whence != os.SEEK_SET:
130 raise NotImplementedError(
130 raise NotImplementedError(
131 '_multifile does not support anything other'
131 '_multifile does not support anything other'
132 ' than os.SEEK_SET for whence on seek()')
132 ' than os.SEEK_SET for whence on seek()')
133 if offset != 0:
133 if offset != 0:
134 raise NotImplementedError(
134 raise NotImplementedError(
135 '_multifile only supports seeking to start, but that '
135 '_multifile only supports seeking to start, but that '
136 'could be fixed if you need it')
136 'could be fixed if you need it')
137 for f in self._fileobjs:
137 for f in self._fileobjs:
138 f.seek(0)
138 f.seek(0)
139 self._index = 0
139 self._index = 0
140
140
141 def makev1commandrequest(ui, requestbuilder, caps, capablefn,
141 def makev1commandrequest(ui, requestbuilder, caps, capablefn,
142 repobaseurl, cmd, args):
142 repobaseurl, cmd, args):
143 """Make an HTTP request to run a command for a version 1 client.
143 """Make an HTTP request to run a command for a version 1 client.
144
144
145 ``caps`` is a set of known server capabilities. The value may be
145 ``caps`` is a set of known server capabilities. The value may be
146 None if capabilities are not yet known.
146 None if capabilities are not yet known.
147
147
148 ``capablefn`` is a function to evaluate a capability.
148 ``capablefn`` is a function to evaluate a capability.
149
149
150 ``cmd``, ``args``, and ``data`` define the command, its arguments, and
150 ``cmd``, ``args``, and ``data`` define the command, its arguments, and
151 raw data to pass to it.
151 raw data to pass to it.
152 """
152 """
153 if cmd == 'pushkey':
153 if cmd == 'pushkey':
154 args['data'] = ''
154 args['data'] = ''
155 data = args.pop('data', None)
155 data = args.pop('data', None)
156 headers = args.pop('headers', {})
156 headers = args.pop('headers', {})
157
157
158 ui.debug("sending %s command\n" % cmd)
158 ui.debug("sending %s command\n" % cmd)
159 q = [('cmd', cmd)]
159 q = [('cmd', cmd)]
160 headersize = 0
160 headersize = 0
161 # Important: don't use self.capable() here or else you end up
161 # Important: don't use self.capable() here or else you end up
162 # with infinite recursion when trying to look up capabilities
162 # with infinite recursion when trying to look up capabilities
163 # for the first time.
163 # for the first time.
164 postargsok = caps is not None and 'httppostargs' in caps
164 postargsok = caps is not None and 'httppostargs' in caps
165
165
166 # Send arguments via POST.
166 # Send arguments via POST.
167 if postargsok and args:
167 if postargsok and args:
168 strargs = urlreq.urlencode(sorted(args.items()))
168 strargs = urlreq.urlencode(sorted(args.items()))
169 if not data:
169 if not data:
170 data = strargs
170 data = strargs
171 else:
171 else:
172 if isinstance(data, bytes):
172 if isinstance(data, bytes):
173 i = io.BytesIO(data)
173 i = io.BytesIO(data)
174 i.length = len(data)
174 i.length = len(data)
175 data = i
175 data = i
176 argsio = io.BytesIO(strargs)
176 argsio = io.BytesIO(strargs)
177 argsio.length = len(strargs)
177 argsio.length = len(strargs)
178 data = _multifile(argsio, data)
178 data = _multifile(argsio, data)
179 headers[r'X-HgArgs-Post'] = len(strargs)
179 headers[r'X-HgArgs-Post'] = len(strargs)
180 elif args:
180 elif args:
181 # Calling self.capable() can infinite loop if we are calling
181 # Calling self.capable() can infinite loop if we are calling
182 # "capabilities". But that command should never accept wire
182 # "capabilities". But that command should never accept wire
183 # protocol arguments. So this should never happen.
183 # protocol arguments. So this should never happen.
184 assert cmd != 'capabilities'
184 assert cmd != 'capabilities'
185 httpheader = capablefn('httpheader')
185 httpheader = capablefn('httpheader')
186 if httpheader:
186 if httpheader:
187 headersize = int(httpheader.split(',', 1)[0])
187 headersize = int(httpheader.split(',', 1)[0])
188
188
189 # Send arguments via HTTP headers.
189 # Send arguments via HTTP headers.
190 if headersize > 0:
190 if headersize > 0:
191 # The headers can typically carry more data than the URL.
191 # The headers can typically carry more data than the URL.
192 encargs = urlreq.urlencode(sorted(args.items()))
192 encargs = urlreq.urlencode(sorted(args.items()))
193 for header, value in encodevalueinheaders(encargs, 'X-HgArg',
193 for header, value in encodevalueinheaders(encargs, 'X-HgArg',
194 headersize):
194 headersize):
195 headers[header] = value
195 headers[header] = value
196 # Send arguments via query string (Mercurial <1.9).
196 # Send arguments via query string (Mercurial <1.9).
197 else:
197 else:
198 q += sorted(args.items())
198 q += sorted(args.items())
199
199
200 qs = '?%s' % urlreq.urlencode(q)
200 qs = '?%s' % urlreq.urlencode(q)
201 cu = "%s%s" % (repobaseurl, qs)
201 cu = "%s%s" % (repobaseurl, qs)
202 size = 0
202 size = 0
203 if util.safehasattr(data, 'length'):
203 if util.safehasattr(data, 'length'):
204 size = data.length
204 size = data.length
205 elif data is not None:
205 elif data is not None:
206 size = len(data)
206 size = len(data)
207 if data is not None and r'Content-Type' not in headers:
207 if data is not None and r'Content-Type' not in headers:
208 headers[r'Content-Type'] = r'application/mercurial-0.1'
208 headers[r'Content-Type'] = r'application/mercurial-0.1'
209
209
210 # Tell the server we accept application/mercurial-0.2 and multiple
210 # Tell the server we accept application/mercurial-0.2 and multiple
211 # compression formats if the server is capable of emitting those
211 # compression formats if the server is capable of emitting those
212 # payloads.
212 # payloads.
213 protoparams = {'partial-pull'}
213 # Note: Keep this set empty by default, as client advertisement of
214 # protocol parameters should only occur after the handshake.
215 protoparams = set()
214
216
215 mediatypes = set()
217 mediatypes = set()
216 if caps is not None:
218 if caps is not None:
217 mt = capablefn('httpmediatype')
219 mt = capablefn('httpmediatype')
218 if mt:
220 if mt:
219 protoparams.add('0.1')
221 protoparams.add('0.1')
220 mediatypes = set(mt.split(','))
222 mediatypes = set(mt.split(','))
221
223
224 protoparams.add('partial-pull')
225
222 if '0.2tx' in mediatypes:
226 if '0.2tx' in mediatypes:
223 protoparams.add('0.2')
227 protoparams.add('0.2')
224
228
225 if '0.2tx' in mediatypes and capablefn('compression'):
229 if '0.2tx' in mediatypes and capablefn('compression'):
226 # We /could/ compare supported compression formats and prune
230 # We /could/ compare supported compression formats and prune
227 # non-mutually supported or error if nothing is mutually supported.
231 # non-mutually supported or error if nothing is mutually supported.
228 # For now, send the full list to the server and have it error.
232 # For now, send the full list to the server and have it error.
229 comps = [e.wireprotosupport().name for e in
233 comps = [e.wireprotosupport().name for e in
230 util.compengines.supportedwireengines(util.CLIENTROLE)]
234 util.compengines.supportedwireengines(util.CLIENTROLE)]
231 protoparams.add('comp=%s' % ','.join(comps))
235 protoparams.add('comp=%s' % ','.join(comps))
232
236
233 if protoparams:
237 if protoparams:
234 protoheaders = encodevalueinheaders(' '.join(sorted(protoparams)),
238 protoheaders = encodevalueinheaders(' '.join(sorted(protoparams)),
235 'X-HgProto',
239 'X-HgProto',
236 headersize or 1024)
240 headersize or 1024)
237 for header, value in protoheaders:
241 for header, value in protoheaders:
238 headers[header] = value
242 headers[header] = value
239
243
240 varyheaders = []
244 varyheaders = []
241 for header in headers:
245 for header in headers:
242 if header.lower().startswith(r'x-hg'):
246 if header.lower().startswith(r'x-hg'):
243 varyheaders.append(header)
247 varyheaders.append(header)
244
248
245 if varyheaders:
249 if varyheaders:
246 headers[r'Vary'] = r','.join(sorted(varyheaders))
250 headers[r'Vary'] = r','.join(sorted(varyheaders))
247
251
248 req = requestbuilder(pycompat.strurl(cu), data, headers)
252 req = requestbuilder(pycompat.strurl(cu), data, headers)
249
253
250 if data is not None:
254 if data is not None:
251 ui.debug("sending %d bytes\n" % size)
255 ui.debug("sending %d bytes\n" % size)
252 req.add_unredirected_header(r'Content-Length', r'%d' % size)
256 req.add_unredirected_header(r'Content-Length', r'%d' % size)
253
257
254 return req, cu, qs
258 return req, cu, qs
255
259
256 def sendrequest(ui, opener, req):
260 def sendrequest(ui, opener, req):
257 """Send a prepared HTTP request.
261 """Send a prepared HTTP request.
258
262
259 Returns the response object.
263 Returns the response object.
260 """
264 """
261 if (ui.debugflag
265 if (ui.debugflag
262 and ui.configbool('devel', 'debug.peer-request')):
266 and ui.configbool('devel', 'debug.peer-request')):
263 dbg = ui.debug
267 dbg = ui.debug
264 line = 'devel-peer-request: %s\n'
268 line = 'devel-peer-request: %s\n'
265 dbg(line % '%s %s' % (req.get_method(), req.get_full_url()))
269 dbg(line % '%s %s' % (req.get_method(), req.get_full_url()))
266 hgargssize = None
270 hgargssize = None
267
271
268 for header, value in sorted(req.header_items()):
272 for header, value in sorted(req.header_items()):
269 if header.startswith('X-hgarg-'):
273 if header.startswith('X-hgarg-'):
270 if hgargssize is None:
274 if hgargssize is None:
271 hgargssize = 0
275 hgargssize = 0
272 hgargssize += len(value)
276 hgargssize += len(value)
273 else:
277 else:
274 dbg(line % ' %s %s' % (header, value))
278 dbg(line % ' %s %s' % (header, value))
275
279
276 if hgargssize is not None:
280 if hgargssize is not None:
277 dbg(line % ' %d bytes of commands arguments in headers'
281 dbg(line % ' %d bytes of commands arguments in headers'
278 % hgargssize)
282 % hgargssize)
279
283
280 if req.has_data():
284 if req.has_data():
281 data = req.get_data()
285 data = req.get_data()
282 length = getattr(data, 'length', None)
286 length = getattr(data, 'length', None)
283 if length is None:
287 if length is None:
284 length = len(data)
288 length = len(data)
285 dbg(line % ' %d bytes of data' % length)
289 dbg(line % ' %d bytes of data' % length)
286
290
287 start = util.timer()
291 start = util.timer()
288
292
289 try:
293 try:
290 res = opener.open(req)
294 res = opener.open(req)
291 except urlerr.httperror as inst:
295 except urlerr.httperror as inst:
292 if inst.code == 401:
296 if inst.code == 401:
293 raise error.Abort(_('authorization failed'))
297 raise error.Abort(_('authorization failed'))
294 raise
298 raise
295 except httplib.HTTPException as inst:
299 except httplib.HTTPException as inst:
296 ui.debug('http error requesting %s\n' %
300 ui.debug('http error requesting %s\n' %
297 util.hidepassword(req.get_full_url()))
301 util.hidepassword(req.get_full_url()))
298 ui.traceback()
302 ui.traceback()
299 raise IOError(None, inst)
303 raise IOError(None, inst)
300 finally:
304 finally:
301 if ui.configbool('devel', 'debug.peer-request'):
305 if ui.configbool('devel', 'debug.peer-request'):
302 dbg(line % ' finished in %.4f seconds (%s)'
306 dbg(line % ' finished in %.4f seconds (%s)'
303 % (util.timer() - start, res.code))
307 % (util.timer() - start, res.code))
304
308
305 # Insert error handlers for common I/O failures.
309 # Insert error handlers for common I/O failures.
306 _wraphttpresponse(res)
310 _wraphttpresponse(res)
307
311
308 return res
312 return res
309
313
310 def parsev1commandresponse(ui, baseurl, requrl, qs, resp, compressible):
314 def parsev1commandresponse(ui, baseurl, requrl, qs, resp, compressible):
311 # record the url we got redirected to
315 # record the url we got redirected to
312 respurl = pycompat.bytesurl(resp.geturl())
316 respurl = pycompat.bytesurl(resp.geturl())
313 if respurl.endswith(qs):
317 if respurl.endswith(qs):
314 respurl = respurl[:-len(qs)]
318 respurl = respurl[:-len(qs)]
315 if baseurl.rstrip('/') != respurl.rstrip('/'):
319 if baseurl.rstrip('/') != respurl.rstrip('/'):
316 if not ui.quiet:
320 if not ui.quiet:
317 ui.warn(_('real URL is %s\n') % respurl)
321 ui.warn(_('real URL is %s\n') % respurl)
318
322
319 try:
323 try:
320 proto = pycompat.bytesurl(resp.getheader(r'content-type', r''))
324 proto = pycompat.bytesurl(resp.getheader(r'content-type', r''))
321 except AttributeError:
325 except AttributeError:
322 proto = pycompat.bytesurl(resp.headers.get(r'content-type', r''))
326 proto = pycompat.bytesurl(resp.headers.get(r'content-type', r''))
323
327
324 safeurl = util.hidepassword(baseurl)
328 safeurl = util.hidepassword(baseurl)
325 if proto.startswith('application/hg-error'):
329 if proto.startswith('application/hg-error'):
326 raise error.OutOfBandError(resp.read())
330 raise error.OutOfBandError(resp.read())
327
331
328 # Pre 1.0 versions of Mercurial used text/plain and
332 # Pre 1.0 versions of Mercurial used text/plain and
329 # application/hg-changegroup. We don't support such old servers.
333 # application/hg-changegroup. We don't support such old servers.
330 if not proto.startswith('application/mercurial-'):
334 if not proto.startswith('application/mercurial-'):
331 ui.debug("requested URL: '%s'\n" % util.hidepassword(requrl))
335 ui.debug("requested URL: '%s'\n" % util.hidepassword(requrl))
332 raise error.RepoError(
336 raise error.RepoError(
333 _("'%s' does not appear to be an hg repository:\n"
337 _("'%s' does not appear to be an hg repository:\n"
334 "---%%<--- (%s)\n%s\n---%%<---\n")
338 "---%%<--- (%s)\n%s\n---%%<---\n")
335 % (safeurl, proto or 'no content-type', resp.read(1024)))
339 % (safeurl, proto or 'no content-type', resp.read(1024)))
336
340
337 try:
341 try:
338 version = proto.split('-', 1)[1]
342 version = proto.split('-', 1)[1]
339 version_info = tuple([int(n) for n in version.split('.')])
343 version_info = tuple([int(n) for n in version.split('.')])
340 except ValueError:
344 except ValueError:
341 raise error.RepoError(_("'%s' sent a broken Content-Type "
345 raise error.RepoError(_("'%s' sent a broken Content-Type "
342 "header (%s)") % (safeurl, proto))
346 "header (%s)") % (safeurl, proto))
343
347
344 # TODO consider switching to a decompression reader that uses
348 # TODO consider switching to a decompression reader that uses
345 # generators.
349 # generators.
346 if version_info == (0, 1):
350 if version_info == (0, 1):
347 if compressible:
351 if compressible:
348 resp = util.compengines['zlib'].decompressorreader(resp)
352 resp = util.compengines['zlib'].decompressorreader(resp)
349
353
350 elif version_info == (0, 2):
354 elif version_info == (0, 2):
351 # application/mercurial-0.2 always identifies the compression
355 # application/mercurial-0.2 always identifies the compression
352 # engine in the payload header.
356 # engine in the payload header.
353 elen = struct.unpack('B', resp.read(1))[0]
357 elen = struct.unpack('B', resp.read(1))[0]
354 ename = resp.read(elen)
358 ename = resp.read(elen)
355 engine = util.compengines.forwiretype(ename)
359 engine = util.compengines.forwiretype(ename)
356
360
357 resp = engine.decompressorreader(resp)
361 resp = engine.decompressorreader(resp)
358 else:
362 else:
359 raise error.RepoError(_("'%s' uses newer protocol %s") %
363 raise error.RepoError(_("'%s' uses newer protocol %s") %
360 (safeurl, version))
364 (safeurl, version))
361
365
362 return respurl, resp
366 return respurl, resp
363
367
364 class httppeer(wireproto.wirepeer):
368 class httppeer(wireproto.wirepeer):
365 def __init__(self, ui, path, url, opener, requestbuilder, caps):
369 def __init__(self, ui, path, url, opener, requestbuilder, caps):
366 self.ui = ui
370 self.ui = ui
367 self._path = path
371 self._path = path
368 self._url = url
372 self._url = url
369 self._caps = caps
373 self._caps = caps
370 self._urlopener = opener
374 self._urlopener = opener
371 self._requestbuilder = requestbuilder
375 self._requestbuilder = requestbuilder
372
376
373 def __del__(self):
377 def __del__(self):
374 for h in self._urlopener.handlers:
378 for h in self._urlopener.handlers:
375 h.close()
379 h.close()
376 getattr(h, "close_all", lambda: None)()
380 getattr(h, "close_all", lambda: None)()
377
381
378 # Begin of ipeerconnection interface.
382 # Begin of ipeerconnection interface.
379
383
380 def url(self):
384 def url(self):
381 return self._path
385 return self._path
382
386
383 def local(self):
387 def local(self):
384 return None
388 return None
385
389
386 def peer(self):
390 def peer(self):
387 return self
391 return self
388
392
389 def canpush(self):
393 def canpush(self):
390 return True
394 return True
391
395
392 def close(self):
396 def close(self):
393 pass
397 pass
394
398
395 # End of ipeerconnection interface.
399 # End of ipeerconnection interface.
396
400
397 # Begin of ipeercommands interface.
401 # Begin of ipeercommands interface.
398
402
399 def capabilities(self):
403 def capabilities(self):
400 return self._caps
404 return self._caps
401
405
402 # End of ipeercommands interface.
406 # End of ipeercommands interface.
403
407
404 # look up capabilities only when needed
408 # look up capabilities only when needed
405
409
406 def _callstream(self, cmd, _compressible=False, **args):
410 def _callstream(self, cmd, _compressible=False, **args):
407 args = pycompat.byteskwargs(args)
411 args = pycompat.byteskwargs(args)
408
412
409 req, cu, qs = makev1commandrequest(self.ui, self._requestbuilder,
413 req, cu, qs = makev1commandrequest(self.ui, self._requestbuilder,
410 self._caps, self.capable,
414 self._caps, self.capable,
411 self._url, cmd, args)
415 self._url, cmd, args)
412
416
413 resp = sendrequest(self.ui, self._urlopener, req)
417 resp = sendrequest(self.ui, self._urlopener, req)
414
418
415 self._url, resp = parsev1commandresponse(self.ui, self._url, cu, qs,
419 self._url, resp = parsev1commandresponse(self.ui, self._url, cu, qs,
416 resp, _compressible)
420 resp, _compressible)
417
421
418 return resp
422 return resp
419
423
420 def _call(self, cmd, **args):
424 def _call(self, cmd, **args):
421 fp = self._callstream(cmd, **args)
425 fp = self._callstream(cmd, **args)
422 try:
426 try:
423 return fp.read()
427 return fp.read()
424 finally:
428 finally:
425 # if using keepalive, allow connection to be reused
429 # if using keepalive, allow connection to be reused
426 fp.close()
430 fp.close()
427
431
428 def _callpush(self, cmd, cg, **args):
432 def _callpush(self, cmd, cg, **args):
429 # have to stream bundle to a temp file because we do not have
433 # have to stream bundle to a temp file because we do not have
430 # http 1.1 chunked transfer.
434 # http 1.1 chunked transfer.
431
435
432 types = self.capable('unbundle')
436 types = self.capable('unbundle')
433 try:
437 try:
434 types = types.split(',')
438 types = types.split(',')
435 except AttributeError:
439 except AttributeError:
436 # servers older than d1b16a746db6 will send 'unbundle' as a
440 # servers older than d1b16a746db6 will send 'unbundle' as a
437 # boolean capability. They only support headerless/uncompressed
441 # boolean capability. They only support headerless/uncompressed
438 # bundles.
442 # bundles.
439 types = [""]
443 types = [""]
440 for x in types:
444 for x in types:
441 if x in bundle2.bundletypes:
445 if x in bundle2.bundletypes:
442 type = x
446 type = x
443 break
447 break
444
448
445 tempname = bundle2.writebundle(self.ui, cg, None, type)
449 tempname = bundle2.writebundle(self.ui, cg, None, type)
446 fp = httpconnection.httpsendfile(self.ui, tempname, "rb")
450 fp = httpconnection.httpsendfile(self.ui, tempname, "rb")
447 headers = {r'Content-Type': r'application/mercurial-0.1'}
451 headers = {r'Content-Type': r'application/mercurial-0.1'}
448
452
449 try:
453 try:
450 r = self._call(cmd, data=fp, headers=headers, **args)
454 r = self._call(cmd, data=fp, headers=headers, **args)
451 vals = r.split('\n', 1)
455 vals = r.split('\n', 1)
452 if len(vals) < 2:
456 if len(vals) < 2:
453 raise error.ResponseError(_("unexpected response:"), r)
457 raise error.ResponseError(_("unexpected response:"), r)
454 return vals
458 return vals
455 except urlerr.httperror:
459 except urlerr.httperror:
456 # Catch and re-raise these so we don't try and treat them
460 # Catch and re-raise these so we don't try and treat them
457 # like generic socket errors. They lack any values in
461 # like generic socket errors. They lack any values in
458 # .args on Python 3 which breaks our socket.error block.
462 # .args on Python 3 which breaks our socket.error block.
459 raise
463 raise
460 except socket.error as err:
464 except socket.error as err:
461 if err.args[0] in (errno.ECONNRESET, errno.EPIPE):
465 if err.args[0] in (errno.ECONNRESET, errno.EPIPE):
462 raise error.Abort(_('push failed: %s') % err.args[1])
466 raise error.Abort(_('push failed: %s') % err.args[1])
463 raise error.Abort(err.args[1])
467 raise error.Abort(err.args[1])
464 finally:
468 finally:
465 fp.close()
469 fp.close()
466 os.unlink(tempname)
470 os.unlink(tempname)
467
471
468 def _calltwowaystream(self, cmd, fp, **args):
472 def _calltwowaystream(self, cmd, fp, **args):
469 fh = None
473 fh = None
470 fp_ = None
474 fp_ = None
471 filename = None
475 filename = None
472 try:
476 try:
473 # dump bundle to disk
477 # dump bundle to disk
474 fd, filename = tempfile.mkstemp(prefix="hg-bundle-", suffix=".hg")
478 fd, filename = tempfile.mkstemp(prefix="hg-bundle-", suffix=".hg")
475 fh = os.fdopen(fd, r"wb")
479 fh = os.fdopen(fd, r"wb")
476 d = fp.read(4096)
480 d = fp.read(4096)
477 while d:
481 while d:
478 fh.write(d)
482 fh.write(d)
479 d = fp.read(4096)
483 d = fp.read(4096)
480 fh.close()
484 fh.close()
481 # start http push
485 # start http push
482 fp_ = httpconnection.httpsendfile(self.ui, filename, "rb")
486 fp_ = httpconnection.httpsendfile(self.ui, filename, "rb")
483 headers = {r'Content-Type': r'application/mercurial-0.1'}
487 headers = {r'Content-Type': r'application/mercurial-0.1'}
484 return self._callstream(cmd, data=fp_, headers=headers, **args)
488 return self._callstream(cmd, data=fp_, headers=headers, **args)
485 finally:
489 finally:
486 if fp_ is not None:
490 if fp_ is not None:
487 fp_.close()
491 fp_.close()
488 if fh is not None:
492 if fh is not None:
489 fh.close()
493 fh.close()
490 os.unlink(filename)
494 os.unlink(filename)
491
495
492 def _callcompressable(self, cmd, **args):
496 def _callcompressable(self, cmd, **args):
493 return self._callstream(cmd, _compressible=True, **args)
497 return self._callstream(cmd, _compressible=True, **args)
494
498
495 def _abort(self, exception):
499 def _abort(self, exception):
496 raise exception
500 raise exception
497
501
498 # TODO implement interface for version 2 peers
502 # TODO implement interface for version 2 peers
499 class httpv2peer(object):
503 class httpv2peer(object):
500 def __init__(self, ui, repourl, opener):
504 def __init__(self, ui, repourl, opener):
501 self.ui = ui
505 self.ui = ui
502
506
503 if repourl.endswith('/'):
507 if repourl.endswith('/'):
504 repourl = repourl[:-1]
508 repourl = repourl[:-1]
505
509
506 self.url = repourl
510 self.url = repourl
507 self._opener = opener
511 self._opener = opener
508 # This is an its own attribute to facilitate extensions overriding
512 # This is an its own attribute to facilitate extensions overriding
509 # the default type.
513 # the default type.
510 self._requestbuilder = urlreq.request
514 self._requestbuilder = urlreq.request
511
515
512 def close(self):
516 def close(self):
513 pass
517 pass
514
518
515 # TODO require to be part of a batched primitive, use futures.
519 # TODO require to be part of a batched primitive, use futures.
516 def _call(self, name, **args):
520 def _call(self, name, **args):
517 """Call a wire protocol command with arguments."""
521 """Call a wire protocol command with arguments."""
518
522
519 # Having this early has a side-effect of importing wireprotov2server,
523 # Having this early has a side-effect of importing wireprotov2server,
520 # which has the side-effect of ensuring commands are registered.
524 # which has the side-effect of ensuring commands are registered.
521
525
522 # TODO modify user-agent to reflect v2.
526 # TODO modify user-agent to reflect v2.
523 headers = {
527 headers = {
524 r'Accept': wireprotov2server.FRAMINGTYPE,
528 r'Accept': wireprotov2server.FRAMINGTYPE,
525 r'Content-Type': wireprotov2server.FRAMINGTYPE,
529 r'Content-Type': wireprotov2server.FRAMINGTYPE,
526 }
530 }
527
531
528 # TODO permissions should come from capabilities results.
532 # TODO permissions should come from capabilities results.
529 permission = wireproto.commandsv2[name].permission
533 permission = wireproto.commandsv2[name].permission
530 if permission not in ('push', 'pull'):
534 if permission not in ('push', 'pull'):
531 raise error.ProgrammingError('unknown permission type: %s' %
535 raise error.ProgrammingError('unknown permission type: %s' %
532 permission)
536 permission)
533
537
534 permission = {
538 permission = {
535 'push': 'rw',
539 'push': 'rw',
536 'pull': 'ro',
540 'pull': 'ro',
537 }[permission]
541 }[permission]
538
542
539 url = '%s/api/%s/%s/%s' % (self.url, wireprotov2server.HTTPV2,
543 url = '%s/api/%s/%s/%s' % (self.url, wireprotov2server.HTTPV2,
540 permission, name)
544 permission, name)
541
545
542 # TODO this should be part of a generic peer for the frame-based
546 # TODO this should be part of a generic peer for the frame-based
543 # protocol.
547 # protocol.
544 reactor = wireprotoframing.clientreactor(hasmultiplesend=False,
548 reactor = wireprotoframing.clientreactor(hasmultiplesend=False,
545 buffersends=True)
549 buffersends=True)
546
550
547 request, action, meta = reactor.callcommand(name, args)
551 request, action, meta = reactor.callcommand(name, args)
548 assert action == 'noop'
552 assert action == 'noop'
549
553
550 action, meta = reactor.flushcommands()
554 action, meta = reactor.flushcommands()
551 assert action == 'sendframes'
555 assert action == 'sendframes'
552
556
553 body = b''.join(map(bytes, meta['framegen']))
557 body = b''.join(map(bytes, meta['framegen']))
554 req = self._requestbuilder(pycompat.strurl(url), body, headers)
558 req = self._requestbuilder(pycompat.strurl(url), body, headers)
555 req.add_unredirected_header(r'Content-Length', r'%d' % len(body))
559 req.add_unredirected_header(r'Content-Length', r'%d' % len(body))
556
560
557 # TODO unify this code with httppeer.
561 # TODO unify this code with httppeer.
558 try:
562 try:
559 res = self._opener.open(req)
563 res = self._opener.open(req)
560 except urlerr.httperror as e:
564 except urlerr.httperror as e:
561 if e.code == 401:
565 if e.code == 401:
562 raise error.Abort(_('authorization failed'))
566 raise error.Abort(_('authorization failed'))
563
567
564 raise
568 raise
565 except httplib.HTTPException as e:
569 except httplib.HTTPException as e:
566 self.ui.traceback()
570 self.ui.traceback()
567 raise IOError(None, e)
571 raise IOError(None, e)
568
572
569 # TODO validate response type, wrap response to handle I/O errors.
573 # TODO validate response type, wrap response to handle I/O errors.
570 # TODO more robust frame receiver.
574 # TODO more robust frame receiver.
571 results = []
575 results = []
572
576
573 while True:
577 while True:
574 frame = wireprotoframing.readframe(res)
578 frame = wireprotoframing.readframe(res)
575 if frame is None:
579 if frame is None:
576 break
580 break
577
581
578 self.ui.note(_('received %r\n') % frame)
582 self.ui.note(_('received %r\n') % frame)
579
583
580 action, meta = reactor.onframerecv(frame)
584 action, meta = reactor.onframerecv(frame)
581
585
582 if action == 'responsedata':
586 if action == 'responsedata':
583 if meta['cbor']:
587 if meta['cbor']:
584 payload = util.bytesio(meta['data'])
588 payload = util.bytesio(meta['data'])
585
589
586 decoder = cbor.CBORDecoder(payload)
590 decoder = cbor.CBORDecoder(payload)
587 while payload.tell() + 1 < len(meta['data']):
591 while payload.tell() + 1 < len(meta['data']):
588 results.append(decoder.decode())
592 results.append(decoder.decode())
589 else:
593 else:
590 results.append(meta['data'])
594 results.append(meta['data'])
591 else:
595 else:
592 error.ProgrammingError('unhandled action: %s' % action)
596 error.ProgrammingError('unhandled action: %s' % action)
593
597
594 return results
598 return results
595
599
596 def performhandshake(ui, url, opener, requestbuilder):
600 def performhandshake(ui, url, opener, requestbuilder):
597 # The handshake is a request to the capabilities command.
601 # The handshake is a request to the capabilities command.
598
602
599 caps = None
603 caps = None
600 def capable(x):
604 def capable(x):
601 raise error.ProgrammingError('should not be called')
605 raise error.ProgrammingError('should not be called')
602
606
603 req, requrl, qs = makev1commandrequest(ui, requestbuilder, caps,
607 req, requrl, qs = makev1commandrequest(ui, requestbuilder, caps,
604 capable, url, 'capabilities',
608 capable, url, 'capabilities',
605 {})
609 {})
606
610
607 resp = sendrequest(ui, opener, req)
611 resp = sendrequest(ui, opener, req)
608
612
609 respurl, resp = parsev1commandresponse(ui, url, requrl, qs, resp,
613 respurl, resp = parsev1commandresponse(ui, url, requrl, qs, resp,
610 compressible=False)
614 compressible=False)
611
615
612 try:
616 try:
613 rawcaps = resp.read()
617 rawcaps = resp.read()
614 finally:
618 finally:
615 resp.close()
619 resp.close()
616
620
617 return respurl, set(rawcaps.split())
621 return respurl, set(rawcaps.split())
618
622
619 def makepeer(ui, path, opener=None, requestbuilder=urlreq.request):
623 def makepeer(ui, path, opener=None, requestbuilder=urlreq.request):
620 """Construct an appropriate HTTP peer instance.
624 """Construct an appropriate HTTP peer instance.
621
625
622 ``opener`` is an ``url.opener`` that should be used to establish
626 ``opener`` is an ``url.opener`` that should be used to establish
623 connections, perform HTTP requests.
627 connections, perform HTTP requests.
624
628
625 ``requestbuilder`` is the type used for constructing HTTP requests.
629 ``requestbuilder`` is the type used for constructing HTTP requests.
626 It exists as an argument so extensions can override the default.
630 It exists as an argument so extensions can override the default.
627 """
631 """
628 u = util.url(path)
632 u = util.url(path)
629 if u.query or u.fragment:
633 if u.query or u.fragment:
630 raise error.Abort(_('unsupported URL component: "%s"') %
634 raise error.Abort(_('unsupported URL component: "%s"') %
631 (u.query or u.fragment))
635 (u.query or u.fragment))
632
636
633 # urllib cannot handle URLs with embedded user or passwd.
637 # urllib cannot handle URLs with embedded user or passwd.
634 url, authinfo = u.authinfo()
638 url, authinfo = u.authinfo()
635 ui.debug('using %s\n' % url)
639 ui.debug('using %s\n' % url)
636
640
637 opener = opener or urlmod.opener(ui, authinfo)
641 opener = opener or urlmod.opener(ui, authinfo)
638
642
639 respurl, caps = performhandshake(ui, url, opener, requestbuilder)
643 respurl, caps = performhandshake(ui, url, opener, requestbuilder)
640
644
641 return httppeer(ui, path, respurl, opener, requestbuilder, caps)
645 return httppeer(ui, path, respurl, opener, requestbuilder, caps)
642
646
643 def instance(ui, path, create):
647 def instance(ui, path, create):
644 if create:
648 if create:
645 raise error.Abort(_('cannot create new http repository'))
649 raise error.Abort(_('cannot create new http repository'))
646 try:
650 try:
647 if path.startswith('https:') and not urlmod.has_https:
651 if path.startswith('https:') and not urlmod.has_https:
648 raise error.Abort(_('Python support for SSL and HTTPS '
652 raise error.Abort(_('Python support for SSL and HTTPS '
649 'is not installed'))
653 'is not installed'))
650
654
651 inst = makepeer(ui, path)
655 inst = makepeer(ui, path)
652
656
653 return inst
657 return inst
654 except error.RepoError as httpexception:
658 except error.RepoError as httpexception:
655 try:
659 try:
656 r = statichttprepo.instance(ui, "static-" + path, create)
660 r = statichttprepo.instance(ui, "static-" + path, create)
657 ui.note(_('(falling back to static-http)\n'))
661 ui.note(_('(falling back to static-http)\n'))
658 return r
662 return r
659 except error.RepoError:
663 except error.RepoError:
660 raise httpexception # use the original http RepoError instead
664 raise httpexception # use the original http RepoError instead
@@ -1,547 +1,547 b''
1 #require no-reposimplestore
1 #require no-reposimplestore
2
2
3 Set up a server
3 Set up a server
4
4
5 $ hg init server
5 $ hg init server
6 $ cd server
6 $ cd server
7 $ cat >> .hg/hgrc << EOF
7 $ cat >> .hg/hgrc << EOF
8 > [extensions]
8 > [extensions]
9 > clonebundles =
9 > clonebundles =
10 > EOF
10 > EOF
11
11
12 $ touch foo
12 $ touch foo
13 $ hg -q commit -A -m 'add foo'
13 $ hg -q commit -A -m 'add foo'
14 $ touch bar
14 $ touch bar
15 $ hg -q commit -A -m 'add bar'
15 $ hg -q commit -A -m 'add bar'
16
16
17 $ hg serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log
17 $ hg serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log
18 $ cat hg.pid >> $DAEMON_PIDS
18 $ cat hg.pid >> $DAEMON_PIDS
19 $ cd ..
19 $ cd ..
20
20
21 Missing manifest should not result in server lookup
21 Missing manifest should not result in server lookup
22
22
23 $ hg --verbose clone -U http://localhost:$HGPORT no-manifest
23 $ hg --verbose clone -U http://localhost:$HGPORT no-manifest
24 requesting all changes
24 requesting all changes
25 adding changesets
25 adding changesets
26 adding manifests
26 adding manifests
27 adding file changes
27 adding file changes
28 added 2 changesets with 2 changes to 2 files
28 added 2 changesets with 2 changes to 2 files
29 new changesets 53245c60e682:aaff8d2ffbbf
29 new changesets 53245c60e682:aaff8d2ffbbf
30
30
31 $ cat server/access.log
31 $ cat server/access.log
32 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull (glob)
32 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
33 $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
33 $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
34 $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=aaff8d2ffbbf07a46dd1f05d8ae7877e3f56e2a2&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
34 $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=aaff8d2ffbbf07a46dd1f05d8ae7877e3f56e2a2&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
35
35
36 Empty manifest file results in retrieval
36 Empty manifest file results in retrieval
37 (the extension only checks if the manifest file exists)
37 (the extension only checks if the manifest file exists)
38
38
39 $ touch server/.hg/clonebundles.manifest
39 $ touch server/.hg/clonebundles.manifest
40 $ hg --verbose clone -U http://localhost:$HGPORT empty-manifest
40 $ hg --verbose clone -U http://localhost:$HGPORT empty-manifest
41 no clone bundles available on remote; falling back to regular clone
41 no clone bundles available on remote; falling back to regular clone
42 requesting all changes
42 requesting all changes
43 adding changesets
43 adding changesets
44 adding manifests
44 adding manifests
45 adding file changes
45 adding file changes
46 added 2 changesets with 2 changes to 2 files
46 added 2 changesets with 2 changes to 2 files
47 new changesets 53245c60e682:aaff8d2ffbbf
47 new changesets 53245c60e682:aaff8d2ffbbf
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|(\[Errno -?\d+])? No address associated with hostname) (re) (no-windows !)
54 error fetching bundle: (.* not known|(\[Errno -?\d+])? No address associated with hostname) (re) (no-windows !)
55 error fetching bundle: [Errno 11004] getaddrinfo failed (windows !)
55 error fetching bundle: [Errno 11004] getaddrinfo failed (windows !)
56 abort: error applying bundle
56 abort: error applying bundle
57 (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false")
57 (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false")
58 [255]
58 [255]
59
59
60 Server is not running aborts
60 Server is not running aborts
61
61
62 $ echo "http://localhost:$HGPORT1/bundle.hg" > server/.hg/clonebundles.manifest
62 $ echo "http://localhost:$HGPORT1/bundle.hg" > server/.hg/clonebundles.manifest
63 $ hg clone http://localhost:$HGPORT server-not-runner
63 $ hg clone http://localhost:$HGPORT server-not-runner
64 applying clone bundle from http://localhost:$HGPORT1/bundle.hg
64 applying clone bundle from http://localhost:$HGPORT1/bundle.hg
65 error fetching bundle: (.* refused.*|Protocol not supported|(.* )?Cannot assign requested address) (re)
65 error fetching bundle: (.* refused.*|Protocol not supported|(.* )?Cannot assign requested address) (re)
66 abort: error applying bundle
66 abort: error applying bundle
67 (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false")
67 (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false")
68 [255]
68 [255]
69
69
70 Server returns 404
70 Server returns 404
71
71
72 $ "$PYTHON" $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid
72 $ "$PYTHON" $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid
73 $ cat http.pid >> $DAEMON_PIDS
73 $ cat http.pid >> $DAEMON_PIDS
74 $ hg clone http://localhost:$HGPORT running-404
74 $ hg clone http://localhost:$HGPORT running-404
75 applying clone bundle from http://localhost:$HGPORT1/bundle.hg
75 applying clone bundle from http://localhost:$HGPORT1/bundle.hg
76 HTTP error fetching bundle: HTTP Error 404: File not found
76 HTTP error fetching bundle: HTTP Error 404: File not found
77 abort: error applying bundle
77 abort: error applying bundle
78 (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false")
78 (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false")
79 [255]
79 [255]
80
80
81 We can override failure to fall back to regular clone
81 We can override failure to fall back to regular clone
82
82
83 $ hg --config ui.clonebundlefallback=true clone -U http://localhost:$HGPORT 404-fallback
83 $ hg --config ui.clonebundlefallback=true clone -U http://localhost:$HGPORT 404-fallback
84 applying clone bundle from http://localhost:$HGPORT1/bundle.hg
84 applying clone bundle from http://localhost:$HGPORT1/bundle.hg
85 HTTP error fetching bundle: HTTP Error 404: File not found
85 HTTP error fetching bundle: HTTP Error 404: File not found
86 falling back to normal clone
86 falling back to normal clone
87 requesting all changes
87 requesting all changes
88 adding changesets
88 adding changesets
89 adding manifests
89 adding manifests
90 adding file changes
90 adding file changes
91 added 2 changesets with 2 changes to 2 files
91 added 2 changesets with 2 changes to 2 files
92 new changesets 53245c60e682:aaff8d2ffbbf
92 new changesets 53245c60e682:aaff8d2ffbbf
93
93
94 Bundle with partial content works
94 Bundle with partial content works
95
95
96 $ hg -R server bundle --type gzip-v1 --base null -r 53245c60e682 partial.hg
96 $ hg -R server bundle --type gzip-v1 --base null -r 53245c60e682 partial.hg
97 1 changesets found
97 1 changesets found
98
98
99 We verify exact bundle content as an extra check against accidental future
99 We verify exact bundle content as an extra check against accidental future
100 changes. If this output changes, we could break old clients.
100 changes. If this output changes, we could break old clients.
101
101
102 $ f --size --hexdump partial.hg
102 $ f --size --hexdump partial.hg
103 partial.hg: size=207
103 partial.hg: size=207
104 0000: 48 47 31 30 47 5a 78 9c 63 60 60 98 17 ac 12 93 |HG10GZx.c``.....|
104 0000: 48 47 31 30 47 5a 78 9c 63 60 60 98 17 ac 12 93 |HG10GZx.c``.....|
105 0010: f0 ac a9 23 45 70 cb bf 0d 5f 59 4e 4a 7f 79 21 |...#Ep..._YNJ.y!|
105 0010: f0 ac a9 23 45 70 cb bf 0d 5f 59 4e 4a 7f 79 21 |...#Ep..._YNJ.y!|
106 0020: 9b cc 40 24 20 a0 d7 ce 2c d1 38 25 cd 24 25 d5 |..@$ ...,.8%.$%.|
106 0020: 9b cc 40 24 20 a0 d7 ce 2c d1 38 25 cd 24 25 d5 |..@$ ...,.8%.$%.|
107 0030: d8 c2 22 cd 38 d9 24 cd 22 d5 c8 22 cd 24 cd 32 |..".8.$."..".$.2|
107 0030: d8 c2 22 cd 38 d9 24 cd 22 d5 c8 22 cd 24 cd 32 |..".8.$."..".$.2|
108 0040: d1 c2 d0 c4 c8 d2 32 d1 38 39 29 c9 34 cd d4 80 |......2.89).4...|
108 0040: d1 c2 d0 c4 c8 d2 32 d1 38 39 29 c9 34 cd d4 80 |......2.89).4...|
109 0050: ab 24 b5 b8 84 cb 40 c1 80 2b 2d 3f 9f 8b 2b 31 |.$....@..+-?..+1|
109 0050: ab 24 b5 b8 84 cb 40 c1 80 2b 2d 3f 9f 8b 2b 31 |.$....@..+-?..+1|
110 0060: 25 45 01 c8 80 9a d2 9b 65 fb e5 9e 45 bf 8d 7f |%E......e...E...|
110 0060: 25 45 01 c8 80 9a d2 9b 65 fb e5 9e 45 bf 8d 7f |%E......e...E...|
111 0070: 9f c6 97 9f 2b 44 34 67 d9 ec 8e 0f a0 92 0b 75 |....+D4g.......u|
111 0070: 9f c6 97 9f 2b 44 34 67 d9 ec 8e 0f a0 92 0b 75 |....+D4g.......u|
112 0080: 41 d6 24 59 18 a4 a4 9a a6 18 1a 5b 98 9b 5a 98 |A.$Y.......[..Z.|
112 0080: 41 d6 24 59 18 a4 a4 9a a6 18 1a 5b 98 9b 5a 98 |A.$Y.......[..Z.|
113 0090: 9a 18 26 9b a6 19 98 1a 99 99 26 a6 18 9a 98 24 |..&.......&....$|
113 0090: 9a 18 26 9b a6 19 98 1a 99 99 26 a6 18 9a 98 24 |..&.......&....$|
114 00a0: 26 59 a6 25 5a 98 a5 18 a6 24 71 41 35 b1 43 dc |&Y.%Z....$qA5.C.|
114 00a0: 26 59 a6 25 5a 98 a5 18 a6 24 71 41 35 b1 43 dc |&Y.%Z....$qA5.C.|
115 00b0: 16 b2 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 d7 8a |.....E..V....R..|
115 00b0: 16 b2 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 d7 8a |.....E..V....R..|
116 00c0: 78 ed fc d5 76 f1 36 35 dc 05 00 36 ed 5e c7 |x...v.65...6.^.|
116 00c0: 78 ed fc d5 76 f1 36 35 dc 05 00 36 ed 5e c7 |x...v.65...6.^.|
117
117
118 $ echo "http://localhost:$HGPORT1/partial.hg" > server/.hg/clonebundles.manifest
118 $ echo "http://localhost:$HGPORT1/partial.hg" > server/.hg/clonebundles.manifest
119 $ hg clone -U http://localhost:$HGPORT partial-bundle
119 $ hg clone -U http://localhost:$HGPORT partial-bundle
120 applying clone bundle from http://localhost:$HGPORT1/partial.hg
120 applying clone bundle from http://localhost:$HGPORT1/partial.hg
121 adding changesets
121 adding changesets
122 adding manifests
122 adding manifests
123 adding file changes
123 adding file changes
124 added 1 changesets with 1 changes to 1 files
124 added 1 changesets with 1 changes to 1 files
125 finished applying clone bundle
125 finished applying clone bundle
126 searching for changes
126 searching for changes
127 adding changesets
127 adding changesets
128 adding manifests
128 adding manifests
129 adding file changes
129 adding file changes
130 added 1 changesets with 1 changes to 1 files
130 added 1 changesets with 1 changes to 1 files
131 new changesets aaff8d2ffbbf
131 new changesets aaff8d2ffbbf
132
132
133 Incremental pull doesn't fetch bundle
133 Incremental pull doesn't fetch bundle
134
134
135 $ hg clone -r 53245c60e682 -U http://localhost:$HGPORT partial-clone
135 $ hg clone -r 53245c60e682 -U http://localhost:$HGPORT partial-clone
136 adding changesets
136 adding changesets
137 adding manifests
137 adding manifests
138 adding file changes
138 adding file changes
139 added 1 changesets with 1 changes to 1 files
139 added 1 changesets with 1 changes to 1 files
140 new changesets 53245c60e682
140 new changesets 53245c60e682
141
141
142 $ cd partial-clone
142 $ cd partial-clone
143 $ hg pull
143 $ hg pull
144 pulling from http://localhost:$HGPORT/
144 pulling from http://localhost:$HGPORT/
145 searching for changes
145 searching for changes
146 adding changesets
146 adding changesets
147 adding manifests
147 adding manifests
148 adding file changes
148 adding file changes
149 added 1 changesets with 1 changes to 1 files
149 added 1 changesets with 1 changes to 1 files
150 new changesets aaff8d2ffbbf
150 new changesets aaff8d2ffbbf
151 (run 'hg update' to get a working copy)
151 (run 'hg update' to get a working copy)
152 $ cd ..
152 $ cd ..
153
153
154 Bundle with full content works
154 Bundle with full content works
155
155
156 $ hg -R server bundle --type gzip-v2 --base null -r tip full.hg
156 $ hg -R server bundle --type gzip-v2 --base null -r tip full.hg
157 2 changesets found
157 2 changesets found
158
158
159 Again, we perform an extra check against bundle content changes. If this content
159 Again, we perform an extra check against bundle content changes. If this content
160 changes, clone bundles produced by new Mercurial versions may not be readable
160 changes, clone bundles produced by new Mercurial versions may not be readable
161 by old clients.
161 by old clients.
162
162
163 $ f --size --hexdump full.hg
163 $ f --size --hexdump full.hg
164 full.hg: size=442
164 full.hg: size=442
165 0000: 48 47 32 30 00 00 00 0e 43 6f 6d 70 72 65 73 73 |HG20....Compress|
165 0000: 48 47 32 30 00 00 00 0e 43 6f 6d 70 72 65 73 73 |HG20....Compress|
166 0010: 69 6f 6e 3d 47 5a 78 9c 63 60 60 d0 e4 76 f6 70 |ion=GZx.c``..v.p|
166 0010: 69 6f 6e 3d 47 5a 78 9c 63 60 60 d0 e4 76 f6 70 |ion=GZx.c``..v.p|
167 0020: f4 73 77 75 0f f2 0f 0d 60 00 02 46 46 76 26 4e |.swu....`..FFv&N|
167 0020: f4 73 77 75 0f f2 0f 0d 60 00 02 46 46 76 26 4e |.swu....`..FFv&N|
168 0030: c6 b2 d4 a2 e2 cc fc 3c 03 a3 bc a4 e4 8c c4 bc |.......<........|
168 0030: c6 b2 d4 a2 e2 cc fc 3c 03 a3 bc a4 e4 8c c4 bc |.......<........|
169 0040: f4 d4 62 23 06 06 e6 19 40 f9 4d c1 2a 31 09 cf |..b#....@.M.*1..|
169 0040: f4 d4 62 23 06 06 e6 19 40 f9 4d c1 2a 31 09 cf |..b#....@.M.*1..|
170 0050: 9a 3a 52 04 b7 fc db f0 95 e5 a4 f4 97 17 b2 c9 |.:R.............|
170 0050: 9a 3a 52 04 b7 fc db f0 95 e5 a4 f4 97 17 b2 c9 |.:R.............|
171 0060: 0c 14 00 02 e6 d9 99 25 1a a7 a4 99 a4 a4 1a 5b |.......%.......[|
171 0060: 0c 14 00 02 e6 d9 99 25 1a a7 a4 99 a4 a4 1a 5b |.......%.......[|
172 0070: 58 a4 19 27 9b a4 59 a4 1a 59 a4 99 a4 59 26 5a |X..'..Y..Y...Y&Z|
172 0070: 58 a4 19 27 9b a4 59 a4 1a 59 a4 99 a4 59 26 5a |X..'..Y..Y...Y&Z|
173 0080: 18 9a 18 59 5a 26 1a 27 27 25 99 a6 99 1a 70 95 |...YZ&.''%....p.|
173 0080: 18 9a 18 59 5a 26 1a 27 27 25 99 a6 99 1a 70 95 |...YZ&.''%....p.|
174 0090: a4 16 97 70 19 28 18 70 a5 e5 e7 73 71 25 a6 a4 |...p.(.p...sq%..|
174 0090: a4 16 97 70 19 28 18 70 a5 e5 e7 73 71 25 a6 a4 |...p.(.p...sq%..|
175 00a0: 28 00 19 20 17 af fa df ab ff 7b 3f fb 92 dc 8b |(.. ......{?....|
175 00a0: 28 00 19 20 17 af fa df ab ff 7b 3f fb 92 dc 8b |(.. ......{?....|
176 00b0: 1f 62 bb 9e b7 d7 d9 87 3d 5a 44 89 2f b0 99 87 |.b......=ZD./...|
176 00b0: 1f 62 bb 9e b7 d7 d9 87 3d 5a 44 89 2f b0 99 87 |.b......=ZD./...|
177 00c0: ec e2 54 63 43 e3 b4 64 43 73 23 33 43 53 0b 63 |..TcC..dCs#3CS.c|
177 00c0: ec e2 54 63 43 e3 b4 64 43 73 23 33 43 53 0b 63 |..TcC..dCs#3CS.c|
178 00d0: d3 14 23 03 a0 fb 2c 2c 0c d3 80 1e 30 49 49 b1 |..#...,,....0II.|
178 00d0: d3 14 23 03 a0 fb 2c 2c 0c d3 80 1e 30 49 49 b1 |..#...,,....0II.|
179 00e0: 4c 4a 32 48 33 30 b0 34 42 b8 38 29 b1 08 e2 62 |LJ2H30.4B.8)...b|
179 00e0: 4c 4a 32 48 33 30 b0 34 42 b8 38 29 b1 08 e2 62 |LJ2H30.4B.8)...b|
180 00f0: 20 03 6a ca c2 2c db 2f f7 2c fa 6d fc fb 34 be | .j..,./.,.m..4.|
180 00f0: 20 03 6a ca c2 2c db 2f f7 2c fa 6d fc fb 34 be | .j..,./.,.m..4.|
181 0100: fc 5c 21 a2 39 cb 66 77 7c 00 0d c3 59 17 14 58 |.\!.9.fw|...Y..X|
181 0100: fc 5c 21 a2 39 cb 66 77 7c 00 0d c3 59 17 14 58 |.\!.9.fw|...Y..X|
182 0110: 49 16 06 29 a9 a6 29 86 c6 16 e6 a6 16 a6 26 86 |I..)..).......&.|
182 0110: 49 16 06 29 a9 a6 29 86 c6 16 e6 a6 16 a6 26 86 |I..)..).......&.|
183 0120: c9 a6 69 06 a6 46 66 a6 89 29 86 26 26 89 49 96 |..i..Ff..).&&.I.|
183 0120: c9 a6 69 06 a6 46 66 a6 89 29 86 26 26 89 49 96 |..i..Ff..).&&.I.|
184 0130: 69 89 16 66 29 86 29 49 5c 20 07 3e 16 fe 23 ae |i..f).)I\ .>..#.|
184 0130: 69 89 16 66 29 86 29 49 5c 20 07 3e 16 fe 23 ae |i..f).)I\ .>..#.|
185 0140: 26 da 1c ab 10 1f d1 f8 e3 b3 ef cd dd fc 0c 93 |&...............|
185 0140: 26 da 1c ab 10 1f d1 f8 e3 b3 ef cd dd fc 0c 93 |&...............|
186 0150: 88 75 34 36 75 04 82 55 17 14 36 a4 38 10 04 d8 |.u46u..U..6.8...|
186 0150: 88 75 34 36 75 04 82 55 17 14 36 a4 38 10 04 d8 |.u46u..U..6.8...|
187 0160: 21 01 9a b1 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 |!......E..V....R|
187 0160: 21 01 9a b1 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 |!......E..V....R|
188 0170: d7 8a 78 ed fc d5 76 f1 36 25 81 89 c7 ad ec 90 |..x...v.6%......|
188 0170: d7 8a 78 ed fc d5 76 f1 36 25 81 89 c7 ad ec 90 |..x...v.6%......|
189 0180: 54 47 75 2b 89 48 b1 b2 62 ce 8e ce 1e ae 56 41 |TGu+.H..b.....VA|
189 0180: 54 47 75 2b 89 48 b1 b2 62 ce 8e ce 1e ae 56 41 |TGu+.H..b.....VA|
190 0190: ae 61 ba 4e 41 8e 7e ce 1e ba 60 01 a0 14 23 58 |.a.NA.~...`...#X|
190 0190: ae 61 ba 4e 41 8e 7e ce 1e ba 60 01 a0 14 23 58 |.a.NA.~...`...#X|
191 01a0: 81 35 c8 7d 40 cc 04 e2 a4 a4 a6 25 96 e6 94 60 |.5.}@......%...`|
191 01a0: 81 35 c8 7d 40 cc 04 e2 a4 a4 a6 25 96 e6 94 60 |.5.}@......%...`|
192 01b0: 33 17 5f 54 00 00 01 1b 0a ec |3._T......|
192 01b0: 33 17 5f 54 00 00 01 1b 0a ec |3._T......|
193
193
194 $ echo "http://localhost:$HGPORT1/full.hg" > server/.hg/clonebundles.manifest
194 $ echo "http://localhost:$HGPORT1/full.hg" > server/.hg/clonebundles.manifest
195 $ hg clone -U http://localhost:$HGPORT full-bundle
195 $ hg clone -U http://localhost:$HGPORT full-bundle
196 applying clone bundle from http://localhost:$HGPORT1/full.hg
196 applying clone bundle from http://localhost:$HGPORT1/full.hg
197 adding changesets
197 adding changesets
198 adding manifests
198 adding manifests
199 adding file changes
199 adding file changes
200 added 2 changesets with 2 changes to 2 files
200 added 2 changesets with 2 changes to 2 files
201 finished applying clone bundle
201 finished applying clone bundle
202 searching for changes
202 searching for changes
203 no changes found
203 no changes found
204
204
205 Feature works over SSH
205 Feature works over SSH
206
206
207 $ hg clone -U -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/server ssh-full-clone
207 $ hg clone -U -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/server ssh-full-clone
208 applying clone bundle from http://localhost:$HGPORT1/full.hg
208 applying clone bundle from http://localhost:$HGPORT1/full.hg
209 adding changesets
209 adding changesets
210 adding manifests
210 adding manifests
211 adding file changes
211 adding file changes
212 added 2 changesets with 2 changes to 2 files
212 added 2 changesets with 2 changes to 2 files
213 finished applying clone bundle
213 finished applying clone bundle
214 searching for changes
214 searching for changes
215 no changes found
215 no changes found
216
216
217 Entry with unknown BUNDLESPEC is filtered and not used
217 Entry with unknown BUNDLESPEC is filtered and not used
218
218
219 $ cat > server/.hg/clonebundles.manifest << EOF
219 $ cat > server/.hg/clonebundles.manifest << EOF
220 > http://bad.entry1 BUNDLESPEC=UNKNOWN
220 > http://bad.entry1 BUNDLESPEC=UNKNOWN
221 > http://bad.entry2 BUNDLESPEC=xz-v1
221 > http://bad.entry2 BUNDLESPEC=xz-v1
222 > http://bad.entry3 BUNDLESPEC=none-v100
222 > http://bad.entry3 BUNDLESPEC=none-v100
223 > http://localhost:$HGPORT1/full.hg BUNDLESPEC=gzip-v2
223 > http://localhost:$HGPORT1/full.hg BUNDLESPEC=gzip-v2
224 > EOF
224 > EOF
225
225
226 $ hg clone -U http://localhost:$HGPORT filter-unknown-type
226 $ hg clone -U http://localhost:$HGPORT filter-unknown-type
227 applying clone bundle from http://localhost:$HGPORT1/full.hg
227 applying clone bundle from http://localhost:$HGPORT1/full.hg
228 adding changesets
228 adding changesets
229 adding manifests
229 adding manifests
230 adding file changes
230 adding file changes
231 added 2 changesets with 2 changes to 2 files
231 added 2 changesets with 2 changes to 2 files
232 finished applying clone bundle
232 finished applying clone bundle
233 searching for changes
233 searching for changes
234 no changes found
234 no changes found
235
235
236 Automatic fallback when all entries are filtered
236 Automatic fallback when all entries are filtered
237
237
238 $ cat > server/.hg/clonebundles.manifest << EOF
238 $ cat > server/.hg/clonebundles.manifest << EOF
239 > http://bad.entry BUNDLESPEC=UNKNOWN
239 > http://bad.entry BUNDLESPEC=UNKNOWN
240 > EOF
240 > EOF
241
241
242 $ hg clone -U http://localhost:$HGPORT filter-all
242 $ hg clone -U http://localhost:$HGPORT filter-all
243 no compatible clone bundles available on server; falling back to regular clone
243 no compatible clone bundles available on server; falling back to regular clone
244 (you may want to report this to the server operator)
244 (you may want to report this to the server operator)
245 requesting all changes
245 requesting all changes
246 adding changesets
246 adding changesets
247 adding manifests
247 adding manifests
248 adding file changes
248 adding file changes
249 added 2 changesets with 2 changes to 2 files
249 added 2 changesets with 2 changes to 2 files
250 new changesets 53245c60e682:aaff8d2ffbbf
250 new changesets 53245c60e682:aaff8d2ffbbf
251
251
252 URLs requiring SNI are filtered in Python <2.7.9
252 URLs requiring SNI are filtered in Python <2.7.9
253
253
254 $ cp full.hg sni.hg
254 $ cp full.hg sni.hg
255 $ cat > server/.hg/clonebundles.manifest << EOF
255 $ cat > server/.hg/clonebundles.manifest << EOF
256 > http://localhost:$HGPORT1/sni.hg REQUIRESNI=true
256 > http://localhost:$HGPORT1/sni.hg REQUIRESNI=true
257 > http://localhost:$HGPORT1/full.hg
257 > http://localhost:$HGPORT1/full.hg
258 > EOF
258 > EOF
259
259
260 #if sslcontext
260 #if sslcontext
261 Python 2.7.9+ support SNI
261 Python 2.7.9+ support SNI
262
262
263 $ hg clone -U http://localhost:$HGPORT sni-supported
263 $ hg clone -U http://localhost:$HGPORT sni-supported
264 applying clone bundle from http://localhost:$HGPORT1/sni.hg
264 applying clone bundle from http://localhost:$HGPORT1/sni.hg
265 adding changesets
265 adding changesets
266 adding manifests
266 adding manifests
267 adding file changes
267 adding file changes
268 added 2 changesets with 2 changes to 2 files
268 added 2 changesets with 2 changes to 2 files
269 finished applying clone bundle
269 finished applying clone bundle
270 searching for changes
270 searching for changes
271 no changes found
271 no changes found
272 #else
272 #else
273 Python <2.7.9 will filter SNI URLs
273 Python <2.7.9 will filter SNI URLs
274
274
275 $ hg clone -U http://localhost:$HGPORT sni-unsupported
275 $ hg clone -U http://localhost:$HGPORT sni-unsupported
276 applying clone bundle from http://localhost:$HGPORT1/full.hg
276 applying clone bundle from http://localhost:$HGPORT1/full.hg
277 adding changesets
277 adding changesets
278 adding manifests
278 adding manifests
279 adding file changes
279 adding file changes
280 added 2 changesets with 2 changes to 2 files
280 added 2 changesets with 2 changes to 2 files
281 finished applying clone bundle
281 finished applying clone bundle
282 searching for changes
282 searching for changes
283 no changes found
283 no changes found
284 #endif
284 #endif
285
285
286 Stream clone bundles are supported
286 Stream clone bundles are supported
287
287
288 $ hg -R server debugcreatestreamclonebundle packed.hg
288 $ hg -R server debugcreatestreamclonebundle packed.hg
289 writing 613 bytes for 4 files
289 writing 613 bytes for 4 files
290 bundle requirements: generaldelta, revlogv1
290 bundle requirements: generaldelta, revlogv1
291
291
292 No bundle spec should work
292 No bundle spec should work
293
293
294 $ cat > server/.hg/clonebundles.manifest << EOF
294 $ cat > server/.hg/clonebundles.manifest << EOF
295 > http://localhost:$HGPORT1/packed.hg
295 > http://localhost:$HGPORT1/packed.hg
296 > EOF
296 > EOF
297
297
298 $ hg clone -U http://localhost:$HGPORT stream-clone-no-spec
298 $ hg clone -U http://localhost:$HGPORT stream-clone-no-spec
299 applying clone bundle from http://localhost:$HGPORT1/packed.hg
299 applying clone bundle from http://localhost:$HGPORT1/packed.hg
300 4 files to transfer, 613 bytes of data
300 4 files to transfer, 613 bytes of data
301 transferred 613 bytes in *.* seconds (*) (glob)
301 transferred 613 bytes in *.* seconds (*) (glob)
302 finished applying clone bundle
302 finished applying clone bundle
303 searching for changes
303 searching for changes
304 no changes found
304 no changes found
305
305
306 Bundle spec without parameters should work
306 Bundle spec without parameters should work
307
307
308 $ cat > server/.hg/clonebundles.manifest << EOF
308 $ cat > server/.hg/clonebundles.manifest << EOF
309 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1
309 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1
310 > EOF
310 > EOF
311
311
312 $ hg clone -U http://localhost:$HGPORT stream-clone-vanilla-spec
312 $ hg clone -U http://localhost:$HGPORT stream-clone-vanilla-spec
313 applying clone bundle from http://localhost:$HGPORT1/packed.hg
313 applying clone bundle from http://localhost:$HGPORT1/packed.hg
314 4 files to transfer, 613 bytes of data
314 4 files to transfer, 613 bytes of data
315 transferred 613 bytes in *.* seconds (*) (glob)
315 transferred 613 bytes in *.* seconds (*) (glob)
316 finished applying clone bundle
316 finished applying clone bundle
317 searching for changes
317 searching for changes
318 no changes found
318 no changes found
319
319
320 Bundle spec with format requirements should work
320 Bundle spec with format requirements should work
321
321
322 $ cat > server/.hg/clonebundles.manifest << EOF
322 $ cat > server/.hg/clonebundles.manifest << EOF
323 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1
323 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1
324 > EOF
324 > EOF
325
325
326 $ hg clone -U http://localhost:$HGPORT stream-clone-supported-requirements
326 $ hg clone -U http://localhost:$HGPORT stream-clone-supported-requirements
327 applying clone bundle from http://localhost:$HGPORT1/packed.hg
327 applying clone bundle from http://localhost:$HGPORT1/packed.hg
328 4 files to transfer, 613 bytes of data
328 4 files to transfer, 613 bytes of data
329 transferred 613 bytes in *.* seconds (*) (glob)
329 transferred 613 bytes in *.* seconds (*) (glob)
330 finished applying clone bundle
330 finished applying clone bundle
331 searching for changes
331 searching for changes
332 no changes found
332 no changes found
333
333
334 Stream bundle spec with unknown requirements should be filtered out
334 Stream bundle spec with unknown requirements should be filtered out
335
335
336 $ cat > server/.hg/clonebundles.manifest << EOF
336 $ cat > server/.hg/clonebundles.manifest << EOF
337 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42
337 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42
338 > EOF
338 > EOF
339
339
340 $ hg clone -U http://localhost:$HGPORT stream-clone-unsupported-requirements
340 $ hg clone -U http://localhost:$HGPORT stream-clone-unsupported-requirements
341 no compatible clone bundles available on server; falling back to regular clone
341 no compatible clone bundles available on server; falling back to regular clone
342 (you may want to report this to the server operator)
342 (you may want to report this to the server operator)
343 requesting all changes
343 requesting all changes
344 adding changesets
344 adding changesets
345 adding manifests
345 adding manifests
346 adding file changes
346 adding file changes
347 added 2 changesets with 2 changes to 2 files
347 added 2 changesets with 2 changes to 2 files
348 new changesets 53245c60e682:aaff8d2ffbbf
348 new changesets 53245c60e682:aaff8d2ffbbf
349
349
350 Set up manifest for testing preferences
350 Set up manifest for testing preferences
351 (Remember, the TYPE does not have to match reality - the URL is
351 (Remember, the TYPE does not have to match reality - the URL is
352 important)
352 important)
353
353
354 $ cp full.hg gz-a.hg
354 $ cp full.hg gz-a.hg
355 $ cp full.hg gz-b.hg
355 $ cp full.hg gz-b.hg
356 $ cp full.hg bz2-a.hg
356 $ cp full.hg bz2-a.hg
357 $ cp full.hg bz2-b.hg
357 $ cp full.hg bz2-b.hg
358 $ cat > server/.hg/clonebundles.manifest << EOF
358 $ cat > server/.hg/clonebundles.manifest << EOF
359 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 extra=a
359 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 extra=a
360 > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 extra=a
360 > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 extra=a
361 > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b
361 > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b
362 > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b
362 > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b
363 > EOF
363 > EOF
364
364
365 Preferring an undefined attribute will take first entry
365 Preferring an undefined attribute will take first entry
366
366
367 $ hg --config ui.clonebundleprefers=foo=bar clone -U http://localhost:$HGPORT prefer-foo
367 $ hg --config ui.clonebundleprefers=foo=bar clone -U http://localhost:$HGPORT prefer-foo
368 applying clone bundle from http://localhost:$HGPORT1/gz-a.hg
368 applying clone bundle from http://localhost:$HGPORT1/gz-a.hg
369 adding changesets
369 adding changesets
370 adding manifests
370 adding manifests
371 adding file changes
371 adding file changes
372 added 2 changesets with 2 changes to 2 files
372 added 2 changesets with 2 changes to 2 files
373 finished applying clone bundle
373 finished applying clone bundle
374 searching for changes
374 searching for changes
375 no changes found
375 no changes found
376
376
377 Preferring bz2 type will download first entry of that type
377 Preferring bz2 type will download first entry of that type
378
378
379 $ hg --config ui.clonebundleprefers=COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-bz
379 $ hg --config ui.clonebundleprefers=COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-bz
380 applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg
380 applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg
381 adding changesets
381 adding changesets
382 adding manifests
382 adding manifests
383 adding file changes
383 adding file changes
384 added 2 changesets with 2 changes to 2 files
384 added 2 changesets with 2 changes to 2 files
385 finished applying clone bundle
385 finished applying clone bundle
386 searching for changes
386 searching for changes
387 no changes found
387 no changes found
388
388
389 Preferring multiple values of an option works
389 Preferring multiple values of an option works
390
390
391 $ hg --config ui.clonebundleprefers=COMPRESSION=unknown,COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-multiple-bz
391 $ hg --config ui.clonebundleprefers=COMPRESSION=unknown,COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-multiple-bz
392 applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg
392 applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg
393 adding changesets
393 adding changesets
394 adding manifests
394 adding manifests
395 adding file changes
395 adding file changes
396 added 2 changesets with 2 changes to 2 files
396 added 2 changesets with 2 changes to 2 files
397 finished applying clone bundle
397 finished applying clone bundle
398 searching for changes
398 searching for changes
399 no changes found
399 no changes found
400
400
401 Sorting multiple values should get us back to original first entry
401 Sorting multiple values should get us back to original first entry
402
402
403 $ hg --config ui.clonebundleprefers=BUNDLESPEC=unknown,BUNDLESPEC=gzip-v2,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-multiple-gz
403 $ hg --config ui.clonebundleprefers=BUNDLESPEC=unknown,BUNDLESPEC=gzip-v2,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-multiple-gz
404 applying clone bundle from http://localhost:$HGPORT1/gz-a.hg
404 applying clone bundle from http://localhost:$HGPORT1/gz-a.hg
405 adding changesets
405 adding changesets
406 adding manifests
406 adding manifests
407 adding file changes
407 adding file changes
408 added 2 changesets with 2 changes to 2 files
408 added 2 changesets with 2 changes to 2 files
409 finished applying clone bundle
409 finished applying clone bundle
410 searching for changes
410 searching for changes
411 no changes found
411 no changes found
412
412
413 Preferring multiple attributes has correct order
413 Preferring multiple attributes has correct order
414
414
415 $ hg --config ui.clonebundleprefers=extra=b,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-separate-attributes
415 $ hg --config ui.clonebundleprefers=extra=b,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-separate-attributes
416 applying clone bundle from http://localhost:$HGPORT1/bz2-b.hg
416 applying clone bundle from http://localhost:$HGPORT1/bz2-b.hg
417 adding changesets
417 adding changesets
418 adding manifests
418 adding manifests
419 adding file changes
419 adding file changes
420 added 2 changesets with 2 changes to 2 files
420 added 2 changesets with 2 changes to 2 files
421 finished applying clone bundle
421 finished applying clone bundle
422 searching for changes
422 searching for changes
423 no changes found
423 no changes found
424
424
425 Test where attribute is missing from some entries
425 Test where attribute is missing from some entries
426
426
427 $ cat > server/.hg/clonebundles.manifest << EOF
427 $ cat > server/.hg/clonebundles.manifest << EOF
428 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2
428 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2
429 > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2
429 > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2
430 > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b
430 > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b
431 > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b
431 > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b
432 > EOF
432 > EOF
433
433
434 $ hg --config ui.clonebundleprefers=extra=b clone -U http://localhost:$HGPORT prefer-partially-defined-attribute
434 $ hg --config ui.clonebundleprefers=extra=b clone -U http://localhost:$HGPORT prefer-partially-defined-attribute
435 applying clone bundle from http://localhost:$HGPORT1/gz-b.hg
435 applying clone bundle from http://localhost:$HGPORT1/gz-b.hg
436 adding changesets
436 adding changesets
437 adding manifests
437 adding manifests
438 adding file changes
438 adding file changes
439 added 2 changesets with 2 changes to 2 files
439 added 2 changesets with 2 changes to 2 files
440 finished applying clone bundle
440 finished applying clone bundle
441 searching for changes
441 searching for changes
442 no changes found
442 no changes found
443
443
444 Test interaction between clone bundles and --stream
444 Test interaction between clone bundles and --stream
445
445
446 A manifest with just a gzip bundle
446 A manifest with just a gzip bundle
447
447
448 $ cat > server/.hg/clonebundles.manifest << EOF
448 $ cat > server/.hg/clonebundles.manifest << EOF
449 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2
449 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2
450 > EOF
450 > EOF
451
451
452 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip
452 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip
453 no compatible clone bundles available on server; falling back to regular clone
453 no compatible clone bundles available on server; falling back to regular clone
454 (you may want to report this to the server operator)
454 (you may want to report this to the server operator)
455 streaming all changes
455 streaming all changes
456 4 files to transfer, 613 bytes of data
456 4 files to transfer, 613 bytes of data
457 transferred 613 bytes in * seconds (*) (glob)
457 transferred 613 bytes in * seconds (*) (glob)
458 searching for changes
458 searching for changes
459 no changes found
459 no changes found
460
460
461 A manifest with a stream clone but no BUNDLESPEC
461 A manifest with a stream clone but no BUNDLESPEC
462
462
463 $ cat > server/.hg/clonebundles.manifest << EOF
463 $ cat > server/.hg/clonebundles.manifest << EOF
464 > http://localhost:$HGPORT1/packed.hg
464 > http://localhost:$HGPORT1/packed.hg
465 > EOF
465 > EOF
466
466
467 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-no-bundlespec
467 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-no-bundlespec
468 no compatible clone bundles available on server; falling back to regular clone
468 no compatible clone bundles available on server; falling back to regular clone
469 (you may want to report this to the server operator)
469 (you may want to report this to the server operator)
470 streaming all changes
470 streaming all changes
471 4 files to transfer, 613 bytes of data
471 4 files to transfer, 613 bytes of data
472 transferred 613 bytes in * seconds (*) (glob)
472 transferred 613 bytes in * seconds (*) (glob)
473 searching for changes
473 searching for changes
474 no changes found
474 no changes found
475
475
476 A manifest with a gzip bundle and a stream clone
476 A manifest with a gzip bundle and a stream clone
477
477
478 $ cat > server/.hg/clonebundles.manifest << EOF
478 $ cat > server/.hg/clonebundles.manifest << EOF
479 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2
479 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2
480 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1
480 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1
481 > EOF
481 > EOF
482
482
483 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed
483 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed
484 applying clone bundle from http://localhost:$HGPORT1/packed.hg
484 applying clone bundle from http://localhost:$HGPORT1/packed.hg
485 4 files to transfer, 613 bytes of data
485 4 files to transfer, 613 bytes of data
486 transferred 613 bytes in * seconds (*) (glob)
486 transferred 613 bytes in * seconds (*) (glob)
487 finished applying clone bundle
487 finished applying clone bundle
488 searching for changes
488 searching for changes
489 no changes found
489 no changes found
490
490
491 A manifest with a gzip bundle and stream clone with supported requirements
491 A manifest with a gzip bundle and stream clone with supported requirements
492
492
493 $ cat > server/.hg/clonebundles.manifest << EOF
493 $ cat > server/.hg/clonebundles.manifest << EOF
494 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2
494 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2
495 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1
495 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1
496 > EOF
496 > EOF
497
497
498 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed-requirements
498 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed-requirements
499 applying clone bundle from http://localhost:$HGPORT1/packed.hg
499 applying clone bundle from http://localhost:$HGPORT1/packed.hg
500 4 files to transfer, 613 bytes of data
500 4 files to transfer, 613 bytes of data
501 transferred 613 bytes in * seconds (*) (glob)
501 transferred 613 bytes in * seconds (*) (glob)
502 finished applying clone bundle
502 finished applying clone bundle
503 searching for changes
503 searching for changes
504 no changes found
504 no changes found
505
505
506 A manifest with a gzip bundle and a stream clone with unsupported requirements
506 A manifest with a gzip bundle and a stream clone with unsupported requirements
507
507
508 $ cat > server/.hg/clonebundles.manifest << EOF
508 $ cat > server/.hg/clonebundles.manifest << EOF
509 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2
509 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2
510 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42
510 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42
511 > EOF
511 > EOF
512
512
513 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed-unsupported-requirements
513 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed-unsupported-requirements
514 no compatible clone bundles available on server; falling back to regular clone
514 no compatible clone bundles available on server; falling back to regular clone
515 (you may want to report this to the server operator)
515 (you may want to report this to the server operator)
516 streaming all changes
516 streaming all changes
517 4 files to transfer, 613 bytes of data
517 4 files to transfer, 613 bytes of data
518 transferred 613 bytes in * seconds (*) (glob)
518 transferred 613 bytes in * seconds (*) (glob)
519 searching for changes
519 searching for changes
520 no changes found
520 no changes found
521
521
522 Test clone bundle retrieved through bundle2
522 Test clone bundle retrieved through bundle2
523
523
524 $ cat << EOF >> $HGRCPATH
524 $ cat << EOF >> $HGRCPATH
525 > [extensions]
525 > [extensions]
526 > largefiles=
526 > largefiles=
527 > EOF
527 > EOF
528 $ killdaemons.py
528 $ killdaemons.py
529 $ hg -R server serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log
529 $ hg -R server serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log
530 $ cat hg.pid >> $DAEMON_PIDS
530 $ cat hg.pid >> $DAEMON_PIDS
531
531
532 $ hg -R server debuglfput gz-a.hg
532 $ hg -R server debuglfput gz-a.hg
533 14ee2f0b3f1d14aeeb2fe037e09fc295c3cf59f5
533 14ee2f0b3f1d14aeeb2fe037e09fc295c3cf59f5
534
534
535 $ cat > server/.hg/clonebundles.manifest << EOF
535 $ cat > server/.hg/clonebundles.manifest << EOF
536 > largefile://14ee2f0b3f1d14aeeb2fe037e09fc295c3cf59f5 BUNDLESPEC=gzip-v2
536 > largefile://14ee2f0b3f1d14aeeb2fe037e09fc295c3cf59f5 BUNDLESPEC=gzip-v2
537 > EOF
537 > EOF
538
538
539 $ hg clone -U http://localhost:$HGPORT largefile-provided --traceback
539 $ hg clone -U http://localhost:$HGPORT largefile-provided --traceback
540 applying clone bundle from largefile://14ee2f0b3f1d14aeeb2fe037e09fc295c3cf59f5
540 applying clone bundle from largefile://14ee2f0b3f1d14aeeb2fe037e09fc295c3cf59f5
541 adding changesets
541 adding changesets
542 adding manifests
542 adding manifests
543 adding file changes
543 adding file changes
544 added 2 changesets with 2 changes to 2 files
544 added 2 changesets with 2 changes to 2 files
545 finished applying clone bundle
545 finished applying clone bundle
546 searching for changes
546 searching for changes
547 no changes found
547 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 -- {version: 01}
173 changegroup -- {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 - x-hgproto-1:partial-pull (glob)
266 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
267 $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
267 $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
268 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull (glob)
268 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
269 $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:common=700b7e19db54103633c4bf4a6a6b6d55f4d50c03+d5f6e1ea452285324836a49d7d3c2a63cfed1d31&heads=13c0170174366b441dc68e8e33757232fa744458+bac16991d12ff45f9dc43c52da1946dfadb83e80 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
269 $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:common=700b7e19db54103633c4bf4a6a6b6d55f4d50c03+d5f6e1ea452285324836a49d7d3c2a63cfed1d31&heads=13c0170174366b441dc68e8e33757232fa744458+bac16991d12ff45f9dc43c52da1946dfadb83e80 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
270
270
271 $ cat error.log
271 $ cat error.log
272
272
@@ -1,934 +1,914 b''
1 #require killdaemons serve zstd
1 #require killdaemons serve zstd
2
2
3 Client version is embedded in HTTP request and is effectively dynamic. Pin the
3 Client version is embedded in HTTP request and is effectively dynamic. Pin the
4 version so behavior is deterministic.
4 version so behavior is deterministic.
5
5
6 $ cat > fakeversion.py << EOF
6 $ cat > fakeversion.py << EOF
7 > from mercurial import util
7 > from mercurial import util
8 > util.version = lambda: '4.2'
8 > util.version = lambda: '4.2'
9 > EOF
9 > EOF
10
10
11 $ cat >> $HGRCPATH << EOF
11 $ cat >> $HGRCPATH << EOF
12 > [extensions]
12 > [extensions]
13 > fakeversion = `pwd`/fakeversion.py
13 > fakeversion = `pwd`/fakeversion.py
14 > [devel]
14 > [devel]
15 > legacy.exchange = phases
15 > legacy.exchange = phases
16 > EOF
16 > EOF
17
17
18 $ hg init server0
18 $ hg init server0
19 $ cd server0
19 $ cd server0
20 $ touch foo
20 $ touch foo
21 $ hg -q commit -A -m initial
21 $ hg -q commit -A -m initial
22
22
23 Also disable compression because zstd is optional and causes output to vary
23 Also disable compression because zstd is optional and causes output to vary
24 and because debugging partial responses is hard when compression is involved
24 and because debugging partial responses is hard when compression is involved
25
25
26 $ cat > .hg/hgrc << EOF
26 $ cat > .hg/hgrc << EOF
27 > [extensions]
27 > [extensions]
28 > badserver = $TESTDIR/badserverext.py
28 > badserver = $TESTDIR/badserverext.py
29 > [server]
29 > [server]
30 > compressionengines = none
30 > compressionengines = none
31 > EOF
31 > EOF
32
32
33 Failure to accept() socket should result in connection related error message
33 Failure to accept() socket should result in connection related error message
34
34
35 $ hg serve --config badserver.closebeforeaccept=true -p $HGPORT -d --pid-file=hg.pid
35 $ hg serve --config badserver.closebeforeaccept=true -p $HGPORT -d --pid-file=hg.pid
36 $ cat hg.pid > $DAEMON_PIDS
36 $ cat hg.pid > $DAEMON_PIDS
37
37
38 $ hg clone http://localhost:$HGPORT/ clone
38 $ hg clone http://localhost:$HGPORT/ clone
39 abort: error: $ECONNRESET$
39 abort: error: $ECONNRESET$
40 [255]
40 [255]
41
41
42 (The server exits on its own, but there is a race between that and starting a new server.
42 (The server exits on its own, but there is a race between that and starting a new server.
43 So ensure the process is dead.)
43 So ensure the process is dead.)
44
44
45 $ killdaemons.py $DAEMON_PIDS
45 $ killdaemons.py $DAEMON_PIDS
46
46
47 Failure immediately after accept() should yield connection related error message
47 Failure immediately after accept() should yield connection related error message
48
48
49 $ hg serve --config badserver.closeafteraccept=true -p $HGPORT -d --pid-file=hg.pid
49 $ hg serve --config badserver.closeafteraccept=true -p $HGPORT -d --pid-file=hg.pid
50 $ cat hg.pid > $DAEMON_PIDS
50 $ cat hg.pid > $DAEMON_PIDS
51
51
52 TODO: this usually outputs good results, but sometimes emits abort:
52 TODO: this usually outputs good results, but sometimes emits abort:
53 error: '' on FreeBSD and OS X.
53 error: '' on FreeBSD and OS X.
54 What we ideally want are:
54 What we ideally want are:
55
55
56 abort: error: $ECONNRESET$
56 abort: error: $ECONNRESET$
57
57
58 The flakiness in this output was observable easily with
58 The flakiness in this output was observable easily with
59 --runs-per-test=20 on macOS 10.12 during the freeze for 4.2.
59 --runs-per-test=20 on macOS 10.12 during the freeze for 4.2.
60 $ hg clone http://localhost:$HGPORT/ clone
60 $ hg clone http://localhost:$HGPORT/ clone
61 abort: error: * (glob)
61 abort: error: * (glob)
62 [255]
62 [255]
63
63
64 $ killdaemons.py $DAEMON_PIDS
64 $ killdaemons.py $DAEMON_PIDS
65
65
66 Failure to read all bytes in initial HTTP request should yield connection related error message
66 Failure to read all bytes in initial HTTP request should yield connection related error message
67
67
68 $ hg serve --config badserver.closeafterrecvbytes=1 -p $HGPORT -d --pid-file=hg.pid -E error.log
68 $ hg serve --config badserver.closeafterrecvbytes=1 -p $HGPORT -d --pid-file=hg.pid -E error.log
69 $ cat hg.pid > $DAEMON_PIDS
69 $ cat hg.pid > $DAEMON_PIDS
70
70
71 $ hg clone http://localhost:$HGPORT/ clone
71 $ hg clone http://localhost:$HGPORT/ clone
72 abort: error: bad HTTP status line: ''
72 abort: error: bad HTTP status line: ''
73 [255]
73 [255]
74
74
75 $ killdaemons.py $DAEMON_PIDS
75 $ killdaemons.py $DAEMON_PIDS
76
76
77 $ cat error.log
77 $ cat error.log
78 readline(1 from 65537) -> (1) G
78 readline(1 from 65537) -> (1) G
79 read limit reached; closing socket
79 read limit reached; closing socket
80
80
81 $ rm -f error.log
81 $ rm -f error.log
82
82
83 Same failure, but server reads full HTTP request line
83 Same failure, but server reads full HTTP request line
84
84
85 $ hg serve --config badserver.closeafterrecvbytes=40 -p $HGPORT -d --pid-file=hg.pid -E error.log
85 $ hg serve --config badserver.closeafterrecvbytes=40 -p $HGPORT -d --pid-file=hg.pid -E error.log
86 $ cat hg.pid > $DAEMON_PIDS
86 $ cat hg.pid > $DAEMON_PIDS
87 $ hg clone http://localhost:$HGPORT/ clone
87 $ hg clone http://localhost:$HGPORT/ clone
88 abort: error: bad HTTP status line: ''
88 abort: error: bad HTTP status line: ''
89 [255]
89 [255]
90
90
91 $ killdaemons.py $DAEMON_PIDS
91 $ killdaemons.py $DAEMON_PIDS
92
92
93 $ cat error.log
93 $ cat error.log
94 readline(40 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
94 readline(40 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
95 readline(7 from -1) -> (7) Accept-
95 readline(7 from -1) -> (7) Accept-
96 read limit reached; closing socket
96 read limit reached; closing socket
97
97
98 $ rm -f error.log
98 $ rm -f error.log
99
99
100 Failure on subsequent HTTP request on the same socket (cmd?batch)
100 Failure on subsequent HTTP request on the same socket (cmd?batch)
101
101
102 $ hg serve --config badserver.closeafterrecvbytes=256,223 -p $HGPORT -d --pid-file=hg.pid -E error.log
102 $ hg serve --config badserver.closeafterrecvbytes=210,223 -p $HGPORT -d --pid-file=hg.pid -E error.log
103 $ cat hg.pid > $DAEMON_PIDS
103 $ cat hg.pid > $DAEMON_PIDS
104 $ hg clone http://localhost:$HGPORT/ clone
104 $ hg clone http://localhost:$HGPORT/ clone
105 abort: error: bad HTTP status line: ''
105 abort: error: bad HTTP status line: ''
106 [255]
106 [255]
107
107
108 $ killdaemons.py $DAEMON_PIDS
108 $ killdaemons.py $DAEMON_PIDS
109
109
110 $ cat error.log
110 $ cat error.log
111 readline(256 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
111 readline(210 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
112 readline(223 from -1) -> (27) Accept-Encoding: identity\r\n
112 readline(177 from -1) -> (27) Accept-Encoding: identity\r\n
113 readline(196 from -1) -> (19) vary: X-HgProto-1\r\n
114 readline(177 from -1) -> (27) x-hgproto-1: partial-pull\r\n
115 readline(150 from -1) -> (35) accept: application/mercurial-0.1\r\n
113 readline(150 from -1) -> (35) accept: application/mercurial-0.1\r\n
116 readline(115 from -1) -> (*) host: localhost:$HGPORT\r\n (glob)
114 readline(115 from -1) -> (*) host: localhost:$HGPORT\r\n (glob)
117 readline(* from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
115 readline(* from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
118 readline(* from -1) -> (2) \r\n (glob)
116 readline(* from -1) -> (2) \r\n (glob)
119 write(36) -> HTTP/1.1 200 Script output follows\r\n
117 write(36) -> HTTP/1.1 200 Script output follows\r\n
120 write(23) -> Server: badhttpserver\r\n
118 write(23) -> Server: badhttpserver\r\n
121 write(37) -> Date: $HTTP_DATE$\r\n
119 write(37) -> Date: $HTTP_DATE$\r\n
122 write(41) -> Content-Type: application/mercurial-0.1\r\n
120 write(41) -> Content-Type: application/mercurial-0.1\r\n
123 write(21) -> Content-Length: 436\r\n
121 write(21) -> Content-Length: 436\r\n
124 write(2) -> \r\n
122 write(2) -> \r\n
125 write(436) -> batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
123 write(436) -> batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
126 readline(4? from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n (glob)
124 readline(4? from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n (glob)
127 readline(1? from -1) -> (1?) Accept-Encoding* (glob)
125 readline(1? from -1) -> (1?) Accept-Encoding* (glob)
128 read limit reached; closing socket
126 read limit reached; closing socket
129 readline(223 from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
127 readline(223 from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
130 readline(197 from -1) -> (27) Accept-Encoding: identity\r\n
128 readline(197 from -1) -> (27) Accept-Encoding: identity\r\n
131 readline(170 from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
129 readline(170 from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
132 readline(141 from -1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
130 readline(141 from -1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
133 readline(100 from -1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
131 readline(100 from -1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
134 readline(39 from -1) -> (35) accept: application/mercurial-0.1\r\n
132 readline(39 from -1) -> (35) accept: application/mercurial-0.1\r\n
135 readline(4 from -1) -> (4) host
133 readline(4 from -1) -> (4) host
136 read limit reached; closing socket
134 read limit reached; closing socket
137
135
138 $ rm -f error.log
136 $ rm -f error.log
139
137
140 Failure to read getbundle HTTP request
138 Failure to read getbundle HTTP request
141
139
142 $ hg serve --config badserver.closeafterrecvbytes=354,317,304 -p $HGPORT -d --pid-file=hg.pid -E error.log
140 $ hg serve --config badserver.closeafterrecvbytes=308,317,304 -p $HGPORT -d --pid-file=hg.pid -E error.log
143 $ cat hg.pid > $DAEMON_PIDS
141 $ cat hg.pid > $DAEMON_PIDS
144 $ hg clone http://localhost:$HGPORT/ clone
142 $ hg clone http://localhost:$HGPORT/ clone
145 requesting all changes
143 requesting all changes
146 abort: error: bad HTTP status line: ''
144 abort: error: bad HTTP status line: ''
147 [255]
145 [255]
148
146
149 $ killdaemons.py $DAEMON_PIDS
147 $ killdaemons.py $DAEMON_PIDS
150
148
151 $ cat error.log
149 $ cat error.log
152 readline(1 from -1) -> (1) x (?)
150 readline(1 from -1) -> (1) x (?)
153 readline(1 from -1) -> (1) x (?)
151 readline(1 from -1) -> (1) x (?)
154 readline(354 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
152 readline(308 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
155 readline(321 from -1) -> (27) Accept-Encoding: identity\r\n
153 readline(275 from -1) -> (27) Accept-Encoding: identity\r\n
156 readline(294 from -1) -> (19) vary: X-HgProto-1\r\n
157 readline(275 from -1) -> (27) x-hgproto-1: partial-pull\r\n
158 readline(248 from -1) -> (35) accept: application/mercurial-0.1\r\n
154 readline(248 from -1) -> (35) accept: application/mercurial-0.1\r\n
159 readline(213 from -1) -> (*) host: localhost:$HGPORT\r\n (glob)
155 readline(213 from -1) -> (*) host: localhost:$HGPORT\r\n (glob)
160 readline(* from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
156 readline(* from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
161 readline(* from -1) -> (2) \r\n (glob)
157 readline(* from -1) -> (2) \r\n (glob)
162 write(36) -> HTTP/1.1 200 Script output follows\r\n
158 write(36) -> HTTP/1.1 200 Script output follows\r\n
163 write(23) -> Server: badhttpserver\r\n
159 write(23) -> Server: badhttpserver\r\n
164 write(37) -> Date: $HTTP_DATE$\r\n
160 write(37) -> Date: $HTTP_DATE$\r\n
165 write(41) -> Content-Type: application/mercurial-0.1\r\n
161 write(41) -> Content-Type: application/mercurial-0.1\r\n
166 write(21) -> Content-Length: 436\r\n
162 write(21) -> Content-Length: 436\r\n
167 write(2) -> \r\n
163 write(2) -> \r\n
168 write(436) -> batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
164 write(436) -> batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
169 readline(13? from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n (glob)
165 readline(13? from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n (glob)
170 readline(1?? from -1) -> (27) Accept-Encoding: identity\r\n (glob)
166 readline(1?? from -1) -> (27) Accept-Encoding: identity\r\n (glob)
171 readline(8? from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
167 readline(8? from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
172 readline(5? from -1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n (glob)
168 readline(5? from -1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n (glob)
173 readline(1? from -1) -> (1?) x-hgproto-1:* (glob)
169 readline(1? from -1) -> (1?) x-hgproto-1:* (glob)
174 read limit reached; closing socket
170 read limit reached; closing socket
175 readline(317 from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
171 readline(317 from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
176 readline(291 from -1) -> (27) Accept-Encoding: identity\r\n
172 readline(291 from -1) -> (27) Accept-Encoding: identity\r\n
177 readline(264 from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
173 readline(264 from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
178 readline(235 from -1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
174 readline(235 from -1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
179 readline(194 from -1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
175 readline(194 from -1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
180 readline(133 from -1) -> (35) accept: application/mercurial-0.1\r\n
176 readline(133 from -1) -> (35) accept: application/mercurial-0.1\r\n
181 readline(98 from -1) -> (*) host: localhost:$HGPORT\r\n (glob)
177 readline(98 from -1) -> (*) host: localhost:$HGPORT\r\n (glob)
182 readline(* from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
178 readline(* from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
183 readline(* from -1) -> (2) \r\n (glob)
179 readline(* from -1) -> (2) \r\n (glob)
184 write(36) -> HTTP/1.1 200 Script output follows\r\n
180 write(36) -> HTTP/1.1 200 Script output follows\r\n
185 write(23) -> Server: badhttpserver\r\n
181 write(23) -> Server: badhttpserver\r\n
186 write(37) -> Date: $HTTP_DATE$\r\n
182 write(37) -> Date: $HTTP_DATE$\r\n
187 write(41) -> Content-Type: application/mercurial-0.1\r\n
183 write(41) -> Content-Type: application/mercurial-0.1\r\n
188 write(20) -> Content-Length: 42\r\n
184 write(20) -> Content-Length: 42\r\n
189 write(2) -> \r\n
185 write(2) -> \r\n
190 write(42) -> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n;
186 write(42) -> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n;
191 readline(* from 65537) -> (*) GET /?cmd=getbundle HTTP* (glob)
187 readline(* from 65537) -> (*) GET /?cmd=getbundle HTTP* (glob)
192 read limit reached; closing socket
188 read limit reached; closing socket
193 readline(304 from 65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
189 readline(304 from 65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
194 readline(274 from -1) -> (27) Accept-Encoding: identity\r\n
190 readline(274 from -1) -> (27) Accept-Encoding: identity\r\n
195 readline(247 from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
191 readline(247 from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
196 readline(218 from -1) -> (218) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtag
192 readline(218 from -1) -> (218) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtag
197 read limit reached; closing socket
193 read limit reached; closing socket
198
194
199 $ rm -f error.log
195 $ rm -f error.log
200
196
201 Now do a variation using POST to send arguments
197 Now do a variation using POST to send arguments
202
198
203 $ hg serve --config experimental.httppostargs=true --config badserver.closeafterrecvbytes=375,344 -p $HGPORT -d --pid-file=hg.pid -E error.log
199 $ hg serve --config experimental.httppostargs=true --config badserver.closeafterrecvbytes=329,344 -p $HGPORT -d --pid-file=hg.pid -E error.log
204 $ cat hg.pid > $DAEMON_PIDS
200 $ cat hg.pid > $DAEMON_PIDS
205
201
206 $ hg clone http://localhost:$HGPORT/ clone
202 $ hg clone http://localhost:$HGPORT/ clone
207 abort: error: bad HTTP status line: ''
203 abort: error: bad HTTP status line: ''
208 [255]
204 [255]
209
205
210 $ killdaemons.py $DAEMON_PIDS
206 $ killdaemons.py $DAEMON_PIDS
211
207
212 $ cat error.log
208 $ cat error.log
213 readline(375 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
209 readline(329 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
214 readline(342 from -1) -> (27) Accept-Encoding: identity\r\n
210 readline(296 from -1) -> (27) Accept-Encoding: identity\r\n
215 readline(315 from -1) -> (19) vary: X-HgProto-1\r\n
216 readline(296 from -1) -> (27) x-hgproto-1: partial-pull\r\n
217 readline(269 from -1) -> (35) accept: application/mercurial-0.1\r\n
211 readline(269 from -1) -> (35) accept: application/mercurial-0.1\r\n
218 readline(234 from -1) -> (2?) host: localhost:$HGPORT\r\n (glob)
212 readline(234 from -1) -> (2?) host: localhost:$HGPORT\r\n (glob)
219 readline(* from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
213 readline(* from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
220 readline(* from -1) -> (2) \r\n (glob)
214 readline(* from -1) -> (2) \r\n (glob)
221 write(36) -> HTTP/1.1 200 Script output follows\r\n
215 write(36) -> HTTP/1.1 200 Script output follows\r\n
222 write(23) -> Server: badhttpserver\r\n
216 write(23) -> Server: badhttpserver\r\n
223 write(37) -> Date: $HTTP_DATE$\r\n
217 write(37) -> Date: $HTTP_DATE$\r\n
224 write(41) -> Content-Type: application/mercurial-0.1\r\n
218 write(41) -> Content-Type: application/mercurial-0.1\r\n
225 write(21) -> Content-Length: 449\r\n
219 write(21) -> Content-Length: 449\r\n
226 write(2) -> \r\n
220 write(2) -> \r\n
227 write(449) -> batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx httppostargs known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
221 write(449) -> batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx httppostargs known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
228 readline(1?? from 65537) -> (27) POST /?cmd=batch HTTP/1.1\r\n (glob)
222 readline(1?? from 65537) -> (27) POST /?cmd=batch HTTP/1.1\r\n (glob)
229 readline(1?? from -1) -> (27) Accept-Encoding: identity\r\n (glob)
223 readline(1?? from -1) -> (27) Accept-Encoding: identity\r\n (glob)
230 readline(1?? from -1) -> (41) content-type: application/mercurial-0.1\r\n (glob)
224 readline(1?? from -1) -> (41) content-type: application/mercurial-0.1\r\n (glob)
231 readline(6? from -1) -> (33) vary: X-HgArgs-Post,X-HgProto-1\r\n (glob)
225 readline(6? from -1) -> (33) vary: X-HgArgs-Post,X-HgProto-1\r\n (glob)
232 readline(3? from -1) -> (19) x-hgargs-post: 28\r\n (glob)
226 readline(3? from -1) -> (19) x-hgargs-post: 28\r\n (glob)
233 readline(1? from -1) -> (1?) x-hgproto-1: * (glob)
227 readline(1? from -1) -> (1?) x-hgproto-1: * (glob)
234 read limit reached; closing socket
228 read limit reached; closing socket
235 readline(344 from 65537) -> (27) POST /?cmd=batch HTTP/1.1\r\n
229 readline(344 from 65537) -> (27) POST /?cmd=batch HTTP/1.1\r\n
236 readline(317 from -1) -> (27) Accept-Encoding: identity\r\n
230 readline(317 from -1) -> (27) Accept-Encoding: identity\r\n
237 readline(290 from -1) -> (41) content-type: application/mercurial-0.1\r\n
231 readline(290 from -1) -> (41) content-type: application/mercurial-0.1\r\n
238 readline(249 from -1) -> (33) vary: X-HgArgs-Post,X-HgProto-1\r\n
232 readline(249 from -1) -> (33) vary: X-HgArgs-Post,X-HgProto-1\r\n
239 readline(216 from -1) -> (19) x-hgargs-post: 28\r\n
233 readline(216 from -1) -> (19) x-hgargs-post: 28\r\n
240 readline(197 from -1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
234 readline(197 from -1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
241 readline(136 from -1) -> (35) accept: application/mercurial-0.1\r\n
235 readline(136 from -1) -> (35) accept: application/mercurial-0.1\r\n
242 readline(101 from -1) -> (20) content-length: 28\r\n
236 readline(101 from -1) -> (20) content-length: 28\r\n
243 readline(81 from -1) -> (*) host: localhost:$HGPORT\r\n (glob)
237 readline(81 from -1) -> (*) host: localhost:$HGPORT\r\n (glob)
244 readline(* from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
238 readline(* from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
245 readline(* from -1) -> (2) \r\n (glob)
239 readline(* from -1) -> (2) \r\n (glob)
246 read(* from 28) -> (*) cmds=* (glob)
240 read(* from 28) -> (*) cmds=* (glob)
247 read limit reached, closing socket
241 read limit reached, closing socket
248 write(36) -> HTTP/1.1 500 Internal Server Error\r\n
242 write(36) -> HTTP/1.1 500 Internal Server Error\r\n
249
243
250 $ rm -f error.log
244 $ rm -f error.log
251
245
252 Now move on to partial server responses
246 Now move on to partial server responses
253
247
254 Server sends a single character from the HTTP response line
248 Server sends a single character from the HTTP response line
255
249
256 $ hg serve --config badserver.closeaftersendbytes=1 -p $HGPORT -d --pid-file=hg.pid -E error.log
250 $ hg serve --config badserver.closeaftersendbytes=1 -p $HGPORT -d --pid-file=hg.pid -E error.log
257 $ cat hg.pid > $DAEMON_PIDS
251 $ cat hg.pid > $DAEMON_PIDS
258
252
259 $ hg clone http://localhost:$HGPORT/ clone
253 $ hg clone http://localhost:$HGPORT/ clone
260 abort: error: bad HTTP status line: H
254 abort: error: bad HTTP status line: H
261 [255]
255 [255]
262
256
263 $ killdaemons.py $DAEMON_PIDS
257 $ killdaemons.py $DAEMON_PIDS
264
258
265 $ cat error.log
259 $ cat error.log
266 readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
260 readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
267 readline(-1) -> (27) Accept-Encoding: identity\r\n
261 readline(-1) -> (27) Accept-Encoding: identity\r\n
268 readline(-1) -> (19) vary: X-HgProto-1\r\n
269 readline(-1) -> (27) x-hgproto-1: partial-pull\r\n
270 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
262 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
271 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
263 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
272 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
264 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
273 readline(-1) -> (2) \r\n
265 readline(-1) -> (2) \r\n
274 write(1 from 36) -> (0) H
266 write(1 from 36) -> (0) H
275 write limit reached; closing socket
267 write limit reached; closing socket
276 write(36) -> HTTP/1.1 500 Internal Server Error\r\n
268 write(36) -> HTTP/1.1 500 Internal Server Error\r\n
277
269
278 $ rm -f error.log
270 $ rm -f error.log
279
271
280 Server sends an incomplete capabilities response body
272 Server sends an incomplete capabilities response body
281
273
282 $ hg serve --config badserver.closeaftersendbytes=180 -p $HGPORT -d --pid-file=hg.pid -E error.log
274 $ hg serve --config badserver.closeaftersendbytes=180 -p $HGPORT -d --pid-file=hg.pid -E error.log
283 $ cat hg.pid > $DAEMON_PIDS
275 $ cat hg.pid > $DAEMON_PIDS
284
276
285 $ hg clone http://localhost:$HGPORT/ clone
277 $ hg clone http://localhost:$HGPORT/ clone
286 abort: HTTP request error (incomplete response; expected 416 bytes got 20)
278 abort: HTTP request error (incomplete response; expected 416 bytes got 20)
287 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
279 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
288 [255]
280 [255]
289
281
290 $ killdaemons.py $DAEMON_PIDS
282 $ killdaemons.py $DAEMON_PIDS
291
283
292 $ cat error.log
284 $ cat error.log
293 readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
285 readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
294 readline(-1) -> (27) Accept-Encoding: identity\r\n
286 readline(-1) -> (27) Accept-Encoding: identity\r\n
295 readline(-1) -> (19) vary: X-HgProto-1\r\n
296 readline(-1) -> (27) x-hgproto-1: partial-pull\r\n
297 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
287 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
298 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
288 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
299 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
289 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
300 readline(-1) -> (2) \r\n
290 readline(-1) -> (2) \r\n
301 write(36 from 36) -> (144) HTTP/1.1 200 Script output follows\r\n
291 write(36 from 36) -> (144) HTTP/1.1 200 Script output follows\r\n
302 write(23 from 23) -> (121) Server: badhttpserver\r\n
292 write(23 from 23) -> (121) Server: badhttpserver\r\n
303 write(37 from 37) -> (84) Date: $HTTP_DATE$\r\n
293 write(37 from 37) -> (84) Date: $HTTP_DATE$\r\n
304 write(41 from 41) -> (43) Content-Type: application/mercurial-0.1\r\n
294 write(41 from 41) -> (43) Content-Type: application/mercurial-0.1\r\n
305 write(21 from 21) -> (22) Content-Length: 436\r\n
295 write(21 from 21) -> (22) Content-Length: 436\r\n
306 write(2 from 2) -> (20) \r\n
296 write(2 from 2) -> (20) \r\n
307 write(20 from 436) -> (0) batch branchmap bund
297 write(20 from 436) -> (0) batch branchmap bund
308 write limit reached; closing socket
298 write limit reached; closing socket
309
299
310 $ rm -f error.log
300 $ rm -f error.log
311
301
312 Server sends incomplete headers for batch request
302 Server sends incomplete headers for batch request
313
303
314 $ hg serve --config badserver.closeaftersendbytes=714 -p $HGPORT -d --pid-file=hg.pid -E error.log
304 $ hg serve --config badserver.closeaftersendbytes=714 -p $HGPORT -d --pid-file=hg.pid -E error.log
315 $ cat hg.pid > $DAEMON_PIDS
305 $ cat hg.pid > $DAEMON_PIDS
316
306
317 TODO this output is horrible
307 TODO this output is horrible
318
308
319 $ hg clone http://localhost:$HGPORT/ clone
309 $ hg clone http://localhost:$HGPORT/ clone
320 abort: 'http://localhost:$HGPORT/' does not appear to be an hg repository:
310 abort: 'http://localhost:$HGPORT/' does not appear to be an hg repository:
321 ---%<--- (applicat)
311 ---%<--- (applicat)
322
312
323 ---%<---
313 ---%<---
324 !
314 !
325 [255]
315 [255]
326
316
327 $ killdaemons.py $DAEMON_PIDS
317 $ killdaemons.py $DAEMON_PIDS
328
318
329 $ cat error.log
319 $ cat error.log
330 readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
320 readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
331 readline(-1) -> (27) Accept-Encoding: identity\r\n
321 readline(-1) -> (27) Accept-Encoding: identity\r\n
332 readline(-1) -> (19) vary: X-HgProto-1\r\n
333 readline(-1) -> (27) x-hgproto-1: partial-pull\r\n
334 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
322 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
335 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
323 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
336 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
324 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
337 readline(-1) -> (2) \r\n
325 readline(-1) -> (2) \r\n
338 write(36 from 36) -> (678) HTTP/1.1 200 Script output follows\r\n
326 write(36 from 36) -> (678) HTTP/1.1 200 Script output follows\r\n
339 write(23 from 23) -> (655) Server: badhttpserver\r\n
327 write(23 from 23) -> (655) Server: badhttpserver\r\n
340 write(37 from 37) -> (618) Date: $HTTP_DATE$\r\n
328 write(37 from 37) -> (618) Date: $HTTP_DATE$\r\n
341 write(41 from 41) -> (577) Content-Type: application/mercurial-0.1\r\n
329 write(41 from 41) -> (577) Content-Type: application/mercurial-0.1\r\n
342 write(21 from 21) -> (556) Content-Length: 436\r\n
330 write(21 from 21) -> (556) Content-Length: 436\r\n
343 write(2 from 2) -> (554) \r\n
331 write(2 from 2) -> (554) \r\n
344 write(436 from 436) -> (118) batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
332 write(436 from 436) -> (118) batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
345 readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
333 readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
346 readline(-1) -> (27) Accept-Encoding: identity\r\n
334 readline(-1) -> (27) Accept-Encoding: identity\r\n
347 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
335 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
348 readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
336 readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
349 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
337 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
350 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
338 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
351 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
339 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
352 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
340 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
353 readline(-1) -> (2) \r\n
341 readline(-1) -> (2) \r\n
354 write(36 from 36) -> (82) HTTP/1.1 200 Script output follows\r\n
342 write(36 from 36) -> (82) HTTP/1.1 200 Script output follows\r\n
355 write(23 from 23) -> (59) Server: badhttpserver\r\n
343 write(23 from 23) -> (59) Server: badhttpserver\r\n
356 write(37 from 37) -> (22) Date: $HTTP_DATE$\r\n
344 write(37 from 37) -> (22) Date: $HTTP_DATE$\r\n
357 write(22 from 41) -> (0) Content-Type: applicat
345 write(22 from 41) -> (0) Content-Type: applicat
358 write limit reached; closing socket
346 write limit reached; closing socket
359 write(36) -> HTTP/1.1 500 Internal Server Error\r\n
347 write(36) -> HTTP/1.1 500 Internal Server Error\r\n
360
348
361 $ rm -f error.log
349 $ rm -f error.log
362
350
363 Server sends an incomplete HTTP response body to batch request
351 Server sends an incomplete HTTP response body to batch request
364
352
365 $ hg serve --config badserver.closeaftersendbytes=779 -p $HGPORT -d --pid-file=hg.pid -E error.log
353 $ hg serve --config badserver.closeaftersendbytes=779 -p $HGPORT -d --pid-file=hg.pid -E error.log
366 $ cat hg.pid > $DAEMON_PIDS
354 $ cat hg.pid > $DAEMON_PIDS
367
355
368 TODO client spews a stack due to uncaught ValueError in batch.results()
356 TODO client spews a stack due to uncaught ValueError in batch.results()
369 #if no-chg
357 #if no-chg
370 $ hg clone http://localhost:$HGPORT/ clone 2> /dev/null
358 $ hg clone http://localhost:$HGPORT/ clone 2> /dev/null
371 [1]
359 [1]
372 #else
360 #else
373 $ hg clone http://localhost:$HGPORT/ clone 2> /dev/null
361 $ hg clone http://localhost:$HGPORT/ clone 2> /dev/null
374 [255]
362 [255]
375 #endif
363 #endif
376
364
377 $ killdaemons.py $DAEMON_PIDS
365 $ killdaemons.py $DAEMON_PIDS
378
366
379 $ cat error.log
367 $ cat error.log
380 readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
368 readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
381 readline(-1) -> (27) Accept-Encoding: identity\r\n
369 readline(-1) -> (27) Accept-Encoding: identity\r\n
382 readline(-1) -> (19) vary: X-HgProto-1\r\n
383 readline(-1) -> (27) x-hgproto-1: partial-pull\r\n
384 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
370 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
385 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
371 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
386 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
372 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
387 readline(-1) -> (2) \r\n
373 readline(-1) -> (2) \r\n
388 write(36 from 36) -> (743) HTTP/1.1 200 Script output follows\r\n
374 write(36 from 36) -> (743) HTTP/1.1 200 Script output follows\r\n
389 write(23 from 23) -> (720) Server: badhttpserver\r\n
375 write(23 from 23) -> (720) Server: badhttpserver\r\n
390 write(37 from 37) -> (683) Date: $HTTP_DATE$\r\n
376 write(37 from 37) -> (683) Date: $HTTP_DATE$\r\n
391 write(41 from 41) -> (642) Content-Type: application/mercurial-0.1\r\n
377 write(41 from 41) -> (642) Content-Type: application/mercurial-0.1\r\n
392 write(21 from 21) -> (621) Content-Length: 436\r\n
378 write(21 from 21) -> (621) Content-Length: 436\r\n
393 write(2 from 2) -> (619) \r\n
379 write(2 from 2) -> (619) \r\n
394 write(436 from 436) -> (183) batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
380 write(436 from 436) -> (183) batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
395 readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
381 readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
396 readline(-1) -> (27) Accept-Encoding: identity\r\n
382 readline(-1) -> (27) Accept-Encoding: identity\r\n
397 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
383 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
398 readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
384 readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
399 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
385 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
400 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
386 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
401 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
387 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
402 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
388 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
403 readline(-1) -> (2) \r\n
389 readline(-1) -> (2) \r\n
404 write(36 from 36) -> (147) HTTP/1.1 200 Script output follows\r\n
390 write(36 from 36) -> (147) HTTP/1.1 200 Script output follows\r\n
405 write(23 from 23) -> (124) Server: badhttpserver\r\n
391 write(23 from 23) -> (124) Server: badhttpserver\r\n
406 write(37 from 37) -> (87) Date: $HTTP_DATE$\r\n
392 write(37 from 37) -> (87) Date: $HTTP_DATE$\r\n
407 write(41 from 41) -> (46) Content-Type: application/mercurial-0.1\r\n
393 write(41 from 41) -> (46) Content-Type: application/mercurial-0.1\r\n
408 write(20 from 20) -> (26) Content-Length: 42\r\n
394 write(20 from 20) -> (26) Content-Length: 42\r\n
409 write(2 from 2) -> (24) \r\n
395 write(2 from 2) -> (24) \r\n
410 write(24 from 42) -> (0) 96ee1d7354c4ad7372047672
396 write(24 from 42) -> (0) 96ee1d7354c4ad7372047672
411 write limit reached; closing socket
397 write limit reached; closing socket
412
398
413 $ rm -f error.log
399 $ rm -f error.log
414
400
415 Server sends incomplete headers for getbundle response
401 Server sends incomplete headers for getbundle response
416
402
417 $ hg serve --config badserver.closeaftersendbytes=926 -p $HGPORT -d --pid-file=hg.pid -E error.log
403 $ hg serve --config badserver.closeaftersendbytes=926 -p $HGPORT -d --pid-file=hg.pid -E error.log
418 $ cat hg.pid > $DAEMON_PIDS
404 $ cat hg.pid > $DAEMON_PIDS
419
405
420 TODO this output is terrible
406 TODO this output is terrible
421
407
422 $ hg clone http://localhost:$HGPORT/ clone
408 $ hg clone http://localhost:$HGPORT/ clone
423 requesting all changes
409 requesting all changes
424 abort: 'http://localhost:$HGPORT/' does not appear to be an hg repository:
410 abort: 'http://localhost:$HGPORT/' does not appear to be an hg repository:
425 ---%<--- (application/mercuri)
411 ---%<--- (application/mercuri)
426
412
427 ---%<---
413 ---%<---
428 !
414 !
429 [255]
415 [255]
430
416
431 $ killdaemons.py $DAEMON_PIDS
417 $ killdaemons.py $DAEMON_PIDS
432
418
433 $ cat error.log
419 $ cat error.log
434 readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
420 readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
435 readline(-1) -> (27) Accept-Encoding: identity\r\n
421 readline(-1) -> (27) Accept-Encoding: identity\r\n
436 readline(-1) -> (19) vary: X-HgProto-1\r\n
437 readline(-1) -> (27) x-hgproto-1: partial-pull\r\n
438 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
422 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
439 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
423 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
440 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
424 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
441 readline(-1) -> (2) \r\n
425 readline(-1) -> (2) \r\n
442 write(36 from 36) -> (890) HTTP/1.1 200 Script output follows\r\n
426 write(36 from 36) -> (890) HTTP/1.1 200 Script output follows\r\n
443 write(23 from 23) -> (867) Server: badhttpserver\r\n
427 write(23 from 23) -> (867) Server: badhttpserver\r\n
444 write(37 from 37) -> (830) Date: $HTTP_DATE$\r\n
428 write(37 from 37) -> (830) Date: $HTTP_DATE$\r\n
445 write(41 from 41) -> (789) Content-Type: application/mercurial-0.1\r\n
429 write(41 from 41) -> (789) Content-Type: application/mercurial-0.1\r\n
446 write(21 from 21) -> (768) Content-Length: 436\r\n
430 write(21 from 21) -> (768) Content-Length: 436\r\n
447 write(2 from 2) -> (766) \r\n
431 write(2 from 2) -> (766) \r\n
448 write(436 from 436) -> (330) batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
432 write(436 from 436) -> (330) batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
449 readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
433 readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
450 readline(-1) -> (27) Accept-Encoding: identity\r\n
434 readline(-1) -> (27) Accept-Encoding: identity\r\n
451 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
435 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
452 readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
436 readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
453 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
437 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
454 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
438 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
455 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
439 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
456 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
440 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
457 readline(-1) -> (2) \r\n
441 readline(-1) -> (2) \r\n
458 write(36 from 36) -> (294) HTTP/1.1 200 Script output follows\r\n
442 write(36 from 36) -> (294) HTTP/1.1 200 Script output follows\r\n
459 write(23 from 23) -> (271) Server: badhttpserver\r\n
443 write(23 from 23) -> (271) Server: badhttpserver\r\n
460 write(37 from 37) -> (234) Date: $HTTP_DATE$\r\n
444 write(37 from 37) -> (234) Date: $HTTP_DATE$\r\n
461 write(41 from 41) -> (193) Content-Type: application/mercurial-0.1\r\n
445 write(41 from 41) -> (193) Content-Type: application/mercurial-0.1\r\n
462 write(20 from 20) -> (173) Content-Length: 42\r\n
446 write(20 from 20) -> (173) Content-Length: 42\r\n
463 write(2 from 2) -> (171) \r\n
447 write(2 from 2) -> (171) \r\n
464 write(42 from 42) -> (129) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n;
448 write(42 from 42) -> (129) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n;
465 readline(65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
449 readline(65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
466 readline(-1) -> (27) Accept-Encoding: identity\r\n
450 readline(-1) -> (27) Accept-Encoding: identity\r\n
467 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
451 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
468 readline(-1) -> (461) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n
452 readline(-1) -> (461) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n
469 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
453 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
470 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
454 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
471 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
455 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
472 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
456 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
473 readline(-1) -> (2) \r\n
457 readline(-1) -> (2) \r\n
474 write(36 from 36) -> (93) HTTP/1.1 200 Script output follows\r\n
458 write(36 from 36) -> (93) HTTP/1.1 200 Script output follows\r\n
475 write(23 from 23) -> (70) Server: badhttpserver\r\n
459 write(23 from 23) -> (70) Server: badhttpserver\r\n
476 write(37 from 37) -> (33) Date: $HTTP_DATE$\r\n
460 write(37 from 37) -> (33) Date: $HTTP_DATE$\r\n
477 write(33 from 41) -> (0) Content-Type: application/mercuri
461 write(33 from 41) -> (0) Content-Type: application/mercuri
478 write limit reached; closing socket
462 write limit reached; closing socket
479 write(36) -> HTTP/1.1 500 Internal Server Error\r\n
463 write(36) -> HTTP/1.1 500 Internal Server Error\r\n
480
464
481 $ rm -f error.log
465 $ rm -f error.log
482
466
483 Server sends empty HTTP body for getbundle
467 Server sends empty HTTP body for getbundle
484
468
485 $ hg serve --config badserver.closeaftersendbytes=964 -p $HGPORT -d --pid-file=hg.pid -E error.log
469 $ hg serve --config badserver.closeaftersendbytes=964 -p $HGPORT -d --pid-file=hg.pid -E error.log
486 $ cat hg.pid > $DAEMON_PIDS
470 $ cat hg.pid > $DAEMON_PIDS
487
471
488 $ hg clone http://localhost:$HGPORT/ clone
472 $ hg clone http://localhost:$HGPORT/ clone
489 requesting all changes
473 requesting all changes
490 abort: HTTP request error (incomplete response)
474 abort: HTTP request error (incomplete response)
491 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
475 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
492 [255]
476 [255]
493
477
494 $ killdaemons.py $DAEMON_PIDS
478 $ killdaemons.py $DAEMON_PIDS
495
479
496 $ cat error.log
480 $ cat error.log
497 readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
481 readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
498 readline(-1) -> (27) Accept-Encoding: identity\r\n
482 readline(-1) -> (27) Accept-Encoding: identity\r\n
499 readline(-1) -> (19) vary: X-HgProto-1\r\n
500 readline(-1) -> (27) x-hgproto-1: partial-pull\r\n
501 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
483 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
502 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
484 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
503 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
485 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
504 readline(-1) -> (2) \r\n
486 readline(-1) -> (2) \r\n
505 write(36 from 36) -> (928) HTTP/1.1 200 Script output follows\r\n
487 write(36 from 36) -> (928) HTTP/1.1 200 Script output follows\r\n
506 write(23 from 23) -> (905) Server: badhttpserver\r\n
488 write(23 from 23) -> (905) Server: badhttpserver\r\n
507 write(37 from 37) -> (868) Date: $HTTP_DATE$\r\n
489 write(37 from 37) -> (868) Date: $HTTP_DATE$\r\n
508 write(41 from 41) -> (827) Content-Type: application/mercurial-0.1\r\n
490 write(41 from 41) -> (827) Content-Type: application/mercurial-0.1\r\n
509 write(21 from 21) -> (806) Content-Length: 436\r\n
491 write(21 from 21) -> (806) Content-Length: 436\r\n
510 write(2 from 2) -> (804) \r\n
492 write(2 from 2) -> (804) \r\n
511 write(436 from 436) -> (368) batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
493 write(436 from 436) -> (368) batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
512 readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
494 readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
513 readline(-1) -> (27) Accept-Encoding: identity\r\n
495 readline(-1) -> (27) Accept-Encoding: identity\r\n
514 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
496 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
515 readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
497 readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
516 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
498 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
517 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
499 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
518 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
500 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
519 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
501 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
520 readline(-1) -> (2) \r\n
502 readline(-1) -> (2) \r\n
521 write(36 from 36) -> (332) HTTP/1.1 200 Script output follows\r\n
503 write(36 from 36) -> (332) HTTP/1.1 200 Script output follows\r\n
522 write(23 from 23) -> (309) Server: badhttpserver\r\n
504 write(23 from 23) -> (309) Server: badhttpserver\r\n
523 write(37 from 37) -> (272) Date: $HTTP_DATE$\r\n
505 write(37 from 37) -> (272) Date: $HTTP_DATE$\r\n
524 write(41 from 41) -> (231) Content-Type: application/mercurial-0.1\r\n
506 write(41 from 41) -> (231) Content-Type: application/mercurial-0.1\r\n
525 write(20 from 20) -> (211) Content-Length: 42\r\n
507 write(20 from 20) -> (211) Content-Length: 42\r\n
526 write(2 from 2) -> (209) \r\n
508 write(2 from 2) -> (209) \r\n
527 write(42 from 42) -> (167) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n;
509 write(42 from 42) -> (167) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n;
528 readline(65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
510 readline(65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
529 readline(-1) -> (27) Accept-Encoding: identity\r\n
511 readline(-1) -> (27) Accept-Encoding: identity\r\n
530 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
512 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
531 readline(-1) -> (461) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n
513 readline(-1) -> (461) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n
532 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
514 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
533 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
515 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
534 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
516 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
535 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
517 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
536 readline(-1) -> (2) \r\n
518 readline(-1) -> (2) \r\n
537 write(36 from 36) -> (131) HTTP/1.1 200 Script output follows\r\n
519 write(36 from 36) -> (131) HTTP/1.1 200 Script output follows\r\n
538 write(23 from 23) -> (108) Server: badhttpserver\r\n
520 write(23 from 23) -> (108) Server: badhttpserver\r\n
539 write(37 from 37) -> (71) Date: $HTTP_DATE$\r\n
521 write(37 from 37) -> (71) Date: $HTTP_DATE$\r\n
540 write(41 from 41) -> (30) Content-Type: application/mercurial-0.2\r\n
522 write(41 from 41) -> (30) Content-Type: application/mercurial-0.2\r\n
541 write(28 from 28) -> (2) Transfer-Encoding: chunked\r\n
523 write(28 from 28) -> (2) Transfer-Encoding: chunked\r\n
542 write(2 from 2) -> (0) \r\n
524 write(2 from 2) -> (0) \r\n
543 write limit reached; closing socket
525 write limit reached; closing socket
544 write(36) -> HTTP/1.1 500 Internal Server Error\r\n
526 write(36) -> HTTP/1.1 500 Internal Server Error\r\n
545
527
546 $ rm -f error.log
528 $ rm -f error.log
547
529
548 Server sends partial compression string
530 Server sends partial compression string
549
531
550 $ hg serve --config badserver.closeaftersendbytes=988 -p $HGPORT -d --pid-file=hg.pid -E error.log
532 $ hg serve --config badserver.closeaftersendbytes=988 -p $HGPORT -d --pid-file=hg.pid -E error.log
551 $ cat hg.pid > $DAEMON_PIDS
533 $ cat hg.pid > $DAEMON_PIDS
552
534
553 $ hg clone http://localhost:$HGPORT/ clone
535 $ hg clone http://localhost:$HGPORT/ clone
554 requesting all changes
536 requesting all changes
555 abort: HTTP request error (incomplete response)
537 abort: HTTP request error (incomplete response)
556 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
538 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
557 [255]
539 [255]
558
540
559 $ killdaemons.py $DAEMON_PIDS
541 $ killdaemons.py $DAEMON_PIDS
560
542
561 $ cat error.log
543 $ cat error.log
562 readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
544 readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
563 readline(-1) -> (27) Accept-Encoding: identity\r\n
545 readline(-1) -> (27) Accept-Encoding: identity\r\n
564 readline(-1) -> (19) vary: X-HgProto-1\r\n
565 readline(-1) -> (27) x-hgproto-1: partial-pull\r\n
566 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
546 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
567 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
547 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
568 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
548 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
569 readline(-1) -> (2) \r\n
549 readline(-1) -> (2) \r\n
570 write(36 from 36) -> (952) HTTP/1.1 200 Script output follows\r\n
550 write(36 from 36) -> (952) HTTP/1.1 200 Script output follows\r\n
571 write(23 from 23) -> (929) Server: badhttpserver\r\n
551 write(23 from 23) -> (929) Server: badhttpserver\r\n
572 write(37 from 37) -> (892) Date: $HTTP_DATE$\r\n
552 write(37 from 37) -> (892) Date: $HTTP_DATE$\r\n
573 write(41 from 41) -> (851) Content-Type: application/mercurial-0.1\r\n
553 write(41 from 41) -> (851) Content-Type: application/mercurial-0.1\r\n
574 write(21 from 21) -> (830) Content-Length: 436\r\n
554 write(21 from 21) -> (830) Content-Length: 436\r\n
575 write(2 from 2) -> (828) \r\n
555 write(2 from 2) -> (828) \r\n
576 write(436 from 436) -> (392) batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
556 write(436 from 436) -> (392) batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
577 readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
557 readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
578 readline(-1) -> (27) Accept-Encoding: identity\r\n
558 readline(-1) -> (27) Accept-Encoding: identity\r\n
579 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
559 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
580 readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
560 readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
581 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
561 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
582 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
562 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
583 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
563 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
584 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
564 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
585 readline(-1) -> (2) \r\n
565 readline(-1) -> (2) \r\n
586 write(36 from 36) -> (356) HTTP/1.1 200 Script output follows\r\n
566 write(36 from 36) -> (356) HTTP/1.1 200 Script output follows\r\n
587 write(23 from 23) -> (333) Server: badhttpserver\r\n
567 write(23 from 23) -> (333) Server: badhttpserver\r\n
588 write(37 from 37) -> (296) Date: $HTTP_DATE$\r\n
568 write(37 from 37) -> (296) Date: $HTTP_DATE$\r\n
589 write(41 from 41) -> (255) Content-Type: application/mercurial-0.1\r\n
569 write(41 from 41) -> (255) Content-Type: application/mercurial-0.1\r\n
590 write(20 from 20) -> (235) Content-Length: 42\r\n
570 write(20 from 20) -> (235) Content-Length: 42\r\n
591 write(2 from 2) -> (233) \r\n
571 write(2 from 2) -> (233) \r\n
592 write(42 from 42) -> (191) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n;
572 write(42 from 42) -> (191) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n;
593 readline(65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
573 readline(65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
594 readline(-1) -> (27) Accept-Encoding: identity\r\n
574 readline(-1) -> (27) Accept-Encoding: identity\r\n
595 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
575 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
596 readline(-1) -> (461) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n
576 readline(-1) -> (461) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n
597 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
577 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
598 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
578 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
599 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
579 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
600 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
580 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
601 readline(-1) -> (2) \r\n
581 readline(-1) -> (2) \r\n
602 write(36 from 36) -> (155) HTTP/1.1 200 Script output follows\r\n
582 write(36 from 36) -> (155) HTTP/1.1 200 Script output follows\r\n
603 write(23 from 23) -> (132) Server: badhttpserver\r\n
583 write(23 from 23) -> (132) Server: badhttpserver\r\n
604 write(37 from 37) -> (95) Date: $HTTP_DATE$\r\n
584 write(37 from 37) -> (95) Date: $HTTP_DATE$\r\n
605 write(41 from 41) -> (54) Content-Type: application/mercurial-0.2\r\n
585 write(41 from 41) -> (54) Content-Type: application/mercurial-0.2\r\n
606 write(28 from 28) -> (26) Transfer-Encoding: chunked\r\n
586 write(28 from 28) -> (26) Transfer-Encoding: chunked\r\n
607 write(2 from 2) -> (24) \r\n
587 write(2 from 2) -> (24) \r\n
608 write(6 from 6) -> (18) 1\\r\\n\x04\\r\\n (esc)
588 write(6 from 6) -> (18) 1\\r\\n\x04\\r\\n (esc)
609 write(9 from 9) -> (9) 4\r\nnone\r\n
589 write(9 from 9) -> (9) 4\r\nnone\r\n
610 write(9 from 9) -> (0) 4\r\nHG20\r\n
590 write(9 from 9) -> (0) 4\r\nHG20\r\n
611 write limit reached; closing socket
591 write limit reached; closing socket
612 write(27) -> 15\r\nInternal Server Error\r\n
592 write(27) -> 15\r\nInternal Server Error\r\n
613
593
614 $ rm -f error.log
594 $ rm -f error.log
615
595
616 Server sends partial bundle2 header magic
596 Server sends partial bundle2 header magic
617
597
618 $ hg serve --config badserver.closeaftersendbytes=985 -p $HGPORT -d --pid-file=hg.pid -E error.log
598 $ hg serve --config badserver.closeaftersendbytes=985 -p $HGPORT -d --pid-file=hg.pid -E error.log
619 $ cat hg.pid > $DAEMON_PIDS
599 $ cat hg.pid > $DAEMON_PIDS
620
600
621 $ hg clone http://localhost:$HGPORT/ clone
601 $ hg clone http://localhost:$HGPORT/ clone
622 requesting all changes
602 requesting all changes
623 abort: HTTP request error (incomplete response; expected 1 bytes got 3)
603 abort: HTTP request error (incomplete response; expected 1 bytes got 3)
624 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
604 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
625 [255]
605 [255]
626
606
627 $ killdaemons.py $DAEMON_PIDS
607 $ killdaemons.py $DAEMON_PIDS
628
608
629 $ tail -7 error.log
609 $ tail -7 error.log
630 write(28 from 28) -> (23) Transfer-Encoding: chunked\r\n
610 write(28 from 28) -> (23) Transfer-Encoding: chunked\r\n
631 write(2 from 2) -> (21) \r\n
611 write(2 from 2) -> (21) \r\n
632 write(6 from 6) -> (15) 1\\r\\n\x04\\r\\n (esc)
612 write(6 from 6) -> (15) 1\\r\\n\x04\\r\\n (esc)
633 write(9 from 9) -> (6) 4\r\nnone\r\n
613 write(9 from 9) -> (6) 4\r\nnone\r\n
634 write(6 from 9) -> (0) 4\r\nHG2
614 write(6 from 9) -> (0) 4\r\nHG2
635 write limit reached; closing socket
615 write limit reached; closing socket
636 write(27) -> 15\r\nInternal Server Error\r\n
616 write(27) -> 15\r\nInternal Server Error\r\n
637
617
638 $ rm -f error.log
618 $ rm -f error.log
639
619
640 Server sends incomplete bundle2 stream params length
620 Server sends incomplete bundle2 stream params length
641
621
642 $ hg serve --config badserver.closeaftersendbytes=994 -p $HGPORT -d --pid-file=hg.pid -E error.log
622 $ hg serve --config badserver.closeaftersendbytes=994 -p $HGPORT -d --pid-file=hg.pid -E error.log
643 $ cat hg.pid > $DAEMON_PIDS
623 $ cat hg.pid > $DAEMON_PIDS
644
624
645 $ hg clone http://localhost:$HGPORT/ clone
625 $ hg clone http://localhost:$HGPORT/ clone
646 requesting all changes
626 requesting all changes
647 abort: HTTP request error (incomplete response; expected 1 bytes got 3)
627 abort: HTTP request error (incomplete response; expected 1 bytes got 3)
648 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
628 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
649 [255]
629 [255]
650
630
651 $ killdaemons.py $DAEMON_PIDS
631 $ killdaemons.py $DAEMON_PIDS
652
632
653 $ tail -8 error.log
633 $ tail -8 error.log
654 write(28 from 28) -> (32) Transfer-Encoding: chunked\r\n
634 write(28 from 28) -> (32) Transfer-Encoding: chunked\r\n
655 write(2 from 2) -> (30) \r\n
635 write(2 from 2) -> (30) \r\n
656 write(6 from 6) -> (24) 1\\r\\n\x04\\r\\n (esc)
636 write(6 from 6) -> (24) 1\\r\\n\x04\\r\\n (esc)
657 write(9 from 9) -> (15) 4\r\nnone\r\n
637 write(9 from 9) -> (15) 4\r\nnone\r\n
658 write(9 from 9) -> (6) 4\r\nHG20\r\n
638 write(9 from 9) -> (6) 4\r\nHG20\r\n
659 write(6 from 9) -> (0) 4\\r\\n\x00\x00\x00 (esc)
639 write(6 from 9) -> (0) 4\\r\\n\x00\x00\x00 (esc)
660 write limit reached; closing socket
640 write limit reached; closing socket
661 write(27) -> 15\r\nInternal Server Error\r\n
641 write(27) -> 15\r\nInternal Server Error\r\n
662
642
663 $ rm -f error.log
643 $ rm -f error.log
664
644
665 Servers stops after bundle2 stream params header
645 Servers stops after bundle2 stream params header
666
646
667 $ hg serve --config badserver.closeaftersendbytes=997 -p $HGPORT -d --pid-file=hg.pid -E error.log
647 $ hg serve --config badserver.closeaftersendbytes=997 -p $HGPORT -d --pid-file=hg.pid -E error.log
668 $ cat hg.pid > $DAEMON_PIDS
648 $ cat hg.pid > $DAEMON_PIDS
669
649
670 $ hg clone http://localhost:$HGPORT/ clone
650 $ hg clone http://localhost:$HGPORT/ clone
671 requesting all changes
651 requesting all changes
672 abort: HTTP request error (incomplete response)
652 abort: HTTP request error (incomplete response)
673 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
653 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
674 [255]
654 [255]
675
655
676 $ killdaemons.py $DAEMON_PIDS
656 $ killdaemons.py $DAEMON_PIDS
677
657
678 $ tail -8 error.log
658 $ tail -8 error.log
679 write(28 from 28) -> (35) Transfer-Encoding: chunked\r\n
659 write(28 from 28) -> (35) Transfer-Encoding: chunked\r\n
680 write(2 from 2) -> (33) \r\n
660 write(2 from 2) -> (33) \r\n
681 write(6 from 6) -> (27) 1\\r\\n\x04\\r\\n (esc)
661 write(6 from 6) -> (27) 1\\r\\n\x04\\r\\n (esc)
682 write(9 from 9) -> (18) 4\r\nnone\r\n
662 write(9 from 9) -> (18) 4\r\nnone\r\n
683 write(9 from 9) -> (9) 4\r\nHG20\r\n
663 write(9 from 9) -> (9) 4\r\nHG20\r\n
684 write(9 from 9) -> (0) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
664 write(9 from 9) -> (0) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
685 write limit reached; closing socket
665 write limit reached; closing socket
686 write(27) -> 15\r\nInternal Server Error\r\n
666 write(27) -> 15\r\nInternal Server Error\r\n
687
667
688 $ rm -f error.log
668 $ rm -f error.log
689
669
690 Server stops sending after bundle2 part header length
670 Server stops sending after bundle2 part header length
691
671
692 $ hg serve --config badserver.closeaftersendbytes=1006 -p $HGPORT -d --pid-file=hg.pid -E error.log
672 $ hg serve --config badserver.closeaftersendbytes=1006 -p $HGPORT -d --pid-file=hg.pid -E error.log
693 $ cat hg.pid > $DAEMON_PIDS
673 $ cat hg.pid > $DAEMON_PIDS
694
674
695 $ hg clone http://localhost:$HGPORT/ clone
675 $ hg clone http://localhost:$HGPORT/ clone
696 requesting all changes
676 requesting all changes
697 abort: HTTP request error (incomplete response)
677 abort: HTTP request error (incomplete response)
698 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
678 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
699 [255]
679 [255]
700
680
701 $ killdaemons.py $DAEMON_PIDS
681 $ killdaemons.py $DAEMON_PIDS
702
682
703 $ tail -9 error.log
683 $ tail -9 error.log
704 write(28 from 28) -> (44) Transfer-Encoding: chunked\r\n
684 write(28 from 28) -> (44) Transfer-Encoding: chunked\r\n
705 write(2 from 2) -> (42) \r\n
685 write(2 from 2) -> (42) \r\n
706 write(6 from 6) -> (36) 1\\r\\n\x04\\r\\n (esc)
686 write(6 from 6) -> (36) 1\\r\\n\x04\\r\\n (esc)
707 write(9 from 9) -> (27) 4\r\nnone\r\n
687 write(9 from 9) -> (27) 4\r\nnone\r\n
708 write(9 from 9) -> (18) 4\r\nHG20\r\n
688 write(9 from 9) -> (18) 4\r\nHG20\r\n
709 write(9 from 9) -> (9) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
689 write(9 from 9) -> (9) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
710 write(9 from 9) -> (0) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
690 write(9 from 9) -> (0) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
711 write limit reached; closing socket
691 write limit reached; closing socket
712 write(27) -> 15\r\nInternal Server Error\r\n
692 write(27) -> 15\r\nInternal Server Error\r\n
713
693
714 $ rm -f error.log
694 $ rm -f error.log
715
695
716 Server stops sending after bundle2 part header
696 Server stops sending after bundle2 part header
717
697
718 $ hg serve --config badserver.closeaftersendbytes=1053 -p $HGPORT -d --pid-file=hg.pid -E error.log
698 $ hg serve --config badserver.closeaftersendbytes=1053 -p $HGPORT -d --pid-file=hg.pid -E error.log
719 $ cat hg.pid > $DAEMON_PIDS
699 $ cat hg.pid > $DAEMON_PIDS
720
700
721 $ hg clone http://localhost:$HGPORT/ clone
701 $ hg clone http://localhost:$HGPORT/ clone
722 requesting all changes
702 requesting all changes
723 adding changesets
703 adding changesets
724 transaction abort!
704 transaction abort!
725 rollback completed
705 rollback completed
726 abort: HTTP request error (incomplete response)
706 abort: HTTP request error (incomplete response)
727 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
707 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
728 [255]
708 [255]
729
709
730 $ killdaemons.py $DAEMON_PIDS
710 $ killdaemons.py $DAEMON_PIDS
731
711
732 $ tail -10 error.log
712 $ tail -10 error.log
733 write(28 from 28) -> (91) Transfer-Encoding: chunked\r\n
713 write(28 from 28) -> (91) Transfer-Encoding: chunked\r\n
734 write(2 from 2) -> (89) \r\n
714 write(2 from 2) -> (89) \r\n
735 write(6 from 6) -> (83) 1\\r\\n\x04\\r\\n (esc)
715 write(6 from 6) -> (83) 1\\r\\n\x04\\r\\n (esc)
736 write(9 from 9) -> (74) 4\r\nnone\r\n
716 write(9 from 9) -> (74) 4\r\nnone\r\n
737 write(9 from 9) -> (65) 4\r\nHG20\r\n
717 write(9 from 9) -> (65) 4\r\nHG20\r\n
738 write(9 from 9) -> (56) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
718 write(9 from 9) -> (56) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
739 write(9 from 9) -> (47) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
719 write(9 from 9) -> (47) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
740 write(47 from 47) -> (0) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
720 write(47 from 47) -> (0) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
741 write limit reached; closing socket
721 write limit reached; closing socket
742 write(27) -> 15\r\nInternal Server Error\r\n
722 write(27) -> 15\r\nInternal Server Error\r\n
743
723
744 $ rm -f error.log
724 $ rm -f error.log
745
725
746 Server stops after bundle2 part payload chunk size
726 Server stops after bundle2 part payload chunk size
747
727
748 $ hg serve --config badserver.closeaftersendbytes=1074 -p $HGPORT -d --pid-file=hg.pid -E error.log
728 $ hg serve --config badserver.closeaftersendbytes=1074 -p $HGPORT -d --pid-file=hg.pid -E error.log
749 $ cat hg.pid > $DAEMON_PIDS
729 $ cat hg.pid > $DAEMON_PIDS
750
730
751 $ hg clone http://localhost:$HGPORT/ clone
731 $ hg clone http://localhost:$HGPORT/ clone
752 requesting all changes
732 requesting all changes
753 adding changesets
733 adding changesets
754 transaction abort!
734 transaction abort!
755 rollback completed
735 rollback completed
756 abort: HTTP request error (incomplete response; expected 459 bytes got 7)
736 abort: HTTP request error (incomplete response; expected 459 bytes got 7)
757 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
737 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
758 [255]
738 [255]
759
739
760 $ killdaemons.py $DAEMON_PIDS
740 $ killdaemons.py $DAEMON_PIDS
761
741
762 $ tail -11 error.log
742 $ tail -11 error.log
763 write(2 from 2) -> (110) \r\n
743 write(2 from 2) -> (110) \r\n
764 write(6 from 6) -> (104) 1\\r\\n\x04\\r\\n (esc)
744 write(6 from 6) -> (104) 1\\r\\n\x04\\r\\n (esc)
765 write(9 from 9) -> (95) 4\r\nnone\r\n
745 write(9 from 9) -> (95) 4\r\nnone\r\n
766 write(9 from 9) -> (86) 4\r\nHG20\r\n
746 write(9 from 9) -> (86) 4\r\nHG20\r\n
767 write(9 from 9) -> (77) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
747 write(9 from 9) -> (77) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
768 write(9 from 9) -> (68) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
748 write(9 from 9) -> (68) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
769 write(47 from 47) -> (21) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
749 write(47 from 47) -> (21) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
770 write(9 from 9) -> (12) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
750 write(9 from 9) -> (12) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
771 write(12 from 473) -> (0) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1d (esc)
751 write(12 from 473) -> (0) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1d (esc)
772 write limit reached; closing socket
752 write limit reached; closing socket
773 write(27) -> 15\r\nInternal Server Error\r\n
753 write(27) -> 15\r\nInternal Server Error\r\n
774
754
775 $ rm -f error.log
755 $ rm -f error.log
776
756
777 Server stops sending in middle of bundle2 payload chunk
757 Server stops sending in middle of bundle2 payload chunk
778
758
779 $ hg serve --config badserver.closeaftersendbytes=1535 -p $HGPORT -d --pid-file=hg.pid -E error.log
759 $ hg serve --config badserver.closeaftersendbytes=1535 -p $HGPORT -d --pid-file=hg.pid -E error.log
780 $ cat hg.pid > $DAEMON_PIDS
760 $ cat hg.pid > $DAEMON_PIDS
781
761
782 $ hg clone http://localhost:$HGPORT/ clone
762 $ hg clone http://localhost:$HGPORT/ clone
783 requesting all changes
763 requesting all changes
784 adding changesets
764 adding changesets
785 transaction abort!
765 transaction abort!
786 rollback completed
766 rollback completed
787 abort: HTTP request error (incomplete response)
767 abort: HTTP request error (incomplete response)
788 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
768 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
789 [255]
769 [255]
790
770
791 $ killdaemons.py $DAEMON_PIDS
771 $ killdaemons.py $DAEMON_PIDS
792
772
793 $ tail -12 error.log
773 $ tail -12 error.log
794 write(28 from 28) -> (573) Transfer-Encoding: chunked\r\n
774 write(28 from 28) -> (573) Transfer-Encoding: chunked\r\n
795 write(2 from 2) -> (571) \r\n
775 write(2 from 2) -> (571) \r\n
796 write(6 from 6) -> (565) 1\\r\\n\x04\\r\\n (esc)
776 write(6 from 6) -> (565) 1\\r\\n\x04\\r\\n (esc)
797 write(9 from 9) -> (556) 4\r\nnone\r\n
777 write(9 from 9) -> (556) 4\r\nnone\r\n
798 write(9 from 9) -> (547) 4\r\nHG20\r\n
778 write(9 from 9) -> (547) 4\r\nHG20\r\n
799 write(9 from 9) -> (538) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
779 write(9 from 9) -> (538) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
800 write(9 from 9) -> (529) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
780 write(9 from 9) -> (529) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
801 write(47 from 47) -> (482) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
781 write(47 from 47) -> (482) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
802 write(9 from 9) -> (473) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
782 write(9 from 9) -> (473) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
803 write(473 from 473) -> (0) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
783 write(473 from 473) -> (0) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
804 write limit reached; closing socket
784 write limit reached; closing socket
805 write(27) -> 15\r\nInternal Server Error\r\n
785 write(27) -> 15\r\nInternal Server Error\r\n
806
786
807 $ rm -f error.log
787 $ rm -f error.log
808
788
809 Server stops sending after 0 length payload chunk size
789 Server stops sending after 0 length payload chunk size
810
790
811 $ hg serve --config badserver.closeaftersendbytes=1566 -p $HGPORT -d --pid-file=hg.pid -E error.log
791 $ hg serve --config badserver.closeaftersendbytes=1566 -p $HGPORT -d --pid-file=hg.pid -E error.log
812 $ cat hg.pid > $DAEMON_PIDS
792 $ cat hg.pid > $DAEMON_PIDS
813
793
814 $ hg clone http://localhost:$HGPORT/ clone
794 $ hg clone http://localhost:$HGPORT/ clone
815 requesting all changes
795 requesting all changes
816 adding changesets
796 adding changesets
817 adding manifests
797 adding manifests
818 adding file changes
798 adding file changes
819 added 1 changesets with 1 changes to 1 files
799 added 1 changesets with 1 changes to 1 files
820 transaction abort!
800 transaction abort!
821 rollback completed
801 rollback completed
822 abort: HTTP request error (incomplete response; expected 23 bytes got 9)
802 abort: HTTP request error (incomplete response; expected 23 bytes got 9)
823 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
803 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
824 [255]
804 [255]
825
805
826 $ killdaemons.py $DAEMON_PIDS
806 $ killdaemons.py $DAEMON_PIDS
827
807
828 $ tail -13 error.log
808 $ tail -13 error.log
829 write(6 from 6) -> (596) 1\\r\\n\x04\\r\\n (esc)
809 write(6 from 6) -> (596) 1\\r\\n\x04\\r\\n (esc)
830 write(9 from 9) -> (587) 4\r\nnone\r\n
810 write(9 from 9) -> (587) 4\r\nnone\r\n
831 write(9 from 9) -> (578) 4\r\nHG20\r\n
811 write(9 from 9) -> (578) 4\r\nHG20\r\n
832 write(9 from 9) -> (569) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
812 write(9 from 9) -> (569) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
833 write(9 from 9) -> (560) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
813 write(9 from 9) -> (560) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
834 write(47 from 47) -> (513) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
814 write(47 from 47) -> (513) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
835 write(9 from 9) -> (504) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
815 write(9 from 9) -> (504) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
836 write(473 from 473) -> (31) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
816 write(473 from 473) -> (31) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
837 write(9 from 9) -> (22) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
817 write(9 from 9) -> (22) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
838 write(9 from 9) -> (13) 4\\r\\n\x00\x00\x00 \\r\\n (esc)
818 write(9 from 9) -> (13) 4\\r\\n\x00\x00\x00 \\r\\n (esc)
839 write(13 from 38) -> (0) 20\\r\\n\x08LISTKEYS (esc)
819 write(13 from 38) -> (0) 20\\r\\n\x08LISTKEYS (esc)
840 write limit reached; closing socket
820 write limit reached; closing socket
841 write(27) -> 15\r\nInternal Server Error\r\n
821 write(27) -> 15\r\nInternal Server Error\r\n
842
822
843 $ rm -f error.log
823 $ rm -f error.log
844
824
845 Server stops sending after 0 part bundle part header (indicating end of bundle2 payload)
825 Server stops sending after 0 part bundle part header (indicating end of bundle2 payload)
846 This is before the 0 size chunked transfer part that signals end of HTTP response.
826 This is before the 0 size chunked transfer part that signals end of HTTP response.
847
827
848 # $ hg serve --config badserver.closeaftersendbytes=1741 -p $HGPORT -d --pid-file=hg.pid -E error.log
828 # $ hg serve --config badserver.closeaftersendbytes=1741 -p $HGPORT -d --pid-file=hg.pid -E error.log
849 $ hg serve --config badserver.closeaftersendbytes=1848 -p $HGPORT -d --pid-file=hg.pid -E error.log
829 $ hg serve --config badserver.closeaftersendbytes=1848 -p $HGPORT -d --pid-file=hg.pid -E error.log
850 $ cat hg.pid > $DAEMON_PIDS
830 $ cat hg.pid > $DAEMON_PIDS
851
831
852 $ hg clone http://localhost:$HGPORT/ clone
832 $ hg clone http://localhost:$HGPORT/ clone
853 requesting all changes
833 requesting all changes
854 adding changesets
834 adding changesets
855 adding manifests
835 adding manifests
856 adding file changes
836 adding file changes
857 added 1 changesets with 1 changes to 1 files
837 added 1 changesets with 1 changes to 1 files
858 new changesets 96ee1d7354c4
838 new changesets 96ee1d7354c4
859 updating to branch default
839 updating to branch default
860 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
840 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
861
841
862 $ killdaemons.py $DAEMON_PIDS
842 $ killdaemons.py $DAEMON_PIDS
863
843
864 $ tail -22 error.log
844 $ tail -22 error.log
865 write(9 from 9) -> (851) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
845 write(9 from 9) -> (851) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
866 write(9 from 9) -> (842) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
846 write(9 from 9) -> (842) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
867 write(47 from 47) -> (795) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
847 write(47 from 47) -> (795) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
868 write(9 from 9) -> (786) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
848 write(9 from 9) -> (786) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
869 write(473 from 473) -> (313) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
849 write(473 from 473) -> (313) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
870 write(9 from 9) -> (304) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
850 write(9 from 9) -> (304) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
871 write(9 from 9) -> (295) 4\\r\\n\x00\x00\x00 \\r\\n (esc)
851 write(9 from 9) -> (295) 4\\r\\n\x00\x00\x00 \\r\\n (esc)
872 write(38 from 38) -> (257) 20\\r\\n\x08LISTKEYS\x00\x00\x00\x01\x01\x00 \x06namespacephases\\r\\n (esc)
852 write(38 from 38) -> (257) 20\\r\\n\x08LISTKEYS\x00\x00\x00\x01\x01\x00 \x06namespacephases\\r\\n (esc)
873 write(9 from 9) -> (248) 4\\r\\n\x00\x00\x00:\\r\\n (esc)
853 write(9 from 9) -> (248) 4\\r\\n\x00\x00\x00:\\r\\n (esc)
874 write(64 from 64) -> (184) 3a\r\n96ee1d7354c4ad7372047672c36a1f561e3a6a4c 1\npublishing True\r\n
854 write(64 from 64) -> (184) 3a\r\n96ee1d7354c4ad7372047672c36a1f561e3a6a4c 1\npublishing True\r\n
875 write(9 from 9) -> (175) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
855 write(9 from 9) -> (175) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
876 write(9 from 9) -> (166) 4\\r\\n\x00\x00\x00#\\r\\n (esc)
856 write(9 from 9) -> (166) 4\\r\\n\x00\x00\x00#\\r\\n (esc)
877 write(41 from 41) -> (125) 23\\r\\n\x08LISTKEYS\x00\x00\x00\x02\x01\x00 namespacebookmarks\\r\\n (esc)
857 write(41 from 41) -> (125) 23\\r\\n\x08LISTKEYS\x00\x00\x00\x02\x01\x00 namespacebookmarks\\r\\n (esc)
878 write(9 from 9) -> (116) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
858 write(9 from 9) -> (116) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
879 write(9 from 9) -> (107) 4\\r\\n\x00\x00\x00\x1d\\r\\n (esc)
859 write(9 from 9) -> (107) 4\\r\\n\x00\x00\x00\x1d\\r\\n (esc)
880 write(35 from 35) -> (72) 1d\\r\\n\x16CACHE:REV-BRANCH-CACHE\x00\x00\x00\x03\x00\x00\\r\\n (esc)
860 write(35 from 35) -> (72) 1d\\r\\n\x16CACHE:REV-BRANCH-CACHE\x00\x00\x00\x03\x00\x00\\r\\n (esc)
881 write(9 from 9) -> (63) 4\\r\\n\x00\x00\x00'\\r\\n (esc)
861 write(9 from 9) -> (63) 4\\r\\n\x00\x00\x00'\\r\\n (esc)
882 write(45 from 45) -> (18) 27\\r\\n\x00\x00\x00\x07\x00\x00\x00\x01\x00\x00\x00\x00default\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\\r\\n (esc)
862 write(45 from 45) -> (18) 27\\r\\n\x00\x00\x00\x07\x00\x00\x00\x01\x00\x00\x00\x00default\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\\r\\n (esc)
883 write(9 from 9) -> (9) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
863 write(9 from 9) -> (9) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
884 write(9 from 9) -> (0) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
864 write(9 from 9) -> (0) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
885 write limit reached; closing socket
865 write limit reached; closing socket
886 write(27) -> 15\r\nInternal Server Error\r\n
866 write(27) -> 15\r\nInternal Server Error\r\n
887
867
888 $ rm -f error.log
868 $ rm -f error.log
889 $ rm -rf clone
869 $ rm -rf clone
890
870
891 Server sends a size 0 chunked-transfer size without terminating \r\n
871 Server sends a size 0 chunked-transfer size without terminating \r\n
892
872
893 $ hg serve --config badserver.closeaftersendbytes=1851 -p $HGPORT -d --pid-file=hg.pid -E error.log
873 $ hg serve --config badserver.closeaftersendbytes=1851 -p $HGPORT -d --pid-file=hg.pid -E error.log
894 $ cat hg.pid > $DAEMON_PIDS
874 $ cat hg.pid > $DAEMON_PIDS
895
875
896 $ hg clone http://localhost:$HGPORT/ clone
876 $ hg clone http://localhost:$HGPORT/ clone
897 requesting all changes
877 requesting all changes
898 adding changesets
878 adding changesets
899 adding manifests
879 adding manifests
900 adding file changes
880 adding file changes
901 added 1 changesets with 1 changes to 1 files
881 added 1 changesets with 1 changes to 1 files
902 new changesets 96ee1d7354c4
882 new changesets 96ee1d7354c4
903 updating to branch default
883 updating to branch default
904 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
884 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
905
885
906 $ killdaemons.py $DAEMON_PIDS
886 $ killdaemons.py $DAEMON_PIDS
907
887
908 $ tail -23 error.log
888 $ tail -23 error.log
909 write(9 from 9) -> (854) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
889 write(9 from 9) -> (854) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
910 write(9 from 9) -> (845) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
890 write(9 from 9) -> (845) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
911 write(47 from 47) -> (798) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
891 write(47 from 47) -> (798) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
912 write(9 from 9) -> (789) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
892 write(9 from 9) -> (789) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
913 write(473 from 473) -> (316) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
893 write(473 from 473) -> (316) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
914 write(9 from 9) -> (307) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
894 write(9 from 9) -> (307) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
915 write(9 from 9) -> (298) 4\\r\\n\x00\x00\x00 \\r\\n (esc)
895 write(9 from 9) -> (298) 4\\r\\n\x00\x00\x00 \\r\\n (esc)
916 write(38 from 38) -> (260) 20\\r\\n\x08LISTKEYS\x00\x00\x00\x01\x01\x00 \x06namespacephases\\r\\n (esc)
896 write(38 from 38) -> (260) 20\\r\\n\x08LISTKEYS\x00\x00\x00\x01\x01\x00 \x06namespacephases\\r\\n (esc)
917 write(9 from 9) -> (251) 4\\r\\n\x00\x00\x00:\\r\\n (esc)
897 write(9 from 9) -> (251) 4\\r\\n\x00\x00\x00:\\r\\n (esc)
918 write(64 from 64) -> (187) 3a\r\n96ee1d7354c4ad7372047672c36a1f561e3a6a4c 1\npublishing True\r\n
898 write(64 from 64) -> (187) 3a\r\n96ee1d7354c4ad7372047672c36a1f561e3a6a4c 1\npublishing True\r\n
919 write(9 from 9) -> (178) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
899 write(9 from 9) -> (178) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
920 write(9 from 9) -> (169) 4\\r\\n\x00\x00\x00#\\r\\n (esc)
900 write(9 from 9) -> (169) 4\\r\\n\x00\x00\x00#\\r\\n (esc)
921 write(41 from 41) -> (128) 23\\r\\n\x08LISTKEYS\x00\x00\x00\x02\x01\x00 namespacebookmarks\\r\\n (esc)
901 write(41 from 41) -> (128) 23\\r\\n\x08LISTKEYS\x00\x00\x00\x02\x01\x00 namespacebookmarks\\r\\n (esc)
922 write(9 from 9) -> (119) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
902 write(9 from 9) -> (119) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
923 write(9 from 9) -> (110) 4\\r\\n\x00\x00\x00\x1d\\r\\n (esc)
903 write(9 from 9) -> (110) 4\\r\\n\x00\x00\x00\x1d\\r\\n (esc)
924 write(35 from 35) -> (75) 1d\\r\\n\x16CACHE:REV-BRANCH-CACHE\x00\x00\x00\x03\x00\x00\\r\\n (esc)
904 write(35 from 35) -> (75) 1d\\r\\n\x16CACHE:REV-BRANCH-CACHE\x00\x00\x00\x03\x00\x00\\r\\n (esc)
925 write(9 from 9) -> (66) 4\\r\\n\x00\x00\x00'\\r\\n (esc)
905 write(9 from 9) -> (66) 4\\r\\n\x00\x00\x00'\\r\\n (esc)
926 write(45 from 45) -> (21) 27\\r\\n\x00\x00\x00\x07\x00\x00\x00\x01\x00\x00\x00\x00default\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\\r\\n (esc)
906 write(45 from 45) -> (21) 27\\r\\n\x00\x00\x00\x07\x00\x00\x00\x01\x00\x00\x00\x00default\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\\r\\n (esc)
927 write(9 from 9) -> (12) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
907 write(9 from 9) -> (12) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
928 write(9 from 9) -> (3) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
908 write(9 from 9) -> (3) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
929 write(3 from 5) -> (0) 0\r\n
909 write(3 from 5) -> (0) 0\r\n
930 write limit reached; closing socket
910 write limit reached; closing socket
931 write(27) -> 15\r\nInternal Server Error\r\n
911 write(27) -> 15\r\nInternal Server Error\r\n
932
912
933 $ rm -f error.log
913 $ rm -f error.log
934 $ rm -rf clone
914 $ rm -rf clone
@@ -1,413 +1,413 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 $ hg serve -p $HGPORT1 2>&1
29 $ hg serve -p $HGPORT1 2>&1
30 abort: cannot start server at 'localhost:$HGPORT1': $EADDRINUSE$
30 abort: cannot start server at 'localhost:$HGPORT1': $EADDRINUSE$
31 [255]
31 [255]
32
32
33 $ cd ..
33 $ cd ..
34 $ cat hg1.pid hg2.pid >> $DAEMON_PIDS
34 $ cat hg1.pid hg2.pid >> $DAEMON_PIDS
35
35
36 clone via stream
36 clone via stream
37
37
38 #if no-reposimplestore
38 #if no-reposimplestore
39 $ hg clone --stream http://localhost:$HGPORT/ copy 2>&1
39 $ hg clone --stream http://localhost:$HGPORT/ copy 2>&1
40 streaming all changes
40 streaming all changes
41 6 files to transfer, 606 bytes of data
41 6 files to transfer, 606 bytes of data
42 transferred * bytes in * seconds (*/sec) (glob)
42 transferred * bytes in * seconds (*/sec) (glob)
43 searching for changes
43 searching for changes
44 no changes found
44 no changes found
45 updating to branch default
45 updating to branch default
46 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
46 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
47 $ hg verify -R copy
47 $ hg verify -R copy
48 checking changesets
48 checking changesets
49 checking manifests
49 checking manifests
50 crosschecking files in changesets and manifests
50 crosschecking files in changesets and manifests
51 checking files
51 checking files
52 4 files, 1 changesets, 4 total revisions
52 4 files, 1 changesets, 4 total revisions
53 #endif
53 #endif
54
54
55 try to clone via stream, should use pull instead
55 try to clone via stream, should use pull instead
56
56
57 $ hg clone --stream http://localhost:$HGPORT1/ copy2
57 $ hg clone --stream http://localhost:$HGPORT1/ copy2
58 warning: stream clone requested but server has them disabled
58 warning: stream clone requested but server has them disabled
59 requesting all changes
59 requesting all changes
60 adding changesets
60 adding changesets
61 adding manifests
61 adding manifests
62 adding file changes
62 adding file changes
63 added 1 changesets with 4 changes to 4 files
63 added 1 changesets with 4 changes to 4 files
64 new changesets 8b6053c928fe
64 new changesets 8b6053c928fe
65 updating to branch default
65 updating to branch default
66 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
66 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
67
67
68 try to clone via stream but missing requirements, so should use pull instead
68 try to clone via stream but missing requirements, so should use pull instead
69
69
70 $ cat > $TESTTMP/removesupportedformat.py << EOF
70 $ cat > $TESTTMP/removesupportedformat.py << EOF
71 > from mercurial import localrepo
71 > from mercurial import localrepo
72 > def extsetup(ui):
72 > def extsetup(ui):
73 > localrepo.localrepository.supportedformats.remove(b'generaldelta')
73 > localrepo.localrepository.supportedformats.remove(b'generaldelta')
74 > EOF
74 > EOF
75
75
76 $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --stream http://localhost:$HGPORT/ copy3
76 $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --stream http://localhost:$HGPORT/ copy3
77 warning: stream clone requested but client is missing requirements: generaldelta
77 warning: stream clone requested but client is missing requirements: generaldelta
78 (see https://www.mercurial-scm.org/wiki/MissingRequirement for more information)
78 (see https://www.mercurial-scm.org/wiki/MissingRequirement for more information)
79 requesting all changes
79 requesting all changes
80 adding changesets
80 adding changesets
81 adding manifests
81 adding manifests
82 adding file changes
82 adding file changes
83 added 1 changesets with 4 changes to 4 files
83 added 1 changesets with 4 changes to 4 files
84 new changesets 8b6053c928fe
84 new changesets 8b6053c928fe
85 updating to branch default
85 updating to branch default
86 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
86 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
87
87
88 clone via pull
88 clone via pull
89
89
90 $ hg clone http://localhost:$HGPORT1/ copy-pull
90 $ hg clone http://localhost:$HGPORT1/ copy-pull
91 requesting all changes
91 requesting all changes
92 adding changesets
92 adding changesets
93 adding manifests
93 adding manifests
94 adding file changes
94 adding file changes
95 added 1 changesets with 4 changes to 4 files
95 added 1 changesets with 4 changes to 4 files
96 new changesets 8b6053c928fe
96 new changesets 8b6053c928fe
97 updating to branch default
97 updating to branch default
98 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
98 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
99 $ hg verify -R copy-pull
99 $ hg verify -R copy-pull
100 checking changesets
100 checking changesets
101 checking manifests
101 checking manifests
102 crosschecking files in changesets and manifests
102 crosschecking files in changesets and manifests
103 checking files
103 checking files
104 4 files, 1 changesets, 4 total revisions
104 4 files, 1 changesets, 4 total revisions
105 $ cd test
105 $ cd test
106 $ echo bar > bar
106 $ echo bar > bar
107 $ hg commit -A -d '1 0' -m 2
107 $ hg commit -A -d '1 0' -m 2
108 adding bar
108 adding bar
109 $ cd ..
109 $ cd ..
110
110
111 clone over http with --update
111 clone over http with --update
112
112
113 $ hg clone http://localhost:$HGPORT1/ updated --update 0
113 $ hg clone http://localhost:$HGPORT1/ updated --update 0
114 requesting all changes
114 requesting all changes
115 adding changesets
115 adding changesets
116 adding manifests
116 adding manifests
117 adding file changes
117 adding file changes
118 added 2 changesets with 5 changes to 5 files
118 added 2 changesets with 5 changes to 5 files
119 new changesets 8b6053c928fe:5fed3813f7f5
119 new changesets 8b6053c928fe:5fed3813f7f5
120 updating to branch default
120 updating to branch default
121 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
121 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
122 $ hg log -r . -R updated
122 $ hg log -r . -R updated
123 changeset: 0:8b6053c928fe
123 changeset: 0:8b6053c928fe
124 user: test
124 user: test
125 date: Thu Jan 01 00:00:00 1970 +0000
125 date: Thu Jan 01 00:00:00 1970 +0000
126 summary: 1
126 summary: 1
127
127
128 $ rm -rf updated
128 $ rm -rf updated
129
129
130 incoming via HTTP
130 incoming via HTTP
131
131
132 $ hg clone http://localhost:$HGPORT1/ --rev 0 partial
132 $ hg clone http://localhost:$HGPORT1/ --rev 0 partial
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 4 changes to 4 files
136 added 1 changesets with 4 changes to 4 files
137 new changesets 8b6053c928fe
137 new changesets 8b6053c928fe
138 updating to branch default
138 updating to branch default
139 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
139 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
140 $ cd partial
140 $ cd partial
141 $ touch LOCAL
141 $ touch LOCAL
142 $ hg ci -qAm LOCAL
142 $ hg ci -qAm LOCAL
143 $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n'
143 $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n'
144 comparing with http://localhost:$HGPORT1/
144 comparing with http://localhost:$HGPORT1/
145 searching for changes
145 searching for changes
146 2
146 2
147 $ cd ..
147 $ cd ..
148
148
149 pull
149 pull
150
150
151 $ cd copy-pull
151 $ cd copy-pull
152 $ cat >> .hg/hgrc <<EOF
152 $ cat >> .hg/hgrc <<EOF
153 > [hooks]
153 > [hooks]
154 > changegroup = sh -c "printenv.py changegroup"
154 > changegroup = sh -c "printenv.py changegroup"
155 > EOF
155 > EOF
156 $ hg pull
156 $ hg pull
157 pulling from http://localhost:$HGPORT1/
157 pulling from http://localhost:$HGPORT1/
158 searching for changes
158 searching for changes
159 adding changesets
159 adding changesets
160 adding manifests
160 adding manifests
161 adding file changes
161 adding file changes
162 added 1 changesets with 1 changes to 1 files
162 added 1 changesets with 1 changes to 1 files
163 new changesets 5fed3813f7f5
163 new changesets 5fed3813f7f5
164 changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_NODE_LAST=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=http://localhost:$HGPORT1/
164 changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_NODE_LAST=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=http://localhost:$HGPORT1/
165 (run 'hg update' to get a working copy)
165 (run 'hg update' to get a working copy)
166 $ cd ..
166 $ cd ..
167
167
168 clone from invalid URL
168 clone from invalid URL
169
169
170 $ hg clone http://localhost:$HGPORT/bad
170 $ hg clone http://localhost:$HGPORT/bad
171 abort: HTTP Error 404: Not Found
171 abort: HTTP Error 404: Not Found
172 [255]
172 [255]
173
173
174 test http authentication
174 test http authentication
175 + use the same server to test server side streaming preference
175 + use the same server to test server side streaming preference
176
176
177 $ cd test
177 $ cd test
178 $ cat << EOT > userpass.py
178 $ cat << EOT > userpass.py
179 > import base64
179 > import base64
180 > from mercurial.hgweb import common
180 > from mercurial.hgweb import common
181 > def perform_authentication(hgweb, req, op):
181 > def perform_authentication(hgweb, req, op):
182 > auth = req.headers.get('Authorization')
182 > auth = req.headers.get('Authorization')
183 > if not auth:
183 > if not auth:
184 > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who',
184 > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who',
185 > [('WWW-Authenticate', 'Basic Realm="mercurial"')])
185 > [('WWW-Authenticate', 'Basic Realm="mercurial"')])
186 > if base64.b64decode(auth.split()[1]).split(b':', 1) != [b'user',
186 > if base64.b64decode(auth.split()[1]).split(b':', 1) != [b'user',
187 > b'pass']:
187 > b'pass']:
188 > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no')
188 > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no')
189 > def extsetup():
189 > def extsetup():
190 > common.permhooks.insert(0, perform_authentication)
190 > common.permhooks.insert(0, perform_authentication)
191 > EOT
191 > EOT
192 $ hg serve --config extensions.x=userpass.py -p $HGPORT2 -d --pid-file=pid \
192 $ hg serve --config extensions.x=userpass.py -p $HGPORT2 -d --pid-file=pid \
193 > --config server.preferuncompressed=True \
193 > --config server.preferuncompressed=True \
194 > --config web.push_ssl=False --config web.allow_push=* -A ../access.log
194 > --config web.push_ssl=False --config web.allow_push=* -A ../access.log
195 $ cat pid >> $DAEMON_PIDS
195 $ cat pid >> $DAEMON_PIDS
196
196
197 $ cat << EOF > get_pass.py
197 $ cat << EOF > get_pass.py
198 > import getpass
198 > import getpass
199 > def newgetpass(arg):
199 > def newgetpass(arg):
200 > return "pass"
200 > return "pass"
201 > getpass.getpass = newgetpass
201 > getpass.getpass = newgetpass
202 > EOF
202 > EOF
203
203
204 $ hg id http://localhost:$HGPORT2/
204 $ hg id http://localhost:$HGPORT2/
205 abort: http authorization required for http://localhost:$HGPORT2/
205 abort: http authorization required for http://localhost:$HGPORT2/
206 [255]
206 [255]
207 $ hg id http://localhost:$HGPORT2/
207 $ hg id http://localhost:$HGPORT2/
208 abort: http authorization required for http://localhost:$HGPORT2/
208 abort: http authorization required for http://localhost:$HGPORT2/
209 [255]
209 [255]
210 $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/
210 $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/
211 http authorization required for http://localhost:$HGPORT2/
211 http authorization required for http://localhost:$HGPORT2/
212 realm: mercurial
212 realm: mercurial
213 user: user
213 user: user
214 password: 5fed3813f7f5
214 password: 5fed3813f7f5
215 $ hg id http://user:pass@localhost:$HGPORT2/
215 $ hg id http://user:pass@localhost:$HGPORT2/
216 5fed3813f7f5
216 5fed3813f7f5
217 $ echo '[auth]' >> .hg/hgrc
217 $ echo '[auth]' >> .hg/hgrc
218 $ echo 'l.schemes=http' >> .hg/hgrc
218 $ echo 'l.schemes=http' >> .hg/hgrc
219 $ echo 'l.prefix=lo' >> .hg/hgrc
219 $ echo 'l.prefix=lo' >> .hg/hgrc
220 $ echo 'l.username=user' >> .hg/hgrc
220 $ echo 'l.username=user' >> .hg/hgrc
221 $ echo 'l.password=pass' >> .hg/hgrc
221 $ echo 'l.password=pass' >> .hg/hgrc
222 $ hg id http://localhost:$HGPORT2/
222 $ hg id http://localhost:$HGPORT2/
223 5fed3813f7f5
223 5fed3813f7f5
224 $ hg id http://localhost:$HGPORT2/
224 $ hg id http://localhost:$HGPORT2/
225 5fed3813f7f5
225 5fed3813f7f5
226 $ hg id http://user@localhost:$HGPORT2/
226 $ hg id http://user@localhost:$HGPORT2/
227 5fed3813f7f5
227 5fed3813f7f5
228
228
229 #if no-reposimplestore
229 #if no-reposimplestore
230 $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1
230 $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1
231 streaming all changes
231 streaming all changes
232 7 files to transfer, 916 bytes of data
232 7 files to transfer, 916 bytes of data
233 transferred * bytes in * seconds (*/sec) (glob)
233 transferred * bytes in * seconds (*/sec) (glob)
234 searching for changes
234 searching for changes
235 no changes found
235 no changes found
236 updating to branch default
236 updating to branch default
237 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
237 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
238 #endif
238 #endif
239
239
240 --pull should override server's preferuncompressed
240 --pull should override server's preferuncompressed
241
241
242 $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1
242 $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1
243 requesting all changes
243 requesting all changes
244 adding changesets
244 adding changesets
245 adding manifests
245 adding manifests
246 adding file changes
246 adding file changes
247 added 2 changesets with 5 changes to 5 files
247 added 2 changesets with 5 changes to 5 files
248 new changesets 8b6053c928fe:5fed3813f7f5
248 new changesets 8b6053c928fe:5fed3813f7f5
249 updating to branch default
249 updating to branch default
250 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
250 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
251
251
252 $ hg id http://user2@localhost:$HGPORT2/
252 $ hg id http://user2@localhost:$HGPORT2/
253 abort: http authorization required for http://localhost:$HGPORT2/
253 abort: http authorization required for http://localhost:$HGPORT2/
254 [255]
254 [255]
255 $ hg id http://user:pass2@localhost:$HGPORT2/
255 $ hg id http://user:pass2@localhost:$HGPORT2/
256 abort: HTTP Error 403: no
256 abort: HTTP Error 403: no
257 [255]
257 [255]
258
258
259 $ hg -R dest-pull tag -r tip top
259 $ hg -R dest-pull tag -r tip top
260 $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/
260 $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/
261 pushing to http://user:***@localhost:$HGPORT2/
261 pushing to http://user:***@localhost:$HGPORT2/
262 searching for changes
262 searching for changes
263 remote: adding changesets
263 remote: adding changesets
264 remote: adding manifests
264 remote: adding manifests
265 remote: adding file changes
265 remote: adding file changes
266 remote: added 1 changesets with 1 changes to 1 files
266 remote: added 1 changesets with 1 changes to 1 files
267 $ hg rollback -q
267 $ hg rollback -q
268
268
269 $ sed 's/.*] "/"/' < ../access.log
269 $ sed 's/.*] "/"/' < ../access.log
270 "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull
270 "GET /?cmd=capabilities HTTP/1.1" 401 -
271 "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull
271 "GET /?cmd=capabilities HTTP/1.1" 401 -
272 "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull
272 "GET /?cmd=capabilities HTTP/1.1" 401 -
273 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull
273 "GET /?cmd=capabilities HTTP/1.1" 200 -
274 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
274 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
275 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
275 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
276 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
276 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
277 "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull
277 "GET /?cmd=capabilities HTTP/1.1" 401 -
278 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull
278 "GET /?cmd=capabilities HTTP/1.1" 200 -
279 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
279 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
280 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
280 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
281 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
281 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
282 "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull
282 "GET /?cmd=capabilities HTTP/1.1" 401 -
283 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull
283 "GET /?cmd=capabilities HTTP/1.1" 200 -
284 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
284 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
285 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
285 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
286 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
286 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
287 "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull
287 "GET /?cmd=capabilities HTTP/1.1" 401 -
288 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull
288 "GET /?cmd=capabilities HTTP/1.1" 200 -
289 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
289 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
290 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
290 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
291 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
291 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
292 "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull
292 "GET /?cmd=capabilities HTTP/1.1" 401 -
293 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull
293 "GET /?cmd=capabilities HTTP/1.1" 200 -
294 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
294 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
295 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
295 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
296 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
296 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
297 "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull (no-reposimplestore !)
297 "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !)
298 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull (no-reposimplestore !)
298 "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !)
299 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
299 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
300 "GET /?cmd=stream_out HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
300 "GET /?cmd=stream_out HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
301 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
301 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
302 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D5fed3813f7f5e1824344fdc9cf8f63bb662c292d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
302 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D5fed3813f7f5e1824344fdc9cf8f63bb662c292d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
303 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
303 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
304 "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull (no-reposimplestore !)
304 "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !)
305 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull (no-reposimplestore !)
305 "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !)
306 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
306 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
307 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
307 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
308 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
308 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
309 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
309 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
310 "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull
310 "GET /?cmd=capabilities HTTP/1.1" 401 -
311 "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull
311 "GET /?cmd=capabilities HTTP/1.1" 401 -
312 "GET /?cmd=capabilities HTTP/1.1" 403 - x-hgproto-1:partial-pull
312 "GET /?cmd=capabilities HTTP/1.1" 403 -
313 "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull
313 "GET /?cmd=capabilities HTTP/1.1" 401 -
314 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull
314 "GET /?cmd=capabilities HTTP/1.1" 200 -
315 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
315 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
316 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
316 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
317 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
317 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
318 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
318 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
319 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
319 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
320 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
320 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
321 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+5eb5abfefeea63c80dd7553bcc3783f37e0c5524* (glob)
321 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+5eb5abfefeea63c80dd7553bcc3783f37e0c5524* (glob)
322 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
322 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
323
323
324 $ cd ..
324 $ cd ..
325
325
326 clone of serve with repo in root and unserved subrepo (issue2970)
326 clone of serve with repo in root and unserved subrepo (issue2970)
327
327
328 $ hg --cwd test init sub
328 $ hg --cwd test init sub
329 $ echo empty > test/sub/empty
329 $ echo empty > test/sub/empty
330 $ hg --cwd test/sub add empty
330 $ hg --cwd test/sub add empty
331 $ hg --cwd test/sub commit -qm 'add empty'
331 $ hg --cwd test/sub commit -qm 'add empty'
332 $ hg --cwd test/sub tag -r 0 something
332 $ hg --cwd test/sub tag -r 0 something
333 $ echo sub = sub > test/.hgsub
333 $ echo sub = sub > test/.hgsub
334 $ hg --cwd test add .hgsub
334 $ hg --cwd test add .hgsub
335 $ hg --cwd test commit -qm 'add subrepo'
335 $ hg --cwd test commit -qm 'add subrepo'
336 $ hg clone http://localhost:$HGPORT noslash-clone
336 $ hg clone http://localhost:$HGPORT noslash-clone
337 requesting all changes
337 requesting all changes
338 adding changesets
338 adding changesets
339 adding manifests
339 adding manifests
340 adding file changes
340 adding file changes
341 added 3 changesets with 7 changes to 7 files
341 added 3 changesets with 7 changes to 7 files
342 new changesets 8b6053c928fe:56f9bc90cce6
342 new changesets 8b6053c928fe:56f9bc90cce6
343 updating to branch default
343 updating to branch default
344 abort: HTTP Error 404: Not Found
344 abort: HTTP Error 404: Not Found
345 [255]
345 [255]
346 $ hg clone http://localhost:$HGPORT/ slash-clone
346 $ hg clone http://localhost:$HGPORT/ slash-clone
347 requesting all changes
347 requesting all changes
348 adding changesets
348 adding changesets
349 adding manifests
349 adding manifests
350 adding file changes
350 adding file changes
351 added 3 changesets with 7 changes to 7 files
351 added 3 changesets with 7 changes to 7 files
352 new changesets 8b6053c928fe:56f9bc90cce6
352 new changesets 8b6053c928fe:56f9bc90cce6
353 updating to branch default
353 updating to branch default
354 abort: HTTP Error 404: Not Found
354 abort: HTTP Error 404: Not Found
355 [255]
355 [255]
356
356
357 check error log
357 check error log
358
358
359 $ cat error.log
359 $ cat error.log
360
360
361 Check error reporting while pulling/cloning
361 Check error reporting while pulling/cloning
362
362
363 $ $RUNTESTDIR/killdaemons.py
363 $ $RUNTESTDIR/killdaemons.py
364 $ hg serve -R test -p $HGPORT -d --pid-file=hg3.pid -E error.log --config extensions.crash=${TESTDIR}/crashgetbundler.py
364 $ hg serve -R test -p $HGPORT -d --pid-file=hg3.pid -E error.log --config extensions.crash=${TESTDIR}/crashgetbundler.py
365 $ cat hg3.pid >> $DAEMON_PIDS
365 $ cat hg3.pid >> $DAEMON_PIDS
366 $ hg clone http://localhost:$HGPORT/ abort-clone
366 $ hg clone http://localhost:$HGPORT/ abort-clone
367 requesting all changes
367 requesting all changes
368 abort: remote error:
368 abort: remote error:
369 this is an exercise
369 this is an exercise
370 [255]
370 [255]
371 $ cat error.log
371 $ cat error.log
372
372
373 disable pull-based clones
373 disable pull-based clones
374
374
375 $ hg serve -R test -p $HGPORT1 -d --pid-file=hg4.pid -E error.log --config server.disablefullbundle=True
375 $ hg serve -R test -p $HGPORT1 -d --pid-file=hg4.pid -E error.log --config server.disablefullbundle=True
376 $ cat hg4.pid >> $DAEMON_PIDS
376 $ cat hg4.pid >> $DAEMON_PIDS
377 $ hg clone http://localhost:$HGPORT1/ disable-pull-clone
377 $ hg clone http://localhost:$HGPORT1/ disable-pull-clone
378 requesting all changes
378 requesting all changes
379 abort: remote error:
379 abort: remote error:
380 server has pull-based clones disabled
380 server has pull-based clones disabled
381 [255]
381 [255]
382
382
383 #if no-reposimplestore
383 #if no-reposimplestore
384 ... but keep stream clones working
384 ... but keep stream clones working
385
385
386 $ hg clone --stream --noupdate http://localhost:$HGPORT1/ test-stream-clone
386 $ hg clone --stream --noupdate http://localhost:$HGPORT1/ test-stream-clone
387 streaming all changes
387 streaming all changes
388 * files to transfer, * of data (glob)
388 * files to transfer, * of data (glob)
389 transferred * in * seconds (* KB/sec) (glob)
389 transferred * in * seconds (* KB/sec) (glob)
390 searching for changes
390 searching for changes
391 no changes found
391 no changes found
392 #endif
392 #endif
393
393
394 ... and also keep partial clones and pulls working
394 ... and also keep partial clones and pulls working
395 $ hg clone http://localhost:$HGPORT1 --rev 0 test-partial-clone
395 $ hg clone http://localhost:$HGPORT1 --rev 0 test-partial-clone
396 adding changesets
396 adding changesets
397 adding manifests
397 adding manifests
398 adding file changes
398 adding file changes
399 added 1 changesets with 4 changes to 4 files
399 added 1 changesets with 4 changes to 4 files
400 new changesets 8b6053c928fe
400 new changesets 8b6053c928fe
401 updating to branch default
401 updating to branch default
402 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
402 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
403 $ hg pull -R test-partial-clone
403 $ hg pull -R test-partial-clone
404 pulling from http://localhost:$HGPORT1/
404 pulling from http://localhost:$HGPORT1/
405 searching for changes
405 searching for changes
406 adding changesets
406 adding changesets
407 adding manifests
407 adding manifests
408 adding file changes
408 adding file changes
409 added 2 changesets with 3 changes to 3 files
409 added 2 changesets with 3 changes to 3 files
410 new changesets 5fed3813f7f5:56f9bc90cce6
410 new changesets 5fed3813f7f5:56f9bc90cce6
411 (run 'hg update' to get a working copy)
411 (run 'hg update' to get a working copy)
412
412
413 $ cat error.log
413 $ cat error.log
@@ -1,241 +1,239 b''
1 $ cat >> $HGRCPATH << EOF
1 $ cat >> $HGRCPATH << EOF
2 > [web]
2 > [web]
3 > push_ssl = false
3 > push_ssl = false
4 > allow_push = *
4 > allow_push = *
5 > EOF
5 > EOF
6
6
7 $ hg init server
7 $ hg init server
8 $ cd server
8 $ cd server
9 $ touch a
9 $ touch a
10 $ hg -q commit -A -m initial
10 $ hg -q commit -A -m initial
11 $ cd ..
11 $ cd ..
12
12
13 $ hg serve -R server -p $HGPORT -d --pid-file hg.pid
13 $ hg serve -R server -p $HGPORT -d --pid-file hg.pid
14 $ cat hg.pid >> $DAEMON_PIDS
14 $ cat hg.pid >> $DAEMON_PIDS
15
15
16 compression formats are advertised in compression capability
16 compression formats are advertised in compression capability
17
17
18 #if zstd
18 #if zstd
19 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=zstd,zlib$' > /dev/null
19 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=zstd,zlib$' > /dev/null
20 #else
20 #else
21 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=zlib$' > /dev/null
21 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=zlib$' > /dev/null
22 #endif
22 #endif
23
23
24 $ killdaemons.py
24 $ killdaemons.py
25
25
26 server.compressionengines can replace engines list wholesale
26 server.compressionengines can replace engines list wholesale
27
27
28 $ hg serve --config server.compressionengines=none -R server -p $HGPORT -d --pid-file hg.pid
28 $ hg serve --config server.compressionengines=none -R server -p $HGPORT -d --pid-file hg.pid
29 $ cat hg.pid > $DAEMON_PIDS
29 $ cat hg.pid > $DAEMON_PIDS
30 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=none$' > /dev/null
30 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=none$' > /dev/null
31
31
32 $ killdaemons.py
32 $ killdaemons.py
33
33
34 Order of engines can also change
34 Order of engines can also change
35
35
36 $ hg serve --config server.compressionengines=none,zlib -R server -p $HGPORT -d --pid-file hg.pid
36 $ hg serve --config server.compressionengines=none,zlib -R server -p $HGPORT -d --pid-file hg.pid
37 $ cat hg.pid > $DAEMON_PIDS
37 $ cat hg.pid > $DAEMON_PIDS
38 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=none,zlib$' > /dev/null
38 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=none,zlib$' > /dev/null
39
39
40 $ killdaemons.py
40 $ killdaemons.py
41
41
42 Start a default server again
42 Start a default server again
43
43
44 $ hg serve -R server -p $HGPORT -d --pid-file hg.pid
44 $ hg serve -R server -p $HGPORT -d --pid-file hg.pid
45 $ cat hg.pid > $DAEMON_PIDS
45 $ cat hg.pid > $DAEMON_PIDS
46
46
47 Server should send application/mercurial-0.1 to clients if no Accept is used
47 Server should send application/mercurial-0.1 to clients if no Accept is used
48
48
49 $ get-with-headers.py --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' -
49 $ get-with-headers.py --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' -
50 200 Script output follows
50 200 Script output follows
51 content-type: application/mercurial-0.1
51 content-type: application/mercurial-0.1
52 date: $HTTP_DATE$
52 date: $HTTP_DATE$
53 server: testing stub value
53 server: testing stub value
54 transfer-encoding: chunked
54 transfer-encoding: chunked
55
55
56 Server should send application/mercurial-0.1 when client says it wants it
56 Server should send application/mercurial-0.1 when client says it wants it
57
57
58 $ get-with-headers.py --hgproto '0.1' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' -
58 $ get-with-headers.py --hgproto '0.1' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' -
59 200 Script output follows
59 200 Script output follows
60 content-type: application/mercurial-0.1
60 content-type: application/mercurial-0.1
61 date: $HTTP_DATE$
61 date: $HTTP_DATE$
62 server: testing stub value
62 server: testing stub value
63 transfer-encoding: chunked
63 transfer-encoding: chunked
64
64
65 Server should send application/mercurial-0.2 when client says it wants it
65 Server should send application/mercurial-0.2 when client says it wants it
66
66
67 $ get-with-headers.py --hgproto '0.2' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' -
67 $ get-with-headers.py --hgproto '0.2' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' -
68 200 Script output follows
68 200 Script output follows
69 content-type: application/mercurial-0.2
69 content-type: application/mercurial-0.2
70 date: $HTTP_DATE$
70 date: $HTTP_DATE$
71 server: testing stub value
71 server: testing stub value
72 transfer-encoding: chunked
72 transfer-encoding: chunked
73
73
74 $ get-with-headers.py --hgproto '0.1 0.2' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' -
74 $ get-with-headers.py --hgproto '0.1 0.2' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' -
75 200 Script output follows
75 200 Script output follows
76 content-type: application/mercurial-0.2
76 content-type: application/mercurial-0.2
77 date: $HTTP_DATE$
77 date: $HTTP_DATE$
78 server: testing stub value
78 server: testing stub value
79 transfer-encoding: chunked
79 transfer-encoding: chunked
80
80
81 Requesting a compression format that server doesn't support results will fall back to 0.1
81 Requesting a compression format that server doesn't support results will fall back to 0.1
82
82
83 $ get-with-headers.py --hgproto '0.2 comp=aa' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' -
83 $ get-with-headers.py --hgproto '0.2 comp=aa' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' -
84 200 Script output follows
84 200 Script output follows
85 content-type: application/mercurial-0.1
85 content-type: application/mercurial-0.1
86 date: $HTTP_DATE$
86 date: $HTTP_DATE$
87 server: testing stub value
87 server: testing stub value
88 transfer-encoding: chunked
88 transfer-encoding: chunked
89
89
90 #if zstd
90 #if zstd
91 zstd is used if available
91 zstd is used if available
92
92
93 $ get-with-headers.py --hgproto '0.2 comp=zstd' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp
93 $ get-with-headers.py --hgproto '0.2 comp=zstd' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp
94 $ f --size --hexdump --bytes 36 --sha1 resp
94 $ f --size --hexdump --bytes 36 --sha1 resp
95 resp: size=248, sha1=4d8d8f87fb82bd542ce52881fdc94f850748
95 resp: size=248, sha1=4d8d8f87fb82bd542ce52881fdc94f850748
96 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu|
96 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu|
97 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 7a 73 74 64 |t follows...zstd|
97 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 7a 73 74 64 |t follows...zstd|
98 0020: 28 b5 2f fd |(./.|
98 0020: 28 b5 2f fd |(./.|
99
99
100 #endif
100 #endif
101
101
102 application/mercurial-0.2 is not yet used on non-streaming responses
102 application/mercurial-0.2 is not yet used on non-streaming responses
103
103
104 $ get-with-headers.py --hgproto '0.2' $LOCALIP:$HGPORT '?cmd=heads' -
104 $ get-with-headers.py --hgproto '0.2' $LOCALIP:$HGPORT '?cmd=heads' -
105 200 Script output follows
105 200 Script output follows
106 content-length: 41
106 content-length: 41
107 content-type: application/mercurial-0.1
107 content-type: application/mercurial-0.1
108 date: $HTTP_DATE$
108 date: $HTTP_DATE$
109 server: testing stub value
109 server: testing stub value
110
110
111 e93700bd72895c5addab234c56d4024b487a362f
111 e93700bd72895c5addab234c56d4024b487a362f
112
112
113 Now test protocol preference usage
113 Now test protocol preference usage
114
114
115 $ killdaemons.py
115 $ killdaemons.py
116 $ hg serve --config server.compressionengines=none,zlib -R server -p $HGPORT -d --pid-file hg.pid
116 $ hg serve --config server.compressionengines=none,zlib -R server -p $HGPORT -d --pid-file hg.pid
117 $ cat hg.pid > $DAEMON_PIDS
117 $ cat hg.pid > $DAEMON_PIDS
118
118
119 No Accept will send 0.1+zlib, even though "none" is preferred b/c "none" isn't supported on 0.1
119 No Accept will send 0.1+zlib, even though "none" is preferred b/c "none" isn't supported on 0.1
120
120
121 $ get-with-headers.py --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' Content-Type
121 $ get-with-headers.py --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' Content-Type
122 200 Script output follows
122 200 Script output follows
123 content-type: application/mercurial-0.1
123 content-type: application/mercurial-0.1
124
124
125 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp
125 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp
126 $ f --size --hexdump --bytes 28 --sha1 resp
126 $ f --size --hexdump --bytes 28 --sha1 resp
127 resp: size=227, sha1=35a4c074da74f32f5440da3cbf04
127 resp: size=227, sha1=35a4c074da74f32f5440da3cbf04
128 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu|
128 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu|
129 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 78 |t follows..x|
129 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 78 |t follows..x|
130
130
131 Explicit 0.1 will send zlib because "none" isn't supported on 0.1
131 Explicit 0.1 will send zlib because "none" isn't supported on 0.1
132
132
133 $ get-with-headers.py --hgproto '0.1' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp
133 $ get-with-headers.py --hgproto '0.1' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp
134 $ f --size --hexdump --bytes 28 --sha1 resp
134 $ f --size --hexdump --bytes 28 --sha1 resp
135 resp: size=227, sha1=35a4c074da74f32f5440da3cbf04
135 resp: size=227, sha1=35a4c074da74f32f5440da3cbf04
136 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu|
136 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu|
137 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 78 |t follows..x|
137 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 78 |t follows..x|
138
138
139 0.2 with no compression will get "none" because that is server's preference
139 0.2 with no compression will get "none" because that is server's preference
140 (spec says ZL and UN are implicitly supported)
140 (spec says ZL and UN are implicitly supported)
141
141
142 $ get-with-headers.py --hgproto '0.2' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp
142 $ get-with-headers.py --hgproto '0.2' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp
143 $ f --size --hexdump --bytes 32 --sha1 resp
143 $ f --size --hexdump --bytes 32 --sha1 resp
144 resp: size=432, sha1=ac931b412ec185a02e0e5bcff98dac83
144 resp: size=432, sha1=ac931b412ec185a02e0e5bcff98dac83
145 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu|
145 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu|
146 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 6e 6f 6e 65 |t follows...none|
146 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 6e 6f 6e 65 |t follows...none|
147
147
148 Client receives server preference even if local order doesn't match
148 Client receives server preference even if local order doesn't match
149
149
150 $ get-with-headers.py --hgproto '0.2 comp=zlib,none' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp
150 $ get-with-headers.py --hgproto '0.2 comp=zlib,none' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp
151 $ f --size --hexdump --bytes 32 --sha1 resp
151 $ f --size --hexdump --bytes 32 --sha1 resp
152 resp: size=432, sha1=ac931b412ec185a02e0e5bcff98dac83
152 resp: size=432, sha1=ac931b412ec185a02e0e5bcff98dac83
153 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu|
153 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu|
154 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 6e 6f 6e 65 |t follows...none|
154 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 6e 6f 6e 65 |t follows...none|
155
155
156 Client receives only supported format even if not server preferred format
156 Client receives only supported format even if not server preferred format
157
157
158 $ get-with-headers.py --hgproto '0.2 comp=zlib' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp
158 $ get-with-headers.py --hgproto '0.2 comp=zlib' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp
159 $ f --size --hexdump --bytes 33 --sha1 resp
159 $ f --size --hexdump --bytes 33 --sha1 resp
160 resp: size=232, sha1=a1c727f0c9693ca15742a75c30419bc36
160 resp: size=232, sha1=a1c727f0c9693ca15742a75c30419bc36
161 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu|
161 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu|
162 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 7a 6c 69 62 |t follows...zlib|
162 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 7a 6c 69 62 |t follows...zlib|
163 0020: 78 |x|
163 0020: 78 |x|
164
164
165 $ killdaemons.py
165 $ killdaemons.py
166 $ cd ..
166 $ cd ..
167
167
168 Test listkeys for listing namespaces
168 Test listkeys for listing namespaces
169
169
170 $ hg init empty
170 $ hg init empty
171 $ hg -R empty serve -p $HGPORT -d --pid-file hg.pid
171 $ hg -R empty serve -p $HGPORT -d --pid-file hg.pid
172 $ cat hg.pid > $DAEMON_PIDS
172 $ cat hg.pid > $DAEMON_PIDS
173
173
174 $ hg --verbose debugwireproto http://$LOCALIP:$HGPORT << EOF
174 $ hg --verbose debugwireproto http://$LOCALIP:$HGPORT << EOF
175 > command listkeys
175 > command listkeys
176 > namespace namespaces
176 > namespace namespaces
177 > EOF
177 > EOF
178 s> GET /?cmd=capabilities HTTP/1.1\r\n
178 s> GET /?cmd=capabilities HTTP/1.1\r\n
179 s> Accept-Encoding: identity\r\n
179 s> Accept-Encoding: identity\r\n
180 s> vary: X-HgProto-1\r\n
181 s> x-hgproto-1: partial-pull\r\n
182 s> accept: application/mercurial-0.1\r\n
180 s> accept: application/mercurial-0.1\r\n
183 s> host: $LOCALIP:$HGPORT\r\n (glob)
181 s> host: $LOCALIP:$HGPORT\r\n (glob)
184 s> user-agent: Mercurial debugwireproto\r\n
182 s> user-agent: Mercurial debugwireproto\r\n
185 s> \r\n
183 s> \r\n
186 s> makefile('rb', None)
184 s> makefile('rb', None)
187 s> HTTP/1.1 200 Script output follows\r\n
185 s> HTTP/1.1 200 Script output follows\r\n
188 s> Server: testing stub value\r\n
186 s> Server: testing stub value\r\n
189 s> Date: $HTTP_DATE$\r\n
187 s> Date: $HTTP_DATE$\r\n
190 s> Content-Type: application/mercurial-0.1\r\n
188 s> Content-Type: application/mercurial-0.1\r\n
191 s> Content-Length: *\r\n (glob)
189 s> Content-Length: *\r\n (glob)
192 s> \r\n
190 s> \r\n
193 s> batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
191 s> batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
194 sending listkeys command
192 sending listkeys command
195 s> GET /?cmd=listkeys HTTP/1.1\r\n
193 s> GET /?cmd=listkeys HTTP/1.1\r\n
196 s> Accept-Encoding: identity\r\n
194 s> Accept-Encoding: identity\r\n
197 s> vary: X-HgArg-1,X-HgProto-1\r\n
195 s> vary: X-HgArg-1,X-HgProto-1\r\n
198 s> x-hgarg-1: namespace=namespaces\r\n
196 s> x-hgarg-1: namespace=namespaces\r\n
199 s> x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
197 s> x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
200 s> accept: application/mercurial-0.1\r\n
198 s> accept: application/mercurial-0.1\r\n
201 s> host: $LOCALIP:$HGPORT\r\n (glob)
199 s> host: $LOCALIP:$HGPORT\r\n (glob)
202 s> user-agent: Mercurial debugwireproto\r\n
200 s> user-agent: Mercurial debugwireproto\r\n
203 s> \r\n
201 s> \r\n
204 s> makefile('rb', None)
202 s> makefile('rb', None)
205 s> HTTP/1.1 200 Script output follows\r\n
203 s> HTTP/1.1 200 Script output follows\r\n
206 s> Server: testing stub value\r\n
204 s> Server: testing stub value\r\n
207 s> Date: $HTTP_DATE$\r\n
205 s> Date: $HTTP_DATE$\r\n
208 s> Content-Type: application/mercurial-0.1\r\n
206 s> Content-Type: application/mercurial-0.1\r\n
209 s> Content-Length: 30\r\n
207 s> Content-Length: 30\r\n
210 s> \r\n
208 s> \r\n
211 s> bookmarks\t\n
209 s> bookmarks\t\n
212 s> namespaces\t\n
210 s> namespaces\t\n
213 s> phases\t
211 s> phases\t
214 response: b'bookmarks\t\nnamespaces\t\nphases\t'
212 response: b'bookmarks\t\nnamespaces\t\nphases\t'
215
213
216 Same thing, but with "httprequest" command
214 Same thing, but with "httprequest" command
217
215
218 $ hg --verbose debugwireproto --peer raw http://$LOCALIP:$HGPORT << EOF
216 $ hg --verbose debugwireproto --peer raw http://$LOCALIP:$HGPORT << EOF
219 > httprequest GET ?cmd=listkeys
217 > httprequest GET ?cmd=listkeys
220 > user-agent: test
218 > user-agent: test
221 > x-hgarg-1: namespace=namespaces
219 > x-hgarg-1: namespace=namespaces
222 > EOF
220 > EOF
223 using raw connection to peer
221 using raw connection to peer
224 s> GET /?cmd=listkeys HTTP/1.1\r\n
222 s> GET /?cmd=listkeys HTTP/1.1\r\n
225 s> Accept-Encoding: identity\r\n
223 s> Accept-Encoding: identity\r\n
226 s> user-agent: test\r\n
224 s> user-agent: test\r\n
227 s> x-hgarg-1: namespace=namespaces\r\n
225 s> x-hgarg-1: namespace=namespaces\r\n
228 s> host: $LOCALIP:$HGPORT\r\n (glob)
226 s> host: $LOCALIP:$HGPORT\r\n (glob)
229 s> \r\n
227 s> \r\n
230 s> makefile('rb', None)
228 s> makefile('rb', None)
231 s> HTTP/1.1 200 Script output follows\r\n
229 s> HTTP/1.1 200 Script output follows\r\n
232 s> Server: testing stub value\r\n
230 s> Server: testing stub value\r\n
233 s> Date: $HTTP_DATE$\r\n
231 s> Date: $HTTP_DATE$\r\n
234 s> Content-Type: application/mercurial-0.1\r\n
232 s> Content-Type: application/mercurial-0.1\r\n
235 s> Content-Length: 30\r\n
233 s> Content-Length: 30\r\n
236 s> \r\n
234 s> \r\n
237 s> bookmarks\t\n
235 s> bookmarks\t\n
238 s> namespaces\t\n
236 s> namespaces\t\n
239 s> phases\t
237 s> phases\t
240
238
241 $ killdaemons.py
239 $ killdaemons.py
@@ -1,126 +1,126 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 2>proxy.log >/dev/null </dev/null &
11 $ tinyproxy.py $HGPORT1 localhost 2>proxy.log >/dev/null </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 --stream http://localhost:$HGPORT/ b
17 $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone --stream http://localhost:$HGPORT/ b
18 streaming all changes
18 streaming all changes
19 3 files to transfer, 303 bytes of data (reporevlogstore !)
19 3 files to transfer, 303 bytes of data (reporevlogstore !)
20 4 files to transfer, 330 bytes of data (reposimplestore !)
20 4 files to transfer, 330 bytes of data (reposimplestore !)
21 transferred * bytes in * seconds (*/sec) (glob)
21 transferred * bytes in * seconds (*/sec) (glob)
22 searching for changes
22 searching for changes
23 no changes found
23 no changes found
24 updating to branch default
24 updating to branch default
25 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
25 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
26 $ cd b
26 $ cd b
27 $ hg verify
27 $ hg verify
28 checking changesets
28 checking changesets
29 checking manifests
29 checking manifests
30 crosschecking files in changesets and manifests
30 crosschecking files in changesets and manifests
31 checking files
31 checking files
32 1 files, 1 changesets, 1 total revisions
32 1 files, 1 changesets, 1 total revisions
33 $ cd ..
33 $ cd ..
34
34
35 url for proxy, pull
35 url for proxy, pull
36
36
37 $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone http://localhost:$HGPORT/ b-pull
37 $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone http://localhost:$HGPORT/ b-pull
38 requesting all changes
38 requesting all changes
39 adding changesets
39 adding changesets
40 adding manifests
40 adding manifests
41 adding file changes
41 adding file changes
42 added 1 changesets with 1 changes to 1 files
42 added 1 changesets with 1 changes to 1 files
43 new changesets 83180e7845de
43 new changesets 83180e7845de
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 $ cd b-pull
46 $ cd b-pull
47 $ hg verify
47 $ hg verify
48 checking changesets
48 checking changesets
49 checking manifests
49 checking manifests
50 crosschecking files in changesets and manifests
50 crosschecking files in changesets and manifests
51 checking files
51 checking files
52 1 files, 1 changesets, 1 total revisions
52 1 files, 1 changesets, 1 total revisions
53 $ cd ..
53 $ cd ..
54
54
55 host:port for proxy
55 host:port for proxy
56
56
57 $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ c
57 $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ c
58 requesting all changes
58 requesting all changes
59 adding changesets
59 adding changesets
60 adding manifests
60 adding manifests
61 adding file changes
61 adding file changes
62 added 1 changesets with 1 changes to 1 files
62 added 1 changesets with 1 changes to 1 files
63 new changesets 83180e7845de
63 new changesets 83180e7845de
64 updating to branch default
64 updating to branch default
65 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
65 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
66
66
67 proxy url with user name and password
67 proxy url with user name and password
68
68
69 $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ d
69 $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ d
70 requesting all changes
70 requesting all changes
71 adding changesets
71 adding changesets
72 adding manifests
72 adding manifests
73 adding file changes
73 adding file changes
74 added 1 changesets with 1 changes to 1 files
74 added 1 changesets with 1 changes to 1 files
75 new changesets 83180e7845de
75 new changesets 83180e7845de
76 updating to branch default
76 updating to branch default
77 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
77 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
78
78
79 url with user name and password
79 url with user name and password
80
80
81 $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://user:passwd@localhost:$HGPORT/ e
81 $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://user:passwd@localhost:$HGPORT/ e
82 requesting all changes
82 requesting all changes
83 adding changesets
83 adding changesets
84 adding manifests
84 adding manifests
85 adding file changes
85 adding file changes
86 added 1 changesets with 1 changes to 1 files
86 added 1 changesets with 1 changes to 1 files
87 new changesets 83180e7845de
87 new changesets 83180e7845de
88 updating to branch default
88 updating to branch default
89 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
89 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
90
90
91 bad host:port for proxy ("Protocol not supported" can happen on
91 bad host:port for proxy ("Protocol not supported" can happen on
92 misconfigured hosts)
92 misconfigured hosts)
93
93
94 $ http_proxy=localhost:$HGPORT2 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ f
94 $ http_proxy=localhost:$HGPORT2 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ f
95 abort: error: (Connection refused|Protocol not supported|.* actively refused it|Cannot assign requested address) (re)
95 abort: error: (Connection refused|Protocol not supported|.* actively refused it|Cannot assign requested address) (re)
96 [255]
96 [255]
97
97
98 do not use the proxy if it is in the no list
98 do not use the proxy if it is in the no list
99
99
100 $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.no=localhost http://localhost:$HGPORT/ g
100 $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.no=localhost http://localhost:$HGPORT/ g
101 requesting all changes
101 requesting all changes
102 adding changesets
102 adding changesets
103 adding manifests
103 adding manifests
104 adding file changes
104 adding file changes
105 added 1 changesets with 1 changes to 1 files
105 added 1 changesets with 1 changes to 1 files
106 new changesets 83180e7845de
106 new changesets 83180e7845de
107 updating to branch default
107 updating to branch default
108 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
108 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
109 $ cat proxy.log
109 $ cat proxy.log
110 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - x-hgproto-1:partial-pull (glob)
110 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
111 $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=branchmap HTTP/1.1" - - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
111 $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=branchmap HTTP/1.1" - - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
112 $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=stream_out HTTP/1.1" - - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
112 $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=stream_out HTTP/1.1" - - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
113 $LOCALIP - - [$LOGDATE$] "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=$USUAL_COMPRESSIONS$ partial-pull (glob)
113 $LOCALIP - - [$LOGDATE$] "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=$USUAL_COMPRESSIONS$ partial-pull (glob)
114 $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=83180e7845de420a1bb46896fd5fe05294f8d629&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
114 $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=83180e7845de420a1bb46896fd5fe05294f8d629&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
115 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - x-hgproto-1:partial-pull (glob)
115 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
116 $LOCALIP - - [$LOGDATE$] "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=$USUAL_COMPRESSIONS$ partial-pull (glob)
116 $LOCALIP - - [$LOGDATE$] "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=$USUAL_COMPRESSIONS$ partial-pull (glob)
117 $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
117 $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
118 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - x-hgproto-1:partial-pull (glob)
118 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
119 $LOCALIP - - [$LOGDATE$] "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=$USUAL_COMPRESSIONS$ partial-pull (glob)
119 $LOCALIP - - [$LOGDATE$] "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=$USUAL_COMPRESSIONS$ partial-pull (glob)
120 $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
120 $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
121 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - x-hgproto-1:partial-pull (glob)
121 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
122 $LOCALIP - - [$LOGDATE$] "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=$USUAL_COMPRESSIONS$ partial-pull (glob)
122 $LOCALIP - - [$LOGDATE$] "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=$USUAL_COMPRESSIONS$ partial-pull (glob)
123 $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
123 $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
124 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - x-hgproto-1:partial-pull (glob)
124 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
125 $LOCALIP - - [$LOGDATE$] "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=$USUAL_COMPRESSIONS$ partial-pull (glob)
125 $LOCALIP - - [$LOGDATE$] "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=$USUAL_COMPRESSIONS$ partial-pull (glob)
126 $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
126 $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
@@ -1,565 +1,563 b''
1 #require killdaemons serve
1 #require killdaemons 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 $ hg serve -p $HGPORT1 2>&1
20 $ hg serve -p $HGPORT1 2>&1
21 abort: cannot start server at 'localhost:$HGPORT1': $EADDRINUSE$
21 abort: cannot start server at 'localhost:$HGPORT1': $EADDRINUSE$
22 [255]
22 [255]
23
23
24 $ cd ..
24 $ cd ..
25 $ cat hg1.pid hg2.pid >> $DAEMON_PIDS
25 $ cat hg1.pid hg2.pid >> $DAEMON_PIDS
26
26
27 clone via stream
27 clone via stream
28
28
29 #if no-reposimplestore
29 #if no-reposimplestore
30 $ hg clone --stream http://localhost:$HGPORT/ copy 2>&1
30 $ hg clone --stream http://localhost:$HGPORT/ copy 2>&1
31 streaming all changes
31 streaming all changes
32 6 files to transfer, 606 bytes of data
32 6 files to transfer, 606 bytes of data
33 transferred * bytes in * seconds (*/sec) (glob)
33 transferred * bytes in * seconds (*/sec) (glob)
34 searching for changes
34 searching for changes
35 no changes found
35 no changes found
36 updating to branch default
36 updating to branch default
37 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
37 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
38 $ hg verify -R copy
38 $ hg verify -R copy
39 checking changesets
39 checking changesets
40 checking manifests
40 checking manifests
41 crosschecking files in changesets and manifests
41 crosschecking files in changesets and manifests
42 checking files
42 checking files
43 4 files, 1 changesets, 4 total revisions
43 4 files, 1 changesets, 4 total revisions
44 #endif
44 #endif
45
45
46 try to clone via stream, should use pull instead
46 try to clone via stream, should use pull instead
47
47
48 $ hg clone --stream http://localhost:$HGPORT1/ copy2
48 $ hg clone --stream http://localhost:$HGPORT1/ copy2
49 warning: stream clone requested but server has them disabled
49 warning: stream clone requested but server has them disabled
50 requesting all changes
50 requesting all changes
51 adding changesets
51 adding changesets
52 adding manifests
52 adding manifests
53 adding file changes
53 adding file changes
54 added 1 changesets with 4 changes to 4 files
54 added 1 changesets with 4 changes to 4 files
55 new changesets 8b6053c928fe
55 new changesets 8b6053c928fe
56 updating to branch default
56 updating to branch default
57 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
57 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
58
58
59 try to clone via stream but missing requirements, so should use pull instead
59 try to clone via stream but missing requirements, so should use pull instead
60
60
61 $ cat > $TESTTMP/removesupportedformat.py << EOF
61 $ cat > $TESTTMP/removesupportedformat.py << EOF
62 > from mercurial import localrepo
62 > from mercurial import localrepo
63 > def extsetup(ui):
63 > def extsetup(ui):
64 > localrepo.localrepository.supportedformats.remove('generaldelta')
64 > localrepo.localrepository.supportedformats.remove('generaldelta')
65 > EOF
65 > EOF
66
66
67 $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --stream http://localhost:$HGPORT/ copy3
67 $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --stream http://localhost:$HGPORT/ copy3
68 warning: stream clone requested but client is missing requirements: generaldelta
68 warning: stream clone requested but client is missing requirements: generaldelta
69 (see https://www.mercurial-scm.org/wiki/MissingRequirement for more information)
69 (see https://www.mercurial-scm.org/wiki/MissingRequirement for more information)
70 requesting all changes
70 requesting all changes
71 adding changesets
71 adding changesets
72 adding manifests
72 adding manifests
73 adding file changes
73 adding file changes
74 added 1 changesets with 4 changes to 4 files
74 added 1 changesets with 4 changes to 4 files
75 new changesets 8b6053c928fe
75 new changesets 8b6053c928fe
76 updating to branch default
76 updating to branch default
77 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
77 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
78
78
79 clone via pull
79 clone via pull
80
80
81 $ hg clone http://localhost:$HGPORT1/ copy-pull
81 $ hg clone http://localhost:$HGPORT1/ copy-pull
82 requesting all changes
82 requesting all changes
83 adding changesets
83 adding changesets
84 adding manifests
84 adding manifests
85 adding file changes
85 adding file changes
86 added 1 changesets with 4 changes to 4 files
86 added 1 changesets with 4 changes to 4 files
87 new changesets 8b6053c928fe
87 new changesets 8b6053c928fe
88 updating to branch default
88 updating to branch default
89 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
89 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
90 $ hg verify -R copy-pull
90 $ hg verify -R copy-pull
91 checking changesets
91 checking changesets
92 checking manifests
92 checking manifests
93 crosschecking files in changesets and manifests
93 crosschecking files in changesets and manifests
94 checking files
94 checking files
95 4 files, 1 changesets, 4 total revisions
95 4 files, 1 changesets, 4 total revisions
96 $ cd test
96 $ cd test
97 $ echo bar > bar
97 $ echo bar > bar
98 $ hg commit -A -d '1 0' -m 2
98 $ hg commit -A -d '1 0' -m 2
99 adding bar
99 adding bar
100 $ cd ..
100 $ cd ..
101
101
102 clone over http with --update
102 clone over http with --update
103
103
104 $ hg clone http://localhost:$HGPORT1/ updated --update 0
104 $ hg clone http://localhost:$HGPORT1/ updated --update 0
105 requesting all changes
105 requesting all changes
106 adding changesets
106 adding changesets
107 adding manifests
107 adding manifests
108 adding file changes
108 adding file changes
109 added 2 changesets with 5 changes to 5 files
109 added 2 changesets with 5 changes to 5 files
110 new changesets 8b6053c928fe:5fed3813f7f5
110 new changesets 8b6053c928fe:5fed3813f7f5
111 updating to branch default
111 updating to branch default
112 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
112 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
113 $ hg log -r . -R updated
113 $ hg log -r . -R updated
114 changeset: 0:8b6053c928fe
114 changeset: 0:8b6053c928fe
115 user: test
115 user: test
116 date: Thu Jan 01 00:00:00 1970 +0000
116 date: Thu Jan 01 00:00:00 1970 +0000
117 summary: 1
117 summary: 1
118
118
119 $ rm -rf updated
119 $ rm -rf updated
120
120
121 incoming via HTTP
121 incoming via HTTP
122
122
123 $ hg clone http://localhost:$HGPORT1/ --rev 0 partial
123 $ hg clone http://localhost:$HGPORT1/ --rev 0 partial
124 adding changesets
124 adding changesets
125 adding manifests
125 adding manifests
126 adding file changes
126 adding file changes
127 added 1 changesets with 4 changes to 4 files
127 added 1 changesets with 4 changes to 4 files
128 new changesets 8b6053c928fe
128 new changesets 8b6053c928fe
129 updating to branch default
129 updating to branch default
130 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
130 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
131 $ cd partial
131 $ cd partial
132 $ touch LOCAL
132 $ touch LOCAL
133 $ hg ci -qAm LOCAL
133 $ hg ci -qAm LOCAL
134 $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n'
134 $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n'
135 comparing with http://localhost:$HGPORT1/
135 comparing with http://localhost:$HGPORT1/
136 searching for changes
136 searching for changes
137 2
137 2
138 $ cd ..
138 $ cd ..
139
139
140 pull
140 pull
141
141
142 $ cd copy-pull
142 $ cd copy-pull
143 $ cat >> .hg/hgrc <<EOF
143 $ cat >> .hg/hgrc <<EOF
144 > [hooks]
144 > [hooks]
145 > changegroup = sh -c "printenv.py changegroup"
145 > changegroup = sh -c "printenv.py changegroup"
146 > EOF
146 > EOF
147 $ hg pull
147 $ hg pull
148 pulling from http://localhost:$HGPORT1/
148 pulling from http://localhost:$HGPORT1/
149 searching for changes
149 searching for changes
150 adding changesets
150 adding changesets
151 adding manifests
151 adding manifests
152 adding file changes
152 adding file changes
153 added 1 changesets with 1 changes to 1 files
153 added 1 changesets with 1 changes to 1 files
154 new changesets 5fed3813f7f5
154 new changesets 5fed3813f7f5
155 changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_NODE_LAST=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=http://localhost:$HGPORT1/
155 changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_NODE_LAST=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=http://localhost:$HGPORT1/
156 (run 'hg update' to get a working copy)
156 (run 'hg update' to get a working copy)
157 $ cd ..
157 $ cd ..
158
158
159 clone from invalid URL
159 clone from invalid URL
160
160
161 $ hg clone http://localhost:$HGPORT/bad
161 $ hg clone http://localhost:$HGPORT/bad
162 abort: HTTP Error 404: Not Found
162 abort: HTTP Error 404: Not Found
163 [255]
163 [255]
164
164
165 test http authentication
165 test http authentication
166 + use the same server to test server side streaming preference
166 + use the same server to test server side streaming preference
167
167
168 $ cd test
168 $ cd test
169 $ cat << EOT > userpass.py
169 $ cat << EOT > userpass.py
170 > import base64
170 > import base64
171 > from mercurial.hgweb import common
171 > from mercurial.hgweb import common
172 > def perform_authentication(hgweb, req, op):
172 > def perform_authentication(hgweb, req, op):
173 > auth = req.headers.get('Authorization')
173 > auth = req.headers.get('Authorization')
174 > if not auth:
174 > if not auth:
175 > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who',
175 > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who',
176 > [('WWW-Authenticate', 'Basic Realm="mercurial"')])
176 > [('WWW-Authenticate', 'Basic Realm="mercurial"')])
177 > if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']:
177 > if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']:
178 > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no')
178 > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no')
179 > def extsetup():
179 > def extsetup():
180 > common.permhooks.insert(0, perform_authentication)
180 > common.permhooks.insert(0, perform_authentication)
181 > EOT
181 > EOT
182 $ hg serve --config extensions.x=userpass.py -p $HGPORT2 -d --pid-file=pid \
182 $ hg serve --config extensions.x=userpass.py -p $HGPORT2 -d --pid-file=pid \
183 > --config server.preferuncompressed=True \
183 > --config server.preferuncompressed=True \
184 > --config web.push_ssl=False --config web.allow_push=* -A ../access.log
184 > --config web.push_ssl=False --config web.allow_push=* -A ../access.log
185 $ cat pid >> $DAEMON_PIDS
185 $ cat pid >> $DAEMON_PIDS
186
186
187 $ cat << EOF > get_pass.py
187 $ cat << EOF > get_pass.py
188 > import getpass
188 > import getpass
189 > def newgetpass(arg):
189 > def newgetpass(arg):
190 > return "pass"
190 > return "pass"
191 > getpass.getpass = newgetpass
191 > getpass.getpass = newgetpass
192 > EOF
192 > EOF
193
193
194 $ hg id http://localhost:$HGPORT2/
194 $ hg id http://localhost:$HGPORT2/
195 abort: http authorization required for http://localhost:$HGPORT2/
195 abort: http authorization required for http://localhost:$HGPORT2/
196 [255]
196 [255]
197 $ hg id http://localhost:$HGPORT2/
197 $ hg id http://localhost:$HGPORT2/
198 abort: http authorization required for http://localhost:$HGPORT2/
198 abort: http authorization required for http://localhost:$HGPORT2/
199 [255]
199 [255]
200 $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/
200 $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/
201 http authorization required for http://localhost:$HGPORT2/
201 http authorization required for http://localhost:$HGPORT2/
202 realm: mercurial
202 realm: mercurial
203 user: user
203 user: user
204 password: 5fed3813f7f5
204 password: 5fed3813f7f5
205 $ hg id http://user:pass@localhost:$HGPORT2/
205 $ hg id http://user:pass@localhost:$HGPORT2/
206 5fed3813f7f5
206 5fed3813f7f5
207 $ echo '[auth]' >> .hg/hgrc
207 $ echo '[auth]' >> .hg/hgrc
208 $ echo 'l.schemes=http' >> .hg/hgrc
208 $ echo 'l.schemes=http' >> .hg/hgrc
209 $ echo 'l.prefix=lo' >> .hg/hgrc
209 $ echo 'l.prefix=lo' >> .hg/hgrc
210 $ echo 'l.username=user' >> .hg/hgrc
210 $ echo 'l.username=user' >> .hg/hgrc
211 $ echo 'l.password=pass' >> .hg/hgrc
211 $ echo 'l.password=pass' >> .hg/hgrc
212 $ hg id http://localhost:$HGPORT2/
212 $ hg id http://localhost:$HGPORT2/
213 5fed3813f7f5
213 5fed3813f7f5
214 $ hg id http://localhost:$HGPORT2/
214 $ hg id http://localhost:$HGPORT2/
215 5fed3813f7f5
215 5fed3813f7f5
216 $ hg id http://user@localhost:$HGPORT2/
216 $ hg id http://user@localhost:$HGPORT2/
217 5fed3813f7f5
217 5fed3813f7f5
218
218
219 #if no-reposimplestore
219 #if no-reposimplestore
220 $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1
220 $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1
221 streaming all changes
221 streaming all changes
222 7 files to transfer, 916 bytes of data
222 7 files to transfer, 916 bytes of data
223 transferred * bytes in * seconds (*/sec) (glob)
223 transferred * bytes in * seconds (*/sec) (glob)
224 searching for changes
224 searching for changes
225 no changes found
225 no changes found
226 updating to branch default
226 updating to branch default
227 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
227 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
228 #endif
228 #endif
229
229
230 --pull should override server's preferuncompressed
230 --pull should override server's preferuncompressed
231 $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1
231 $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1
232 requesting all changes
232 requesting all changes
233 adding changesets
233 adding changesets
234 adding manifests
234 adding manifests
235 adding file changes
235 adding file changes
236 added 2 changesets with 5 changes to 5 files
236 added 2 changesets with 5 changes to 5 files
237 new changesets 8b6053c928fe:5fed3813f7f5
237 new changesets 8b6053c928fe:5fed3813f7f5
238 updating to branch default
238 updating to branch default
239 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
239 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
240
240
241 $ hg id http://user2@localhost:$HGPORT2/
241 $ hg id http://user2@localhost:$HGPORT2/
242 abort: http authorization required for http://localhost:$HGPORT2/
242 abort: http authorization required for http://localhost:$HGPORT2/
243 [255]
243 [255]
244 $ hg id http://user:pass2@localhost:$HGPORT2/
244 $ hg id http://user:pass2@localhost:$HGPORT2/
245 abort: HTTP Error 403: no
245 abort: HTTP Error 403: no
246 [255]
246 [255]
247
247
248 $ hg -R dest-pull tag -r tip top
248 $ hg -R dest-pull tag -r tip top
249 $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/
249 $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/
250 pushing to http://user:***@localhost:$HGPORT2/
250 pushing to http://user:***@localhost:$HGPORT2/
251 searching for changes
251 searching for changes
252 remote: adding changesets
252 remote: adding changesets
253 remote: adding manifests
253 remote: adding manifests
254 remote: adding file changes
254 remote: adding file changes
255 remote: added 1 changesets with 1 changes to 1 files
255 remote: added 1 changesets with 1 changes to 1 files
256 $ hg rollback -q
256 $ hg rollback -q
257 $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/ --debug --config devel.debug.peer-request=yes
257 $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/ --debug --config devel.debug.peer-request=yes
258 pushing to http://user:***@localhost:$HGPORT2/
258 pushing to http://user:***@localhost:$HGPORT2/
259 using http://localhost:$HGPORT2/
259 using http://localhost:$HGPORT2/
260 http auth: user user, password ****
260 http auth: user user, password ****
261 sending capabilities command
261 sending capabilities command
262 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=capabilities
262 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=capabilities
263 devel-peer-request: Vary X-HgProto-1
264 devel-peer-request: X-hgproto-1 partial-pull
265 http auth: user user, password ****
263 http auth: user user, password ****
266 devel-peer-request: finished in *.???? seconds (200) (glob)
264 devel-peer-request: finished in *.???? seconds (200) (glob)
267 query 1; heads
265 query 1; heads
268 devel-peer-request: batched-content
266 devel-peer-request: batched-content
269 devel-peer-request: - heads (0 arguments)
267 devel-peer-request: - heads (0 arguments)
270 devel-peer-request: - known (1 arguments)
268 devel-peer-request: - known (1 arguments)
271 sending batch command
269 sending batch command
272 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=batch
270 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=batch
273 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
271 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
274 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
272 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
275 devel-peer-request: 68 bytes of commands arguments in headers
273 devel-peer-request: 68 bytes of commands arguments in headers
276 devel-peer-request: finished in *.???? seconds (200) (glob)
274 devel-peer-request: finished in *.???? seconds (200) (glob)
277 searching for changes
275 searching for changes
278 all remote heads known locally
276 all remote heads known locally
279 preparing listkeys for "phases"
277 preparing listkeys for "phases"
280 sending listkeys command
278 sending listkeys command
281 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
279 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
282 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
280 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
283 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
281 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
284 devel-peer-request: 16 bytes of commands arguments in headers
282 devel-peer-request: 16 bytes of commands arguments in headers
285 devel-peer-request: finished in *.???? seconds (200) (glob)
283 devel-peer-request: finished in *.???? seconds (200) (glob)
286 received listkey for "phases": 58 bytes
284 received listkey for "phases": 58 bytes
287 checking for updated bookmarks
285 checking for updated bookmarks
288 preparing listkeys for "bookmarks"
286 preparing listkeys for "bookmarks"
289 sending listkeys command
287 sending listkeys command
290 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
288 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
291 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
289 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
292 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
290 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
293 devel-peer-request: 19 bytes of commands arguments in headers
291 devel-peer-request: 19 bytes of commands arguments in headers
294 devel-peer-request: finished in *.???? seconds (200) (glob)
292 devel-peer-request: finished in *.???? seconds (200) (glob)
295 received listkey for "bookmarks": 0 bytes
293 received listkey for "bookmarks": 0 bytes
296 sending branchmap command
294 sending branchmap command
297 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=branchmap
295 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=branchmap
298 devel-peer-request: Vary X-HgProto-1
296 devel-peer-request: Vary X-HgProto-1
299 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
297 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
300 devel-peer-request: finished in *.???? seconds (200) (glob)
298 devel-peer-request: finished in *.???? seconds (200) (glob)
301 sending branchmap command
299 sending branchmap command
302 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=branchmap
300 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=branchmap
303 devel-peer-request: Vary X-HgProto-1
301 devel-peer-request: Vary X-HgProto-1
304 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
302 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
305 devel-peer-request: finished in *.???? seconds (200) (glob)
303 devel-peer-request: finished in *.???? seconds (200) (glob)
306 preparing listkeys for "bookmarks"
304 preparing listkeys for "bookmarks"
307 sending listkeys command
305 sending listkeys command
308 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
306 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
309 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
307 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
310 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
308 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
311 devel-peer-request: 19 bytes of commands arguments in headers
309 devel-peer-request: 19 bytes of commands arguments in headers
312 devel-peer-request: finished in *.???? seconds (200) (glob)
310 devel-peer-request: finished in *.???? seconds (200) (glob)
313 received listkey for "bookmarks": 0 bytes
311 received listkey for "bookmarks": 0 bytes
314 1 changesets found
312 1 changesets found
315 list of changesets:
313 list of changesets:
316 7f4e523d01f2cc3765ac8934da3d14db775ff872
314 7f4e523d01f2cc3765ac8934da3d14db775ff872
317 bundle2-output-bundle: "HG20", 5 parts total
315 bundle2-output-bundle: "HG20", 5 parts total
318 bundle2-output-part: "replycaps" 205 bytes payload
316 bundle2-output-part: "replycaps" 205 bytes payload
319 bundle2-output-part: "check:phases" 24 bytes payload
317 bundle2-output-part: "check:phases" 24 bytes payload
320 bundle2-output-part: "check:heads" streamed payload
318 bundle2-output-part: "check:heads" streamed payload
321 bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload
319 bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload
322 bundle2-output-part: "phase-heads" 24 bytes payload
320 bundle2-output-part: "phase-heads" 24 bytes payload
323 sending unbundle command
321 sending unbundle command
324 sending 1013 bytes
322 sending 1013 bytes
325 devel-peer-request: POST http://localhost:$HGPORT2/?cmd=unbundle
323 devel-peer-request: POST http://localhost:$HGPORT2/?cmd=unbundle
326 devel-peer-request: Content-length 1013
324 devel-peer-request: Content-length 1013
327 devel-peer-request: Content-type application/mercurial-0.1
325 devel-peer-request: Content-type application/mercurial-0.1
328 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
326 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
329 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
327 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
330 devel-peer-request: 16 bytes of commands arguments in headers
328 devel-peer-request: 16 bytes of commands arguments in headers
331 devel-peer-request: 1013 bytes of data
329 devel-peer-request: 1013 bytes of data
332 devel-peer-request: finished in *.???? seconds (200) (glob)
330 devel-peer-request: finished in *.???? seconds (200) (glob)
333 bundle2-input-bundle: no-transaction
331 bundle2-input-bundle: no-transaction
334 bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported
332 bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported
335 bundle2-input-part: "output" (advisory) (params: 0 advisory) supported
333 bundle2-input-part: "output" (advisory) (params: 0 advisory) supported
336 bundle2-input-part: total payload size 100
334 bundle2-input-part: total payload size 100
337 remote: adding changesets
335 remote: adding changesets
338 remote: adding manifests
336 remote: adding manifests
339 remote: adding file changes
337 remote: adding file changes
340 remote: added 1 changesets with 1 changes to 1 files
338 remote: added 1 changesets with 1 changes to 1 files
341 bundle2-input-part: "output" (advisory) supported
339 bundle2-input-part: "output" (advisory) supported
342 bundle2-input-bundle: 2 parts total
340 bundle2-input-bundle: 2 parts total
343 preparing listkeys for "phases"
341 preparing listkeys for "phases"
344 sending listkeys command
342 sending listkeys command
345 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
343 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
346 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
344 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
347 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
345 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
348 devel-peer-request: 16 bytes of commands arguments in headers
346 devel-peer-request: 16 bytes of commands arguments in headers
349 devel-peer-request: finished in *.???? seconds (200) (glob)
347 devel-peer-request: finished in *.???? seconds (200) (glob)
350 received listkey for "phases": 15 bytes
348 received listkey for "phases": 15 bytes
351 $ hg rollback -q
349 $ hg rollback -q
352
350
353 $ sed 's/.*] "/"/' < ../access.log
351 $ sed 's/.*] "/"/' < ../access.log
354 "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull
352 "GET /?cmd=capabilities HTTP/1.1" 401 -
355 "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull
353 "GET /?cmd=capabilities HTTP/1.1" 401 -
356 "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull
354 "GET /?cmd=capabilities HTTP/1.1" 401 -
357 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull
355 "GET /?cmd=capabilities HTTP/1.1" 200 -
358 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
356 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
359 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
357 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
360 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
358 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
361 "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull
359 "GET /?cmd=capabilities HTTP/1.1" 401 -
362 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull
360 "GET /?cmd=capabilities HTTP/1.1" 200 -
363 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
361 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
364 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
362 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
365 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
363 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
366 "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull
364 "GET /?cmd=capabilities HTTP/1.1" 401 -
367 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull
365 "GET /?cmd=capabilities HTTP/1.1" 200 -
368 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
366 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
369 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
367 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
370 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
368 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
371 "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull
369 "GET /?cmd=capabilities HTTP/1.1" 401 -
372 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull
370 "GET /?cmd=capabilities HTTP/1.1" 200 -
373 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
371 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
374 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
372 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
375 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
373 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
376 "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull
374 "GET /?cmd=capabilities HTTP/1.1" 401 -
377 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull
375 "GET /?cmd=capabilities HTTP/1.1" 200 -
378 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
376 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
379 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
377 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
380 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
378 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
381 "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull (no-reposimplestore !)
379 "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !)
382 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull (no-reposimplestore !)
380 "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !)
383 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
381 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
384 "GET /?cmd=stream_out HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
382 "GET /?cmd=stream_out HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
385 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D5fed3813f7f5e1824344fdc9cf8f63bb662c292d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
383 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D5fed3813f7f5e1824344fdc9cf8f63bb662c292d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
386 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
384 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
387 "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull (no-reposimplestore !)
385 "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !)
388 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull (no-reposimplestore !)
386 "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !)
389 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
387 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
390 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
388 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
391 "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull
389 "GET /?cmd=capabilities HTTP/1.1" 401 -
392 "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull
390 "GET /?cmd=capabilities HTTP/1.1" 401 -
393 "GET /?cmd=capabilities HTTP/1.1" 403 - x-hgproto-1:partial-pull
391 "GET /?cmd=capabilities HTTP/1.1" 403 -
394 "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull
392 "GET /?cmd=capabilities HTTP/1.1" 401 -
395 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull
393 "GET /?cmd=capabilities HTTP/1.1" 200 -
396 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
394 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
397 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
395 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
398 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
396 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
399 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
397 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
400 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
398 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
401 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
399 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
402 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365* (glob)
400 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365* (glob)
403 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
401 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
404 "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgproto-1:partial-pull
402 "GET /?cmd=capabilities HTTP/1.1" 401 -
405 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull
403 "GET /?cmd=capabilities HTTP/1.1" 200 -
406 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
404 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
407 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
405 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
408 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
406 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
409 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
407 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
410 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
408 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
411 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
409 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
412 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
410 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
413 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
411 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
414
412
415 $ cd ..
413 $ cd ..
416
414
417 clone of serve with repo in root and unserved subrepo (issue2970)
415 clone of serve with repo in root and unserved subrepo (issue2970)
418
416
419 $ hg --cwd test init sub
417 $ hg --cwd test init sub
420 $ echo empty > test/sub/empty
418 $ echo empty > test/sub/empty
421 $ hg --cwd test/sub add empty
419 $ hg --cwd test/sub add empty
422 $ hg --cwd test/sub commit -qm 'add empty'
420 $ hg --cwd test/sub commit -qm 'add empty'
423 $ hg --cwd test/sub tag -r 0 something
421 $ hg --cwd test/sub tag -r 0 something
424 $ echo sub = sub > test/.hgsub
422 $ echo sub = sub > test/.hgsub
425 $ hg --cwd test add .hgsub
423 $ hg --cwd test add .hgsub
426 $ hg --cwd test commit -qm 'add subrepo'
424 $ hg --cwd test commit -qm 'add subrepo'
427 $ hg clone http://localhost:$HGPORT noslash-clone
425 $ hg clone http://localhost:$HGPORT noslash-clone
428 requesting all changes
426 requesting all changes
429 adding changesets
427 adding changesets
430 adding manifests
428 adding manifests
431 adding file changes
429 adding file changes
432 added 3 changesets with 7 changes to 7 files
430 added 3 changesets with 7 changes to 7 files
433 new changesets 8b6053c928fe:56f9bc90cce6
431 new changesets 8b6053c928fe:56f9bc90cce6
434 updating to branch default
432 updating to branch default
435 abort: HTTP Error 404: Not Found
433 abort: HTTP Error 404: Not Found
436 [255]
434 [255]
437 $ hg clone http://localhost:$HGPORT/ slash-clone
435 $ hg clone http://localhost:$HGPORT/ slash-clone
438 requesting all changes
436 requesting all changes
439 adding changesets
437 adding changesets
440 adding manifests
438 adding manifests
441 adding file changes
439 adding file changes
442 added 3 changesets with 7 changes to 7 files
440 added 3 changesets with 7 changes to 7 files
443 new changesets 8b6053c928fe:56f9bc90cce6
441 new changesets 8b6053c928fe:56f9bc90cce6
444 updating to branch default
442 updating to branch default
445 abort: HTTP Error 404: Not Found
443 abort: HTTP Error 404: Not Found
446 [255]
444 [255]
447
445
448 check error log
446 check error log
449
447
450 $ cat error.log
448 $ cat error.log
451
449
452 check abort error reporting while pulling/cloning
450 check abort error reporting while pulling/cloning
453
451
454 $ $RUNTESTDIR/killdaemons.py
452 $ $RUNTESTDIR/killdaemons.py
455 $ hg serve -R test -p $HGPORT -d --pid-file=hg3.pid -E error.log --config extensions.crash=${TESTDIR}/crashgetbundler.py
453 $ hg serve -R test -p $HGPORT -d --pid-file=hg3.pid -E error.log --config extensions.crash=${TESTDIR}/crashgetbundler.py
456 $ cat hg3.pid >> $DAEMON_PIDS
454 $ cat hg3.pid >> $DAEMON_PIDS
457 $ hg clone http://localhost:$HGPORT/ abort-clone
455 $ hg clone http://localhost:$HGPORT/ abort-clone
458 requesting all changes
456 requesting all changes
459 remote: abort: this is an exercise
457 remote: abort: this is an exercise
460 abort: pull failed on remote
458 abort: pull failed on remote
461 [255]
459 [255]
462 $ cat error.log
460 $ cat error.log
463
461
464 disable pull-based clones
462 disable pull-based clones
465
463
466 $ hg serve -R test -p $HGPORT1 -d --pid-file=hg4.pid -E error.log --config server.disablefullbundle=True
464 $ hg serve -R test -p $HGPORT1 -d --pid-file=hg4.pid -E error.log --config server.disablefullbundle=True
467 $ cat hg4.pid >> $DAEMON_PIDS
465 $ cat hg4.pid >> $DAEMON_PIDS
468 $ hg clone http://localhost:$HGPORT1/ disable-pull-clone
466 $ hg clone http://localhost:$HGPORT1/ disable-pull-clone
469 requesting all changes
467 requesting all changes
470 remote: abort: server has pull-based clones disabled
468 remote: abort: server has pull-based clones disabled
471 abort: pull failed on remote
469 abort: pull failed on remote
472 (remove --pull if specified or upgrade Mercurial)
470 (remove --pull if specified or upgrade Mercurial)
473 [255]
471 [255]
474
472
475 #if no-reposimplestore
473 #if no-reposimplestore
476 ... but keep stream clones working
474 ... but keep stream clones working
477
475
478 $ hg clone --stream --noupdate http://localhost:$HGPORT1/ test-stream-clone
476 $ hg clone --stream --noupdate http://localhost:$HGPORT1/ test-stream-clone
479 streaming all changes
477 streaming all changes
480 * files to transfer, * of data (glob)
478 * files to transfer, * of data (glob)
481 transferred * in * seconds (*/sec) (glob)
479 transferred * in * seconds (*/sec) (glob)
482 searching for changes
480 searching for changes
483 no changes found
481 no changes found
484 $ cat error.log
482 $ cat error.log
485 #endif
483 #endif
486
484
487 ... and also keep partial clones and pulls working
485 ... and also keep partial clones and pulls working
488 $ hg clone http://localhost:$HGPORT1 --rev 0 test-partial-clone
486 $ hg clone http://localhost:$HGPORT1 --rev 0 test-partial-clone
489 adding changesets
487 adding changesets
490 adding manifests
488 adding manifests
491 adding file changes
489 adding file changes
492 added 1 changesets with 4 changes to 4 files
490 added 1 changesets with 4 changes to 4 files
493 new changesets 8b6053c928fe
491 new changesets 8b6053c928fe
494 updating to branch default
492 updating to branch default
495 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
493 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
496 $ hg pull -R test-partial-clone
494 $ hg pull -R test-partial-clone
497 pulling from http://localhost:$HGPORT1/
495 pulling from http://localhost:$HGPORT1/
498 searching for changes
496 searching for changes
499 adding changesets
497 adding changesets
500 adding manifests
498 adding manifests
501 adding file changes
499 adding file changes
502 added 2 changesets with 3 changes to 3 files
500 added 2 changesets with 3 changes to 3 files
503 new changesets 5fed3813f7f5:56f9bc90cce6
501 new changesets 5fed3813f7f5:56f9bc90cce6
504 (run 'hg update' to get a working copy)
502 (run 'hg update' to get a working copy)
505
503
506 corrupt cookies file should yield a warning
504 corrupt cookies file should yield a warning
507
505
508 $ cat > $TESTTMP/cookies.txt << EOF
506 $ cat > $TESTTMP/cookies.txt << EOF
509 > bad format
507 > bad format
510 > EOF
508 > EOF
511
509
512 $ hg --config auth.cookiefile=$TESTTMP/cookies.txt id http://localhost:$HGPORT/
510 $ hg --config auth.cookiefile=$TESTTMP/cookies.txt id http://localhost:$HGPORT/
513 (error loading cookie file $TESTTMP/cookies.txt: '*/cookies.txt' does not look like a Netscape format cookies file; continuing without cookies) (glob)
511 (error loading cookie file $TESTTMP/cookies.txt: '*/cookies.txt' does not look like a Netscape format cookies file; continuing without cookies) (glob)
514 56f9bc90cce6
512 56f9bc90cce6
515
513
516 $ killdaemons.py
514 $ killdaemons.py
517
515
518 Create dummy authentication handler that looks for cookies. It doesn't do anything
516 Create dummy authentication handler that looks for cookies. It doesn't do anything
519 useful. It just raises an HTTP 500 with details about the Cookie request header.
517 useful. It just raises an HTTP 500 with details about the Cookie request header.
520 We raise HTTP 500 because its message is printed in the abort message.
518 We raise HTTP 500 because its message is printed in the abort message.
521
519
522 $ cat > cookieauth.py << EOF
520 $ cat > cookieauth.py << EOF
523 > from mercurial import util
521 > from mercurial import util
524 > from mercurial.hgweb import common
522 > from mercurial.hgweb import common
525 > def perform_authentication(hgweb, req, op):
523 > def perform_authentication(hgweb, req, op):
526 > cookie = req.headers.get('Cookie')
524 > cookie = req.headers.get('Cookie')
527 > if not cookie:
525 > if not cookie:
528 > raise common.ErrorResponse(common.HTTP_SERVER_ERROR, 'no-cookie')
526 > raise common.ErrorResponse(common.HTTP_SERVER_ERROR, 'no-cookie')
529 > raise common.ErrorResponse(common.HTTP_SERVER_ERROR, 'Cookie: %s' % cookie)
527 > raise common.ErrorResponse(common.HTTP_SERVER_ERROR, 'Cookie: %s' % cookie)
530 > def extsetup():
528 > def extsetup():
531 > common.permhooks.insert(0, perform_authentication)
529 > common.permhooks.insert(0, perform_authentication)
532 > EOF
530 > EOF
533
531
534 $ hg serve --config extensions.cookieauth=cookieauth.py -R test -p $HGPORT -d --pid-file=pid
532 $ hg serve --config extensions.cookieauth=cookieauth.py -R test -p $HGPORT -d --pid-file=pid
535 $ cat pid > $DAEMON_PIDS
533 $ cat pid > $DAEMON_PIDS
536
534
537 Request without cookie sent should fail due to lack of cookie
535 Request without cookie sent should fail due to lack of cookie
538
536
539 $ hg id http://localhost:$HGPORT
537 $ hg id http://localhost:$HGPORT
540 abort: HTTP Error 500: no-cookie
538 abort: HTTP Error 500: no-cookie
541 [255]
539 [255]
542
540
543 Populate a cookies file
541 Populate a cookies file
544
542
545 $ cat > cookies.txt << EOF
543 $ cat > cookies.txt << EOF
546 > # HTTP Cookie File
544 > # HTTP Cookie File
547 > # Expiration is 2030-01-01 at midnight
545 > # Expiration is 2030-01-01 at midnight
548 > .example.com TRUE / FALSE 1893456000 hgkey examplevalue
546 > .example.com TRUE / FALSE 1893456000 hgkey examplevalue
549 > EOF
547 > EOF
550
548
551 Should not send a cookie for another domain
549 Should not send a cookie for another domain
552
550
553 $ hg --config auth.cookiefile=cookies.txt id http://localhost:$HGPORT/
551 $ hg --config auth.cookiefile=cookies.txt id http://localhost:$HGPORT/
554 abort: HTTP Error 500: no-cookie
552 abort: HTTP Error 500: no-cookie
555 [255]
553 [255]
556
554
557 Add a cookie entry for our test server and verify it is sent
555 Add a cookie entry for our test server and verify it is sent
558
556
559 $ cat >> cookies.txt << EOF
557 $ cat >> cookies.txt << EOF
560 > localhost.local FALSE / FALSE 1893456000 hgkey localhostvalue
558 > localhost.local FALSE / FALSE 1893456000 hgkey localhostvalue
561 > EOF
559 > EOF
562
560
563 $ hg --config auth.cookiefile=cookies.txt id http://localhost:$HGPORT/
561 $ hg --config auth.cookiefile=cookies.txt id http://localhost:$HGPORT/
564 abort: HTTP Error 500: Cookie: hgkey=localhostvalue
562 abort: HTTP Error 500: Cookie: hgkey=localhostvalue
565 [255]
563 [255]
@@ -1,67 +1,67 b''
1 #require serve no-reposimplestore
1 #require serve no-reposimplestore
2
2
3 $ cat >> $HGRCPATH <<EOF
3 $ cat >> $HGRCPATH <<EOF
4 > [extensions]
4 > [extensions]
5 > lfs=
5 > lfs=
6 > [lfs]
6 > [lfs]
7 > url=http://localhost:$HGPORT/.git/info/lfs
7 > url=http://localhost:$HGPORT/.git/info/lfs
8 > track=all()
8 > track=all()
9 > [web]
9 > [web]
10 > push_ssl = False
10 > push_ssl = False
11 > allow-push = *
11 > allow-push = *
12 > EOF
12 > EOF
13
13
14 Serving LFS files can experimentally be turned off. The long term solution is
14 Serving LFS files can experimentally be turned off. The long term solution is
15 to support the 'verify' action in both client and server, so that the server can
15 to support the 'verify' action in both client and server, so that the server can
16 tell the client to store files elsewhere.
16 tell the client to store files elsewhere.
17
17
18 $ hg init server
18 $ hg init server
19 $ hg --config "lfs.usercache=$TESTTMP/servercache" \
19 $ hg --config "lfs.usercache=$TESTTMP/servercache" \
20 > --config experimental.lfs.serve=False -R server serve -d \
20 > --config experimental.lfs.serve=False -R server serve -d \
21 > -p $HGPORT --pid-file=hg.pid -A $TESTTMP/access.log -E $TESTTMP/errors.log
21 > -p $HGPORT --pid-file=hg.pid -A $TESTTMP/access.log -E $TESTTMP/errors.log
22 $ cat hg.pid >> $DAEMON_PIDS
22 $ cat hg.pid >> $DAEMON_PIDS
23
23
24 Uploads fail...
24 Uploads fail...
25
25
26 $ hg init client
26 $ hg init client
27 $ echo 'this-is-an-lfs-file' > client/lfs.bin
27 $ echo 'this-is-an-lfs-file' > client/lfs.bin
28 $ hg -R client ci -Am 'initial commit'
28 $ hg -R client ci -Am 'initial commit'
29 adding lfs.bin
29 adding lfs.bin
30 $ hg -R client push http://localhost:$HGPORT
30 $ hg -R client push http://localhost:$HGPORT
31 pushing to http://localhost:$HGPORT/
31 pushing to http://localhost:$HGPORT/
32 searching for changes
32 searching for changes
33 abort: LFS HTTP error: HTTP Error 400: no such method: .git (action=upload)!
33 abort: LFS HTTP error: HTTP Error 400: no such method: .git (action=upload)!
34 [255]
34 [255]
35
35
36 ... so do a local push to make the data available. Remove the blob from the
36 ... so do a local push to make the data available. Remove the blob from the
37 default cache, so it attempts to download.
37 default cache, so it attempts to download.
38 $ hg --config "lfs.usercache=$TESTTMP/servercache" \
38 $ hg --config "lfs.usercache=$TESTTMP/servercache" \
39 > --config "lfs.url=null://" \
39 > --config "lfs.url=null://" \
40 > -R client push -q server
40 > -R client push -q server
41 $ rm -rf `hg config lfs.usercache`
41 $ rm -rf `hg config lfs.usercache`
42
42
43 Downloads fail...
43 Downloads fail...
44
44
45 $ hg clone http://localhost:$HGPORT httpclone
45 $ hg clone http://localhost:$HGPORT httpclone
46 requesting all changes
46 requesting all changes
47 adding changesets
47 adding changesets
48 adding manifests
48 adding manifests
49 adding file changes
49 adding file changes
50 added 1 changesets with 1 changes to 1 files
50 added 1 changesets with 1 changes to 1 files
51 new changesets 525251863cad
51 new changesets 525251863cad
52 updating to branch default
52 updating to branch default
53 abort: LFS HTTP error: HTTP Error 400: no such method: .git (action=download)!
53 abort: LFS HTTP error: HTTP Error 400: no such method: .git (action=download)!
54 [255]
54 [255]
55
55
56 $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS
56 $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS
57
57
58 $ cat $TESTTMP/access.log $TESTTMP/errors.log
58 $ cat $TESTTMP/access.log $TESTTMP/errors.log
59 $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull (glob)
59 $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
60 $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D525251863cad618e55d483555f3d00a2ca99597e x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
60 $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D525251863cad618e55d483555f3d00a2ca99597e x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
61 $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
61 $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
62 $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
62 $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
63 $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 400 - (glob)
63 $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 400 - (glob)
64 $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull (glob)
64 $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
65 $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
65 $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
66 $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
66 $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
67 $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 400 - (glob)
67 $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 400 - (glob)
@@ -1,556 +1,556 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 "% -- a -> b set (tip only)"
19 > echo "% -- a -> b set (tip only)"
20 > hg -R a debugdiscovery b --verbose --debug --config progress.debug=true --rev tip
20 > hg -R a debugdiscovery b --verbose --debug --config progress.debug=true --rev tip
21 > echo
21 > echo
22 > echo "% -- b -> a tree"
22 > echo "% -- b -> a tree"
23 > hg -R b debugdiscovery a --verbose --old
23 > hg -R b debugdiscovery a --verbose --old
24 > echo
24 > echo
25 > echo "% -- b -> a set"
25 > echo "% -- b -> a set"
26 > hg -R b debugdiscovery a --verbose --debug --config progress.debug=true
26 > hg -R b debugdiscovery a --verbose --debug --config progress.debug=true
27 > echo
27 > echo
28 > echo "% -- b -> a set (tip only)"
28 > echo "% -- b -> a set (tip only)"
29 > hg -R b debugdiscovery a --verbose --debug --config progress.debug=true --rev tip
29 > hg -R b debugdiscovery a --verbose --debug --config progress.debug=true --rev tip
30 > cd ..
30 > cd ..
31 > }
31 > }
32
32
33
33
34 Small superset:
34 Small superset:
35
35
36 $ testdesc '-ra1 -ra2' '-rb1 -rb2 -rb3' '
36 $ testdesc '-ra1 -ra2' '-rb1 -rb2 -rb3' '
37 > +2:f +1:a1:b1
37 > +2:f +1:a1:b1
38 > <f +4 :a2
38 > <f +4 :a2
39 > +5 :b2
39 > +5 :b2
40 > <f +3 :b3'
40 > <f +3 :b3'
41
41
42 % -- a -> b tree
42 % -- a -> b tree
43 comparing with b
43 comparing with b
44 searching for changes
44 searching for changes
45 unpruned common: 01241442b3c2 66f7d451a68b b5714e113bc0
45 unpruned common: 01241442b3c2 66f7d451a68b b5714e113bc0
46 common heads: 01241442b3c2 b5714e113bc0
46 common heads: 01241442b3c2 b5714e113bc0
47 local is subset
47 local is subset
48
48
49 % -- a -> b set
49 % -- a -> b set
50 comparing with b
50 comparing with b
51 query 1; heads
51 query 1; heads
52 searching for changes
52 searching for changes
53 all local heads known remotely
53 all local heads known remotely
54 common heads: 01241442b3c2 b5714e113bc0
54 common heads: 01241442b3c2 b5714e113bc0
55 local is subset
55 local is subset
56
56
57 % -- a -> b set (tip only)
57 % -- a -> b set (tip only)
58 comparing with b
58 comparing with b
59 query 1; heads
59 query 1; heads
60 searching for changes
60 searching for changes
61 all local heads known remotely
61 all local heads known remotely
62 common heads: b5714e113bc0
62 common heads: b5714e113bc0
63
63
64 % -- b -> a tree
64 % -- b -> a tree
65 comparing with a
65 comparing with a
66 searching for changes
66 searching for changes
67 unpruned common: 01241442b3c2 b5714e113bc0
67 unpruned common: 01241442b3c2 b5714e113bc0
68 common heads: 01241442b3c2 b5714e113bc0
68 common heads: 01241442b3c2 b5714e113bc0
69 remote is subset
69 remote is subset
70
70
71 % -- b -> a set
71 % -- b -> a set
72 comparing with a
72 comparing with a
73 query 1; heads
73 query 1; heads
74 searching for changes
74 searching for changes
75 all remote heads known locally
75 all remote heads known locally
76 common heads: 01241442b3c2 b5714e113bc0
76 common heads: 01241442b3c2 b5714e113bc0
77 remote is subset
77 remote is subset
78
78
79 % -- b -> a set (tip only)
79 % -- b -> a set (tip only)
80 comparing with a
80 comparing with a
81 query 1; heads
81 query 1; heads
82 searching for changes
82 searching for changes
83 all remote heads known locally
83 all remote heads known locally
84 common heads: 01241442b3c2 b5714e113bc0
84 common heads: 01241442b3c2 b5714e113bc0
85 remote is subset
85 remote is subset
86
86
87
87
88 Many new:
88 Many new:
89
89
90 $ testdesc '-ra1 -ra2' '-rb' '
90 $ testdesc '-ra1 -ra2' '-rb' '
91 > +2:f +3:a1 +3:b
91 > +2:f +3:a1 +3:b
92 > <f +30 :a2'
92 > <f +30 :a2'
93
93
94 % -- a -> b tree
94 % -- a -> b tree
95 comparing with b
95 comparing with b
96 searching for changes
96 searching for changes
97 unpruned common: bebd167eb94d
97 unpruned common: bebd167eb94d
98 common heads: bebd167eb94d
98 common heads: bebd167eb94d
99
99
100 % -- a -> b set
100 % -- a -> b set
101 comparing with b
101 comparing with b
102 query 1; heads
102 query 1; heads
103 searching for changes
103 searching for changes
104 taking initial sample
104 taking initial sample
105 searching: 2 queries
105 searching: 2 queries
106 query 2; still undecided: 29, sample size is: 29
106 query 2; still undecided: 29, sample size is: 29
107 2 total queries in *.????s (glob)
107 2 total queries in *.????s (glob)
108 common heads: bebd167eb94d
108 common heads: bebd167eb94d
109
109
110 % -- a -> b set (tip only)
110 % -- a -> b set (tip only)
111 comparing with b
111 comparing with b
112 query 1; heads
112 query 1; heads
113 searching for changes
113 searching for changes
114 taking quick initial sample
114 taking quick initial sample
115 searching: 2 queries
115 searching: 2 queries
116 query 2; still undecided: 31, sample size is: 31
116 query 2; still undecided: 31, sample size is: 31
117 2 total queries in *.????s (glob)
117 2 total queries in *.????s (glob)
118 common heads: 66f7d451a68b
118 common heads: 66f7d451a68b
119
119
120 % -- b -> a tree
120 % -- b -> a tree
121 comparing with a
121 comparing with a
122 searching for changes
122 searching for changes
123 unpruned common: 66f7d451a68b bebd167eb94d
123 unpruned common: 66f7d451a68b bebd167eb94d
124 common heads: bebd167eb94d
124 common heads: bebd167eb94d
125
125
126 % -- b -> a set
126 % -- b -> a set
127 comparing with a
127 comparing with a
128 query 1; heads
128 query 1; heads
129 searching for changes
129 searching for changes
130 taking initial sample
130 taking initial sample
131 searching: 2 queries
131 searching: 2 queries
132 query 2; still undecided: 2, sample size is: 2
132 query 2; still undecided: 2, sample size is: 2
133 2 total queries in *.????s (glob)
133 2 total queries in *.????s (glob)
134 common heads: bebd167eb94d
134 common heads: bebd167eb94d
135
135
136 % -- b -> a set (tip only)
136 % -- b -> a set (tip only)
137 comparing with a
137 comparing with a
138 query 1; heads
138 query 1; heads
139 searching for changes
139 searching for changes
140 taking initial sample
140 taking initial sample
141 searching: 2 queries
141 searching: 2 queries
142 query 2; still undecided: 2, sample size is: 2
142 query 2; still undecided: 2, sample size is: 2
143 2 total queries in *.????s (glob)
143 2 total queries in *.????s (glob)
144 common heads: bebd167eb94d
144 common heads: bebd167eb94d
145
145
146 Both sides many new with stub:
146 Both sides many new with stub:
147
147
148 $ testdesc '-ra1 -ra2' '-rb' '
148 $ testdesc '-ra1 -ra2' '-rb' '
149 > +2:f +2:a1 +30 :b
149 > +2:f +2:a1 +30 :b
150 > <f +30 :a2'
150 > <f +30 :a2'
151
151
152 % -- a -> b tree
152 % -- a -> b tree
153 comparing with b
153 comparing with b
154 searching for changes
154 searching for changes
155 unpruned common: 2dc09a01254d
155 unpruned common: 2dc09a01254d
156 common heads: 2dc09a01254d
156 common heads: 2dc09a01254d
157
157
158 % -- a -> b set
158 % -- a -> b set
159 comparing with b
159 comparing with b
160 query 1; heads
160 query 1; heads
161 searching for changes
161 searching for changes
162 taking initial sample
162 taking initial sample
163 searching: 2 queries
163 searching: 2 queries
164 query 2; still undecided: 29, sample size is: 29
164 query 2; still undecided: 29, sample size is: 29
165 2 total queries in *.????s (glob)
165 2 total queries in *.????s (glob)
166 common heads: 2dc09a01254d
166 common heads: 2dc09a01254d
167
167
168 % -- a -> b set (tip only)
168 % -- a -> b set (tip only)
169 comparing with b
169 comparing with b
170 query 1; heads
170 query 1; heads
171 searching for changes
171 searching for changes
172 taking quick initial sample
172 taking quick initial sample
173 searching: 2 queries
173 searching: 2 queries
174 query 2; still undecided: 31, sample size is: 31
174 query 2; still undecided: 31, sample size is: 31
175 2 total queries in *.????s (glob)
175 2 total queries in *.????s (glob)
176 common heads: 66f7d451a68b
176 common heads: 66f7d451a68b
177
177
178 % -- b -> a tree
178 % -- b -> a tree
179 comparing with a
179 comparing with a
180 searching for changes
180 searching for changes
181 unpruned common: 2dc09a01254d 66f7d451a68b
181 unpruned common: 2dc09a01254d 66f7d451a68b
182 common heads: 2dc09a01254d
182 common heads: 2dc09a01254d
183
183
184 % -- b -> a set
184 % -- b -> a set
185 comparing with a
185 comparing with a
186 query 1; heads
186 query 1; heads
187 searching for changes
187 searching for changes
188 taking initial sample
188 taking initial sample
189 searching: 2 queries
189 searching: 2 queries
190 query 2; still undecided: 29, sample size is: 29
190 query 2; still undecided: 29, sample size is: 29
191 2 total queries in *.????s (glob)
191 2 total queries in *.????s (glob)
192 common heads: 2dc09a01254d
192 common heads: 2dc09a01254d
193
193
194 % -- b -> a set (tip only)
194 % -- b -> a set (tip only)
195 comparing with a
195 comparing with a
196 query 1; heads
196 query 1; heads
197 searching for changes
197 searching for changes
198 taking initial sample
198 taking initial sample
199 searching: 2 queries
199 searching: 2 queries
200 query 2; still undecided: 29, sample size is: 29
200 query 2; still undecided: 29, sample size is: 29
201 2 total queries in *.????s (glob)
201 2 total queries in *.????s (glob)
202 common heads: 2dc09a01254d
202 common heads: 2dc09a01254d
203
203
204
204
205 Both many new:
205 Both many new:
206
206
207 $ testdesc '-ra' '-rb' '
207 $ testdesc '-ra' '-rb' '
208 > +2:f +30 :b
208 > +2:f +30 :b
209 > <f +30 :a'
209 > <f +30 :a'
210
210
211 % -- a -> b tree
211 % -- a -> b tree
212 comparing with b
212 comparing with b
213 searching for changes
213 searching for changes
214 unpruned common: 66f7d451a68b
214 unpruned common: 66f7d451a68b
215 common heads: 66f7d451a68b
215 common heads: 66f7d451a68b
216
216
217 % -- a -> b set
217 % -- a -> b set
218 comparing with b
218 comparing with b
219 query 1; heads
219 query 1; heads
220 searching for changes
220 searching for changes
221 taking quick initial sample
221 taking quick initial sample
222 searching: 2 queries
222 searching: 2 queries
223 query 2; still undecided: 31, sample size is: 31
223 query 2; still undecided: 31, sample size is: 31
224 2 total queries in *.????s (glob)
224 2 total queries in *.????s (glob)
225 common heads: 66f7d451a68b
225 common heads: 66f7d451a68b
226
226
227 % -- a -> b set (tip only)
227 % -- a -> b set (tip only)
228 comparing with b
228 comparing with b
229 query 1; heads
229 query 1; heads
230 searching for changes
230 searching for changes
231 taking quick initial sample
231 taking quick initial sample
232 searching: 2 queries
232 searching: 2 queries
233 query 2; still undecided: 31, sample size is: 31
233 query 2; still undecided: 31, sample size is: 31
234 2 total queries in *.????s (glob)
234 2 total queries in *.????s (glob)
235 common heads: 66f7d451a68b
235 common heads: 66f7d451a68b
236
236
237 % -- b -> a tree
237 % -- b -> a tree
238 comparing with a
238 comparing with a
239 searching for changes
239 searching for changes
240 unpruned common: 66f7d451a68b
240 unpruned common: 66f7d451a68b
241 common heads: 66f7d451a68b
241 common heads: 66f7d451a68b
242
242
243 % -- b -> a set
243 % -- b -> a set
244 comparing with a
244 comparing with a
245 query 1; heads
245 query 1; heads
246 searching for changes
246 searching for changes
247 taking quick initial sample
247 taking quick initial sample
248 searching: 2 queries
248 searching: 2 queries
249 query 2; still undecided: 31, sample size is: 31
249 query 2; still undecided: 31, sample size is: 31
250 2 total queries in *.????s (glob)
250 2 total queries in *.????s (glob)
251 common heads: 66f7d451a68b
251 common heads: 66f7d451a68b
252
252
253 % -- b -> a set (tip only)
253 % -- b -> a set (tip only)
254 comparing with a
254 comparing with a
255 query 1; heads
255 query 1; heads
256 searching for changes
256 searching for changes
257 taking quick initial sample
257 taking quick initial sample
258 searching: 2 queries
258 searching: 2 queries
259 query 2; still undecided: 31, sample size is: 31
259 query 2; still undecided: 31, sample size is: 31
260 2 total queries in *.????s (glob)
260 2 total queries in *.????s (glob)
261 common heads: 66f7d451a68b
261 common heads: 66f7d451a68b
262
262
263
263
264 Both many new skewed:
264 Both many new skewed:
265
265
266 $ testdesc '-ra' '-rb' '
266 $ testdesc '-ra' '-rb' '
267 > +2:f +30 :b
267 > +2:f +30 :b
268 > <f +50 :a'
268 > <f +50 :a'
269
269
270 % -- a -> b tree
270 % -- a -> b tree
271 comparing with b
271 comparing with b
272 searching for changes
272 searching for changes
273 unpruned common: 66f7d451a68b
273 unpruned common: 66f7d451a68b
274 common heads: 66f7d451a68b
274 common heads: 66f7d451a68b
275
275
276 % -- a -> b set
276 % -- a -> b set
277 comparing with b
277 comparing with b
278 query 1; heads
278 query 1; heads
279 searching for changes
279 searching for changes
280 taking quick initial sample
280 taking quick initial sample
281 searching: 2 queries
281 searching: 2 queries
282 query 2; still undecided: 51, sample size is: 51
282 query 2; still undecided: 51, sample size is: 51
283 2 total queries in *.????s (glob)
283 2 total queries in *.????s (glob)
284 common heads: 66f7d451a68b
284 common heads: 66f7d451a68b
285
285
286 % -- a -> b set (tip only)
286 % -- a -> b set (tip only)
287 comparing with b
287 comparing with b
288 query 1; heads
288 query 1; heads
289 searching for changes
289 searching for changes
290 taking quick initial sample
290 taking quick initial sample
291 searching: 2 queries
291 searching: 2 queries
292 query 2; still undecided: 51, sample size is: 51
292 query 2; still undecided: 51, sample size is: 51
293 2 total queries in *.????s (glob)
293 2 total queries in *.????s (glob)
294 common heads: 66f7d451a68b
294 common heads: 66f7d451a68b
295
295
296 % -- b -> a tree
296 % -- b -> a tree
297 comparing with a
297 comparing with a
298 searching for changes
298 searching for changes
299 unpruned common: 66f7d451a68b
299 unpruned common: 66f7d451a68b
300 common heads: 66f7d451a68b
300 common heads: 66f7d451a68b
301
301
302 % -- b -> a set
302 % -- b -> a set
303 comparing with a
303 comparing with a
304 query 1; heads
304 query 1; heads
305 searching for changes
305 searching for changes
306 taking quick initial sample
306 taking quick initial sample
307 searching: 2 queries
307 searching: 2 queries
308 query 2; still undecided: 31, sample size is: 31
308 query 2; still undecided: 31, sample size is: 31
309 2 total queries in *.????s (glob)
309 2 total queries in *.????s (glob)
310 common heads: 66f7d451a68b
310 common heads: 66f7d451a68b
311
311
312 % -- b -> a set (tip only)
312 % -- b -> a set (tip only)
313 comparing with a
313 comparing with a
314 query 1; heads
314 query 1; heads
315 searching for changes
315 searching for changes
316 taking quick initial sample
316 taking quick initial sample
317 searching: 2 queries
317 searching: 2 queries
318 query 2; still undecided: 31, sample size is: 31
318 query 2; still undecided: 31, sample size is: 31
319 2 total queries in *.????s (glob)
319 2 total queries in *.????s (glob)
320 common heads: 66f7d451a68b
320 common heads: 66f7d451a68b
321
321
322
322
323 Both many new on top of long history:
323 Both many new on top of long history:
324
324
325 $ testdesc '-ra' '-rb' '
325 $ testdesc '-ra' '-rb' '
326 > +1000:f +30 :b
326 > +1000:f +30 :b
327 > <f +50 :a'
327 > <f +50 :a'
328
328
329 % -- a -> b tree
329 % -- a -> b tree
330 comparing with b
330 comparing with b
331 searching for changes
331 searching for changes
332 unpruned common: 7ead0cba2838
332 unpruned common: 7ead0cba2838
333 common heads: 7ead0cba2838
333 common heads: 7ead0cba2838
334
334
335 % -- a -> b set
335 % -- a -> b set
336 comparing with b
336 comparing with b
337 query 1; heads
337 query 1; heads
338 searching for changes
338 searching for changes
339 taking quick initial sample
339 taking quick initial sample
340 searching: 2 queries
340 searching: 2 queries
341 query 2; still undecided: 1049, sample size is: 11
341 query 2; still undecided: 1049, sample size is: 11
342 sampling from both directions
342 sampling from both directions
343 searching: 3 queries
343 searching: 3 queries
344 query 3; still undecided: 31, sample size is: 31
344 query 3; still undecided: 31, sample size is: 31
345 3 total queries in *.????s (glob)
345 3 total queries in *.????s (glob)
346 common heads: 7ead0cba2838
346 common heads: 7ead0cba2838
347
347
348 % -- a -> b set (tip only)
348 % -- a -> b set (tip only)
349 comparing with b
349 comparing with b
350 query 1; heads
350 query 1; heads
351 searching for changes
351 searching for changes
352 taking quick initial sample
352 taking quick initial sample
353 searching: 2 queries
353 searching: 2 queries
354 query 2; still undecided: 1049, sample size is: 11
354 query 2; still undecided: 1049, sample size is: 11
355 sampling from both directions
355 sampling from both directions
356 searching: 3 queries
356 searching: 3 queries
357 query 3; still undecided: 31, sample size is: 31
357 query 3; still undecided: 31, sample size is: 31
358 3 total queries in *.????s (glob)
358 3 total queries in *.????s (glob)
359 common heads: 7ead0cba2838
359 common heads: 7ead0cba2838
360
360
361 % -- b -> a tree
361 % -- b -> a tree
362 comparing with a
362 comparing with a
363 searching for changes
363 searching for changes
364 unpruned common: 7ead0cba2838
364 unpruned common: 7ead0cba2838
365 common heads: 7ead0cba2838
365 common heads: 7ead0cba2838
366
366
367 % -- b -> a set
367 % -- b -> a set
368 comparing with a
368 comparing with a
369 query 1; heads
369 query 1; heads
370 searching for changes
370 searching for changes
371 taking quick initial sample
371 taking quick initial sample
372 searching: 2 queries
372 searching: 2 queries
373 query 2; still undecided: 1029, sample size is: 11
373 query 2; still undecided: 1029, sample size is: 11
374 sampling from both directions
374 sampling from both directions
375 searching: 3 queries
375 searching: 3 queries
376 query 3; still undecided: 15, sample size is: 15
376 query 3; still undecided: 15, sample size is: 15
377 3 total queries in *.????s (glob)
377 3 total queries in *.????s (glob)
378 common heads: 7ead0cba2838
378 common heads: 7ead0cba2838
379
379
380 % -- b -> a set (tip only)
380 % -- b -> a set (tip only)
381 comparing with a
381 comparing with a
382 query 1; heads
382 query 1; heads
383 searching for changes
383 searching for changes
384 taking quick initial sample
384 taking quick initial sample
385 searching: 2 queries
385 searching: 2 queries
386 query 2; still undecided: 1029, sample size is: 11
386 query 2; still undecided: 1029, sample size is: 11
387 sampling from both directions
387 sampling from both directions
388 searching: 3 queries
388 searching: 3 queries
389 query 3; still undecided: 15, sample size is: 15
389 query 3; still undecided: 15, sample size is: 15
390 3 total queries in *.????s (glob)
390 3 total queries in *.????s (glob)
391 common heads: 7ead0cba2838
391 common heads: 7ead0cba2838
392
392
393
393
394 One with >200 heads, which used to use up all of the sample:
394 One with >200 heads, which used to use up all of the sample:
395
395
396 $ hg init manyheads
396 $ hg init manyheads
397 $ cd manyheads
397 $ cd manyheads
398 $ echo "+300:r @a" >dagdesc
398 $ echo "+300:r @a" >dagdesc
399 $ 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
399 $ 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
400 $ 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
400 $ 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
401 $ 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
401 $ 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
402 $ 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
402 $ 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
403 $ 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
403 $ 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
404 $ 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
404 $ 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
405 $ 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
405 $ 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
406 $ 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
406 $ 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
407 $ 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
407 $ 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
408 $ 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
408 $ 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
409 $ 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
409 $ 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
410 $ 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
410 $ 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
411 $ 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
411 $ 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
412 $ echo "@b *r+3" >>dagdesc # one more head
412 $ echo "@b *r+3" >>dagdesc # one more head
413 $ hg debugbuilddag <dagdesc
413 $ hg debugbuilddag <dagdesc
414 reading DAG from stdin
414 reading DAG from stdin
415
415
416 $ hg heads -t --template . | wc -c
416 $ hg heads -t --template . | wc -c
417 \s*261 (re)
417 \s*261 (re)
418
418
419 $ hg clone -b a . a
419 $ hg clone -b a . a
420 adding changesets
420 adding changesets
421 adding manifests
421 adding manifests
422 adding file changes
422 adding file changes
423 added 1340 changesets with 0 changes to 0 files (+259 heads)
423 added 1340 changesets with 0 changes to 0 files (+259 heads)
424 new changesets 1ea73414a91b:1c51e2c80832
424 new changesets 1ea73414a91b:1c51e2c80832
425 updating to branch a
425 updating to branch a
426 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
426 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
427 $ hg clone -b b . b
427 $ hg clone -b b . b
428 adding changesets
428 adding changesets
429 adding manifests
429 adding manifests
430 adding file changes
430 adding file changes
431 added 304 changesets with 0 changes to 0 files
431 added 304 changesets with 0 changes to 0 files
432 new changesets 1ea73414a91b:513314ca8b3a
432 new changesets 1ea73414a91b:513314ca8b3a
433 updating to branch b
433 updating to branch b
434 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
434 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
435
435
436 $ hg -R a debugdiscovery b --debug --verbose --config progress.debug=true
436 $ hg -R a debugdiscovery b --debug --verbose --config progress.debug=true
437 comparing with b
437 comparing with b
438 query 1; heads
438 query 1; heads
439 searching for changes
439 searching for changes
440 taking quick initial sample
440 taking quick initial sample
441 searching: 2 queries
441 searching: 2 queries
442 query 2; still undecided: 1240, sample size is: 100
442 query 2; still undecided: 1240, sample size is: 100
443 sampling from both directions
443 sampling from both directions
444 searching: 3 queries
444 searching: 3 queries
445 query 3; still undecided: 1140, sample size is: 200
445 query 3; still undecided: 1140, sample size is: 200
446 sampling from both directions
446 sampling from both directions
447 searching: 4 queries
447 searching: 4 queries
448 query 4; still undecided: \d+, sample size is: 200 (re)
448 query 4; still undecided: \d+, sample size is: 200 (re)
449 sampling from both directions
449 sampling from both directions
450 searching: 5 queries
450 searching: 5 queries
451 query 5; still undecided: \d+, sample size is: 200 (re)
451 query 5; still undecided: \d+, sample size is: 200 (re)
452 sampling from both directions
452 sampling from both directions
453 searching: 6 queries
453 searching: 6 queries
454 query 6; still undecided: \d+, sample size is: \d+ (re)
454 query 6; still undecided: \d+, sample size is: \d+ (re)
455 6 total queries in *.????s (glob)
455 6 total queries in *.????s (glob)
456 common heads: 3ee37d65064a
456 common heads: 3ee37d65064a
457 $ hg -R a debugdiscovery b --debug --verbose --config progress.debug=true --rev tip
457 $ hg -R a debugdiscovery b --debug --verbose --config progress.debug=true --rev tip
458 comparing with b
458 comparing with b
459 query 1; heads
459 query 1; heads
460 searching for changes
460 searching for changes
461 taking quick initial sample
461 taking quick initial sample
462 searching: 2 queries
462 searching: 2 queries
463 query 2; still undecided: 303, sample size is: 9
463 query 2; still undecided: 303, sample size is: 9
464 sampling from both directions
464 sampling from both directions
465 searching: 3 queries
465 searching: 3 queries
466 query 3; still undecided: 3, sample size is: 3
466 query 3; still undecided: 3, sample size is: 3
467 3 total queries in *.????s (glob)
467 3 total queries in *.????s (glob)
468 common heads: 3ee37d65064a
468 common heads: 3ee37d65064a
469
469
470 Test actual protocol when pulling one new head in addition to common heads
470 Test actual protocol when pulling one new head in addition to common heads
471
471
472 $ hg clone -U b c
472 $ hg clone -U b c
473 $ hg -R c id -ir tip
473 $ hg -R c id -ir tip
474 513314ca8b3a
474 513314ca8b3a
475 $ hg -R c up -qr default
475 $ hg -R c up -qr default
476 $ touch c/f
476 $ touch c/f
477 $ hg -R c ci -Aqm "extra head"
477 $ hg -R c ci -Aqm "extra head"
478 $ hg -R c id -i
478 $ hg -R c id -i
479 e64a39e7da8b
479 e64a39e7da8b
480
480
481 $ hg serve -R c -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
481 $ hg serve -R c -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
482 $ cat hg.pid >> $DAEMON_PIDS
482 $ cat hg.pid >> $DAEMON_PIDS
483
483
484 $ hg -R b incoming http://localhost:$HGPORT/ -T '{node|short}\n'
484 $ hg -R b incoming http://localhost:$HGPORT/ -T '{node|short}\n'
485 comparing with http://localhost:$HGPORT/
485 comparing with http://localhost:$HGPORT/
486 searching for changes
486 searching for changes
487 e64a39e7da8b
487 e64a39e7da8b
488
488
489 $ killdaemons.py
489 $ killdaemons.py
490 $ cut -d' ' -f6- access.log | grep -v cmd=known # cmd=known uses random sampling
490 $ cut -d' ' -f6- access.log | grep -v cmd=known # cmd=known uses random sampling
491 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull
491 "GET /?cmd=capabilities HTTP/1.1" 200 -
492 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D513314ca8b3ae4dac8eec56966265b00fcf866db x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
492 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D513314ca8b3ae4dac8eec56966265b00fcf866db x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
493 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:$USUAL_BUNDLE_CAPS$&cg=1&common=513314ca8b3ae4dac8eec56966265b00fcf866db&heads=e64a39e7da8b0d54bc63e81169aff001c13b3477 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
493 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:$USUAL_BUNDLE_CAPS$&cg=1&common=513314ca8b3ae4dac8eec56966265b00fcf866db&heads=e64a39e7da8b0d54bc63e81169aff001c13b3477 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
494 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
494 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
495 $ cat errors.log
495 $ cat errors.log
496
496
497 $ cd ..
497 $ cd ..
498
498
499
499
500 Issue 4438 - test coverage for 3ef893520a85 issues.
500 Issue 4438 - test coverage for 3ef893520a85 issues.
501
501
502 $ mkdir issue4438
502 $ mkdir issue4438
503 $ cd issue4438
503 $ cd issue4438
504 #if false
504 #if false
505 generate new bundles:
505 generate new bundles:
506 $ hg init r1
506 $ hg init r1
507 $ 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
507 $ 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
508 $ hg clone -q r1 r2
508 $ hg clone -q r1 r2
509 $ 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
509 $ 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
510 $ hg -R r2 branch -q r2change && hg -R r2 ci -qmr2change
510 $ hg -R r2 branch -q r2change && hg -R r2 ci -qmr2change
511 $ hg -R r1 bundle -qa $TESTDIR/bundles/issue4438-r1.hg
511 $ hg -R r1 bundle -qa $TESTDIR/bundles/issue4438-r1.hg
512 $ hg -R r2 bundle -qa $TESTDIR/bundles/issue4438-r2.hg
512 $ hg -R r2 bundle -qa $TESTDIR/bundles/issue4438-r2.hg
513 #else
513 #else
514 use existing bundles:
514 use existing bundles:
515 $ hg init r1
515 $ hg init r1
516 $ hg -R r1 -q unbundle $TESTDIR/bundles/issue4438-r1.hg
516 $ hg -R r1 -q unbundle $TESTDIR/bundles/issue4438-r1.hg
517 $ hg -R r1 -q up
517 $ hg -R r1 -q up
518 $ hg init r2
518 $ hg init r2
519 $ hg -R r2 -q unbundle $TESTDIR/bundles/issue4438-r2.hg
519 $ hg -R r2 -q unbundle $TESTDIR/bundles/issue4438-r2.hg
520 $ hg -R r2 -q up
520 $ hg -R r2 -q up
521 #endif
521 #endif
522
522
523 Set iteration order could cause wrong and unstable results - fixed in 73cfaa348650:
523 Set iteration order could cause wrong and unstable results - fixed in 73cfaa348650:
524
524
525 $ hg -R r1 outgoing r2 -T'{rev} '
525 $ hg -R r1 outgoing r2 -T'{rev} '
526 comparing with r2
526 comparing with r2
527 searching for changes
527 searching for changes
528 101 102 103 104 105 106 107 108 109 110 (no-eol)
528 101 102 103 104 105 106 107 108 109 110 (no-eol)
529
529
530 The case where all the 'initialsamplesize' samples already were common would
530 The case where all the 'initialsamplesize' samples already were common would
531 give 'all remote heads known locally' without checking the remaining heads -
531 give 'all remote heads known locally' without checking the remaining heads -
532 fixed in 86c35b7ae300:
532 fixed in 86c35b7ae300:
533
533
534 $ cat >> $TESTTMP/unrandomsample.py << EOF
534 $ cat >> $TESTTMP/unrandomsample.py << EOF
535 > import random
535 > import random
536 > def sample(population, k):
536 > def sample(population, k):
537 > return sorted(population)[:k]
537 > return sorted(population)[:k]
538 > random.sample = sample
538 > random.sample = sample
539 > EOF
539 > EOF
540
540
541 $ cat >> r1/.hg/hgrc << EOF
541 $ cat >> r1/.hg/hgrc << EOF
542 > [extensions]
542 > [extensions]
543 > unrandomsample = $TESTTMP/unrandomsample.py
543 > unrandomsample = $TESTTMP/unrandomsample.py
544 > EOF
544 > EOF
545
545
546 $ hg -R r1 outgoing r2 -T'{rev} ' --config extensions.blackbox=
546 $ hg -R r1 outgoing r2 -T'{rev} ' --config extensions.blackbox=
547 comparing with r2
547 comparing with r2
548 searching for changes
548 searching for changes
549 101 102 103 104 105 106 107 108 109 110 (no-eol)
549 101 102 103 104 105 106 107 108 109 110 (no-eol)
550 $ hg -R r1 --config extensions.blackbox= blackbox
550 $ hg -R r1 --config extensions.blackbox= blackbox
551 * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> serve --cmdserver chgunix * (glob) (chg !)
551 * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> serve --cmdserver chgunix * (glob) (chg !)
552 * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> -R r1 outgoing r2 *-T{rev} * --config *extensions.blackbox=* (glob)
552 * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> -R r1 outgoing r2 *-T{rev} * --config *extensions.blackbox=* (glob)
553 * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> found 101 common and 1 unknown server heads, 2 roundtrips in *.????s (glob)
553 * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> found 101 common and 1 unknown server heads, 2 roundtrips in *.????s (glob)
554 * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> -R r1 outgoing r2 *-T{rev} * --config *extensions.blackbox=* exited 0 after *.?? seconds (glob)
554 * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> -R r1 outgoing r2 *-T{rev} * --config *extensions.blackbox=* exited 0 after *.?? seconds (glob)
555 * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> -R r1 --config *extensions.blackbox=* blackbox (glob)
555 * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> -R r1 --config *extensions.blackbox=* blackbox (glob)
556 $ cd ..
556 $ cd ..
@@ -1,1205 +1,1205 b''
1 $ cat >> $HGRCPATH <<EOF
1 $ cat >> $HGRCPATH <<EOF
2 > [extdiff]
2 > [extdiff]
3 > # for portability:
3 > # for portability:
4 > pdiff = sh "$RUNTESTDIR/pdiff"
4 > pdiff = sh "$RUNTESTDIR/pdiff"
5 > [progress]
5 > [progress]
6 > disable=False
6 > disable=False
7 > assume-tty = 1
7 > assume-tty = 1
8 > delay = 0
8 > delay = 0
9 > # set changedelay really large so we don't see nested topics
9 > # set changedelay really large so we don't see nested topics
10 > changedelay = 30000
10 > changedelay = 30000
11 > format = topic bar number
11 > format = topic bar number
12 > refresh = 0
12 > refresh = 0
13 > width = 60
13 > width = 60
14 > EOF
14 > EOF
15
15
16 Preparing the subrepository 'sub2'
16 Preparing the subrepository 'sub2'
17
17
18 $ hg init sub2
18 $ hg init sub2
19 $ echo sub2 > sub2/sub2
19 $ echo sub2 > sub2/sub2
20 $ hg add -R sub2
20 $ hg add -R sub2
21 adding sub2/sub2
21 adding sub2/sub2
22 $ hg commit -R sub2 -m "sub2 import"
22 $ hg commit -R sub2 -m "sub2 import"
23
23
24 Preparing the 'sub1' repo which depends on the subrepo 'sub2'
24 Preparing the 'sub1' repo which depends on the subrepo 'sub2'
25
25
26 $ hg init sub1
26 $ hg init sub1
27 $ echo sub1 > sub1/sub1
27 $ echo sub1 > sub1/sub1
28 $ echo "sub2 = ../sub2" > sub1/.hgsub
28 $ echo "sub2 = ../sub2" > sub1/.hgsub
29 $ hg clone sub2 sub1/sub2
29 $ hg clone sub2 sub1/sub2
30 \r (no-eol) (esc)
30 \r (no-eol) (esc)
31 linking [ <=> ] 1\r (no-eol) (esc)
31 linking [ <=> ] 1\r (no-eol) (esc)
32 linking [ <=> ] 2\r (no-eol) (esc)
32 linking [ <=> ] 2\r (no-eol) (esc)
33 linking [ <=> ] 3\r (no-eol) (esc)
33 linking [ <=> ] 3\r (no-eol) (esc)
34 linking [ <=> ] 4\r (no-eol) (esc)
34 linking [ <=> ] 4\r (no-eol) (esc)
35 linking [ <=> ] 5\r (no-eol) (esc)
35 linking [ <=> ] 5\r (no-eol) (esc)
36 linking [ <=> ] 6\r (no-eol) (esc)
36 linking [ <=> ] 6\r (no-eol) (esc)
37 \r (no-eol) (esc)
37 \r (no-eol) (esc)
38 \r (no-eol) (esc)
38 \r (no-eol) (esc)
39 updating [===========================================>] 1/1\r (no-eol) (esc)
39 updating [===========================================>] 1/1\r (no-eol) (esc)
40 \r (no-eol) (esc)
40 \r (no-eol) (esc)
41 updating to branch default
41 updating to branch default
42 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
42 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
43 $ hg add -R sub1
43 $ hg add -R sub1
44 adding sub1/.hgsub
44 adding sub1/.hgsub
45 adding sub1/sub1
45 adding sub1/sub1
46 $ hg commit -R sub1 -m "sub1 import"
46 $ hg commit -R sub1 -m "sub1 import"
47
47
48 Preparing the 'main' repo which depends on the subrepo 'sub1'
48 Preparing the 'main' repo which depends on the subrepo 'sub1'
49
49
50 $ hg init main
50 $ hg init main
51 $ echo main > main/main
51 $ echo main > main/main
52 $ echo "sub1 = ../sub1" > main/.hgsub
52 $ echo "sub1 = ../sub1" > main/.hgsub
53 $ hg clone sub1 main/sub1
53 $ hg clone sub1 main/sub1
54 \r (no-eol) (esc)
54 \r (no-eol) (esc)
55 linking [ <=> ] 1\r (no-eol) (esc)
55 linking [ <=> ] 1\r (no-eol) (esc)
56 linking [ <=> ] 2\r (no-eol) (esc)
56 linking [ <=> ] 2\r (no-eol) (esc)
57 linking [ <=> ] 3\r (no-eol) (esc)
57 linking [ <=> ] 3\r (no-eol) (esc)
58 linking [ <=> ] 4\r (no-eol) (esc)
58 linking [ <=> ] 4\r (no-eol) (esc)
59 linking [ <=> ] 5\r (no-eol) (esc)
59 linking [ <=> ] 5\r (no-eol) (esc)
60 linking [ <=> ] 6\r (no-eol) (esc)
60 linking [ <=> ] 6\r (no-eol) (esc)
61 linking [ <=> ] 7\r (no-eol) (esc)
61 linking [ <=> ] 7\r (no-eol) (esc)
62 linking [ <=> ] 8\r (no-eol) (esc)
62 linking [ <=> ] 8\r (no-eol) (esc)
63 linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !)
63 linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !)
64 linking [ <=> ] 10\r (no-eol) (esc) (reposimplestore !)
64 linking [ <=> ] 10\r (no-eol) (esc) (reposimplestore !)
65 \r (no-eol) (esc)
65 \r (no-eol) (esc)
66 \r (no-eol) (esc)
66 \r (no-eol) (esc)
67 updating [===========================================>] 3/3\r (no-eol) (esc)
67 updating [===========================================>] 3/3\r (no-eol) (esc)
68 \r (no-eol) (esc)
68 \r (no-eol) (esc)
69 \r (no-eol) (esc)
69 \r (no-eol) (esc)
70 linking [ <=> ] 1\r (no-eol) (esc)
70 linking [ <=> ] 1\r (no-eol) (esc)
71 linking [ <=> ] 2\r (no-eol) (esc)
71 linking [ <=> ] 2\r (no-eol) (esc)
72 linking [ <=> ] 3\r (no-eol) (esc)
72 linking [ <=> ] 3\r (no-eol) (esc)
73 linking [ <=> ] 4\r (no-eol) (esc)
73 linking [ <=> ] 4\r (no-eol) (esc)
74 linking [ <=> ] 5\r (no-eol) (esc)
74 linking [ <=> ] 5\r (no-eol) (esc)
75 linking [ <=> ] 6\r (no-eol) (esc)
75 linking [ <=> ] 6\r (no-eol) (esc)
76 updating [===========================================>] 1/1\r (no-eol) (esc)
76 updating [===========================================>] 1/1\r (no-eol) (esc)
77 \r (no-eol) (esc)
77 \r (no-eol) (esc)
78 updating to branch default
78 updating to branch default
79 cloning subrepo sub2 from $TESTTMP/sub2
79 cloning subrepo sub2 from $TESTTMP/sub2
80 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
80 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
81 $ hg add -R main
81 $ hg add -R main
82 adding main/.hgsub
82 adding main/.hgsub
83 adding main/main
83 adding main/main
84 $ hg commit -R main -m "main import"
84 $ hg commit -R main -m "main import"
85
85
86 #if serve
86 #if serve
87
87
88 Unfortunately, subrepos not at their nominal location cannot be cloned. But
88 Unfortunately, subrepos not at their nominal location cannot be cloned. But
89 they are still served from their location within the local repository. The only
89 they are still served from their location within the local repository. The only
90 reason why 'main' can be cloned via the filesystem is because 'sub1' and 'sub2'
90 reason why 'main' can be cloned via the filesystem is because 'sub1' and 'sub2'
91 are also available as siblings of 'main'.
91 are also available as siblings of 'main'.
92
92
93 $ hg serve -R main --debug -S -p $HGPORT -d --pid-file=hg1.pid -E error.log -A access.log
93 $ hg serve -R main --debug -S -p $HGPORT -d --pid-file=hg1.pid -E error.log -A access.log
94 adding = $TESTTMP/main
94 adding = $TESTTMP/main
95 adding sub1 = $TESTTMP/main/sub1
95 adding sub1 = $TESTTMP/main/sub1
96 adding sub1/sub2 = $TESTTMP/main/sub1/sub2
96 adding sub1/sub2 = $TESTTMP/main/sub1/sub2
97 listening at http://*:$HGPORT/ (bound to *:$HGPORT) (glob) (?)
97 listening at http://*:$HGPORT/ (bound to *:$HGPORT) (glob) (?)
98 adding = $TESTTMP/main (?)
98 adding = $TESTTMP/main (?)
99 adding sub1 = $TESTTMP/main/sub1 (?)
99 adding sub1 = $TESTTMP/main/sub1 (?)
100 adding sub1/sub2 = $TESTTMP/main/sub1/sub2 (?)
100 adding sub1/sub2 = $TESTTMP/main/sub1/sub2 (?)
101 $ cat hg1.pid >> $DAEMON_PIDS
101 $ cat hg1.pid >> $DAEMON_PIDS
102
102
103 $ hg clone http://localhost:$HGPORT httpclone --config progress.disable=True
103 $ hg clone http://localhost:$HGPORT httpclone --config progress.disable=True
104 requesting all changes
104 requesting all changes
105 adding changesets
105 adding changesets
106 adding manifests
106 adding manifests
107 adding file changes
107 adding file changes
108 added 1 changesets with 3 changes to 3 files
108 added 1 changesets with 3 changes to 3 files
109 new changesets 7f491f53a367
109 new changesets 7f491f53a367
110 updating to branch default
110 updating to branch default
111 abort: HTTP Error 404: Not Found
111 abort: HTTP Error 404: Not Found
112 [255]
112 [255]
113
113
114 $ cat access.log
114 $ cat access.log
115 * "GET /?cmd=capabilities HTTP/1.1" 200 - * (glob)
115 * "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
116 * "GET /?cmd=batch HTTP/1.1" 200 - * (glob)
116 * "GET /?cmd=batch HTTP/1.1" 200 - * (glob)
117 * "GET /?cmd=getbundle HTTP/1.1" 200 - * (glob)
117 * "GET /?cmd=getbundle HTTP/1.1" 200 - * (glob)
118 * "GET /../sub1?cmd=capabilities HTTP/1.1" 404 - * (glob)
118 * "GET /../sub1?cmd=capabilities HTTP/1.1" 404 - (glob)
119 $ cat error.log
119 $ cat error.log
120
120
121 $ killdaemons.py
121 $ killdaemons.py
122 $ rm hg1.pid error.log access.log
122 $ rm hg1.pid error.log access.log
123 #endif
123 #endif
124
124
125 Cleaning both repositories, just as a clone -U
125 Cleaning both repositories, just as a clone -U
126
126
127 $ hg up -C -R sub2 null
127 $ hg up -C -R sub2 null
128 \r (no-eol) (esc)
128 \r (no-eol) (esc)
129 updating [===========================================>] 1/1\r (no-eol) (esc)
129 updating [===========================================>] 1/1\r (no-eol) (esc)
130 \r (no-eol) (esc)
130 \r (no-eol) (esc)
131 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
131 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
132 $ hg up -C -R sub1 null
132 $ hg up -C -R sub1 null
133 \r (no-eol) (esc)
133 \r (no-eol) (esc)
134 updating [===========================================>] 1/1\r (no-eol) (esc)
134 updating [===========================================>] 1/1\r (no-eol) (esc)
135 \r (no-eol) (esc)
135 \r (no-eol) (esc)
136 \r (no-eol) (esc)
136 \r (no-eol) (esc)
137 updating [===========================================>] 3/3\r (no-eol) (esc)
137 updating [===========================================>] 3/3\r (no-eol) (esc)
138 \r (no-eol) (esc)
138 \r (no-eol) (esc)
139 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
139 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
140 $ hg up -C -R main null
140 $ hg up -C -R main null
141 \r (no-eol) (esc)
141 \r (no-eol) (esc)
142 updating [===========================================>] 1/1\r (no-eol) (esc)
142 updating [===========================================>] 1/1\r (no-eol) (esc)
143 \r (no-eol) (esc)
143 \r (no-eol) (esc)
144 \r (no-eol) (esc)
144 \r (no-eol) (esc)
145 updating [===========================================>] 3/3\r (no-eol) (esc)
145 updating [===========================================>] 3/3\r (no-eol) (esc)
146 \r (no-eol) (esc)
146 \r (no-eol) (esc)
147 \r (no-eol) (esc)
147 \r (no-eol) (esc)
148 updating [===========================================>] 3/3\r (no-eol) (esc)
148 updating [===========================================>] 3/3\r (no-eol) (esc)
149 \r (no-eol) (esc)
149 \r (no-eol) (esc)
150 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
150 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
151 $ rm -rf main/sub1
151 $ rm -rf main/sub1
152 $ rm -rf sub1/sub2
152 $ rm -rf sub1/sub2
153
153
154 Clone main
154 Clone main
155
155
156 $ hg --config extensions.largefiles= clone main cloned
156 $ hg --config extensions.largefiles= clone main cloned
157 \r (no-eol) (esc)
157 \r (no-eol) (esc)
158 linking [ <=> ] 1\r (no-eol) (esc)
158 linking [ <=> ] 1\r (no-eol) (esc)
159 linking [ <=> ] 2\r (no-eol) (esc)
159 linking [ <=> ] 2\r (no-eol) (esc)
160 linking [ <=> ] 3\r (no-eol) (esc)
160 linking [ <=> ] 3\r (no-eol) (esc)
161 linking [ <=> ] 4\r (no-eol) (esc)
161 linking [ <=> ] 4\r (no-eol) (esc)
162 linking [ <=> ] 5\r (no-eol) (esc)
162 linking [ <=> ] 5\r (no-eol) (esc)
163 linking [ <=> ] 6\r (no-eol) (esc)
163 linking [ <=> ] 6\r (no-eol) (esc)
164 linking [ <=> ] 7\r (no-eol) (esc)
164 linking [ <=> ] 7\r (no-eol) (esc)
165 linking [ <=> ] 8\r (no-eol) (esc)
165 linking [ <=> ] 8\r (no-eol) (esc)
166 linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !)
166 linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !)
167 linking [ <=> ] 10\r (no-eol) (esc) (reposimplestore !)
167 linking [ <=> ] 10\r (no-eol) (esc) (reposimplestore !)
168 \r (no-eol) (esc)
168 \r (no-eol) (esc)
169 \r (no-eol) (esc)
169 \r (no-eol) (esc)
170 updating [===========================================>] 3/3\r (no-eol) (esc)
170 updating [===========================================>] 3/3\r (no-eol) (esc)
171 \r (no-eol) (esc)
171 \r (no-eol) (esc)
172 \r (no-eol) (esc)
172 \r (no-eol) (esc)
173 linking [ <=> ] 1\r (no-eol) (esc)
173 linking [ <=> ] 1\r (no-eol) (esc)
174 linking [ <=> ] 2\r (no-eol) (esc)
174 linking [ <=> ] 2\r (no-eol) (esc)
175 linking [ <=> ] 3\r (no-eol) (esc)
175 linking [ <=> ] 3\r (no-eol) (esc)
176 linking [ <=> ] 4\r (no-eol) (esc)
176 linking [ <=> ] 4\r (no-eol) (esc)
177 linking [ <=> ] 5\r (no-eol) (esc)
177 linking [ <=> ] 5\r (no-eol) (esc)
178 linking [ <=> ] 6\r (no-eol) (esc)
178 linking [ <=> ] 6\r (no-eol) (esc)
179 linking [ <=> ] 7\r (no-eol) (esc)
179 linking [ <=> ] 7\r (no-eol) (esc)
180 linking [ <=> ] 8\r (no-eol) (esc)
180 linking [ <=> ] 8\r (no-eol) (esc)
181 linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !)
181 linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !)
182 linking [ <=> ] 10\r (no-eol) (esc) (reposimplestore !)
182 linking [ <=> ] 10\r (no-eol) (esc) (reposimplestore !)
183 updating [===========================================>] 3/3\r (no-eol) (esc)
183 updating [===========================================>] 3/3\r (no-eol) (esc)
184 \r (no-eol) (esc)
184 \r (no-eol) (esc)
185 \r (no-eol) (esc)
185 \r (no-eol) (esc)
186 linking [ <=> ] 1\r (no-eol) (esc) (reporevlogstore !)
186 linking [ <=> ] 1\r (no-eol) (esc) (reporevlogstore !)
187 linking [ <=> ] 2\r (no-eol) (esc) (reporevlogstore !)
187 linking [ <=> ] 2\r (no-eol) (esc) (reporevlogstore !)
188 linking [ <=> ] 3\r (no-eol) (esc) (reporevlogstore !)
188 linking [ <=> ] 3\r (no-eol) (esc) (reporevlogstore !)
189 linking [ <=> ] 4\r (no-eol) (esc) (reporevlogstore !)
189 linking [ <=> ] 4\r (no-eol) (esc) (reporevlogstore !)
190 linking [ <=> ] 5\r (no-eol) (esc) (reporevlogstore !)
190 linking [ <=> ] 5\r (no-eol) (esc) (reporevlogstore !)
191 linking [ <=> ] 6\r (no-eol) (esc) (reporevlogstore !)
191 linking [ <=> ] 6\r (no-eol) (esc) (reporevlogstore !)
192 linking [ <=> ] 1\r (no-eol) (esc) (reposimplestore !)
192 linking [ <=> ] 1\r (no-eol) (esc) (reposimplestore !)
193 linking [ <=> ] 2\r (no-eol) (esc) (reposimplestore !)
193 linking [ <=> ] 2\r (no-eol) (esc) (reposimplestore !)
194 linking [ <=> ] 3\r (no-eol) (esc) (reposimplestore !)
194 linking [ <=> ] 3\r (no-eol) (esc) (reposimplestore !)
195 linking [ <=> ] 4\r (no-eol) (esc) (reposimplestore !)
195 linking [ <=> ] 4\r (no-eol) (esc) (reposimplestore !)
196 linking [ <=> ] 5\r (no-eol) (esc) (reposimplestore !)
196 linking [ <=> ] 5\r (no-eol) (esc) (reposimplestore !)
197 linking [ <=> ] 6\r (no-eol) (esc) (reposimplestore !)
197 linking [ <=> ] 6\r (no-eol) (esc) (reposimplestore !)
198 updating [===========================================>] 1/1\r (no-eol) (esc)
198 updating [===========================================>] 1/1\r (no-eol) (esc)
199 \r (no-eol) (esc)
199 \r (no-eol) (esc)
200 updating to branch default
200 updating to branch default
201 cloning subrepo sub1 from $TESTTMP/sub1
201 cloning subrepo sub1 from $TESTTMP/sub1
202 cloning subrepo sub1/sub2 from $TESTTMP/sub2
202 cloning subrepo sub1/sub2 from $TESTTMP/sub2
203 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
203 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
204
204
205 Largefiles is NOT enabled in the clone if the source repo doesn't require it
205 Largefiles is NOT enabled in the clone if the source repo doesn't require it
206 $ cat cloned/.hg/hgrc
206 $ cat cloned/.hg/hgrc
207 # example repository config (see 'hg help config' for more info)
207 # example repository config (see 'hg help config' for more info)
208 [paths]
208 [paths]
209 default = $TESTTMP/main
209 default = $TESTTMP/main
210
210
211 # path aliases to other clones of this repo in URLs or filesystem paths
211 # path aliases to other clones of this repo in URLs or filesystem paths
212 # (see 'hg help config.paths' for more info)
212 # (see 'hg help config.paths' for more info)
213 #
213 #
214 # default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork
214 # default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork
215 # my-fork = ssh://jdoe@example.net/hg/jdoes-fork
215 # my-fork = ssh://jdoe@example.net/hg/jdoes-fork
216 # my-clone = /home/jdoe/jdoes-clone
216 # my-clone = /home/jdoe/jdoes-clone
217
217
218 [ui]
218 [ui]
219 # name and email (local to this repository, optional), e.g.
219 # name and email (local to this repository, optional), e.g.
220 # username = Jane Doe <jdoe@example.com>
220 # username = Jane Doe <jdoe@example.com>
221
221
222 Checking cloned repo ids
222 Checking cloned repo ids
223
223
224 $ printf "cloned " ; hg id -R cloned
224 $ printf "cloned " ; hg id -R cloned
225 cloned 7f491f53a367 tip
225 cloned 7f491f53a367 tip
226 $ printf "cloned/sub1 " ; hg id -R cloned/sub1
226 $ printf "cloned/sub1 " ; hg id -R cloned/sub1
227 cloned/sub1 fc3b4ce2696f tip
227 cloned/sub1 fc3b4ce2696f tip
228 $ printf "cloned/sub1/sub2 " ; hg id -R cloned/sub1/sub2
228 $ printf "cloned/sub1/sub2 " ; hg id -R cloned/sub1/sub2
229 cloned/sub1/sub2 c57a0840e3ba tip
229 cloned/sub1/sub2 c57a0840e3ba tip
230
230
231 debugsub output for main and sub1
231 debugsub output for main and sub1
232
232
233 $ hg debugsub -R cloned
233 $ hg debugsub -R cloned
234 path sub1
234 path sub1
235 source ../sub1
235 source ../sub1
236 revision fc3b4ce2696f7741438c79207583768f2ce6b0dd
236 revision fc3b4ce2696f7741438c79207583768f2ce6b0dd
237 $ hg debugsub -R cloned/sub1
237 $ hg debugsub -R cloned/sub1
238 path sub2
238 path sub2
239 source ../sub2
239 source ../sub2
240 revision c57a0840e3badd667ef3c3ef65471609acb2ba3c
240 revision c57a0840e3badd667ef3c3ef65471609acb2ba3c
241
241
242 Modifying deeply nested 'sub2'
242 Modifying deeply nested 'sub2'
243
243
244 $ echo modified > cloned/sub1/sub2/sub2
244 $ echo modified > cloned/sub1/sub2/sub2
245 $ hg commit --subrepos -m "deep nested modif should trigger a commit" -R cloned
245 $ hg commit --subrepos -m "deep nested modif should trigger a commit" -R cloned
246 committing subrepository sub1
246 committing subrepository sub1
247 committing subrepository sub1/sub2
247 committing subrepository sub1/sub2
248
248
249 Checking modified node ids
249 Checking modified node ids
250
250
251 $ printf "cloned " ; hg id -R cloned
251 $ printf "cloned " ; hg id -R cloned
252 cloned ffe6649062fe tip
252 cloned ffe6649062fe tip
253 $ printf "cloned/sub1 " ; hg id -R cloned/sub1
253 $ printf "cloned/sub1 " ; hg id -R cloned/sub1
254 cloned/sub1 2ecb03bf44a9 tip
254 cloned/sub1 2ecb03bf44a9 tip
255 $ printf "cloned/sub1/sub2 " ; hg id -R cloned/sub1/sub2
255 $ printf "cloned/sub1/sub2 " ; hg id -R cloned/sub1/sub2
256 cloned/sub1/sub2 53dd3430bcaf tip
256 cloned/sub1/sub2 53dd3430bcaf tip
257
257
258 debugsub output for main and sub1
258 debugsub output for main and sub1
259
259
260 $ hg debugsub -R cloned
260 $ hg debugsub -R cloned
261 path sub1
261 path sub1
262 source ../sub1
262 source ../sub1
263 revision 2ecb03bf44a94e749e8669481dd9069526ce7cb9
263 revision 2ecb03bf44a94e749e8669481dd9069526ce7cb9
264 $ hg debugsub -R cloned/sub1
264 $ hg debugsub -R cloned/sub1
265 path sub2
265 path sub2
266 source ../sub2
266 source ../sub2
267 revision 53dd3430bcaf5ab4a7c48262bcad6d441f510487
267 revision 53dd3430bcaf5ab4a7c48262bcad6d441f510487
268
268
269 Check that deep archiving works
269 Check that deep archiving works
270
270
271 $ cd cloned
271 $ cd cloned
272 $ echo 'test' > sub1/sub2/test.txt
272 $ echo 'test' > sub1/sub2/test.txt
273 $ hg --config extensions.largefiles=! add sub1/sub2/test.txt
273 $ hg --config extensions.largefiles=! add sub1/sub2/test.txt
274 $ mkdir sub1/sub2/folder
274 $ mkdir sub1/sub2/folder
275 $ echo 'subfolder' > sub1/sub2/folder/test.txt
275 $ echo 'subfolder' > sub1/sub2/folder/test.txt
276 $ hg ci -ASm "add test.txt"
276 $ hg ci -ASm "add test.txt"
277 adding sub1/sub2/folder/test.txt
277 adding sub1/sub2/folder/test.txt
278 committing subrepository sub1
278 committing subrepository sub1
279 committing subrepository sub1/sub2
279 committing subrepository sub1/sub2
280
280
281 $ rm -r main
281 $ rm -r main
282 $ hg archive -S -qr 'wdir()' ../wdir
282 $ hg archive -S -qr 'wdir()' ../wdir
283 $ cat ../wdir/.hg_archival.txt
283 $ cat ../wdir/.hg_archival.txt
284 repo: 7f491f53a367861f47ee64a80eb997d1f341b77a
284 repo: 7f491f53a367861f47ee64a80eb997d1f341b77a
285 node: 9bb10eebee29dc0f1201dcf5977b811a540255fd+
285 node: 9bb10eebee29dc0f1201dcf5977b811a540255fd+
286 branch: default
286 branch: default
287 latesttag: null
287 latesttag: null
288 latesttagdistance: 4
288 latesttagdistance: 4
289 changessincelatesttag: 4
289 changessincelatesttag: 4
290 $ hg update -Cq .
290 $ hg update -Cq .
291
291
292 A deleted subrepo file is flagged as dirty, like the top level repo
292 A deleted subrepo file is flagged as dirty, like the top level repo
293
293
294 $ rm -r ../wdir sub1/sub2/folder/test.txt
294 $ rm -r ../wdir sub1/sub2/folder/test.txt
295 $ hg archive -S -qr 'wdir()' ../wdir
295 $ hg archive -S -qr 'wdir()' ../wdir
296 $ cat ../wdir/.hg_archival.txt
296 $ cat ../wdir/.hg_archival.txt
297 repo: 7f491f53a367861f47ee64a80eb997d1f341b77a
297 repo: 7f491f53a367861f47ee64a80eb997d1f341b77a
298 node: 9bb10eebee29dc0f1201dcf5977b811a540255fd+
298 node: 9bb10eebee29dc0f1201dcf5977b811a540255fd+
299 branch: default
299 branch: default
300 latesttag: null
300 latesttag: null
301 latesttagdistance: 4
301 latesttagdistance: 4
302 changessincelatesttag: 4
302 changessincelatesttag: 4
303 $ hg update -Cq .
303 $ hg update -Cq .
304 $ rm -r ../wdir
304 $ rm -r ../wdir
305
305
306 $ hg archive -S -qr 'wdir()' ../wdir \
306 $ hg archive -S -qr 'wdir()' ../wdir \
307 > --config 'experimental.archivemetatemplate=archived {node|short}\n'
307 > --config 'experimental.archivemetatemplate=archived {node|short}\n'
308 $ cat ../wdir/.hg_archival.txt
308 $ cat ../wdir/.hg_archival.txt
309 archived ffffffffffff
309 archived ffffffffffff
310 $ rm -r ../wdir
310 $ rm -r ../wdir
311
311
312 .. but first take a detour through some deep removal testing
312 .. but first take a detour through some deep removal testing
313
313
314 $ hg remove -S -I 're:.*.txt' .
314 $ hg remove -S -I 're:.*.txt' .
315 \r (no-eol) (esc)
315 \r (no-eol) (esc)
316 searching [==========================================>] 1/1\r (no-eol) (esc)
316 searching [==========================================>] 1/1\r (no-eol) (esc)
317 searching [==========================================>] 1/1\r (no-eol) (esc)
317 searching [==========================================>] 1/1\r (no-eol) (esc)
318 \r (no-eol) (esc)
318 \r (no-eol) (esc)
319 \r (no-eol) (esc)
319 \r (no-eol) (esc)
320 deleting [=====================> ] 1/2\r (no-eol) (esc)
320 deleting [=====================> ] 1/2\r (no-eol) (esc)
321 \r (no-eol) (esc)
321 \r (no-eol) (esc)
322 \r (no-eol) (esc)
322 \r (no-eol) (esc)
323 deleting [===========================================>] 2/2\r (no-eol) (esc)
323 deleting [===========================================>] 2/2\r (no-eol) (esc)
324 \r (no-eol) (esc)
324 \r (no-eol) (esc)
325 removing sub1/sub2/folder/test.txt
325 removing sub1/sub2/folder/test.txt
326 removing sub1/sub2/test.txt
326 removing sub1/sub2/test.txt
327 $ hg status -S
327 $ hg status -S
328 R sub1/sub2/folder/test.txt
328 R sub1/sub2/folder/test.txt
329 R sub1/sub2/test.txt
329 R sub1/sub2/test.txt
330 $ hg update -Cq
330 $ hg update -Cq
331 $ hg remove -I 're:.*.txt' sub1
331 $ hg remove -I 're:.*.txt' sub1
332 \r (no-eol) (esc)
332 \r (no-eol) (esc)
333 searching [==========================================>] 1/1\r (no-eol) (esc)
333 searching [==========================================>] 1/1\r (no-eol) (esc)
334 \r (no-eol) (esc)
334 \r (no-eol) (esc)
335 \r (no-eol) (esc)
335 \r (no-eol) (esc)
336 deleting [===========================================>] 1/1\r (no-eol) (esc)
336 deleting [===========================================>] 1/1\r (no-eol) (esc)
337 \r (no-eol) (esc)
337 \r (no-eol) (esc)
338 $ hg status -S
338 $ hg status -S
339 $ hg remove sub1/sub2/folder/test.txt
339 $ hg remove sub1/sub2/folder/test.txt
340 \r (no-eol) (esc)
340 \r (no-eol) (esc)
341 searching [==========================================>] 1/1\r (no-eol) (esc)
341 searching [==========================================>] 1/1\r (no-eol) (esc)
342 searching [==========================================>] 1/1\r (no-eol) (esc)
342 searching [==========================================>] 1/1\r (no-eol) (esc)
343 \r (no-eol) (esc)
343 \r (no-eol) (esc)
344 \r (no-eol) (esc)
344 \r (no-eol) (esc)
345 deleting [===========================================>] 1/1\r (no-eol) (esc)
345 deleting [===========================================>] 1/1\r (no-eol) (esc)
346 \r (no-eol) (esc)
346 \r (no-eol) (esc)
347 \r (no-eol) (esc)
347 \r (no-eol) (esc)
348 deleting [===========================================>] 1/1\r (no-eol) (esc)
348 deleting [===========================================>] 1/1\r (no-eol) (esc)
349 \r (no-eol) (esc)
349 \r (no-eol) (esc)
350 \r (no-eol) (esc)
350 \r (no-eol) (esc)
351 deleting [===========================================>] 1/1\r (no-eol) (esc)
351 deleting [===========================================>] 1/1\r (no-eol) (esc)
352 \r (no-eol) (esc)
352 \r (no-eol) (esc)
353 $ hg remove sub1/.hgsubstate
353 $ hg remove sub1/.hgsubstate
354 \r (no-eol) (esc)
354 \r (no-eol) (esc)
355 searching [==========================================>] 1/1\r (no-eol) (esc)
355 searching [==========================================>] 1/1\r (no-eol) (esc)
356 \r (no-eol) (esc)
356 \r (no-eol) (esc)
357 \r (no-eol) (esc)
357 \r (no-eol) (esc)
358 deleting [===========================================>] 1/1\r (no-eol) (esc)
358 deleting [===========================================>] 1/1\r (no-eol) (esc)
359 \r (no-eol) (esc)
359 \r (no-eol) (esc)
360 \r (no-eol) (esc)
360 \r (no-eol) (esc)
361 deleting [===========================================>] 1/1\r (no-eol) (esc)
361 deleting [===========================================>] 1/1\r (no-eol) (esc)
362 \r (no-eol) (esc)
362 \r (no-eol) (esc)
363 $ mv sub1/.hgsub sub1/x.hgsub
363 $ mv sub1/.hgsub sub1/x.hgsub
364 $ hg status -S
364 $ hg status -S
365 warning: subrepo spec file 'sub1/.hgsub' not found
365 warning: subrepo spec file 'sub1/.hgsub' not found
366 R sub1/.hgsubstate
366 R sub1/.hgsubstate
367 R sub1/sub2/folder/test.txt
367 R sub1/sub2/folder/test.txt
368 ! sub1/.hgsub
368 ! sub1/.hgsub
369 ? sub1/x.hgsub
369 ? sub1/x.hgsub
370 $ mv sub1/x.hgsub sub1/.hgsub
370 $ mv sub1/x.hgsub sub1/.hgsub
371 $ hg update -Cq
371 $ hg update -Cq
372 $ touch sub1/foo
372 $ touch sub1/foo
373 $ hg forget sub1/sub2/folder/test.txt
373 $ hg forget sub1/sub2/folder/test.txt
374 $ rm sub1/sub2/test.txt
374 $ rm sub1/sub2/test.txt
375
375
376 Test relative path printing + subrepos
376 Test relative path printing + subrepos
377 $ mkdir -p foo/bar
377 $ mkdir -p foo/bar
378 $ cd foo
378 $ cd foo
379 $ touch bar/abc
379 $ touch bar/abc
380 $ hg addremove -S ..
380 $ hg addremove -S ..
381 \r (no-eol) (esc)
381 \r (no-eol) (esc)
382 searching for exact renames [ ] 0/1\r (no-eol) (esc)
382 searching for exact renames [ ] 0/1\r (no-eol) (esc)
383 \r (no-eol) (esc)
383 \r (no-eol) (esc)
384 adding ../sub1/sub2/folder/test.txt
384 adding ../sub1/sub2/folder/test.txt
385 removing ../sub1/sub2/test.txt
385 removing ../sub1/sub2/test.txt
386 adding ../sub1/foo
386 adding ../sub1/foo
387 adding bar/abc
387 adding bar/abc
388 $ cd ..
388 $ cd ..
389 $ hg status -S
389 $ hg status -S
390 A foo/bar/abc
390 A foo/bar/abc
391 A sub1/foo
391 A sub1/foo
392 R sub1/sub2/test.txt
392 R sub1/sub2/test.txt
393
393
394 Archive wdir() with subrepos
394 Archive wdir() with subrepos
395 $ hg rm main
395 $ hg rm main
396 \r (no-eol) (esc)
396 \r (no-eol) (esc)
397 deleting [===========================================>] 1/1\r (no-eol) (esc)
397 deleting [===========================================>] 1/1\r (no-eol) (esc)
398 \r (no-eol) (esc)
398 \r (no-eol) (esc)
399 $ hg archive -S -r 'wdir()' ../wdir
399 $ hg archive -S -r 'wdir()' ../wdir
400 \r (no-eol) (esc)
400 \r (no-eol) (esc)
401 archiving [ ] 0/3\r (no-eol) (esc)
401 archiving [ ] 0/3\r (no-eol) (esc)
402 archiving [=============> ] 1/3\r (no-eol) (esc)
402 archiving [=============> ] 1/3\r (no-eol) (esc)
403 archiving [===========================> ] 2/3\r (no-eol) (esc)
403 archiving [===========================> ] 2/3\r (no-eol) (esc)
404 archiving [==========================================>] 3/3\r (no-eol) (esc)
404 archiving [==========================================>] 3/3\r (no-eol) (esc)
405 \r (no-eol) (esc)
405 \r (no-eol) (esc)
406 \r (no-eol) (esc)
406 \r (no-eol) (esc)
407 archiving (sub1) [ ] 0/4\r (no-eol) (esc)
407 archiving (sub1) [ ] 0/4\r (no-eol) (esc)
408 archiving (sub1) [========> ] 1/4\r (no-eol) (esc)
408 archiving (sub1) [========> ] 1/4\r (no-eol) (esc)
409 archiving (sub1) [=================> ] 2/4\r (no-eol) (esc)
409 archiving (sub1) [=================> ] 2/4\r (no-eol) (esc)
410 archiving (sub1) [==========================> ] 3/4\r (no-eol) (esc)
410 archiving (sub1) [==========================> ] 3/4\r (no-eol) (esc)
411 archiving (sub1) [===================================>] 4/4\r (no-eol) (esc)
411 archiving (sub1) [===================================>] 4/4\r (no-eol) (esc)
412 \r (no-eol) (esc)
412 \r (no-eol) (esc)
413 \r (no-eol) (esc)
413 \r (no-eol) (esc)
414 archiving (sub1/sub2) [ ] 0/2\r (no-eol) (esc)
414 archiving (sub1/sub2) [ ] 0/2\r (no-eol) (esc)
415 archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (esc)
415 archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (esc)
416 archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc)
416 archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc)
417 \r (no-eol) (esc)
417 \r (no-eol) (esc)
418 $ diff -r . ../wdir | egrep -v '\.hg$|^Common subdirectories:'
418 $ diff -r . ../wdir | egrep -v '\.hg$|^Common subdirectories:'
419 Only in ../wdir: .hg_archival.txt
419 Only in ../wdir: .hg_archival.txt
420
420
421 $ find ../wdir -type f | sort
421 $ find ../wdir -type f | sort
422 ../wdir/.hg_archival.txt
422 ../wdir/.hg_archival.txt
423 ../wdir/.hgsub
423 ../wdir/.hgsub
424 ../wdir/.hgsubstate
424 ../wdir/.hgsubstate
425 ../wdir/foo/bar/abc
425 ../wdir/foo/bar/abc
426 ../wdir/sub1/.hgsub
426 ../wdir/sub1/.hgsub
427 ../wdir/sub1/.hgsubstate
427 ../wdir/sub1/.hgsubstate
428 ../wdir/sub1/foo
428 ../wdir/sub1/foo
429 ../wdir/sub1/sub1
429 ../wdir/sub1/sub1
430 ../wdir/sub1/sub2/folder/test.txt
430 ../wdir/sub1/sub2/folder/test.txt
431 ../wdir/sub1/sub2/sub2
431 ../wdir/sub1/sub2/sub2
432
432
433 $ cat ../wdir/.hg_archival.txt
433 $ cat ../wdir/.hg_archival.txt
434 repo: 7f491f53a367861f47ee64a80eb997d1f341b77a
434 repo: 7f491f53a367861f47ee64a80eb997d1f341b77a
435 node: 9bb10eebee29dc0f1201dcf5977b811a540255fd+
435 node: 9bb10eebee29dc0f1201dcf5977b811a540255fd+
436 branch: default
436 branch: default
437 latesttag: null
437 latesttag: null
438 latesttagdistance: 4
438 latesttagdistance: 4
439 changessincelatesttag: 4
439 changessincelatesttag: 4
440
440
441 Attempting to archive 'wdir()' with a missing file is handled gracefully
441 Attempting to archive 'wdir()' with a missing file is handled gracefully
442 $ rm sub1/sub1
442 $ rm sub1/sub1
443 $ rm -r ../wdir
443 $ rm -r ../wdir
444 $ hg archive -v -S -r 'wdir()' ../wdir
444 $ hg archive -v -S -r 'wdir()' ../wdir
445 \r (no-eol) (esc)
445 \r (no-eol) (esc)
446 archiving [ ] 0/3\r (no-eol) (esc)
446 archiving [ ] 0/3\r (no-eol) (esc)
447 archiving [=============> ] 1/3\r (no-eol) (esc)
447 archiving [=============> ] 1/3\r (no-eol) (esc)
448 archiving [===========================> ] 2/3\r (no-eol) (esc)
448 archiving [===========================> ] 2/3\r (no-eol) (esc)
449 archiving [==========================================>] 3/3\r (no-eol) (esc)
449 archiving [==========================================>] 3/3\r (no-eol) (esc)
450 \r (no-eol) (esc)
450 \r (no-eol) (esc)
451 \r (no-eol) (esc)
451 \r (no-eol) (esc)
452 archiving (sub1) [ ] 0/3\r (no-eol) (esc)
452 archiving (sub1) [ ] 0/3\r (no-eol) (esc)
453 archiving (sub1) [===========> ] 1/3\r (no-eol) (esc)
453 archiving (sub1) [===========> ] 1/3\r (no-eol) (esc)
454 archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc)
454 archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc)
455 archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
455 archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
456 \r (no-eol) (esc)
456 \r (no-eol) (esc)
457 \r (no-eol) (esc)
457 \r (no-eol) (esc)
458 archiving (sub1/sub2) [ ] 0/2\r (no-eol) (esc)
458 archiving (sub1/sub2) [ ] 0/2\r (no-eol) (esc)
459 archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (esc)
459 archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (esc)
460 archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc)
460 archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc)
461 \r (no-eol) (esc)
461 \r (no-eol) (esc)
462 $ find ../wdir -type f | sort
462 $ find ../wdir -type f | sort
463 ../wdir/.hg_archival.txt
463 ../wdir/.hg_archival.txt
464 ../wdir/.hgsub
464 ../wdir/.hgsub
465 ../wdir/.hgsubstate
465 ../wdir/.hgsubstate
466 ../wdir/foo/bar/abc
466 ../wdir/foo/bar/abc
467 ../wdir/sub1/.hgsub
467 ../wdir/sub1/.hgsub
468 ../wdir/sub1/.hgsubstate
468 ../wdir/sub1/.hgsubstate
469 ../wdir/sub1/foo
469 ../wdir/sub1/foo
470 ../wdir/sub1/sub2/folder/test.txt
470 ../wdir/sub1/sub2/folder/test.txt
471 ../wdir/sub1/sub2/sub2
471 ../wdir/sub1/sub2/sub2
472
472
473 Continue relative path printing + subrepos
473 Continue relative path printing + subrepos
474 $ hg update -Cq
474 $ hg update -Cq
475 $ rm -r ../wdir
475 $ rm -r ../wdir
476 $ hg archive -S -r 'wdir()' ../wdir
476 $ hg archive -S -r 'wdir()' ../wdir
477 \r (no-eol) (esc)
477 \r (no-eol) (esc)
478 archiving [ ] 0/3\r (no-eol) (esc)
478 archiving [ ] 0/3\r (no-eol) (esc)
479 archiving [=============> ] 1/3\r (no-eol) (esc)
479 archiving [=============> ] 1/3\r (no-eol) (esc)
480 archiving [===========================> ] 2/3\r (no-eol) (esc)
480 archiving [===========================> ] 2/3\r (no-eol) (esc)
481 archiving [==========================================>] 3/3\r (no-eol) (esc)
481 archiving [==========================================>] 3/3\r (no-eol) (esc)
482 \r (no-eol) (esc)
482 \r (no-eol) (esc)
483 \r (no-eol) (esc)
483 \r (no-eol) (esc)
484 archiving (sub1) [ ] 0/3\r (no-eol) (esc)
484 archiving (sub1) [ ] 0/3\r (no-eol) (esc)
485 archiving (sub1) [===========> ] 1/3\r (no-eol) (esc)
485 archiving (sub1) [===========> ] 1/3\r (no-eol) (esc)
486 archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc)
486 archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc)
487 archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
487 archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
488 \r (no-eol) (esc)
488 \r (no-eol) (esc)
489 \r (no-eol) (esc)
489 \r (no-eol) (esc)
490 archiving (sub1/sub2) [ ] 0/3\r (no-eol) (esc)
490 archiving (sub1/sub2) [ ] 0/3\r (no-eol) (esc)
491 archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (esc)
491 archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (esc)
492 archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (esc)
492 archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (esc)
493 archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc)
493 archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc)
494 \r (no-eol) (esc)
494 \r (no-eol) (esc)
495 $ cat ../wdir/.hg_archival.txt
495 $ cat ../wdir/.hg_archival.txt
496 repo: 7f491f53a367861f47ee64a80eb997d1f341b77a
496 repo: 7f491f53a367861f47ee64a80eb997d1f341b77a
497 node: 9bb10eebee29dc0f1201dcf5977b811a540255fd
497 node: 9bb10eebee29dc0f1201dcf5977b811a540255fd
498 branch: default
498 branch: default
499 latesttag: null
499 latesttag: null
500 latesttagdistance: 4
500 latesttagdistance: 4
501 changessincelatesttag: 4
501 changessincelatesttag: 4
502
502
503 $ touch sub1/sub2/folder/bar
503 $ touch sub1/sub2/folder/bar
504 $ hg addremove sub1/sub2
504 $ hg addremove sub1/sub2
505 adding sub1/sub2/folder/bar
505 adding sub1/sub2/folder/bar
506 $ hg status -S
506 $ hg status -S
507 A sub1/sub2/folder/bar
507 A sub1/sub2/folder/bar
508 ? foo/bar/abc
508 ? foo/bar/abc
509 ? sub1/foo
509 ? sub1/foo
510 $ hg update -Cq
510 $ hg update -Cq
511 $ hg addremove sub1
511 $ hg addremove sub1
512 adding sub1/sub2/folder/bar
512 adding sub1/sub2/folder/bar
513 adding sub1/foo
513 adding sub1/foo
514 $ hg update -Cq
514 $ hg update -Cq
515 $ rm sub1/sub2/folder/test.txt
515 $ rm sub1/sub2/folder/test.txt
516 $ rm sub1/sub2/test.txt
516 $ rm sub1/sub2/test.txt
517 $ hg ci -ASm "remove test.txt"
517 $ hg ci -ASm "remove test.txt"
518 adding sub1/sub2/folder/bar
518 adding sub1/sub2/folder/bar
519 removing sub1/sub2/folder/test.txt
519 removing sub1/sub2/folder/test.txt
520 removing sub1/sub2/test.txt
520 removing sub1/sub2/test.txt
521 adding sub1/foo
521 adding sub1/foo
522 adding foo/bar/abc
522 adding foo/bar/abc
523 committing subrepository sub1
523 committing subrepository sub1
524 committing subrepository sub1/sub2
524 committing subrepository sub1/sub2
525
525
526 $ hg forget sub1/sub2/sub2
526 $ hg forget sub1/sub2/sub2
527 $ echo x > sub1/sub2/x.txt
527 $ echo x > sub1/sub2/x.txt
528 $ hg add sub1/sub2/x.txt
528 $ hg add sub1/sub2/x.txt
529
529
530 Files sees uncommitted adds and removes in subrepos
530 Files sees uncommitted adds and removes in subrepos
531 $ hg files -S
531 $ hg files -S
532 .hgsub
532 .hgsub
533 .hgsubstate
533 .hgsubstate
534 foo/bar/abc
534 foo/bar/abc
535 main
535 main
536 sub1/.hgsub
536 sub1/.hgsub
537 sub1/.hgsubstate
537 sub1/.hgsubstate
538 sub1/foo
538 sub1/foo
539 sub1/sub1
539 sub1/sub1
540 sub1/sub2/folder/bar
540 sub1/sub2/folder/bar
541 sub1/sub2/x.txt
541 sub1/sub2/x.txt
542
542
543 $ hg files -S "set:eol('dos') or eol('unix') or size('<= 0')"
543 $ hg files -S "set:eol('dos') or eol('unix') or size('<= 0')"
544 .hgsub
544 .hgsub
545 .hgsubstate
545 .hgsubstate
546 foo/bar/abc
546 foo/bar/abc
547 main
547 main
548 sub1/.hgsub
548 sub1/.hgsub
549 sub1/.hgsubstate
549 sub1/.hgsubstate
550 sub1/foo
550 sub1/foo
551 sub1/sub1
551 sub1/sub1
552 sub1/sub2/folder/bar
552 sub1/sub2/folder/bar
553 sub1/sub2/x.txt
553 sub1/sub2/x.txt
554
554
555 $ hg files -r '.^' -S "set:eol('dos') or eol('unix')"
555 $ hg files -r '.^' -S "set:eol('dos') or eol('unix')"
556 .hgsub
556 .hgsub
557 .hgsubstate
557 .hgsubstate
558 main
558 main
559 sub1/.hgsub
559 sub1/.hgsub
560 sub1/.hgsubstate
560 sub1/.hgsubstate
561 sub1/sub1
561 sub1/sub1
562 sub1/sub2/folder/test.txt
562 sub1/sub2/folder/test.txt
563 sub1/sub2/sub2
563 sub1/sub2/sub2
564 sub1/sub2/test.txt
564 sub1/sub2/test.txt
565
565
566 $ hg files sub1
566 $ hg files sub1
567 sub1/.hgsub
567 sub1/.hgsub
568 sub1/.hgsubstate
568 sub1/.hgsubstate
569 sub1/foo
569 sub1/foo
570 sub1/sub1
570 sub1/sub1
571 sub1/sub2/folder/bar
571 sub1/sub2/folder/bar
572 sub1/sub2/x.txt
572 sub1/sub2/x.txt
573
573
574 $ hg files sub1/sub2
574 $ hg files sub1/sub2
575 sub1/sub2/folder/bar
575 sub1/sub2/folder/bar
576 sub1/sub2/x.txt
576 sub1/sub2/x.txt
577
577
578 $ hg files
578 $ hg files
579 .hgsub
579 .hgsub
580 .hgsubstate
580 .hgsubstate
581 foo/bar/abc
581 foo/bar/abc
582 main
582 main
583
583
584 $ hg files -S -r '.^' sub1/sub2/folder
584 $ hg files -S -r '.^' sub1/sub2/folder
585 sub1/sub2/folder/test.txt
585 sub1/sub2/folder/test.txt
586
586
587 $ hg files -S -r '.^' sub1/sub2/missing
587 $ hg files -S -r '.^' sub1/sub2/missing
588 sub1/sub2/missing: no such file in rev 78026e779ea6
588 sub1/sub2/missing: no such file in rev 78026e779ea6
589 [1]
589 [1]
590
590
591 $ hg files -r '.^' sub1/
591 $ hg files -r '.^' sub1/
592 sub1/.hgsub
592 sub1/.hgsub
593 sub1/.hgsubstate
593 sub1/.hgsubstate
594 sub1/sub1
594 sub1/sub1
595 sub1/sub2/folder/test.txt
595 sub1/sub2/folder/test.txt
596 sub1/sub2/sub2
596 sub1/sub2/sub2
597 sub1/sub2/test.txt
597 sub1/sub2/test.txt
598
598
599 $ hg files -r '.^' sub1/sub2
599 $ hg files -r '.^' sub1/sub2
600 sub1/sub2/folder/test.txt
600 sub1/sub2/folder/test.txt
601 sub1/sub2/sub2
601 sub1/sub2/sub2
602 sub1/sub2/test.txt
602 sub1/sub2/test.txt
603
603
604 $ hg rollback -q
604 $ hg rollback -q
605 $ hg up -Cq
605 $ hg up -Cq
606
606
607 $ hg --config extensions.largefiles=! archive -S ../archive_all
607 $ hg --config extensions.largefiles=! archive -S ../archive_all
608 \r (no-eol) (esc)
608 \r (no-eol) (esc)
609 archiving [ ] 0/3\r (no-eol) (esc)
609 archiving [ ] 0/3\r (no-eol) (esc)
610 archiving [=============> ] 1/3\r (no-eol) (esc)
610 archiving [=============> ] 1/3\r (no-eol) (esc)
611 archiving [===========================> ] 2/3\r (no-eol) (esc)
611 archiving [===========================> ] 2/3\r (no-eol) (esc)
612 archiving [==========================================>] 3/3\r (no-eol) (esc)
612 archiving [==========================================>] 3/3\r (no-eol) (esc)
613 \r (no-eol) (esc)
613 \r (no-eol) (esc)
614 \r (no-eol) (esc)
614 \r (no-eol) (esc)
615 archiving (sub1) [ ] 0/3\r (no-eol) (esc)
615 archiving (sub1) [ ] 0/3\r (no-eol) (esc)
616 archiving (sub1) [===========> ] 1/3\r (no-eol) (esc)
616 archiving (sub1) [===========> ] 1/3\r (no-eol) (esc)
617 archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc)
617 archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc)
618 archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
618 archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
619 \r (no-eol) (esc)
619 \r (no-eol) (esc)
620 \r (no-eol) (esc)
620 \r (no-eol) (esc)
621 archiving (sub1/sub2) [ ] 0/3\r (no-eol) (esc)
621 archiving (sub1/sub2) [ ] 0/3\r (no-eol) (esc)
622 archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (esc)
622 archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (esc)
623 archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (esc)
623 archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (esc)
624 archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc)
624 archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc)
625 \r (no-eol) (esc)
625 \r (no-eol) (esc)
626 $ find ../archive_all | sort
626 $ find ../archive_all | sort
627 ../archive_all
627 ../archive_all
628 ../archive_all/.hg_archival.txt
628 ../archive_all/.hg_archival.txt
629 ../archive_all/.hgsub
629 ../archive_all/.hgsub
630 ../archive_all/.hgsubstate
630 ../archive_all/.hgsubstate
631 ../archive_all/main
631 ../archive_all/main
632 ../archive_all/sub1
632 ../archive_all/sub1
633 ../archive_all/sub1/.hgsub
633 ../archive_all/sub1/.hgsub
634 ../archive_all/sub1/.hgsubstate
634 ../archive_all/sub1/.hgsubstate
635 ../archive_all/sub1/sub1
635 ../archive_all/sub1/sub1
636 ../archive_all/sub1/sub2
636 ../archive_all/sub1/sub2
637 ../archive_all/sub1/sub2/folder
637 ../archive_all/sub1/sub2/folder
638 ../archive_all/sub1/sub2/folder/test.txt
638 ../archive_all/sub1/sub2/folder/test.txt
639 ../archive_all/sub1/sub2/sub2
639 ../archive_all/sub1/sub2/sub2
640 ../archive_all/sub1/sub2/test.txt
640 ../archive_all/sub1/sub2/test.txt
641
641
642 Check that archive -X works in deep subrepos
642 Check that archive -X works in deep subrepos
643
643
644 $ hg --config extensions.largefiles=! archive -S -X '**test*' ../archive_exclude
644 $ hg --config extensions.largefiles=! archive -S -X '**test*' ../archive_exclude
645 \r (no-eol) (esc)
645 \r (no-eol) (esc)
646 archiving [ ] 0/3\r (no-eol) (esc)
646 archiving [ ] 0/3\r (no-eol) (esc)
647 archiving [=============> ] 1/3\r (no-eol) (esc)
647 archiving [=============> ] 1/3\r (no-eol) (esc)
648 archiving [===========================> ] 2/3\r (no-eol) (esc)
648 archiving [===========================> ] 2/3\r (no-eol) (esc)
649 archiving [==========================================>] 3/3\r (no-eol) (esc)
649 archiving [==========================================>] 3/3\r (no-eol) (esc)
650 \r (no-eol) (esc)
650 \r (no-eol) (esc)
651 \r (no-eol) (esc)
651 \r (no-eol) (esc)
652 archiving (sub1) [ ] 0/3\r (no-eol) (esc)
652 archiving (sub1) [ ] 0/3\r (no-eol) (esc)
653 archiving (sub1) [===========> ] 1/3\r (no-eol) (esc)
653 archiving (sub1) [===========> ] 1/3\r (no-eol) (esc)
654 archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc)
654 archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc)
655 archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
655 archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
656 \r (no-eol) (esc)
656 \r (no-eol) (esc)
657 \r (no-eol) (esc)
657 \r (no-eol) (esc)
658 archiving (sub1/sub2) [ ] 0/1\r (no-eol) (esc)
658 archiving (sub1/sub2) [ ] 0/1\r (no-eol) (esc)
659 archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc)
659 archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc)
660 \r (no-eol) (esc)
660 \r (no-eol) (esc)
661 $ find ../archive_exclude | sort
661 $ find ../archive_exclude | sort
662 ../archive_exclude
662 ../archive_exclude
663 ../archive_exclude/.hg_archival.txt
663 ../archive_exclude/.hg_archival.txt
664 ../archive_exclude/.hgsub
664 ../archive_exclude/.hgsub
665 ../archive_exclude/.hgsubstate
665 ../archive_exclude/.hgsubstate
666 ../archive_exclude/main
666 ../archive_exclude/main
667 ../archive_exclude/sub1
667 ../archive_exclude/sub1
668 ../archive_exclude/sub1/.hgsub
668 ../archive_exclude/sub1/.hgsub
669 ../archive_exclude/sub1/.hgsubstate
669 ../archive_exclude/sub1/.hgsubstate
670 ../archive_exclude/sub1/sub1
670 ../archive_exclude/sub1/sub1
671 ../archive_exclude/sub1/sub2
671 ../archive_exclude/sub1/sub2
672 ../archive_exclude/sub1/sub2/sub2
672 ../archive_exclude/sub1/sub2/sub2
673
673
674 $ hg --config extensions.largefiles=! archive -S -I '**test*' ../archive_include
674 $ hg --config extensions.largefiles=! archive -S -I '**test*' ../archive_include
675 \r (no-eol) (esc)
675 \r (no-eol) (esc)
676 archiving (sub1) [ <=> ] 0\r (no-eol) (esc)
676 archiving (sub1) [ <=> ] 0\r (no-eol) (esc)
677 \r (no-eol) (esc)
677 \r (no-eol) (esc)
678 \r (no-eol) (esc)
678 \r (no-eol) (esc)
679 archiving (sub1/sub2) [ ] 0/2\r (no-eol) (esc)
679 archiving (sub1/sub2) [ ] 0/2\r (no-eol) (esc)
680 archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (esc)
680 archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (esc)
681 archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc)
681 archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc)
682 \r (no-eol) (esc)
682 \r (no-eol) (esc)
683 $ find ../archive_include | sort
683 $ find ../archive_include | sort
684 ../archive_include
684 ../archive_include
685 ../archive_include/sub1
685 ../archive_include/sub1
686 ../archive_include/sub1/sub2
686 ../archive_include/sub1/sub2
687 ../archive_include/sub1/sub2/folder
687 ../archive_include/sub1/sub2/folder
688 ../archive_include/sub1/sub2/folder/test.txt
688 ../archive_include/sub1/sub2/folder/test.txt
689 ../archive_include/sub1/sub2/test.txt
689 ../archive_include/sub1/sub2/test.txt
690
690
691 Check that deep archive works with largefiles (which overrides hgsubrepo impl)
691 Check that deep archive works with largefiles (which overrides hgsubrepo impl)
692 This also tests the repo.ui regression in 43fb170a23bd, and that lf subrepo
692 This also tests the repo.ui regression in 43fb170a23bd, and that lf subrepo
693 subrepos are archived properly.
693 subrepos are archived properly.
694 Note that add --large through a subrepo currently adds the file as a normal file
694 Note that add --large through a subrepo currently adds the file as a normal file
695
695
696 $ echo "large" > sub1/sub2/large.bin
696 $ echo "large" > sub1/sub2/large.bin
697 $ hg --config extensions.largefiles= add --large -R sub1/sub2 sub1/sub2/large.bin
697 $ hg --config extensions.largefiles= add --large -R sub1/sub2 sub1/sub2/large.bin
698 $ echo "large" > large.bin
698 $ echo "large" > large.bin
699 $ hg --config extensions.largefiles= add --large large.bin
699 $ hg --config extensions.largefiles= add --large large.bin
700 $ hg --config extensions.largefiles= ci -S -m "add large files"
700 $ hg --config extensions.largefiles= ci -S -m "add large files"
701 committing subrepository sub1
701 committing subrepository sub1
702 committing subrepository sub1/sub2
702 committing subrepository sub1/sub2
703
703
704 $ hg --config extensions.largefiles= archive -S ../archive_lf
704 $ hg --config extensions.largefiles= archive -S ../archive_lf
705 $ find ../archive_lf | sort
705 $ find ../archive_lf | sort
706 ../archive_lf
706 ../archive_lf
707 ../archive_lf/.hg_archival.txt
707 ../archive_lf/.hg_archival.txt
708 ../archive_lf/.hgsub
708 ../archive_lf/.hgsub
709 ../archive_lf/.hgsubstate
709 ../archive_lf/.hgsubstate
710 ../archive_lf/large.bin
710 ../archive_lf/large.bin
711 ../archive_lf/main
711 ../archive_lf/main
712 ../archive_lf/sub1
712 ../archive_lf/sub1
713 ../archive_lf/sub1/.hgsub
713 ../archive_lf/sub1/.hgsub
714 ../archive_lf/sub1/.hgsubstate
714 ../archive_lf/sub1/.hgsubstate
715 ../archive_lf/sub1/sub1
715 ../archive_lf/sub1/sub1
716 ../archive_lf/sub1/sub2
716 ../archive_lf/sub1/sub2
717 ../archive_lf/sub1/sub2/folder
717 ../archive_lf/sub1/sub2/folder
718 ../archive_lf/sub1/sub2/folder/test.txt
718 ../archive_lf/sub1/sub2/folder/test.txt
719 ../archive_lf/sub1/sub2/large.bin
719 ../archive_lf/sub1/sub2/large.bin
720 ../archive_lf/sub1/sub2/sub2
720 ../archive_lf/sub1/sub2/sub2
721 ../archive_lf/sub1/sub2/test.txt
721 ../archive_lf/sub1/sub2/test.txt
722 $ rm -rf ../archive_lf
722 $ rm -rf ../archive_lf
723
723
724 Exclude large files from main and sub-sub repo
724 Exclude large files from main and sub-sub repo
725
725
726 $ hg --config extensions.largefiles= archive -S -X '**.bin' ../archive_lf
726 $ hg --config extensions.largefiles= archive -S -X '**.bin' ../archive_lf
727 $ find ../archive_lf | sort
727 $ find ../archive_lf | sort
728 ../archive_lf
728 ../archive_lf
729 ../archive_lf/.hg_archival.txt
729 ../archive_lf/.hg_archival.txt
730 ../archive_lf/.hgsub
730 ../archive_lf/.hgsub
731 ../archive_lf/.hgsubstate
731 ../archive_lf/.hgsubstate
732 ../archive_lf/main
732 ../archive_lf/main
733 ../archive_lf/sub1
733 ../archive_lf/sub1
734 ../archive_lf/sub1/.hgsub
734 ../archive_lf/sub1/.hgsub
735 ../archive_lf/sub1/.hgsubstate
735 ../archive_lf/sub1/.hgsubstate
736 ../archive_lf/sub1/sub1
736 ../archive_lf/sub1/sub1
737 ../archive_lf/sub1/sub2
737 ../archive_lf/sub1/sub2
738 ../archive_lf/sub1/sub2/folder
738 ../archive_lf/sub1/sub2/folder
739 ../archive_lf/sub1/sub2/folder/test.txt
739 ../archive_lf/sub1/sub2/folder/test.txt
740 ../archive_lf/sub1/sub2/sub2
740 ../archive_lf/sub1/sub2/sub2
741 ../archive_lf/sub1/sub2/test.txt
741 ../archive_lf/sub1/sub2/test.txt
742 $ rm -rf ../archive_lf
742 $ rm -rf ../archive_lf
743
743
744 Exclude normal files from main and sub-sub repo
744 Exclude normal files from main and sub-sub repo
745
745
746 $ hg --config extensions.largefiles= archive -S -X '**.txt' -p '.' ../archive_lf.tgz
746 $ hg --config extensions.largefiles= archive -S -X '**.txt' -p '.' ../archive_lf.tgz
747 $ tar -tzf ../archive_lf.tgz | sort
747 $ tar -tzf ../archive_lf.tgz | sort
748 .hgsub
748 .hgsub
749 .hgsubstate
749 .hgsubstate
750 large.bin
750 large.bin
751 main
751 main
752 sub1/.hgsub
752 sub1/.hgsub
753 sub1/.hgsubstate
753 sub1/.hgsubstate
754 sub1/sub1
754 sub1/sub1
755 sub1/sub2/large.bin
755 sub1/sub2/large.bin
756 sub1/sub2/sub2
756 sub1/sub2/sub2
757
757
758 Include normal files from within a largefiles subrepo
758 Include normal files from within a largefiles subrepo
759
759
760 $ hg --config extensions.largefiles= archive -S -I '**.txt' ../archive_lf
760 $ hg --config extensions.largefiles= archive -S -I '**.txt' ../archive_lf
761 $ find ../archive_lf | sort
761 $ find ../archive_lf | sort
762 ../archive_lf
762 ../archive_lf
763 ../archive_lf/.hg_archival.txt
763 ../archive_lf/.hg_archival.txt
764 ../archive_lf/sub1
764 ../archive_lf/sub1
765 ../archive_lf/sub1/sub2
765 ../archive_lf/sub1/sub2
766 ../archive_lf/sub1/sub2/folder
766 ../archive_lf/sub1/sub2/folder
767 ../archive_lf/sub1/sub2/folder/test.txt
767 ../archive_lf/sub1/sub2/folder/test.txt
768 ../archive_lf/sub1/sub2/test.txt
768 ../archive_lf/sub1/sub2/test.txt
769 $ rm -rf ../archive_lf
769 $ rm -rf ../archive_lf
770
770
771 Include large files from within a largefiles subrepo
771 Include large files from within a largefiles subrepo
772
772
773 $ hg --config extensions.largefiles= archive -S -I '**.bin' ../archive_lf
773 $ hg --config extensions.largefiles= archive -S -I '**.bin' ../archive_lf
774 $ find ../archive_lf | sort
774 $ find ../archive_lf | sort
775 ../archive_lf
775 ../archive_lf
776 ../archive_lf/large.bin
776 ../archive_lf/large.bin
777 ../archive_lf/sub1
777 ../archive_lf/sub1
778 ../archive_lf/sub1/sub2
778 ../archive_lf/sub1/sub2
779 ../archive_lf/sub1/sub2/large.bin
779 ../archive_lf/sub1/sub2/large.bin
780 $ rm -rf ../archive_lf
780 $ rm -rf ../archive_lf
781
781
782 Find an exact largefile match in a largefiles subrepo
782 Find an exact largefile match in a largefiles subrepo
783
783
784 $ hg --config extensions.largefiles= archive -S -I 'sub1/sub2/large.bin' ../archive_lf
784 $ hg --config extensions.largefiles= archive -S -I 'sub1/sub2/large.bin' ../archive_lf
785 $ find ../archive_lf | sort
785 $ find ../archive_lf | sort
786 ../archive_lf
786 ../archive_lf
787 ../archive_lf/sub1
787 ../archive_lf/sub1
788 ../archive_lf/sub1/sub2
788 ../archive_lf/sub1/sub2
789 ../archive_lf/sub1/sub2/large.bin
789 ../archive_lf/sub1/sub2/large.bin
790 $ rm -rf ../archive_lf
790 $ rm -rf ../archive_lf
791
791
792 The local repo enables largefiles if a largefiles repo is cloned
792 The local repo enables largefiles if a largefiles repo is cloned
793 $ hg showconfig extensions
793 $ hg showconfig extensions
794 abort: repository requires features unknown to this Mercurial: largefiles!
794 abort: repository requires features unknown to this Mercurial: largefiles!
795 (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
795 (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
796 [255]
796 [255]
797 $ hg --config extensions.largefiles= clone -qU . ../lfclone
797 $ hg --config extensions.largefiles= clone -qU . ../lfclone
798 $ cat ../lfclone/.hg/hgrc
798 $ cat ../lfclone/.hg/hgrc
799 # example repository config (see 'hg help config' for more info)
799 # example repository config (see 'hg help config' for more info)
800 [paths]
800 [paths]
801 default = $TESTTMP/cloned
801 default = $TESTTMP/cloned
802
802
803 # path aliases to other clones of this repo in URLs or filesystem paths
803 # path aliases to other clones of this repo in URLs or filesystem paths
804 # (see 'hg help config.paths' for more info)
804 # (see 'hg help config.paths' for more info)
805 #
805 #
806 # default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork
806 # default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork
807 # my-fork = ssh://jdoe@example.net/hg/jdoes-fork
807 # my-fork = ssh://jdoe@example.net/hg/jdoes-fork
808 # my-clone = /home/jdoe/jdoes-clone
808 # my-clone = /home/jdoe/jdoes-clone
809
809
810 [ui]
810 [ui]
811 # name and email (local to this repository, optional), e.g.
811 # name and email (local to this repository, optional), e.g.
812 # username = Jane Doe <jdoe@example.com>
812 # username = Jane Doe <jdoe@example.com>
813
813
814 [extensions]
814 [extensions]
815 largefiles=
815 largefiles=
816
816
817 Find an exact match to a standin (should archive nothing)
817 Find an exact match to a standin (should archive nothing)
818 $ hg --config extensions.largefiles= archive -S -I 'sub/sub2/.hglf/large.bin' ../archive_lf
818 $ hg --config extensions.largefiles= archive -S -I 'sub/sub2/.hglf/large.bin' ../archive_lf
819 $ find ../archive_lf 2> /dev/null | sort
819 $ find ../archive_lf 2> /dev/null | sort
820
820
821 $ cat >> $HGRCPATH <<EOF
821 $ cat >> $HGRCPATH <<EOF
822 > [extensions]
822 > [extensions]
823 > largefiles=
823 > largefiles=
824 > [largefiles]
824 > [largefiles]
825 > patterns=glob:**.dat
825 > patterns=glob:**.dat
826 > EOF
826 > EOF
827
827
828 Test forget through a deep subrepo with the largefiles extension, both a
828 Test forget through a deep subrepo with the largefiles extension, both a
829 largefile and a normal file. Then a largefile that hasn't been committed yet.
829 largefile and a normal file. Then a largefile that hasn't been committed yet.
830 $ touch sub1/sub2/untracked.txt
830 $ touch sub1/sub2/untracked.txt
831 $ touch sub1/sub2/large.dat
831 $ touch sub1/sub2/large.dat
832 $ hg forget sub1/sub2/large.bin sub1/sub2/test.txt sub1/sub2/untracked.txt
832 $ hg forget sub1/sub2/large.bin sub1/sub2/test.txt sub1/sub2/untracked.txt
833 not removing sub1/sub2/untracked.txt: file is already untracked
833 not removing sub1/sub2/untracked.txt: file is already untracked
834 [1]
834 [1]
835 $ hg add --large --dry-run -v sub1/sub2/untracked.txt
835 $ hg add --large --dry-run -v sub1/sub2/untracked.txt
836 adding sub1/sub2/untracked.txt as a largefile
836 adding sub1/sub2/untracked.txt as a largefile
837 $ hg add --large -v sub1/sub2/untracked.txt
837 $ hg add --large -v sub1/sub2/untracked.txt
838 adding sub1/sub2/untracked.txt as a largefile
838 adding sub1/sub2/untracked.txt as a largefile
839 $ hg add --normal -v sub1/sub2/large.dat
839 $ hg add --normal -v sub1/sub2/large.dat
840 adding sub1/sub2/large.dat
840 adding sub1/sub2/large.dat
841 $ hg forget -v sub1/sub2/untracked.txt
841 $ hg forget -v sub1/sub2/untracked.txt
842 removing sub1/sub2/untracked.txt
842 removing sub1/sub2/untracked.txt
843 $ hg status -S
843 $ hg status -S
844 A sub1/sub2/large.dat
844 A sub1/sub2/large.dat
845 R sub1/sub2/large.bin
845 R sub1/sub2/large.bin
846 R sub1/sub2/test.txt
846 R sub1/sub2/test.txt
847 ? foo/bar/abc
847 ? foo/bar/abc
848 ? sub1/sub2/untracked.txt
848 ? sub1/sub2/untracked.txt
849 ? sub1/sub2/x.txt
849 ? sub1/sub2/x.txt
850 $ hg add sub1/sub2
850 $ hg add sub1/sub2
851
851
852 $ hg archive -S -r 'wdir()' ../wdir2
852 $ hg archive -S -r 'wdir()' ../wdir2
853 $ diff -r . ../wdir2 | egrep -v '\.hg$|^Common subdirectories:'
853 $ diff -r . ../wdir2 | egrep -v '\.hg$|^Common subdirectories:'
854 Only in ../wdir2: .hg_archival.txt
854 Only in ../wdir2: .hg_archival.txt
855 Only in .: .hglf
855 Only in .: .hglf
856 Only in .: foo
856 Only in .: foo
857 Only in ./sub1/sub2: large.bin
857 Only in ./sub1/sub2: large.bin
858 Only in ./sub1/sub2: test.txt
858 Only in ./sub1/sub2: test.txt
859 Only in ./sub1/sub2: untracked.txt
859 Only in ./sub1/sub2: untracked.txt
860 Only in ./sub1/sub2: x.txt
860 Only in ./sub1/sub2: x.txt
861 $ find ../wdir2 -type f | sort
861 $ find ../wdir2 -type f | sort
862 ../wdir2/.hg_archival.txt
862 ../wdir2/.hg_archival.txt
863 ../wdir2/.hgsub
863 ../wdir2/.hgsub
864 ../wdir2/.hgsubstate
864 ../wdir2/.hgsubstate
865 ../wdir2/large.bin
865 ../wdir2/large.bin
866 ../wdir2/main
866 ../wdir2/main
867 ../wdir2/sub1/.hgsub
867 ../wdir2/sub1/.hgsub
868 ../wdir2/sub1/.hgsubstate
868 ../wdir2/sub1/.hgsubstate
869 ../wdir2/sub1/sub1
869 ../wdir2/sub1/sub1
870 ../wdir2/sub1/sub2/folder/test.txt
870 ../wdir2/sub1/sub2/folder/test.txt
871 ../wdir2/sub1/sub2/large.dat
871 ../wdir2/sub1/sub2/large.dat
872 ../wdir2/sub1/sub2/sub2
872 ../wdir2/sub1/sub2/sub2
873 $ hg status -S -mac -n | sort
873 $ hg status -S -mac -n | sort
874 .hgsub
874 .hgsub
875 .hgsubstate
875 .hgsubstate
876 large.bin
876 large.bin
877 main
877 main
878 sub1/.hgsub
878 sub1/.hgsub
879 sub1/.hgsubstate
879 sub1/.hgsubstate
880 sub1/sub1
880 sub1/sub1
881 sub1/sub2/folder/test.txt
881 sub1/sub2/folder/test.txt
882 sub1/sub2/large.dat
882 sub1/sub2/large.dat
883 sub1/sub2/sub2
883 sub1/sub2/sub2
884
884
885 $ hg ci -Sqm 'forget testing'
885 $ hg ci -Sqm 'forget testing'
886
886
887 Test 'wdir()' modified file archiving with largefiles
887 Test 'wdir()' modified file archiving with largefiles
888 $ echo 'mod' > main
888 $ echo 'mod' > main
889 $ echo 'mod' > large.bin
889 $ echo 'mod' > large.bin
890 $ echo 'mod' > sub1/sub2/large.dat
890 $ echo 'mod' > sub1/sub2/large.dat
891 $ hg archive -S -r 'wdir()' ../wdir3
891 $ hg archive -S -r 'wdir()' ../wdir3
892 $ diff -r . ../wdir3 | egrep -v '\.hg$|^Common subdirectories'
892 $ diff -r . ../wdir3 | egrep -v '\.hg$|^Common subdirectories'
893 Only in ../wdir3: .hg_archival.txt
893 Only in ../wdir3: .hg_archival.txt
894 Only in .: .hglf
894 Only in .: .hglf
895 Only in .: foo
895 Only in .: foo
896 Only in ./sub1/sub2: large.bin
896 Only in ./sub1/sub2: large.bin
897 Only in ./sub1/sub2: test.txt
897 Only in ./sub1/sub2: test.txt
898 Only in ./sub1/sub2: untracked.txt
898 Only in ./sub1/sub2: untracked.txt
899 Only in ./sub1/sub2: x.txt
899 Only in ./sub1/sub2: x.txt
900 $ find ../wdir3 -type f | sort
900 $ find ../wdir3 -type f | sort
901 ../wdir3/.hg_archival.txt
901 ../wdir3/.hg_archival.txt
902 ../wdir3/.hgsub
902 ../wdir3/.hgsub
903 ../wdir3/.hgsubstate
903 ../wdir3/.hgsubstate
904 ../wdir3/large.bin
904 ../wdir3/large.bin
905 ../wdir3/main
905 ../wdir3/main
906 ../wdir3/sub1/.hgsub
906 ../wdir3/sub1/.hgsub
907 ../wdir3/sub1/.hgsubstate
907 ../wdir3/sub1/.hgsubstate
908 ../wdir3/sub1/sub1
908 ../wdir3/sub1/sub1
909 ../wdir3/sub1/sub2/folder/test.txt
909 ../wdir3/sub1/sub2/folder/test.txt
910 ../wdir3/sub1/sub2/large.dat
910 ../wdir3/sub1/sub2/large.dat
911 ../wdir3/sub1/sub2/sub2
911 ../wdir3/sub1/sub2/sub2
912 $ hg up -Cq
912 $ hg up -Cq
913
913
914 Test issue4330: commit a directory where only normal files have changed
914 Test issue4330: commit a directory where only normal files have changed
915 $ touch foo/bar/large.dat
915 $ touch foo/bar/large.dat
916 $ hg add --large foo/bar/large.dat
916 $ hg add --large foo/bar/large.dat
917 $ hg ci -m 'add foo/bar/large.dat'
917 $ hg ci -m 'add foo/bar/large.dat'
918 $ touch a.txt
918 $ touch a.txt
919 $ touch a.dat
919 $ touch a.dat
920 $ hg add -v foo/bar/abc a.txt a.dat
920 $ hg add -v foo/bar/abc a.txt a.dat
921 adding a.dat as a largefile
921 adding a.dat as a largefile
922 adding a.txt
922 adding a.txt
923 adding foo/bar/abc
923 adding foo/bar/abc
924 $ hg ci -m 'dir commit with only normal file deltas' foo/bar
924 $ hg ci -m 'dir commit with only normal file deltas' foo/bar
925 $ hg status
925 $ hg status
926 A a.dat
926 A a.dat
927 A a.txt
927 A a.txt
928
928
929 Test a directory commit with a changed largefile and a changed normal file
929 Test a directory commit with a changed largefile and a changed normal file
930 $ echo changed > foo/bar/large.dat
930 $ echo changed > foo/bar/large.dat
931 $ echo changed > foo/bar/abc
931 $ echo changed > foo/bar/abc
932 $ hg ci -m 'dir commit with normal and lf file deltas' foo
932 $ hg ci -m 'dir commit with normal and lf file deltas' foo
933 $ hg status
933 $ hg status
934 A a.dat
934 A a.dat
935 A a.txt
935 A a.txt
936
936
937 $ hg ci -m "add a.*"
937 $ hg ci -m "add a.*"
938 $ hg mv a.dat b.dat
938 $ hg mv a.dat b.dat
939 $ hg mv foo/bar/abc foo/bar/def
939 $ hg mv foo/bar/abc foo/bar/def
940 $ hg status -C
940 $ hg status -C
941 A b.dat
941 A b.dat
942 a.dat
942 a.dat
943 A foo/bar/def
943 A foo/bar/def
944 foo/bar/abc
944 foo/bar/abc
945 R a.dat
945 R a.dat
946 R foo/bar/abc
946 R foo/bar/abc
947
947
948 $ hg ci -m "move large and normal"
948 $ hg ci -m "move large and normal"
949 $ hg status -C --rev '.^' --rev .
949 $ hg status -C --rev '.^' --rev .
950 A b.dat
950 A b.dat
951 a.dat
951 a.dat
952 A foo/bar/def
952 A foo/bar/def
953 foo/bar/abc
953 foo/bar/abc
954 R a.dat
954 R a.dat
955 R foo/bar/abc
955 R foo/bar/abc
956
956
957
957
958 $ echo foo > main
958 $ echo foo > main
959 $ hg ci -m "mod parent only"
959 $ hg ci -m "mod parent only"
960 $ hg init sub3
960 $ hg init sub3
961 $ echo "sub3 = sub3" >> .hgsub
961 $ echo "sub3 = sub3" >> .hgsub
962 $ echo xyz > sub3/a.txt
962 $ echo xyz > sub3/a.txt
963 $ hg add sub3/a.txt
963 $ hg add sub3/a.txt
964 $ hg ci -Sm "add sub3"
964 $ hg ci -Sm "add sub3"
965 committing subrepository sub3
965 committing subrepository sub3
966 $ cat .hgsub | grep -v sub3 > .hgsub1
966 $ cat .hgsub | grep -v sub3 > .hgsub1
967 $ mv .hgsub1 .hgsub
967 $ mv .hgsub1 .hgsub
968 $ hg ci -m "remove sub3"
968 $ hg ci -m "remove sub3"
969
969
970 $ hg log -r "subrepo()" --style compact
970 $ hg log -r "subrepo()" --style compact
971 0 7f491f53a367 1970-01-01 00:00 +0000 test
971 0 7f491f53a367 1970-01-01 00:00 +0000 test
972 main import
972 main import
973
973
974 1 ffe6649062fe 1970-01-01 00:00 +0000 test
974 1 ffe6649062fe 1970-01-01 00:00 +0000 test
975 deep nested modif should trigger a commit
975 deep nested modif should trigger a commit
976
976
977 2 9bb10eebee29 1970-01-01 00:00 +0000 test
977 2 9bb10eebee29 1970-01-01 00:00 +0000 test
978 add test.txt
978 add test.txt
979
979
980 3 7c64f035294f 1970-01-01 00:00 +0000 test
980 3 7c64f035294f 1970-01-01 00:00 +0000 test
981 add large files
981 add large files
982
982
983 4 f734a59e2e35 1970-01-01 00:00 +0000 test
983 4 f734a59e2e35 1970-01-01 00:00 +0000 test
984 forget testing
984 forget testing
985
985
986 11 9685a22af5db 1970-01-01 00:00 +0000 test
986 11 9685a22af5db 1970-01-01 00:00 +0000 test
987 add sub3
987 add sub3
988
988
989 12[tip] 2e0485b475b9 1970-01-01 00:00 +0000 test
989 12[tip] 2e0485b475b9 1970-01-01 00:00 +0000 test
990 remove sub3
990 remove sub3
991
991
992 $ hg log -r "subrepo('sub3')" --style compact
992 $ hg log -r "subrepo('sub3')" --style compact
993 11 9685a22af5db 1970-01-01 00:00 +0000 test
993 11 9685a22af5db 1970-01-01 00:00 +0000 test
994 add sub3
994 add sub3
995
995
996 12[tip] 2e0485b475b9 1970-01-01 00:00 +0000 test
996 12[tip] 2e0485b475b9 1970-01-01 00:00 +0000 test
997 remove sub3
997 remove sub3
998
998
999 $ hg log -r "subrepo('bogus')" --style compact
999 $ hg log -r "subrepo('bogus')" --style compact
1000
1000
1001
1001
1002 Test .hgsubstate in the R state
1002 Test .hgsubstate in the R state
1003
1003
1004 $ hg rm .hgsub .hgsubstate
1004 $ hg rm .hgsub .hgsubstate
1005 \r (no-eol) (esc)
1005 \r (no-eol) (esc)
1006 deleting [=====================> ] 1/2\r (no-eol) (esc)
1006 deleting [=====================> ] 1/2\r (no-eol) (esc)
1007 deleting [===========================================>] 2/2\r (no-eol) (esc)
1007 deleting [===========================================>] 2/2\r (no-eol) (esc)
1008 \r (no-eol) (esc)
1008 \r (no-eol) (esc)
1009 $ hg ci -m 'trash subrepo tracking'
1009 $ hg ci -m 'trash subrepo tracking'
1010
1010
1011 $ hg log -r "subrepo('re:sub\d+')" --style compact
1011 $ hg log -r "subrepo('re:sub\d+')" --style compact
1012 0 7f491f53a367 1970-01-01 00:00 +0000 test
1012 0 7f491f53a367 1970-01-01 00:00 +0000 test
1013 main import
1013 main import
1014
1014
1015 1 ffe6649062fe 1970-01-01 00:00 +0000 test
1015 1 ffe6649062fe 1970-01-01 00:00 +0000 test
1016 deep nested modif should trigger a commit
1016 deep nested modif should trigger a commit
1017
1017
1018 2 9bb10eebee29 1970-01-01 00:00 +0000 test
1018 2 9bb10eebee29 1970-01-01 00:00 +0000 test
1019 add test.txt
1019 add test.txt
1020
1020
1021 3 7c64f035294f 1970-01-01 00:00 +0000 test
1021 3 7c64f035294f 1970-01-01 00:00 +0000 test
1022 add large files
1022 add large files
1023
1023
1024 4 f734a59e2e35 1970-01-01 00:00 +0000 test
1024 4 f734a59e2e35 1970-01-01 00:00 +0000 test
1025 forget testing
1025 forget testing
1026
1026
1027 11 9685a22af5db 1970-01-01 00:00 +0000 test
1027 11 9685a22af5db 1970-01-01 00:00 +0000 test
1028 add sub3
1028 add sub3
1029
1029
1030 12 2e0485b475b9 1970-01-01 00:00 +0000 test
1030 12 2e0485b475b9 1970-01-01 00:00 +0000 test
1031 remove sub3
1031 remove sub3
1032
1032
1033 13[tip] a68b2c361653 1970-01-01 00:00 +0000 test
1033 13[tip] a68b2c361653 1970-01-01 00:00 +0000 test
1034 trash subrepo tracking
1034 trash subrepo tracking
1035
1035
1036
1036
1037 Restore the trashed subrepo tracking
1037 Restore the trashed subrepo tracking
1038
1038
1039 $ hg rollback -q
1039 $ hg rollback -q
1040 $ hg update -Cq .
1040 $ hg update -Cq .
1041
1041
1042 Interaction with extdiff, largefiles and subrepos
1042 Interaction with extdiff, largefiles and subrepos
1043
1043
1044 $ hg --config extensions.extdiff= pdiff -S
1044 $ hg --config extensions.extdiff= pdiff -S
1045
1045
1046 $ hg --config extensions.extdiff= pdiff -r '.^' -S
1046 $ hg --config extensions.extdiff= pdiff -r '.^' -S
1047 \r (no-eol) (esc)
1047 \r (no-eol) (esc)
1048 archiving [ ] 0/2\r (no-eol) (esc)
1048 archiving [ ] 0/2\r (no-eol) (esc)
1049 archiving [====================> ] 1/2\r (no-eol) (esc)
1049 archiving [====================> ] 1/2\r (no-eol) (esc)
1050 archiving [==========================================>] 2/2\r (no-eol) (esc)
1050 archiving [==========================================>] 2/2\r (no-eol) (esc)
1051 \r (no-eol) (esc)
1051 \r (no-eol) (esc)
1052 \r (no-eol) (esc)
1052 \r (no-eol) (esc)
1053 archiving (sub1) [ <=> ] 0\r (no-eol) (esc)
1053 archiving (sub1) [ <=> ] 0\r (no-eol) (esc)
1054 \r (no-eol) (esc)
1054 \r (no-eol) (esc)
1055 \r (no-eol) (esc)
1055 \r (no-eol) (esc)
1056 archiving (sub1/sub2) [ <=> ] 0\r (no-eol) (esc)
1056 archiving (sub1/sub2) [ <=> ] 0\r (no-eol) (esc)
1057 \r (no-eol) (esc)
1057 \r (no-eol) (esc)
1058 \r (no-eol) (esc)
1058 \r (no-eol) (esc)
1059 archiving (sub3) [ <=> ] 0\r (no-eol) (esc)
1059 archiving (sub3) [ <=> ] 0\r (no-eol) (esc)
1060 \r (no-eol) (esc)
1060 \r (no-eol) (esc)
1061 \r (no-eol) (esc)
1061 \r (no-eol) (esc)
1062 archiving [ ] 0/2\r (no-eol) (esc)
1062 archiving [ ] 0/2\r (no-eol) (esc)
1063 archiving [====================> ] 1/2\r (no-eol) (esc)
1063 archiving [====================> ] 1/2\r (no-eol) (esc)
1064 archiving [==========================================>] 2/2\r (no-eol) (esc)
1064 archiving [==========================================>] 2/2\r (no-eol) (esc)
1065 \r (no-eol) (esc)
1065 \r (no-eol) (esc)
1066 \r (no-eol) (esc)
1066 \r (no-eol) (esc)
1067 archiving (sub1) [ <=> ] 0\r (no-eol) (esc)
1067 archiving (sub1) [ <=> ] 0\r (no-eol) (esc)
1068 \r (no-eol) (esc)
1068 \r (no-eol) (esc)
1069 \r (no-eol) (esc)
1069 \r (no-eol) (esc)
1070 archiving (sub1/sub2) [ <=> ] 0\r (no-eol) (esc)
1070 archiving (sub1/sub2) [ <=> ] 0\r (no-eol) (esc)
1071 \r (no-eol) (esc)
1071 \r (no-eol) (esc)
1072 diff -Nru cloned.*/.hgsub cloned/.hgsub (glob)
1072 diff -Nru cloned.*/.hgsub cloned/.hgsub (glob)
1073 --- cloned.*/.hgsub * (glob)
1073 --- cloned.*/.hgsub * (glob)
1074 +++ cloned/.hgsub * (glob)
1074 +++ cloned/.hgsub * (glob)
1075 @@ -1,2 +1* @@ (glob)
1075 @@ -1,2 +1* @@ (glob)
1076 sub1 = ../sub1
1076 sub1 = ../sub1
1077 -sub3 = sub3
1077 -sub3 = sub3
1078 diff -Nru cloned.*/.hgsubstate cloned/.hgsubstate (glob)
1078 diff -Nru cloned.*/.hgsubstate cloned/.hgsubstate (glob)
1079 --- cloned.*/.hgsubstate * (glob)
1079 --- cloned.*/.hgsubstate * (glob)
1080 +++ cloned/.hgsubstate * (glob)
1080 +++ cloned/.hgsubstate * (glob)
1081 @@ -1,2 +1* @@ (glob)
1081 @@ -1,2 +1* @@ (glob)
1082 7a36fa02b66e61f27f3d4a822809f159479b8ab2 sub1
1082 7a36fa02b66e61f27f3d4a822809f159479b8ab2 sub1
1083 -b1a26de6f2a045a9f079323693614ee322f1ff7e sub3
1083 -b1a26de6f2a045a9f079323693614ee322f1ff7e sub3
1084 [1]
1084 [1]
1085
1085
1086 $ hg --config extensions.extdiff= pdiff -r 0 -r '.^' -S
1086 $ hg --config extensions.extdiff= pdiff -r 0 -r '.^' -S
1087 \r (no-eol) (esc)
1087 \r (no-eol) (esc)
1088 archiving [ ] 0/3\r (no-eol) (esc)
1088 archiving [ ] 0/3\r (no-eol) (esc)
1089 archiving [=============> ] 1/3\r (no-eol) (esc)
1089 archiving [=============> ] 1/3\r (no-eol) (esc)
1090 archiving [===========================> ] 2/3\r (no-eol) (esc)
1090 archiving [===========================> ] 2/3\r (no-eol) (esc)
1091 archiving [==========================================>] 3/3\r (no-eol) (esc)
1091 archiving [==========================================>] 3/3\r (no-eol) (esc)
1092 \r (no-eol) (esc)
1092 \r (no-eol) (esc)
1093 \r (no-eol) (esc)
1093 \r (no-eol) (esc)
1094 archiving (sub1) [ ] 0/1\r (no-eol) (esc)
1094 archiving (sub1) [ ] 0/1\r (no-eol) (esc)
1095 archiving (sub1) [===================================>] 1/1\r (no-eol) (esc)
1095 archiving (sub1) [===================================>] 1/1\r (no-eol) (esc)
1096 \r (no-eol) (esc)
1096 \r (no-eol) (esc)
1097 \r (no-eol) (esc)
1097 \r (no-eol) (esc)
1098 archiving (sub1/sub2) [ ] 0/1\r (no-eol) (esc)
1098 archiving (sub1/sub2) [ ] 0/1\r (no-eol) (esc)
1099 archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc)
1099 archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc)
1100 \r (no-eol) (esc)
1100 \r (no-eol) (esc)
1101 \r (no-eol) (esc)
1101 \r (no-eol) (esc)
1102 archiving [ ] 0/8\r (no-eol) (esc)
1102 archiving [ ] 0/8\r (no-eol) (esc)
1103 archiving [====> ] 1/8\r (no-eol) (esc)
1103 archiving [====> ] 1/8\r (no-eol) (esc)
1104 archiving [=========> ] 2/8\r (no-eol) (esc)
1104 archiving [=========> ] 2/8\r (no-eol) (esc)
1105 archiving [===============> ] 3/8\r (no-eol) (esc)
1105 archiving [===============> ] 3/8\r (no-eol) (esc)
1106 archiving [====================> ] 4/8\r (no-eol) (esc)
1106 archiving [====================> ] 4/8\r (no-eol) (esc)
1107 archiving [=========================> ] 5/8\r (no-eol) (esc)
1107 archiving [=========================> ] 5/8\r (no-eol) (esc)
1108 archiving [===============================> ] 6/8\r (no-eol) (esc)
1108 archiving [===============================> ] 6/8\r (no-eol) (esc)
1109 archiving [====================================> ] 7/8\r (no-eol) (esc)
1109 archiving [====================================> ] 7/8\r (no-eol) (esc)
1110 archiving [==========================================>] 8/8\r (no-eol) (esc)
1110 archiving [==========================================>] 8/8\r (no-eol) (esc)
1111 \r (no-eol) (esc)
1111 \r (no-eol) (esc)
1112 \r (no-eol) (esc)
1112 \r (no-eol) (esc)
1113 archiving (sub1) [ ] 0/1\r (no-eol) (esc)
1113 archiving (sub1) [ ] 0/1\r (no-eol) (esc)
1114 archiving (sub1) [===================================>] 1/1\r (no-eol) (esc)
1114 archiving (sub1) [===================================>] 1/1\r (no-eol) (esc)
1115 \r (no-eol) (esc)
1115 \r (no-eol) (esc)
1116 \r (no-eol) (esc)
1116 \r (no-eol) (esc)
1117 archiving (sub1/sub2) [ ] 0/3\r (no-eol) (esc)
1117 archiving (sub1/sub2) [ ] 0/3\r (no-eol) (esc)
1118 archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (esc)
1118 archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (esc)
1119 archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (esc)
1119 archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (esc)
1120 archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc)
1120 archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc)
1121 \r (no-eol) (esc)
1121 \r (no-eol) (esc)
1122 \r (no-eol) (esc)
1122 \r (no-eol) (esc)
1123 archiving (sub3) [ ] 0/1\r (no-eol) (esc)
1123 archiving (sub3) [ ] 0/1\r (no-eol) (esc)
1124 archiving (sub3) [===================================>] 1/1\r (no-eol) (esc)
1124 archiving (sub3) [===================================>] 1/1\r (no-eol) (esc)
1125 \r (no-eol) (esc)
1125 \r (no-eol) (esc)
1126 diff -Nru cloned.*/.hglf/b.dat cloned.*/.hglf/b.dat (glob)
1126 diff -Nru cloned.*/.hglf/b.dat cloned.*/.hglf/b.dat (glob)
1127 --- cloned.*/.hglf/b.dat * (glob)
1127 --- cloned.*/.hglf/b.dat * (glob)
1128 +++ cloned.*/.hglf/b.dat * (glob)
1128 +++ cloned.*/.hglf/b.dat * (glob)
1129 @@ -*,0 +1* @@ (glob)
1129 @@ -*,0 +1* @@ (glob)
1130 +da39a3ee5e6b4b0d3255bfef95601890afd80709
1130 +da39a3ee5e6b4b0d3255bfef95601890afd80709
1131 diff -Nru cloned.*/.hglf/foo/bar/large.dat cloned.*/.hglf/foo/bar/large.dat (glob)
1131 diff -Nru cloned.*/.hglf/foo/bar/large.dat cloned.*/.hglf/foo/bar/large.dat (glob)
1132 --- cloned.*/.hglf/foo/bar/large.dat * (glob)
1132 --- cloned.*/.hglf/foo/bar/large.dat * (glob)
1133 +++ cloned.*/.hglf/foo/bar/large.dat * (glob)
1133 +++ cloned.*/.hglf/foo/bar/large.dat * (glob)
1134 @@ -*,0 +1* @@ (glob)
1134 @@ -*,0 +1* @@ (glob)
1135 +2f6933b5ee0f5fdd823d9717d8729f3c2523811b
1135 +2f6933b5ee0f5fdd823d9717d8729f3c2523811b
1136 diff -Nru cloned.*/.hglf/large.bin cloned.*/.hglf/large.bin (glob)
1136 diff -Nru cloned.*/.hglf/large.bin cloned.*/.hglf/large.bin (glob)
1137 --- cloned.*/.hglf/large.bin * (glob)
1137 --- cloned.*/.hglf/large.bin * (glob)
1138 +++ cloned.*/.hglf/large.bin * (glob)
1138 +++ cloned.*/.hglf/large.bin * (glob)
1139 @@ -*,0 +1* @@ (glob)
1139 @@ -*,0 +1* @@ (glob)
1140 +7f7097b041ccf68cc5561e9600da4655d21c6d18
1140 +7f7097b041ccf68cc5561e9600da4655d21c6d18
1141 diff -Nru cloned.*/.hgsub cloned.*/.hgsub (glob)
1141 diff -Nru cloned.*/.hgsub cloned.*/.hgsub (glob)
1142 --- cloned.*/.hgsub * (glob)
1142 --- cloned.*/.hgsub * (glob)
1143 +++ cloned.*/.hgsub * (glob)
1143 +++ cloned.*/.hgsub * (glob)
1144 @@ -1* +1,2 @@ (glob)
1144 @@ -1* +1,2 @@ (glob)
1145 sub1 = ../sub1
1145 sub1 = ../sub1
1146 +sub3 = sub3
1146 +sub3 = sub3
1147 diff -Nru cloned.*/.hgsubstate cloned.*/.hgsubstate (glob)
1147 diff -Nru cloned.*/.hgsubstate cloned.*/.hgsubstate (glob)
1148 --- cloned.*/.hgsubstate * (glob)
1148 --- cloned.*/.hgsubstate * (glob)
1149 +++ cloned.*/.hgsubstate * (glob)
1149 +++ cloned.*/.hgsubstate * (glob)
1150 @@ -1* +1,2 @@ (glob)
1150 @@ -1* +1,2 @@ (glob)
1151 -fc3b4ce2696f7741438c79207583768f2ce6b0dd sub1
1151 -fc3b4ce2696f7741438c79207583768f2ce6b0dd sub1
1152 +7a36fa02b66e61f27f3d4a822809f159479b8ab2 sub1
1152 +7a36fa02b66e61f27f3d4a822809f159479b8ab2 sub1
1153 +b1a26de6f2a045a9f079323693614ee322f1ff7e sub3
1153 +b1a26de6f2a045a9f079323693614ee322f1ff7e sub3
1154 diff -Nru cloned.*/foo/bar/def cloned.*/foo/bar/def (glob)
1154 diff -Nru cloned.*/foo/bar/def cloned.*/foo/bar/def (glob)
1155 --- cloned.*/foo/bar/def * (glob)
1155 --- cloned.*/foo/bar/def * (glob)
1156 +++ cloned.*/foo/bar/def * (glob)
1156 +++ cloned.*/foo/bar/def * (glob)
1157 @@ -*,0 +1* @@ (glob)
1157 @@ -*,0 +1* @@ (glob)
1158 +changed
1158 +changed
1159 diff -Nru cloned.*/main cloned.*/main (glob)
1159 diff -Nru cloned.*/main cloned.*/main (glob)
1160 --- cloned.*/main * (glob)
1160 --- cloned.*/main * (glob)
1161 +++ cloned.*/main * (glob)
1161 +++ cloned.*/main * (glob)
1162 @@ -1* +1* @@ (glob)
1162 @@ -1* +1* @@ (glob)
1163 -main
1163 -main
1164 +foo
1164 +foo
1165 diff -Nru cloned.*/sub1/.hgsubstate cloned.*/sub1/.hgsubstate (glob)
1165 diff -Nru cloned.*/sub1/.hgsubstate cloned.*/sub1/.hgsubstate (glob)
1166 --- cloned.*/sub1/.hgsubstate * (glob)
1166 --- cloned.*/sub1/.hgsubstate * (glob)
1167 +++ cloned.*/sub1/.hgsubstate * (glob)
1167 +++ cloned.*/sub1/.hgsubstate * (glob)
1168 @@ -1* +1* @@ (glob)
1168 @@ -1* +1* @@ (glob)
1169 -c57a0840e3badd667ef3c3ef65471609acb2ba3c sub2
1169 -c57a0840e3badd667ef3c3ef65471609acb2ba3c sub2
1170 +c77908c81ccea3794a896c79e98b0e004aee2e9e sub2
1170 +c77908c81ccea3794a896c79e98b0e004aee2e9e sub2
1171 diff -Nru cloned.*/sub1/sub2/folder/test.txt cloned.*/sub1/sub2/folder/test.txt (glob)
1171 diff -Nru cloned.*/sub1/sub2/folder/test.txt cloned.*/sub1/sub2/folder/test.txt (glob)
1172 --- cloned.*/sub1/sub2/folder/test.txt * (glob)
1172 --- cloned.*/sub1/sub2/folder/test.txt * (glob)
1173 +++ cloned.*/sub1/sub2/folder/test.txt * (glob)
1173 +++ cloned.*/sub1/sub2/folder/test.txt * (glob)
1174 @@ -*,0 +1* @@ (glob)
1174 @@ -*,0 +1* @@ (glob)
1175 +subfolder
1175 +subfolder
1176 diff -Nru cloned.*/sub1/sub2/sub2 cloned.*/sub1/sub2/sub2 (glob)
1176 diff -Nru cloned.*/sub1/sub2/sub2 cloned.*/sub1/sub2/sub2 (glob)
1177 --- cloned.*/sub1/sub2/sub2 * (glob)
1177 --- cloned.*/sub1/sub2/sub2 * (glob)
1178 +++ cloned.*/sub1/sub2/sub2 * (glob)
1178 +++ cloned.*/sub1/sub2/sub2 * (glob)
1179 @@ -1* +1* @@ (glob)
1179 @@ -1* +1* @@ (glob)
1180 -sub2
1180 -sub2
1181 +modified
1181 +modified
1182 diff -Nru cloned.*/sub3/a.txt cloned.*/sub3/a.txt (glob)
1182 diff -Nru cloned.*/sub3/a.txt cloned.*/sub3/a.txt (glob)
1183 --- cloned.*/sub3/a.txt * (glob)
1183 --- cloned.*/sub3/a.txt * (glob)
1184 +++ cloned.*/sub3/a.txt * (glob)
1184 +++ cloned.*/sub3/a.txt * (glob)
1185 @@ -*,0 +1* @@ (glob)
1185 @@ -*,0 +1* @@ (glob)
1186 +xyz
1186 +xyz
1187 [1]
1187 [1]
1188
1188
1189 $ echo mod > sub1/sub2/sub2
1189 $ echo mod > sub1/sub2/sub2
1190 $ hg --config extensions.extdiff= pdiff -S
1190 $ hg --config extensions.extdiff= pdiff -S
1191 \r (no-eol) (esc)
1191 \r (no-eol) (esc)
1192 archiving (sub1) [ <=> ] 0\r (no-eol) (esc)
1192 archiving (sub1) [ <=> ] 0\r (no-eol) (esc)
1193 \r (no-eol) (esc)
1193 \r (no-eol) (esc)
1194 \r (no-eol) (esc)
1194 \r (no-eol) (esc)
1195 archiving (sub1/sub2) [ ] 0/1\r (no-eol) (esc)
1195 archiving (sub1/sub2) [ ] 0/1\r (no-eol) (esc)
1196 archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc)
1196 archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc)
1197 \r (no-eol) (esc)
1197 \r (no-eol) (esc)
1198 --- */cloned.*/sub1/sub2/sub2 * (glob)
1198 --- */cloned.*/sub1/sub2/sub2 * (glob)
1199 +++ */cloned/sub1/sub2/sub2 * (glob)
1199 +++ */cloned/sub1/sub2/sub2 * (glob)
1200 @@ -1* +1* @@ (glob)
1200 @@ -1* +1* @@ (glob)
1201 -modified
1201 -modified
1202 +mod
1202 +mod
1203 [1]
1203 [1]
1204
1204
1205 $ cd ..
1205 $ cd ..
@@ -1,712 +1,712 b''
1 Create test repository:
1 Create test repository:
2
2
3 $ hg init repo
3 $ hg init repo
4 $ cd repo
4 $ cd repo
5 $ echo x1 > x.txt
5 $ echo x1 > x.txt
6
6
7 $ hg init foo
7 $ hg init foo
8 $ cd foo
8 $ cd foo
9 $ echo y1 > y.txt
9 $ echo y1 > y.txt
10
10
11 $ hg init bar
11 $ hg init bar
12 $ cd bar
12 $ cd bar
13 $ echo z1 > z.txt
13 $ echo z1 > z.txt
14
14
15 $ cd ..
15 $ cd ..
16 $ echo 'bar = bar' > .hgsub
16 $ echo 'bar = bar' > .hgsub
17
17
18 $ cd ..
18 $ cd ..
19 $ echo 'foo = foo' > .hgsub
19 $ echo 'foo = foo' > .hgsub
20
20
21 Add files --- .hgsub files must go first to trigger subrepos:
21 Add files --- .hgsub files must go first to trigger subrepos:
22
22
23 $ hg add -S .hgsub
23 $ hg add -S .hgsub
24 $ hg add -S foo/.hgsub
24 $ hg add -S foo/.hgsub
25 $ hg add -S foo/bar
25 $ hg add -S foo/bar
26 adding foo/bar/z.txt
26 adding foo/bar/z.txt
27 $ hg add -S
27 $ hg add -S
28 adding x.txt
28 adding x.txt
29 adding foo/y.txt
29 adding foo/y.txt
30
30
31 Test recursive status without committing anything:
31 Test recursive status without committing anything:
32
32
33 $ hg status -S
33 $ hg status -S
34 A .hgsub
34 A .hgsub
35 A foo/.hgsub
35 A foo/.hgsub
36 A foo/bar/z.txt
36 A foo/bar/z.txt
37 A foo/y.txt
37 A foo/y.txt
38 A x.txt
38 A x.txt
39
39
40 Test recursive diff without committing anything:
40 Test recursive diff without committing anything:
41
41
42 $ hg diff --nodates -S foo
42 $ hg diff --nodates -S foo
43 diff -r 000000000000 foo/.hgsub
43 diff -r 000000000000 foo/.hgsub
44 --- /dev/null
44 --- /dev/null
45 +++ b/foo/.hgsub
45 +++ b/foo/.hgsub
46 @@ -0,0 +1,1 @@
46 @@ -0,0 +1,1 @@
47 +bar = bar
47 +bar = bar
48 diff -r 000000000000 foo/y.txt
48 diff -r 000000000000 foo/y.txt
49 --- /dev/null
49 --- /dev/null
50 +++ b/foo/y.txt
50 +++ b/foo/y.txt
51 @@ -0,0 +1,1 @@
51 @@ -0,0 +1,1 @@
52 +y1
52 +y1
53 diff -r 000000000000 foo/bar/z.txt
53 diff -r 000000000000 foo/bar/z.txt
54 --- /dev/null
54 --- /dev/null
55 +++ b/foo/bar/z.txt
55 +++ b/foo/bar/z.txt
56 @@ -0,0 +1,1 @@
56 @@ -0,0 +1,1 @@
57 +z1
57 +z1
58
58
59 Commits:
59 Commits:
60
60
61 $ hg commit -m fails
61 $ hg commit -m fails
62 abort: uncommitted changes in subrepository "foo"
62 abort: uncommitted changes in subrepository "foo"
63 (use --subrepos for recursive commit)
63 (use --subrepos for recursive commit)
64 [255]
64 [255]
65
65
66 The --subrepos flag overwrite the config setting:
66 The --subrepos flag overwrite the config setting:
67
67
68 $ hg commit -m 0-0-0 --config ui.commitsubrepos=No --subrepos
68 $ hg commit -m 0-0-0 --config ui.commitsubrepos=No --subrepos
69 committing subrepository foo
69 committing subrepository foo
70 committing subrepository foo/bar
70 committing subrepository foo/bar
71
71
72 $ cd foo
72 $ cd foo
73 $ echo y2 >> y.txt
73 $ echo y2 >> y.txt
74 $ hg commit -m 0-1-0
74 $ hg commit -m 0-1-0
75
75
76 $ cd bar
76 $ cd bar
77 $ echo z2 >> z.txt
77 $ echo z2 >> z.txt
78 $ hg commit -m 0-1-1
78 $ hg commit -m 0-1-1
79
79
80 $ cd ..
80 $ cd ..
81 $ hg commit -m 0-2-1
81 $ hg commit -m 0-2-1
82
82
83 $ cd ..
83 $ cd ..
84 $ hg commit -m 1-2-1
84 $ hg commit -m 1-2-1
85
85
86 Change working directory:
86 Change working directory:
87
87
88 $ echo y3 >> foo/y.txt
88 $ echo y3 >> foo/y.txt
89 $ echo z3 >> foo/bar/z.txt
89 $ echo z3 >> foo/bar/z.txt
90 $ hg status -S
90 $ hg status -S
91 M foo/bar/z.txt
91 M foo/bar/z.txt
92 M foo/y.txt
92 M foo/y.txt
93 $ hg diff --nodates -S
93 $ hg diff --nodates -S
94 diff -r d254738c5f5e foo/y.txt
94 diff -r d254738c5f5e foo/y.txt
95 --- a/foo/y.txt
95 --- a/foo/y.txt
96 +++ b/foo/y.txt
96 +++ b/foo/y.txt
97 @@ -1,2 +1,3 @@
97 @@ -1,2 +1,3 @@
98 y1
98 y1
99 y2
99 y2
100 +y3
100 +y3
101 diff -r 9647f22de499 foo/bar/z.txt
101 diff -r 9647f22de499 foo/bar/z.txt
102 --- a/foo/bar/z.txt
102 --- a/foo/bar/z.txt
103 +++ b/foo/bar/z.txt
103 +++ b/foo/bar/z.txt
104 @@ -1,2 +1,3 @@
104 @@ -1,2 +1,3 @@
105 z1
105 z1
106 z2
106 z2
107 +z3
107 +z3
108
108
109 Status call crossing repository boundaries:
109 Status call crossing repository boundaries:
110
110
111 $ hg status -S foo/bar/z.txt
111 $ hg status -S foo/bar/z.txt
112 M foo/bar/z.txt
112 M foo/bar/z.txt
113 $ hg status -S -I 'foo/?.txt'
113 $ hg status -S -I 'foo/?.txt'
114 M foo/y.txt
114 M foo/y.txt
115 $ hg status -S -I '**/?.txt'
115 $ hg status -S -I '**/?.txt'
116 M foo/bar/z.txt
116 M foo/bar/z.txt
117 M foo/y.txt
117 M foo/y.txt
118 $ hg diff --nodates -S -I '**/?.txt'
118 $ hg diff --nodates -S -I '**/?.txt'
119 diff -r d254738c5f5e foo/y.txt
119 diff -r d254738c5f5e foo/y.txt
120 --- a/foo/y.txt
120 --- a/foo/y.txt
121 +++ b/foo/y.txt
121 +++ b/foo/y.txt
122 @@ -1,2 +1,3 @@
122 @@ -1,2 +1,3 @@
123 y1
123 y1
124 y2
124 y2
125 +y3
125 +y3
126 diff -r 9647f22de499 foo/bar/z.txt
126 diff -r 9647f22de499 foo/bar/z.txt
127 --- a/foo/bar/z.txt
127 --- a/foo/bar/z.txt
128 +++ b/foo/bar/z.txt
128 +++ b/foo/bar/z.txt
129 @@ -1,2 +1,3 @@
129 @@ -1,2 +1,3 @@
130 z1
130 z1
131 z2
131 z2
132 +z3
132 +z3
133
133
134 Status from within a subdirectory:
134 Status from within a subdirectory:
135
135
136 $ mkdir dir
136 $ mkdir dir
137 $ cd dir
137 $ cd dir
138 $ echo a1 > a.txt
138 $ echo a1 > a.txt
139 $ hg status -S
139 $ hg status -S
140 M foo/bar/z.txt
140 M foo/bar/z.txt
141 M foo/y.txt
141 M foo/y.txt
142 ? dir/a.txt
142 ? dir/a.txt
143 $ hg diff --nodates -S
143 $ hg diff --nodates -S
144 diff -r d254738c5f5e foo/y.txt
144 diff -r d254738c5f5e foo/y.txt
145 --- a/foo/y.txt
145 --- a/foo/y.txt
146 +++ b/foo/y.txt
146 +++ b/foo/y.txt
147 @@ -1,2 +1,3 @@
147 @@ -1,2 +1,3 @@
148 y1
148 y1
149 y2
149 y2
150 +y3
150 +y3
151 diff -r 9647f22de499 foo/bar/z.txt
151 diff -r 9647f22de499 foo/bar/z.txt
152 --- a/foo/bar/z.txt
152 --- a/foo/bar/z.txt
153 +++ b/foo/bar/z.txt
153 +++ b/foo/bar/z.txt
154 @@ -1,2 +1,3 @@
154 @@ -1,2 +1,3 @@
155 z1
155 z1
156 z2
156 z2
157 +z3
157 +z3
158
158
159 Status with relative path:
159 Status with relative path:
160
160
161 $ hg status -S ..
161 $ hg status -S ..
162 M ../foo/bar/z.txt
162 M ../foo/bar/z.txt
163 M ../foo/y.txt
163 M ../foo/y.txt
164 ? a.txt
164 ? a.txt
165
165
166 XXX: filtering lfilesrepo.status() in 3.3-rc causes these files to be listed as
166 XXX: filtering lfilesrepo.status() in 3.3-rc causes these files to be listed as
167 added instead of modified.
167 added instead of modified.
168 $ hg status -S .. --config extensions.largefiles=
168 $ hg status -S .. --config extensions.largefiles=
169 M ../foo/bar/z.txt
169 M ../foo/bar/z.txt
170 M ../foo/y.txt
170 M ../foo/y.txt
171 ? a.txt
171 ? a.txt
172
172
173 $ hg diff --nodates -S ..
173 $ hg diff --nodates -S ..
174 diff -r d254738c5f5e foo/y.txt
174 diff -r d254738c5f5e foo/y.txt
175 --- a/foo/y.txt
175 --- a/foo/y.txt
176 +++ b/foo/y.txt
176 +++ b/foo/y.txt
177 @@ -1,2 +1,3 @@
177 @@ -1,2 +1,3 @@
178 y1
178 y1
179 y2
179 y2
180 +y3
180 +y3
181 diff -r 9647f22de499 foo/bar/z.txt
181 diff -r 9647f22de499 foo/bar/z.txt
182 --- a/foo/bar/z.txt
182 --- a/foo/bar/z.txt
183 +++ b/foo/bar/z.txt
183 +++ b/foo/bar/z.txt
184 @@ -1,2 +1,3 @@
184 @@ -1,2 +1,3 @@
185 z1
185 z1
186 z2
186 z2
187 +z3
187 +z3
188 $ cd ..
188 $ cd ..
189
189
190 Cleanup and final commit:
190 Cleanup and final commit:
191
191
192 $ rm -r dir
192 $ rm -r dir
193 $ hg commit --subrepos -m 2-3-2
193 $ hg commit --subrepos -m 2-3-2
194 committing subrepository foo
194 committing subrepository foo
195 committing subrepository foo/bar
195 committing subrepository foo/bar
196
196
197 Test explicit path commands within subrepos: add/forget
197 Test explicit path commands within subrepos: add/forget
198 $ echo z1 > foo/bar/z2.txt
198 $ echo z1 > foo/bar/z2.txt
199 $ hg status -S
199 $ hg status -S
200 ? foo/bar/z2.txt
200 ? foo/bar/z2.txt
201 $ hg add foo/bar/z2.txt
201 $ hg add foo/bar/z2.txt
202 $ hg status -S
202 $ hg status -S
203 A foo/bar/z2.txt
203 A foo/bar/z2.txt
204 $ hg forget foo/bar/z2.txt
204 $ hg forget foo/bar/z2.txt
205 $ hg status -S
205 $ hg status -S
206 ? foo/bar/z2.txt
206 ? foo/bar/z2.txt
207 $ hg forget foo/bar/z2.txt
207 $ hg forget foo/bar/z2.txt
208 not removing foo/bar/z2.txt: file is already untracked
208 not removing foo/bar/z2.txt: file is already untracked
209 [1]
209 [1]
210 $ hg status -S
210 $ hg status -S
211 ? foo/bar/z2.txt
211 ? foo/bar/z2.txt
212 $ rm foo/bar/z2.txt
212 $ rm foo/bar/z2.txt
213
213
214 Log with the relationships between repo and its subrepo:
214 Log with the relationships between repo and its subrepo:
215
215
216 $ hg log --template '{rev}:{node|short} {desc}\n'
216 $ hg log --template '{rev}:{node|short} {desc}\n'
217 2:1326fa26d0c0 2-3-2
217 2:1326fa26d0c0 2-3-2
218 1:4b3c9ff4f66b 1-2-1
218 1:4b3c9ff4f66b 1-2-1
219 0:23376cbba0d8 0-0-0
219 0:23376cbba0d8 0-0-0
220
220
221 $ hg -R foo log --template '{rev}:{node|short} {desc}\n'
221 $ hg -R foo log --template '{rev}:{node|short} {desc}\n'
222 3:65903cebad86 2-3-2
222 3:65903cebad86 2-3-2
223 2:d254738c5f5e 0-2-1
223 2:d254738c5f5e 0-2-1
224 1:8629ce7dcc39 0-1-0
224 1:8629ce7dcc39 0-1-0
225 0:af048e97ade2 0-0-0
225 0:af048e97ade2 0-0-0
226
226
227 $ hg -R foo/bar log --template '{rev}:{node|short} {desc}\n'
227 $ hg -R foo/bar log --template '{rev}:{node|short} {desc}\n'
228 2:31ecbdafd357 2-3-2
228 2:31ecbdafd357 2-3-2
229 1:9647f22de499 0-1-1
229 1:9647f22de499 0-1-1
230 0:4904098473f9 0-0-0
230 0:4904098473f9 0-0-0
231
231
232 Status between revisions:
232 Status between revisions:
233
233
234 $ hg status -S
234 $ hg status -S
235 $ hg status -S --rev 0:1
235 $ hg status -S --rev 0:1
236 M .hgsubstate
236 M .hgsubstate
237 M foo/.hgsubstate
237 M foo/.hgsubstate
238 M foo/bar/z.txt
238 M foo/bar/z.txt
239 M foo/y.txt
239 M foo/y.txt
240 $ hg diff --nodates -S -I '**/?.txt' --rev 0:1
240 $ hg diff --nodates -S -I '**/?.txt' --rev 0:1
241 diff -r af048e97ade2 -r d254738c5f5e foo/y.txt
241 diff -r af048e97ade2 -r d254738c5f5e foo/y.txt
242 --- a/foo/y.txt
242 --- a/foo/y.txt
243 +++ b/foo/y.txt
243 +++ b/foo/y.txt
244 @@ -1,1 +1,2 @@
244 @@ -1,1 +1,2 @@
245 y1
245 y1
246 +y2
246 +y2
247 diff -r 4904098473f9 -r 9647f22de499 foo/bar/z.txt
247 diff -r 4904098473f9 -r 9647f22de499 foo/bar/z.txt
248 --- a/foo/bar/z.txt
248 --- a/foo/bar/z.txt
249 +++ b/foo/bar/z.txt
249 +++ b/foo/bar/z.txt
250 @@ -1,1 +1,2 @@
250 @@ -1,1 +1,2 @@
251 z1
251 z1
252 +z2
252 +z2
253
253
254 #if serve
254 #if serve
255 $ cd ..
255 $ cd ..
256 $ hg serve -R repo --debug -S -p $HGPORT -d --pid-file=hg1.pid -E error.log -A access.log
256 $ hg serve -R repo --debug -S -p $HGPORT -d --pid-file=hg1.pid -E error.log -A access.log
257 adding = $TESTTMP/repo
257 adding = $TESTTMP/repo
258 adding foo = $TESTTMP/repo/foo
258 adding foo = $TESTTMP/repo/foo
259 adding foo/bar = $TESTTMP/repo/foo/bar
259 adding foo/bar = $TESTTMP/repo/foo/bar
260 listening at http://*:$HGPORT/ (bound to *:$HGPORT) (glob) (?)
260 listening at http://*:$HGPORT/ (bound to *:$HGPORT) (glob) (?)
261 adding = $TESTTMP/repo (?)
261 adding = $TESTTMP/repo (?)
262 adding foo = $TESTTMP/repo/foo (?)
262 adding foo = $TESTTMP/repo/foo (?)
263 adding foo/bar = $TESTTMP/repo/foo/bar (?)
263 adding foo/bar = $TESTTMP/repo/foo/bar (?)
264 $ cat hg1.pid >> $DAEMON_PIDS
264 $ cat hg1.pid >> $DAEMON_PIDS
265
265
266 $ hg clone http://localhost:$HGPORT clone --config progress.disable=True
266 $ hg clone http://localhost:$HGPORT clone --config progress.disable=True
267 requesting all changes
267 requesting all changes
268 adding changesets
268 adding changesets
269 adding manifests
269 adding manifests
270 adding file changes
270 adding file changes
271 added 3 changesets with 5 changes to 3 files
271 added 3 changesets with 5 changes to 3 files
272 new changesets 23376cbba0d8:1326fa26d0c0
272 new changesets 23376cbba0d8:1326fa26d0c0
273 updating to branch default
273 updating to branch default
274 cloning subrepo foo from http://localhost:$HGPORT/foo
274 cloning subrepo foo from http://localhost:$HGPORT/foo
275 requesting all changes
275 requesting all changes
276 adding changesets
276 adding changesets
277 adding manifests
277 adding manifests
278 adding file changes
278 adding file changes
279 added 4 changesets with 7 changes to 3 files
279 added 4 changesets with 7 changes to 3 files
280 new changesets af048e97ade2:65903cebad86
280 new changesets af048e97ade2:65903cebad86
281 cloning subrepo foo/bar from http://localhost:$HGPORT/foo/bar
281 cloning subrepo foo/bar from http://localhost:$HGPORT/foo/bar
282 requesting all changes
282 requesting all changes
283 adding changesets
283 adding changesets
284 adding manifests
284 adding manifests
285 adding file changes
285 adding file changes
286 added 3 changesets with 3 changes to 1 files
286 added 3 changesets with 3 changes to 1 files
287 new changesets 4904098473f9:31ecbdafd357
287 new changesets 4904098473f9:31ecbdafd357
288 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
288 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
289
289
290 $ cat clone/foo/bar/z.txt
290 $ cat clone/foo/bar/z.txt
291 z1
291 z1
292 z2
292 z2
293 z3
293 z3
294
294
295 Clone pooling from a remote URL will share the top level repo and the subrepos,
295 Clone pooling from a remote URL will share the top level repo and the subrepos,
296 even if they are referenced by remote URL.
296 even if they are referenced by remote URL.
297
297
298 $ hg --config extensions.share= --config share.pool=$TESTTMP/pool \
298 $ hg --config extensions.share= --config share.pool=$TESTTMP/pool \
299 > clone http://localhost:$HGPORT shared
299 > clone http://localhost:$HGPORT shared
300 (sharing from new pooled repository 23376cbba0d87c15906bb3652584927c140907bf)
300 (sharing from new pooled repository 23376cbba0d87c15906bb3652584927c140907bf)
301 requesting all changes
301 requesting all changes
302 adding changesets
302 adding changesets
303 adding manifests
303 adding manifests
304 adding file changes
304 adding file changes
305 added 3 changesets with 5 changes to 3 files
305 added 3 changesets with 5 changes to 3 files
306 new changesets 23376cbba0d8:1326fa26d0c0
306 new changesets 23376cbba0d8:1326fa26d0c0
307 searching for changes
307 searching for changes
308 no changes found
308 no changes found
309 updating working directory
309 updating working directory
310 cloning subrepo foo from http://localhost:$HGPORT/foo
310 cloning subrepo foo from http://localhost:$HGPORT/foo
311 (sharing from new pooled repository af048e97ade2e236f754f05d07013e586af0f8bf)
311 (sharing from new pooled repository af048e97ade2e236f754f05d07013e586af0f8bf)
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 4 changesets with 7 changes to 3 files
316 added 4 changesets with 7 changes to 3 files
317 new changesets af048e97ade2:65903cebad86
317 new changesets af048e97ade2:65903cebad86
318 searching for changes
318 searching for changes
319 no changes found
319 no changes found
320 cloning subrepo foo/bar from http://localhost:$HGPORT/foo/bar
320 cloning subrepo foo/bar from http://localhost:$HGPORT/foo/bar
321 (sharing from new pooled repository 4904098473f96c900fec436dad267edd4da59fad)
321 (sharing from new pooled repository 4904098473f96c900fec436dad267edd4da59fad)
322 requesting all changes
322 requesting all changes
323 adding changesets
323 adding changesets
324 adding manifests
324 adding manifests
325 adding file changes
325 adding file changes
326 added 3 changesets with 3 changes to 1 files
326 added 3 changesets with 3 changes to 1 files
327 new changesets 4904098473f9:31ecbdafd357
327 new changesets 4904098473f9:31ecbdafd357
328 searching for changes
328 searching for changes
329 no changes found
329 no changes found
330 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
330 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
331
331
332 $ cat access.log
332 $ cat access.log
333 * "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull (glob)
333 * "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
334 * "GET /?cmd=batch HTTP/1.1" 200 - * (glob)
334 * "GET /?cmd=batch HTTP/1.1" 200 - * (glob)
335 * "GET /?cmd=getbundle HTTP/1.1" 200 - * (glob)
335 * "GET /?cmd=getbundle HTTP/1.1" 200 - * (glob)
336 * "GET /foo?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull (glob)
336 * "GET /foo?cmd=capabilities HTTP/1.1" 200 - (glob)
337 * "GET /foo?cmd=batch HTTP/1.1" 200 - * (glob)
337 * "GET /foo?cmd=batch HTTP/1.1" 200 - * (glob)
338 * "GET /foo?cmd=getbundle HTTP/1.1" 200 - * (glob)
338 * "GET /foo?cmd=getbundle HTTP/1.1" 200 - * (glob)
339 * "GET /foo/bar?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull (glob)
339 * "GET /foo/bar?cmd=capabilities HTTP/1.1" 200 - (glob)
340 * "GET /foo/bar?cmd=batch HTTP/1.1" 200 - * (glob)
340 * "GET /foo/bar?cmd=batch HTTP/1.1" 200 - * (glob)
341 * "GET /foo/bar?cmd=getbundle HTTP/1.1" 200 - * (glob)
341 * "GET /foo/bar?cmd=getbundle HTTP/1.1" 200 - * (glob)
342 $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - * (glob)
342 $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
343 $LOCALIP - - [$LOGDATE$] "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=0 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
343 $LOCALIP - - [$LOGDATE$] "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=0 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
344 $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - * (glob)
344 $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
345 $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
345 $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
346 $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=1326fa26d0c00d2146c63b56bb6a45149d7325ac&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
346 $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=1326fa26d0c00d2146c63b56bb6a45149d7325ac&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
347 $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D1326fa26d0c00d2146c63b56bb6a45149d7325ac x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
347 $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D1326fa26d0c00d2146c63b56bb6a45149d7325ac x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
348 $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=1326fa26d0c00d2146c63b56bb6a45149d7325ac&heads=1326fa26d0c00d2146c63b56bb6a45149d7325ac&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
348 $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=1326fa26d0c00d2146c63b56bb6a45149d7325ac&heads=1326fa26d0c00d2146c63b56bb6a45149d7325ac&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
349 $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=capabilities HTTP/1.1" 200 - * (glob)
349 $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=capabilities HTTP/1.1" 200 - (glob)
350 $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=0 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
350 $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=0 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
351 $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=capabilities HTTP/1.1" 200 - * (glob)
351 $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=capabilities HTTP/1.1" 200 - (glob)
352 $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
352 $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
353 $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=65903cebad86f1a84bd4f1134f62fa7dcb7a1c98&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
353 $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=65903cebad86f1a84bd4f1134f62fa7dcb7a1c98&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
354 $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D65903cebad86f1a84bd4f1134f62fa7dcb7a1c98 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
354 $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D65903cebad86f1a84bd4f1134f62fa7dcb7a1c98 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
355 $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=65903cebad86f1a84bd4f1134f62fa7dcb7a1c98&heads=65903cebad86f1a84bd4f1134f62fa7dcb7a1c98&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
355 $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=65903cebad86f1a84bd4f1134f62fa7dcb7a1c98&heads=65903cebad86f1a84bd4f1134f62fa7dcb7a1c98&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
356 $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=capabilities HTTP/1.1" 200 - * (glob)
356 $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=capabilities HTTP/1.1" 200 - (glob)
357 $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=0 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
357 $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=0 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
358 $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=capabilities HTTP/1.1" 200 - * (glob)
358 $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=capabilities HTTP/1.1" 200 - (glob)
359 $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
359 $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
360 $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=31ecbdafd357f54b281c9bd1d681bb90de219e22&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
360 $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=31ecbdafd357f54b281c9bd1d681bb90de219e22&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
361 $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D31ecbdafd357f54b281c9bd1d681bb90de219e22 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
361 $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D31ecbdafd357f54b281c9bd1d681bb90de219e22 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
362 $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=31ecbdafd357f54b281c9bd1d681bb90de219e22&heads=31ecbdafd357f54b281c9bd1d681bb90de219e22&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
362 $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=31ecbdafd357f54b281c9bd1d681bb90de219e22&heads=31ecbdafd357f54b281c9bd1d681bb90de219e22&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
363
363
364 $ killdaemons.py
364 $ killdaemons.py
365 $ rm hg1.pid error.log access.log
365 $ rm hg1.pid error.log access.log
366 $ cd repo
366 $ cd repo
367 #endif
367 #endif
368
368
369 Enable progress extension for archive tests:
369 Enable progress extension for archive tests:
370
370
371 $ cp $HGRCPATH $HGRCPATH.no-progress
371 $ cp $HGRCPATH $HGRCPATH.no-progress
372 $ cat >> $HGRCPATH <<EOF
372 $ cat >> $HGRCPATH <<EOF
373 > [progress]
373 > [progress]
374 > disable=False
374 > disable=False
375 > assume-tty = 1
375 > assume-tty = 1
376 > delay = 0
376 > delay = 0
377 > # set changedelay really large so we don't see nested topics
377 > # set changedelay really large so we don't see nested topics
378 > changedelay = 30000
378 > changedelay = 30000
379 > format = topic bar number
379 > format = topic bar number
380 > refresh = 0
380 > refresh = 0
381 > width = 60
381 > width = 60
382 > EOF
382 > EOF
383
383
384 Test archiving to a directory tree (the doubled lines in the output
384 Test archiving to a directory tree (the doubled lines in the output
385 only show up in the test output, not in real usage):
385 only show up in the test output, not in real usage):
386
386
387 $ hg archive --subrepos ../archive
387 $ hg archive --subrepos ../archive
388 \r (no-eol) (esc)
388 \r (no-eol) (esc)
389 archiving [ ] 0/3\r (no-eol) (esc)
389 archiving [ ] 0/3\r (no-eol) (esc)
390 archiving [=============> ] 1/3\r (no-eol) (esc)
390 archiving [=============> ] 1/3\r (no-eol) (esc)
391 archiving [===========================> ] 2/3\r (no-eol) (esc)
391 archiving [===========================> ] 2/3\r (no-eol) (esc)
392 archiving [==========================================>] 3/3\r (no-eol) (esc)
392 archiving [==========================================>] 3/3\r (no-eol) (esc)
393 \r (no-eol) (esc)
393 \r (no-eol) (esc)
394 \r (no-eol) (esc)
394 \r (no-eol) (esc)
395 archiving (foo) [ ] 0/3\r (no-eol) (esc)
395 archiving (foo) [ ] 0/3\r (no-eol) (esc)
396 archiving (foo) [===========> ] 1/3\r (no-eol) (esc)
396 archiving (foo) [===========> ] 1/3\r (no-eol) (esc)
397 archiving (foo) [=======================> ] 2/3\r (no-eol) (esc)
397 archiving (foo) [=======================> ] 2/3\r (no-eol) (esc)
398 archiving (foo) [====================================>] 3/3\r (no-eol) (esc)
398 archiving (foo) [====================================>] 3/3\r (no-eol) (esc)
399 \r (no-eol) (esc)
399 \r (no-eol) (esc)
400 \r (no-eol) (esc)
400 \r (no-eol) (esc)
401 archiving (foo/bar) [ ] 0/1\r (no-eol) (esc)
401 archiving (foo/bar) [ ] 0/1\r (no-eol) (esc)
402 archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc)
402 archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc)
403 \r (no-eol) (esc)
403 \r (no-eol) (esc)
404 $ find ../archive | sort
404 $ find ../archive | sort
405 ../archive
405 ../archive
406 ../archive/.hg_archival.txt
406 ../archive/.hg_archival.txt
407 ../archive/.hgsub
407 ../archive/.hgsub
408 ../archive/.hgsubstate
408 ../archive/.hgsubstate
409 ../archive/foo
409 ../archive/foo
410 ../archive/foo/.hgsub
410 ../archive/foo/.hgsub
411 ../archive/foo/.hgsubstate
411 ../archive/foo/.hgsubstate
412 ../archive/foo/bar
412 ../archive/foo/bar
413 ../archive/foo/bar/z.txt
413 ../archive/foo/bar/z.txt
414 ../archive/foo/y.txt
414 ../archive/foo/y.txt
415 ../archive/x.txt
415 ../archive/x.txt
416
416
417 Test archiving to zip file (unzip output is unstable):
417 Test archiving to zip file (unzip output is unstable):
418
418
419 $ hg archive --subrepos --prefix '.' ../archive.zip
419 $ hg archive --subrepos --prefix '.' ../archive.zip
420 \r (no-eol) (esc)
420 \r (no-eol) (esc)
421 archiving [ ] 0/3\r (no-eol) (esc)
421 archiving [ ] 0/3\r (no-eol) (esc)
422 archiving [=============> ] 1/3\r (no-eol) (esc)
422 archiving [=============> ] 1/3\r (no-eol) (esc)
423 archiving [===========================> ] 2/3\r (no-eol) (esc)
423 archiving [===========================> ] 2/3\r (no-eol) (esc)
424 archiving [==========================================>] 3/3\r (no-eol) (esc)
424 archiving [==========================================>] 3/3\r (no-eol) (esc)
425 \r (no-eol) (esc)
425 \r (no-eol) (esc)
426 \r (no-eol) (esc)
426 \r (no-eol) (esc)
427 archiving (foo) [ ] 0/3\r (no-eol) (esc)
427 archiving (foo) [ ] 0/3\r (no-eol) (esc)
428 archiving (foo) [===========> ] 1/3\r (no-eol) (esc)
428 archiving (foo) [===========> ] 1/3\r (no-eol) (esc)
429 archiving (foo) [=======================> ] 2/3\r (no-eol) (esc)
429 archiving (foo) [=======================> ] 2/3\r (no-eol) (esc)
430 archiving (foo) [====================================>] 3/3\r (no-eol) (esc)
430 archiving (foo) [====================================>] 3/3\r (no-eol) (esc)
431 \r (no-eol) (esc)
431 \r (no-eol) (esc)
432 \r (no-eol) (esc)
432 \r (no-eol) (esc)
433 archiving (foo/bar) [ ] 0/1\r (no-eol) (esc)
433 archiving (foo/bar) [ ] 0/1\r (no-eol) (esc)
434 archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc)
434 archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc)
435 \r (no-eol) (esc)
435 \r (no-eol) (esc)
436
436
437 (unzip date formating is unstable, we do not care about it and glob it out)
437 (unzip date formating is unstable, we do not care about it and glob it out)
438
438
439 $ unzip -l ../archive.zip | grep -v -- ----- | egrep -v files$
439 $ unzip -l ../archive.zip | grep -v -- ----- | egrep -v files$
440 Archive: ../archive.zip
440 Archive: ../archive.zip
441 Length [ ]* Date [ ]* Time [ ]* Name (re)
441 Length [ ]* Date [ ]* Time [ ]* Name (re)
442 172 [0-9:\- ]* .hg_archival.txt (re)
442 172 [0-9:\- ]* .hg_archival.txt (re)
443 10 [0-9:\- ]* .hgsub (re)
443 10 [0-9:\- ]* .hgsub (re)
444 45 [0-9:\- ]* .hgsubstate (re)
444 45 [0-9:\- ]* .hgsubstate (re)
445 3 [0-9:\- ]* x.txt (re)
445 3 [0-9:\- ]* x.txt (re)
446 10 [0-9:\- ]* foo/.hgsub (re)
446 10 [0-9:\- ]* foo/.hgsub (re)
447 45 [0-9:\- ]* foo/.hgsubstate (re)
447 45 [0-9:\- ]* foo/.hgsubstate (re)
448 9 [0-9:\- ]* foo/y.txt (re)
448 9 [0-9:\- ]* foo/y.txt (re)
449 9 [0-9:\- ]* foo/bar/z.txt (re)
449 9 [0-9:\- ]* foo/bar/z.txt (re)
450
450
451 Test archiving a revision that references a subrepo that is not yet
451 Test archiving a revision that references a subrepo that is not yet
452 cloned:
452 cloned:
453
453
454 #if hardlink
454 #if hardlink
455 $ hg clone -U . ../empty
455 $ hg clone -U . ../empty
456 \r (no-eol) (esc)
456 \r (no-eol) (esc)
457 linking [ <=> ] 1\r (no-eol) (esc)
457 linking [ <=> ] 1\r (no-eol) (esc)
458 linking [ <=> ] 2\r (no-eol) (esc)
458 linking [ <=> ] 2\r (no-eol) (esc)
459 linking [ <=> ] 3\r (no-eol) (esc)
459 linking [ <=> ] 3\r (no-eol) (esc)
460 linking [ <=> ] 4\r (no-eol) (esc)
460 linking [ <=> ] 4\r (no-eol) (esc)
461 linking [ <=> ] 5\r (no-eol) (esc)
461 linking [ <=> ] 5\r (no-eol) (esc)
462 linking [ <=> ] 6\r (no-eol) (esc)
462 linking [ <=> ] 6\r (no-eol) (esc)
463 linking [ <=> ] 7\r (no-eol) (esc)
463 linking [ <=> ] 7\r (no-eol) (esc)
464 linking [ <=> ] 8\r (no-eol) (esc)
464 linking [ <=> ] 8\r (no-eol) (esc)
465 linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !)
465 linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !)
466 linking [ <=> ] 10\r (no-eol) (esc) (reposimplestore !)
466 linking [ <=> ] 10\r (no-eol) (esc) (reposimplestore !)
467 linking [ <=> ] 11\r (no-eol) (esc) (reposimplestore !)
467 linking [ <=> ] 11\r (no-eol) (esc) (reposimplestore !)
468 linking [ <=> ] 12\r (no-eol) (esc) (reposimplestore !)
468 linking [ <=> ] 12\r (no-eol) (esc) (reposimplestore !)
469 linking [ <=> ] 13\r (no-eol) (esc) (reposimplestore !)
469 linking [ <=> ] 13\r (no-eol) (esc) (reposimplestore !)
470 \r (no-eol) (esc)
470 \r (no-eol) (esc)
471 #else
471 #else
472 $ hg clone -U . ../empty
472 $ hg clone -U . ../empty
473 \r (no-eol) (esc)
473 \r (no-eol) (esc)
474 linking [ <=> ] 1 (no-eol)
474 linking [ <=> ] 1 (no-eol)
475 #endif
475 #endif
476
476
477 $ cd ../empty
477 $ cd ../empty
478 #if hardlink
478 #if hardlink
479 $ hg archive --subrepos -r tip --prefix './' ../archive.tar.gz
479 $ hg archive --subrepos -r tip --prefix './' ../archive.tar.gz
480 \r (no-eol) (esc)
480 \r (no-eol) (esc)
481 archiving [ ] 0/3\r (no-eol) (esc)
481 archiving [ ] 0/3\r (no-eol) (esc)
482 archiving [=============> ] 1/3\r (no-eol) (esc)
482 archiving [=============> ] 1/3\r (no-eol) (esc)
483 archiving [===========================> ] 2/3\r (no-eol) (esc)
483 archiving [===========================> ] 2/3\r (no-eol) (esc)
484 archiving [==========================================>] 3/3\r (no-eol) (esc)
484 archiving [==========================================>] 3/3\r (no-eol) (esc)
485 \r (no-eol) (esc)
485 \r (no-eol) (esc)
486 \r (no-eol) (esc)
486 \r (no-eol) (esc)
487 linking [ <=> ] 1\r (no-eol) (esc)
487 linking [ <=> ] 1\r (no-eol) (esc)
488 linking [ <=> ] 2\r (no-eol) (esc)
488 linking [ <=> ] 2\r (no-eol) (esc)
489 linking [ <=> ] 3\r (no-eol) (esc)
489 linking [ <=> ] 3\r (no-eol) (esc)
490 linking [ <=> ] 4\r (no-eol) (esc)
490 linking [ <=> ] 4\r (no-eol) (esc)
491 linking [ <=> ] 5\r (no-eol) (esc)
491 linking [ <=> ] 5\r (no-eol) (esc)
492 linking [ <=> ] 6\r (no-eol) (esc)
492 linking [ <=> ] 6\r (no-eol) (esc)
493 linking [ <=> ] 7\r (no-eol) (esc)
493 linking [ <=> ] 7\r (no-eol) (esc)
494 linking [ <=> ] 8\r (no-eol) (esc)
494 linking [ <=> ] 8\r (no-eol) (esc)
495 linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !)
495 linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !)
496 linking [ <=> ] 10\r (no-eol) (esc) (reposimplestore !)
496 linking [ <=> ] 10\r (no-eol) (esc) (reposimplestore !)
497 linking [ <=> ] 11\r (no-eol) (esc) (reposimplestore !)
497 linking [ <=> ] 11\r (no-eol) (esc) (reposimplestore !)
498 linking [ <=> ] 12\r (no-eol) (esc) (reposimplestore !)
498 linking [ <=> ] 12\r (no-eol) (esc) (reposimplestore !)
499 linking [ <=> ] 13\r (no-eol) (esc) (reposimplestore !)
499 linking [ <=> ] 13\r (no-eol) (esc) (reposimplestore !)
500 linking [ <=> ] 14\r (no-eol) (esc) (reposimplestore !)
500 linking [ <=> ] 14\r (no-eol) (esc) (reposimplestore !)
501 linking [ <=> ] 15\r (no-eol) (esc) (reposimplestore !)
501 linking [ <=> ] 15\r (no-eol) (esc) (reposimplestore !)
502 linking [ <=> ] 16\r (no-eol) (esc) (reposimplestore !)
502 linking [ <=> ] 16\r (no-eol) (esc) (reposimplestore !)
503 \r (no-eol) (esc)
503 \r (no-eol) (esc)
504 \r (no-eol) (esc)
504 \r (no-eol) (esc)
505 archiving (foo) [ ] 0/3\r (no-eol) (esc)
505 archiving (foo) [ ] 0/3\r (no-eol) (esc)
506 archiving (foo) [===========> ] 1/3\r (no-eol) (esc)
506 archiving (foo) [===========> ] 1/3\r (no-eol) (esc)
507 archiving (foo) [=======================> ] 2/3\r (no-eol) (esc)
507 archiving (foo) [=======================> ] 2/3\r (no-eol) (esc)
508 archiving (foo) [====================================>] 3/3\r (no-eol) (esc)
508 archiving (foo) [====================================>] 3/3\r (no-eol) (esc)
509 \r (no-eol) (esc)
509 \r (no-eol) (esc)
510 \r (no-eol) (esc)
510 \r (no-eol) (esc)
511 linking [ <=> ] 1\r (no-eol) (esc)
511 linking [ <=> ] 1\r (no-eol) (esc)
512 linking [ <=> ] 2\r (no-eol) (esc)
512 linking [ <=> ] 2\r (no-eol) (esc)
513 linking [ <=> ] 3\r (no-eol) (esc)
513 linking [ <=> ] 3\r (no-eol) (esc)
514 linking [ <=> ] 4\r (no-eol) (esc)
514 linking [ <=> ] 4\r (no-eol) (esc)
515 linking [ <=> ] 5\r (no-eol) (esc)
515 linking [ <=> ] 5\r (no-eol) (esc)
516 linking [ <=> ] 6\r (no-eol) (esc)
516 linking [ <=> ] 6\r (no-eol) (esc)
517 linking [ <=> ] 7\r (no-eol) (esc) (reposimplestore !)
517 linking [ <=> ] 7\r (no-eol) (esc) (reposimplestore !)
518 linking [ <=> ] 8\r (no-eol) (esc) (reposimplestore !)
518 linking [ <=> ] 8\r (no-eol) (esc) (reposimplestore !)
519 linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !)
519 linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !)
520 \r (no-eol) (esc)
520 \r (no-eol) (esc)
521 \r (no-eol) (esc)
521 \r (no-eol) (esc)
522 archiving (foo/bar) [ ] 0/1\r (no-eol) (esc)
522 archiving (foo/bar) [ ] 0/1\r (no-eol) (esc)
523 archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc)
523 archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc)
524 \r (no-eol) (esc)
524 \r (no-eol) (esc)
525 cloning subrepo foo from $TESTTMP/repo/foo
525 cloning subrepo foo from $TESTTMP/repo/foo
526 cloning subrepo foo/bar from $TESTTMP/repo/foo/bar
526 cloning subrepo foo/bar from $TESTTMP/repo/foo/bar
527 #else
527 #else
528 Note there's a slight output glitch on non-hardlink systems: the last
528 Note there's a slight output glitch on non-hardlink systems: the last
529 "linking" progress topic never gets closed, leading to slight output corruption on that platform.
529 "linking" progress topic never gets closed, leading to slight output corruption on that platform.
530 $ hg archive --subrepos -r tip --prefix './' ../archive.tar.gz
530 $ hg archive --subrepos -r tip --prefix './' ../archive.tar.gz
531 \r (no-eol) (esc)
531 \r (no-eol) (esc)
532 archiving [ ] 0/3\r (no-eol) (esc)
532 archiving [ ] 0/3\r (no-eol) (esc)
533 archiving [=============> ] 1/3\r (no-eol) (esc)
533 archiving [=============> ] 1/3\r (no-eol) (esc)
534 archiving [===========================> ] 2/3\r (no-eol) (esc)
534 archiving [===========================> ] 2/3\r (no-eol) (esc)
535 archiving [==========================================>] 3/3\r (no-eol) (esc)
535 archiving [==========================================>] 3/3\r (no-eol) (esc)
536 \r (no-eol) (esc)
536 \r (no-eol) (esc)
537 \r (no-eol) (esc)
537 \r (no-eol) (esc)
538 linking [ <=> ] 1\r (no-eol) (esc)
538 linking [ <=> ] 1\r (no-eol) (esc)
539 cloning subrepo foo/bar from $TESTTMP/repo/foo/bar
539 cloning subrepo foo/bar from $TESTTMP/repo/foo/bar
540 #endif
540 #endif
541
541
542 Archive + subrepos uses '/' for all component separators
542 Archive + subrepos uses '/' for all component separators
543
543
544 $ tar -tzf ../archive.tar.gz | sort
544 $ tar -tzf ../archive.tar.gz | sort
545 .hg_archival.txt
545 .hg_archival.txt
546 .hgsub
546 .hgsub
547 .hgsubstate
547 .hgsubstate
548 foo/.hgsub
548 foo/.hgsub
549 foo/.hgsubstate
549 foo/.hgsubstate
550 foo/bar/z.txt
550 foo/bar/z.txt
551 foo/y.txt
551 foo/y.txt
552 x.txt
552 x.txt
553
553
554 The newly cloned subrepos contain no working copy:
554 The newly cloned subrepos contain no working copy:
555
555
556 $ hg -R foo summary
556 $ hg -R foo summary
557 parent: -1:000000000000 (no revision checked out)
557 parent: -1:000000000000 (no revision checked out)
558 branch: default
558 branch: default
559 commit: (clean)
559 commit: (clean)
560 update: 4 new changesets (update)
560 update: 4 new changesets (update)
561
561
562 Sharing a local repo without the locally referenced subrepo (i.e. it was never
562 Sharing a local repo without the locally referenced subrepo (i.e. it was never
563 updated from null), fails the same as a clone operation.
563 updated from null), fails the same as a clone operation.
564
564
565 $ hg --config progress.disable=True clone -U ../empty ../empty2
565 $ hg --config progress.disable=True clone -U ../empty ../empty2
566
566
567 $ hg --config extensions.share= --config progress.disable=True \
567 $ hg --config extensions.share= --config progress.disable=True \
568 > share ../empty2 ../empty_share
568 > share ../empty2 ../empty_share
569 updating working directory
569 updating working directory
570 abort: repository $TESTTMP/empty2/foo not found!
570 abort: repository $TESTTMP/empty2/foo not found!
571 [255]
571 [255]
572
572
573 $ hg --config progress.disable=True clone ../empty2 ../empty_clone
573 $ hg --config progress.disable=True clone ../empty2 ../empty_clone
574 updating to branch default
574 updating to branch default
575 abort: repository $TESTTMP/empty2/foo not found!
575 abort: repository $TESTTMP/empty2/foo not found!
576 [255]
576 [255]
577
577
578 Disable progress extension and cleanup:
578 Disable progress extension and cleanup:
579
579
580 $ mv $HGRCPATH.no-progress $HGRCPATH
580 $ mv $HGRCPATH.no-progress $HGRCPATH
581
581
582 Test archiving when there is a directory in the way for a subrepo
582 Test archiving when there is a directory in the way for a subrepo
583 created by archive:
583 created by archive:
584
584
585 $ hg clone -U . ../almost-empty
585 $ hg clone -U . ../almost-empty
586 $ cd ../almost-empty
586 $ cd ../almost-empty
587 $ mkdir foo
587 $ mkdir foo
588 $ echo f > foo/f
588 $ echo f > foo/f
589 $ hg archive --subrepos -r tip archive
589 $ hg archive --subrepos -r tip archive
590 cloning subrepo foo from $TESTTMP/empty/foo
590 cloning subrepo foo from $TESTTMP/empty/foo
591 abort: destination '$TESTTMP/almost-empty/foo' is not empty (in subrepository "foo")
591 abort: destination '$TESTTMP/almost-empty/foo' is not empty (in subrepository "foo")
592 [255]
592 [255]
593
593
594 Clone and test outgoing:
594 Clone and test outgoing:
595
595
596 $ cd ..
596 $ cd ..
597 $ hg clone repo repo2
597 $ hg clone repo repo2
598 updating to branch default
598 updating to branch default
599 cloning subrepo foo from $TESTTMP/repo/foo
599 cloning subrepo foo from $TESTTMP/repo/foo
600 cloning subrepo foo/bar from $TESTTMP/repo/foo/bar
600 cloning subrepo foo/bar from $TESTTMP/repo/foo/bar
601 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
601 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
602 $ cd repo2
602 $ cd repo2
603 $ hg outgoing -S
603 $ hg outgoing -S
604 comparing with $TESTTMP/repo
604 comparing with $TESTTMP/repo
605 searching for changes
605 searching for changes
606 no changes found
606 no changes found
607 comparing with $TESTTMP/repo/foo
607 comparing with $TESTTMP/repo/foo
608 searching for changes
608 searching for changes
609 no changes found
609 no changes found
610 comparing with $TESTTMP/repo/foo/bar
610 comparing with $TESTTMP/repo/foo/bar
611 searching for changes
611 searching for changes
612 no changes found
612 no changes found
613 [1]
613 [1]
614
614
615 Make nested change:
615 Make nested change:
616
616
617 $ echo y4 >> foo/y.txt
617 $ echo y4 >> foo/y.txt
618 $ hg diff --nodates -S
618 $ hg diff --nodates -S
619 diff -r 65903cebad86 foo/y.txt
619 diff -r 65903cebad86 foo/y.txt
620 --- a/foo/y.txt
620 --- a/foo/y.txt
621 +++ b/foo/y.txt
621 +++ b/foo/y.txt
622 @@ -1,3 +1,4 @@
622 @@ -1,3 +1,4 @@
623 y1
623 y1
624 y2
624 y2
625 y3
625 y3
626 +y4
626 +y4
627 $ hg commit --subrepos -m 3-4-2
627 $ hg commit --subrepos -m 3-4-2
628 committing subrepository foo
628 committing subrepository foo
629 $ hg outgoing -S
629 $ hg outgoing -S
630 comparing with $TESTTMP/repo
630 comparing with $TESTTMP/repo
631 searching for changes
631 searching for changes
632 changeset: 3:2655b8ecc4ee
632 changeset: 3:2655b8ecc4ee
633 tag: tip
633 tag: tip
634 user: test
634 user: test
635 date: Thu Jan 01 00:00:00 1970 +0000
635 date: Thu Jan 01 00:00:00 1970 +0000
636 summary: 3-4-2
636 summary: 3-4-2
637
637
638 comparing with $TESTTMP/repo/foo
638 comparing with $TESTTMP/repo/foo
639 searching for changes
639 searching for changes
640 changeset: 4:e96193d6cb36
640 changeset: 4:e96193d6cb36
641 tag: tip
641 tag: tip
642 user: test
642 user: test
643 date: Thu Jan 01 00:00:00 1970 +0000
643 date: Thu Jan 01 00:00:00 1970 +0000
644 summary: 3-4-2
644 summary: 3-4-2
645
645
646 comparing with $TESTTMP/repo/foo/bar
646 comparing with $TESTTMP/repo/foo/bar
647 searching for changes
647 searching for changes
648 no changes found
648 no changes found
649
649
650
650
651 Switch to original repo and setup default path:
651 Switch to original repo and setup default path:
652
652
653 $ cd ../repo
653 $ cd ../repo
654 $ echo '[paths]' >> .hg/hgrc
654 $ echo '[paths]' >> .hg/hgrc
655 $ echo 'default = ../repo2' >> .hg/hgrc
655 $ echo 'default = ../repo2' >> .hg/hgrc
656
656
657 Test incoming:
657 Test incoming:
658
658
659 $ hg incoming -S
659 $ hg incoming -S
660 comparing with $TESTTMP/repo2
660 comparing with $TESTTMP/repo2
661 searching for changes
661 searching for changes
662 changeset: 3:2655b8ecc4ee
662 changeset: 3:2655b8ecc4ee
663 tag: tip
663 tag: tip
664 user: test
664 user: test
665 date: Thu Jan 01 00:00:00 1970 +0000
665 date: Thu Jan 01 00:00:00 1970 +0000
666 summary: 3-4-2
666 summary: 3-4-2
667
667
668 comparing with $TESTTMP/repo2/foo
668 comparing with $TESTTMP/repo2/foo
669 searching for changes
669 searching for changes
670 changeset: 4:e96193d6cb36
670 changeset: 4:e96193d6cb36
671 tag: tip
671 tag: tip
672 user: test
672 user: test
673 date: Thu Jan 01 00:00:00 1970 +0000
673 date: Thu Jan 01 00:00:00 1970 +0000
674 summary: 3-4-2
674 summary: 3-4-2
675
675
676 comparing with $TESTTMP/repo2/foo/bar
676 comparing with $TESTTMP/repo2/foo/bar
677 searching for changes
677 searching for changes
678 no changes found
678 no changes found
679
679
680 $ hg incoming -S --bundle incoming.hg
680 $ hg incoming -S --bundle incoming.hg
681 abort: cannot combine --bundle and --subrepos
681 abort: cannot combine --bundle and --subrepos
682 [255]
682 [255]
683
683
684 Test missing subrepo:
684 Test missing subrepo:
685
685
686 $ rm -r foo
686 $ rm -r foo
687 $ hg status -S
687 $ hg status -S
688 warning: error "unknown revision '65903cebad86f1a84bd4f1134f62fa7dcb7a1c98'" in subrepository "foo"
688 warning: error "unknown revision '65903cebad86f1a84bd4f1134f62fa7dcb7a1c98'" in subrepository "foo"
689
689
690 Issue2619: IndexError: list index out of range on hg add with subrepos
690 Issue2619: IndexError: list index out of range on hg add with subrepos
691 The subrepo must sorts after the explicit filename.
691 The subrepo must sorts after the explicit filename.
692
692
693 $ cd ..
693 $ cd ..
694 $ hg init test
694 $ hg init test
695 $ cd test
695 $ cd test
696 $ hg init x
696 $ hg init x
697 $ echo abc > abc.txt
697 $ echo abc > abc.txt
698 $ hg ci -Am "abc"
698 $ hg ci -Am "abc"
699 adding abc.txt
699 adding abc.txt
700 $ echo "x = x" >> .hgsub
700 $ echo "x = x" >> .hgsub
701 $ hg add .hgsub
701 $ hg add .hgsub
702 $ touch a x/a
702 $ touch a x/a
703 $ hg add a x/a
703 $ hg add a x/a
704
704
705 $ hg ci -Sm "added x"
705 $ hg ci -Sm "added x"
706 committing subrepository x
706 committing subrepository x
707 $ echo abc > x/a
707 $ echo abc > x/a
708 $ hg revert --rev '.^' "set:subrepo('glob:x*')"
708 $ hg revert --rev '.^' "set:subrepo('glob:x*')"
709 abort: subrepository 'x' does not exist in 25ac2c9b3180!
709 abort: subrepository 'x' does not exist in 25ac2c9b3180!
710 [255]
710 [255]
711
711
712 $ cd ..
712 $ cd ..
@@ -1,580 +1,580 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 new changesets d57206cc072a:a19bfa7e7328
143 new changesets d57206cc072a:a19bfa7e7328
144 (run 'hg update' to get a working copy)
144 (run 'hg update' to get a working copy)
145 $ hg incoming $remote
145 $ hg incoming $remote
146 comparing with http://localhost:$HGPORT/
146 comparing with http://localhost:$HGPORT/
147 searching for changes
147 searching for changes
148 no changes found
148 no changes found
149 [1]
149 [1]
150 $ cd ..
150 $ cd ..
151
151
152 Local is subset:
152 Local is subset:
153
153
154 $ hg clone main subset --rev name2 ; cd subset
154 $ hg clone main subset --rev name2 ; cd subset
155 adding changesets
155 adding changesets
156 adding manifests
156 adding manifests
157 adding file changes
157 adding file changes
158 added 6 changesets with 12 changes to 2 files
158 added 6 changesets with 12 changes to 2 files
159 new changesets d57206cc072a:d8f638ac69e9
159 new changesets d57206cc072a:d8f638ac69e9
160 updating to branch name2
160 updating to branch name2
161 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
161 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
162 $ hg incoming $remote
162 $ hg incoming $remote
163 comparing with http://localhost:$HGPORT/
163 comparing with http://localhost:$HGPORT/
164 searching for changes
164 searching for changes
165 6 a7892891da29: r2 name1
165 6 a7892891da29: r2 name1
166 7 2c8d5d5ec612: r3 name1
166 7 2c8d5d5ec612: r3 name1
167 8 e71dbbc70e03: r4 name1
167 8 e71dbbc70e03: r4 name1
168 9 025829e08038: r9 both
168 9 025829e08038: r9 both
169 10 8b6bad1512e1: r10 both
169 10 8b6bad1512e1: r10 both
170 11 a19bfa7e7328: r11 both
170 11 a19bfa7e7328: r11 both
171 $ hg outgoing $remote
171 $ hg outgoing $remote
172 comparing with http://localhost:$HGPORT/
172 comparing with http://localhost:$HGPORT/
173 searching for changes
173 searching for changes
174 no changes found
174 no changes found
175 [1]
175 [1]
176 $ hg push $remote
176 $ hg push $remote
177 pushing to http://localhost:$HGPORT/
177 pushing to http://localhost:$HGPORT/
178 searching for changes
178 searching for changes
179 no changes found
179 no changes found
180 [1]
180 [1]
181 $ hg pull $remote
181 $ hg pull $remote
182 pulling from http://localhost:$HGPORT/
182 pulling from http://localhost:$HGPORT/
183 searching for changes
183 searching for changes
184 adding changesets
184 adding changesets
185 adding manifests
185 adding manifests
186 adding file changes
186 adding file changes
187 added 6 changesets with 12 changes to 2 files
187 added 6 changesets with 12 changes to 2 files
188 new changesets a7892891da29:a19bfa7e7328
188 new changesets a7892891da29:a19bfa7e7328
189 (run 'hg update' to get a working copy)
189 (run 'hg update' to get a working copy)
190 $ hg incoming $remote
190 $ hg incoming $remote
191 comparing with http://localhost:$HGPORT/
191 comparing with http://localhost:$HGPORT/
192 searching for changes
192 searching for changes
193 no changes found
193 no changes found
194 [1]
194 [1]
195 $ cd ..
195 $ cd ..
196 $ tstop
196 $ tstop
197
197
198 Remote is empty:
198 Remote is empty:
199
199
200 $ tstart empty2
200 $ tstart empty2
201 $ cd main
201 $ cd main
202 $ hg incoming $remote
202 $ hg incoming $remote
203 comparing with http://localhost:$HGPORT/
203 comparing with http://localhost:$HGPORT/
204 searching for changes
204 searching for changes
205 no changes found
205 no changes found
206 [1]
206 [1]
207 $ hg outgoing $remote
207 $ hg outgoing $remote
208 comparing with http://localhost:$HGPORT/
208 comparing with http://localhost:$HGPORT/
209 searching for changes
209 searching for changes
210 0 d57206cc072a: r0
210 0 d57206cc072a: r0
211 1 0019a3b924fd: r1
211 1 0019a3b924fd: r1
212 2 a7892891da29: r2 name1
212 2 a7892891da29: r2 name1
213 3 2c8d5d5ec612: r3 name1
213 3 2c8d5d5ec612: r3 name1
214 4 e71dbbc70e03: r4 name1
214 4 e71dbbc70e03: r4 name1
215 5 70314b29987d: r5 name2
215 5 70314b29987d: r5 name2
216 6 6c6f5d5f3c11: r6 name2
216 6 6c6f5d5f3c11: r6 name2
217 7 b6b4d315a2ac: r7 name2
217 7 b6b4d315a2ac: r7 name2
218 8 d8f638ac69e9: r8 name2
218 8 d8f638ac69e9: r8 name2
219 9 025829e08038: r9 both
219 9 025829e08038: r9 both
220 10 8b6bad1512e1: r10 both
220 10 8b6bad1512e1: r10 both
221 11 a19bfa7e7328: r11 both
221 11 a19bfa7e7328: r11 both
222 $ hg pull $remote
222 $ hg pull $remote
223 pulling from http://localhost:$HGPORT/
223 pulling from http://localhost:$HGPORT/
224 searching for changes
224 searching for changes
225 no changes found
225 no changes found
226 $ hg push $remote
226 $ hg push $remote
227 pushing to http://localhost:$HGPORT/
227 pushing to http://localhost:$HGPORT/
228 searching for changes
228 searching for changes
229 remote: adding changesets
229 remote: adding changesets
230 remote: adding manifests
230 remote: adding manifests
231 remote: adding file changes
231 remote: adding file changes
232 remote: added 12 changesets with 24 changes to 2 files
232 remote: added 12 changesets with 24 changes to 2 files
233 $ hg outgoing $remote
233 $ hg outgoing $remote
234 comparing with http://localhost:$HGPORT/
234 comparing with http://localhost:$HGPORT/
235 searching for changes
235 searching for changes
236 no changes found
236 no changes found
237 [1]
237 [1]
238 $ cd ..
238 $ cd ..
239 $ tstop
239 $ tstop
240
240
241 Local is superset:
241 Local is superset:
242
242
243 $ hg clone main subset2 --rev name2
243 $ hg clone main subset2 --rev name2
244 adding changesets
244 adding changesets
245 adding manifests
245 adding manifests
246 adding file changes
246 adding file changes
247 added 6 changesets with 12 changes to 2 files
247 added 6 changesets with 12 changes to 2 files
248 new changesets d57206cc072a:d8f638ac69e9
248 new changesets d57206cc072a:d8f638ac69e9
249 updating to branch name2
249 updating to branch name2
250 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
250 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
251 $ tstart subset2
251 $ tstart subset2
252 $ cd main
252 $ cd main
253 $ hg incoming $remote
253 $ hg incoming $remote
254 comparing with http://localhost:$HGPORT/
254 comparing with http://localhost:$HGPORT/
255 searching for changes
255 searching for changes
256 no changes found
256 no changes found
257 [1]
257 [1]
258 $ hg outgoing $remote
258 $ hg outgoing $remote
259 comparing with http://localhost:$HGPORT/
259 comparing with http://localhost:$HGPORT/
260 searching for changes
260 searching for changes
261 2 a7892891da29: r2 name1
261 2 a7892891da29: r2 name1
262 3 2c8d5d5ec612: r3 name1
262 3 2c8d5d5ec612: r3 name1
263 4 e71dbbc70e03: r4 name1
263 4 e71dbbc70e03: r4 name1
264 9 025829e08038: r9 both
264 9 025829e08038: r9 both
265 10 8b6bad1512e1: r10 both
265 10 8b6bad1512e1: r10 both
266 11 a19bfa7e7328: r11 both
266 11 a19bfa7e7328: r11 both
267 $ hg pull $remote
267 $ hg pull $remote
268 pulling from http://localhost:$HGPORT/
268 pulling from http://localhost:$HGPORT/
269 searching for changes
269 searching for changes
270 no changes found
270 no changes found
271 $ hg push $remote
271 $ hg push $remote
272 pushing to http://localhost:$HGPORT/
272 pushing to http://localhost:$HGPORT/
273 searching for changes
273 searching for changes
274 abort: push creates new remote branches: both, name1!
274 abort: push creates new remote branches: both, name1!
275 (use 'hg push --new-branch' to create new remote branches)
275 (use 'hg push --new-branch' to create new remote branches)
276 [255]
276 [255]
277 $ hg push $remote --new-branch
277 $ hg push $remote --new-branch
278 pushing to http://localhost:$HGPORT/
278 pushing to http://localhost:$HGPORT/
279 searching for changes
279 searching for changes
280 remote: adding changesets
280 remote: adding changesets
281 remote: adding manifests
281 remote: adding manifests
282 remote: adding file changes
282 remote: adding file changes
283 remote: added 6 changesets with 12 changes to 2 files
283 remote: added 6 changesets with 12 changes to 2 files
284 $ hg outgoing $remote
284 $ hg outgoing $remote
285 comparing with http://localhost:$HGPORT/
285 comparing with http://localhost:$HGPORT/
286 searching for changes
286 searching for changes
287 no changes found
287 no changes found
288 [1]
288 [1]
289 $ cd ..
289 $ cd ..
290 $ tstop
290 $ tstop
291
291
292 Partial pull:
292 Partial pull:
293
293
294 $ tstart main
294 $ tstart main
295 $ hg clone $remote partial --rev name2
295 $ hg clone $remote partial --rev name2
296 adding changesets
296 adding changesets
297 adding manifests
297 adding manifests
298 adding file changes
298 adding file changes
299 added 6 changesets with 12 changes to 2 files
299 added 6 changesets with 12 changes to 2 files
300 new changesets d57206cc072a:d8f638ac69e9
300 new changesets d57206cc072a:d8f638ac69e9
301 updating to branch name2
301 updating to branch name2
302 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
302 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
303 $ cd partial
303 $ cd partial
304 $ hg incoming $remote
304 $ hg incoming $remote
305 comparing with http://localhost:$HGPORT/
305 comparing with http://localhost:$HGPORT/
306 searching for changes
306 searching for changes
307 6 a7892891da29: r2 name1
307 6 a7892891da29: r2 name1
308 7 2c8d5d5ec612: r3 name1
308 7 2c8d5d5ec612: r3 name1
309 8 e71dbbc70e03: r4 name1
309 8 e71dbbc70e03: r4 name1
310 9 025829e08038: r9 both
310 9 025829e08038: r9 both
311 10 8b6bad1512e1: r10 both
311 10 8b6bad1512e1: r10 both
312 11 a19bfa7e7328: r11 both
312 11 a19bfa7e7328: r11 both
313 $ hg incoming $remote --rev name1
313 $ hg incoming $remote --rev name1
314 comparing with http://localhost:$HGPORT/
314 comparing with http://localhost:$HGPORT/
315 searching for changes
315 searching for changes
316 6 a7892891da29: r2 name1
316 6 a7892891da29: r2 name1
317 7 2c8d5d5ec612: r3 name1
317 7 2c8d5d5ec612: r3 name1
318 8 e71dbbc70e03: r4 name1
318 8 e71dbbc70e03: r4 name1
319 $ hg pull $remote --rev name1
319 $ hg pull $remote --rev name1
320 pulling from http://localhost:$HGPORT/
320 pulling from http://localhost:$HGPORT/
321 searching for changes
321 searching for changes
322 adding changesets
322 adding changesets
323 adding manifests
323 adding manifests
324 adding file changes
324 adding file changes
325 added 3 changesets with 6 changes to 2 files (+1 heads)
325 added 3 changesets with 6 changes to 2 files (+1 heads)
326 new changesets a7892891da29:e71dbbc70e03
326 new changesets a7892891da29:e71dbbc70e03
327 (run 'hg heads' to see heads)
327 (run 'hg heads' to see heads)
328 $ hg incoming $remote
328 $ hg incoming $remote
329 comparing with http://localhost:$HGPORT/
329 comparing with http://localhost:$HGPORT/
330 searching for changes
330 searching for changes
331 9 025829e08038: r9 both
331 9 025829e08038: r9 both
332 10 8b6bad1512e1: r10 both
332 10 8b6bad1512e1: r10 both
333 11 a19bfa7e7328: r11 both
333 11 a19bfa7e7328: r11 both
334 $ cd ..
334 $ cd ..
335 $ tstop
335 $ tstop
336
336
337 Both have new stuff in new named branches:
337 Both have new stuff in new named branches:
338
338
339 $ hg clone main repo1a --rev name1 -q
339 $ hg clone main repo1a --rev name1 -q
340 $ hg clone repo1a repo1b -q
340 $ hg clone repo1a repo1b -q
341 $ hg clone main repo2a --rev name2 -q
341 $ hg clone main repo2a --rev name2 -q
342 $ hg clone repo2a repo2b -q
342 $ hg clone repo2a repo2b -q
343 $ tstart repo1a
343 $ tstart repo1a
344
344
345 $ cd repo2a
345 $ cd repo2a
346 $ hg incoming $remote
346 $ hg incoming $remote
347 comparing with http://localhost:$HGPORT/
347 comparing with http://localhost:$HGPORT/
348 searching for changes
348 searching for changes
349 6 a7892891da29: r2 name1
349 6 a7892891da29: r2 name1
350 7 2c8d5d5ec612: r3 name1
350 7 2c8d5d5ec612: r3 name1
351 8 e71dbbc70e03: r4 name1
351 8 e71dbbc70e03: r4 name1
352 $ hg outgoing $remote
352 $ hg outgoing $remote
353 comparing with http://localhost:$HGPORT/
353 comparing with http://localhost:$HGPORT/
354 searching for changes
354 searching for changes
355 2 70314b29987d: r5 name2
355 2 70314b29987d: r5 name2
356 3 6c6f5d5f3c11: r6 name2
356 3 6c6f5d5f3c11: r6 name2
357 4 b6b4d315a2ac: r7 name2
357 4 b6b4d315a2ac: r7 name2
358 5 d8f638ac69e9: r8 name2
358 5 d8f638ac69e9: r8 name2
359 $ hg push $remote --new-branch
359 $ hg push $remote --new-branch
360 pushing to http://localhost:$HGPORT/
360 pushing to http://localhost:$HGPORT/
361 searching for changes
361 searching for changes
362 remote: adding changesets
362 remote: adding changesets
363 remote: adding manifests
363 remote: adding manifests
364 remote: adding file changes
364 remote: adding file changes
365 remote: added 4 changesets with 8 changes to 2 files (+1 heads)
365 remote: added 4 changesets with 8 changes to 2 files (+1 heads)
366 $ hg pull $remote
366 $ hg pull $remote
367 pulling from http://localhost:$HGPORT/
367 pulling from http://localhost:$HGPORT/
368 searching for changes
368 searching for changes
369 adding changesets
369 adding changesets
370 adding manifests
370 adding manifests
371 adding file changes
371 adding file changes
372 added 3 changesets with 6 changes to 2 files (+1 heads)
372 added 3 changesets with 6 changes to 2 files (+1 heads)
373 new changesets a7892891da29:e71dbbc70e03
373 new changesets a7892891da29:e71dbbc70e03
374 (run 'hg heads' to see heads)
374 (run 'hg heads' to see heads)
375 $ hg incoming $remote
375 $ hg incoming $remote
376 comparing with http://localhost:$HGPORT/
376 comparing with http://localhost:$HGPORT/
377 searching for changes
377 searching for changes
378 no changes found
378 no changes found
379 [1]
379 [1]
380 $ hg outgoing $remote
380 $ hg outgoing $remote
381 comparing with http://localhost:$HGPORT/
381 comparing with http://localhost:$HGPORT/
382 searching for changes
382 searching for changes
383 no changes found
383 no changes found
384 [1]
384 [1]
385 $ cd ..
385 $ cd ..
386 $ tstop
386 $ tstop
387
387
388 $ tstart repo1b
388 $ tstart repo1b
389 $ cd repo2b
389 $ cd repo2b
390 $ hg incoming $remote
390 $ hg incoming $remote
391 comparing with http://localhost:$HGPORT/
391 comparing with http://localhost:$HGPORT/
392 searching for changes
392 searching for changes
393 6 a7892891da29: r2 name1
393 6 a7892891da29: r2 name1
394 7 2c8d5d5ec612: r3 name1
394 7 2c8d5d5ec612: r3 name1
395 8 e71dbbc70e03: r4 name1
395 8 e71dbbc70e03: r4 name1
396 $ hg outgoing $remote
396 $ hg outgoing $remote
397 comparing with http://localhost:$HGPORT/
397 comparing with http://localhost:$HGPORT/
398 searching for changes
398 searching for changes
399 2 70314b29987d: r5 name2
399 2 70314b29987d: r5 name2
400 3 6c6f5d5f3c11: r6 name2
400 3 6c6f5d5f3c11: r6 name2
401 4 b6b4d315a2ac: r7 name2
401 4 b6b4d315a2ac: r7 name2
402 5 d8f638ac69e9: r8 name2
402 5 d8f638ac69e9: r8 name2
403 $ hg pull $remote
403 $ hg pull $remote
404 pulling from http://localhost:$HGPORT/
404 pulling from http://localhost:$HGPORT/
405 searching for changes
405 searching for changes
406 adding changesets
406 adding changesets
407 adding manifests
407 adding manifests
408 adding file changes
408 adding file changes
409 added 3 changesets with 6 changes to 2 files (+1 heads)
409 added 3 changesets with 6 changes to 2 files (+1 heads)
410 new changesets a7892891da29:e71dbbc70e03
410 new changesets a7892891da29:e71dbbc70e03
411 (run 'hg heads' to see heads)
411 (run 'hg heads' to see heads)
412 $ hg push $remote --new-branch
412 $ hg push $remote --new-branch
413 pushing to http://localhost:$HGPORT/
413 pushing to http://localhost:$HGPORT/
414 searching for changes
414 searching for changes
415 remote: adding changesets
415 remote: adding changesets
416 remote: adding manifests
416 remote: adding manifests
417 remote: adding file changes
417 remote: adding file changes
418 remote: added 4 changesets with 8 changes to 2 files (+1 heads)
418 remote: added 4 changesets with 8 changes to 2 files (+1 heads)
419 $ hg incoming $remote
419 $ hg incoming $remote
420 comparing with http://localhost:$HGPORT/
420 comparing with http://localhost:$HGPORT/
421 searching for changes
421 searching for changes
422 no changes found
422 no changes found
423 [1]
423 [1]
424 $ hg outgoing $remote
424 $ hg outgoing $remote
425 comparing with http://localhost:$HGPORT/
425 comparing with http://localhost:$HGPORT/
426 searching for changes
426 searching for changes
427 no changes found
427 no changes found
428 [1]
428 [1]
429 $ cd ..
429 $ cd ..
430 $ tstop
430 $ tstop
431
431
432 Both have new stuff in existing named branches:
432 Both have new stuff in existing named branches:
433
433
434 $ rm -r repo1a repo1b repo2a repo2b
434 $ rm -r repo1a repo1b repo2a repo2b
435 $ hg clone main repo1a --rev 3 --rev 8 -q
435 $ hg clone main repo1a --rev 3 --rev 8 -q
436 $ hg clone repo1a repo1b -q
436 $ hg clone repo1a repo1b -q
437 $ hg clone main repo2a --rev 4 --rev 7 -q
437 $ hg clone main repo2a --rev 4 --rev 7 -q
438 $ hg clone repo2a repo2b -q
438 $ hg clone repo2a repo2b -q
439 $ tstart repo1a
439 $ tstart repo1a
440
440
441 $ cd repo2a
441 $ cd repo2a
442 $ hg incoming $remote
442 $ hg incoming $remote
443 comparing with http://localhost:$HGPORT/
443 comparing with http://localhost:$HGPORT/
444 searching for changes
444 searching for changes
445 8 d8f638ac69e9: r8 name2
445 8 d8f638ac69e9: r8 name2
446 $ hg outgoing $remote
446 $ hg outgoing $remote
447 comparing with http://localhost:$HGPORT/
447 comparing with http://localhost:$HGPORT/
448 searching for changes
448 searching for changes
449 4 e71dbbc70e03: r4 name1
449 4 e71dbbc70e03: r4 name1
450 $ hg push $remote --new-branch
450 $ hg push $remote --new-branch
451 pushing to http://localhost:$HGPORT/
451 pushing to http://localhost:$HGPORT/
452 searching for changes
452 searching for changes
453 remote: adding changesets
453 remote: adding changesets
454 remote: adding manifests
454 remote: adding manifests
455 remote: adding file changes
455 remote: adding file changes
456 remote: added 1 changesets with 2 changes to 2 files
456 remote: added 1 changesets with 2 changes to 2 files
457 $ hg pull $remote
457 $ hg pull $remote
458 pulling from http://localhost:$HGPORT/
458 pulling from http://localhost:$HGPORT/
459 searching for changes
459 searching for changes
460 adding changesets
460 adding changesets
461 adding manifests
461 adding manifests
462 adding file changes
462 adding file changes
463 added 1 changesets with 2 changes to 2 files
463 added 1 changesets with 2 changes to 2 files
464 new changesets d8f638ac69e9
464 new changesets d8f638ac69e9
465 (run 'hg update' to get a working copy)
465 (run 'hg update' to get a working copy)
466 $ hg incoming $remote
466 $ hg incoming $remote
467 comparing with http://localhost:$HGPORT/
467 comparing with http://localhost:$HGPORT/
468 searching for changes
468 searching for changes
469 no changes found
469 no changes found
470 [1]
470 [1]
471 $ hg outgoing $remote
471 $ hg outgoing $remote
472 comparing with http://localhost:$HGPORT/
472 comparing with http://localhost:$HGPORT/
473 searching for changes
473 searching for changes
474 no changes found
474 no changes found
475 [1]
475 [1]
476 $ cd ..
476 $ cd ..
477 $ tstop
477 $ tstop
478
478
479 $ tstart repo1b
479 $ tstart repo1b
480 $ cd repo2b
480 $ cd repo2b
481 $ hg incoming $remote
481 $ hg incoming $remote
482 comparing with http://localhost:$HGPORT/
482 comparing with http://localhost:$HGPORT/
483 searching for changes
483 searching for changes
484 8 d8f638ac69e9: r8 name2
484 8 d8f638ac69e9: r8 name2
485 $ hg outgoing $remote
485 $ hg outgoing $remote
486 comparing with http://localhost:$HGPORT/
486 comparing with http://localhost:$HGPORT/
487 searching for changes
487 searching for changes
488 4 e71dbbc70e03: r4 name1
488 4 e71dbbc70e03: r4 name1
489 $ hg pull $remote
489 $ hg pull $remote
490 pulling from http://localhost:$HGPORT/
490 pulling from http://localhost:$HGPORT/
491 searching for changes
491 searching for changes
492 adding changesets
492 adding changesets
493 adding manifests
493 adding manifests
494 adding file changes
494 adding file changes
495 added 1 changesets with 2 changes to 2 files
495 added 1 changesets with 2 changes to 2 files
496 new changesets d8f638ac69e9
496 new changesets d8f638ac69e9
497 (run 'hg update' to get a working copy)
497 (run 'hg update' to get a working copy)
498 $ hg push $remote --new-branch
498 $ hg push $remote --new-branch
499 pushing to http://localhost:$HGPORT/
499 pushing to http://localhost:$HGPORT/
500 searching for changes
500 searching for changes
501 remote: adding changesets
501 remote: adding changesets
502 remote: adding manifests
502 remote: adding manifests
503 remote: adding file changes
503 remote: adding file changes
504 remote: added 1 changesets with 2 changes to 2 files
504 remote: added 1 changesets with 2 changes to 2 files
505 $ hg incoming $remote
505 $ hg incoming $remote
506 comparing with http://localhost:$HGPORT/
506 comparing with http://localhost:$HGPORT/
507 searching for changes
507 searching for changes
508 no changes found
508 no changes found
509 [1]
509 [1]
510 $ hg outgoing $remote
510 $ hg outgoing $remote
511 comparing with http://localhost:$HGPORT/
511 comparing with http://localhost:$HGPORT/
512 searching for changes
512 searching for changes
513 no changes found
513 no changes found
514 [1]
514 [1]
515 $ cd ..
515 $ cd ..
516 #if zstd
516 #if zstd
517 $ tstop show
517 $ tstop show
518 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull
518 "GET /?cmd=capabilities HTTP/1.1" 200 -
519 "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
519 "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
520 "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
520 "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
521 "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
521 "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
522 "GET /?cmd=changegroupsubset HTTP/1.1" 200 - x-hgarg-1:bases=d8f638ac69e9ae8dea4f09f11d696546a912d961&heads=d8f638ac69e9ae8dea4f09f11d696546a912d961 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
522 "GET /?cmd=changegroupsubset HTTP/1.1" 200 - x-hgarg-1:bases=d8f638ac69e9ae8dea4f09f11d696546a912d961&heads=d8f638ac69e9ae8dea4f09f11d696546a912d961 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
523 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
523 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
524 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull
524 "GET /?cmd=capabilities HTTP/1.1" 200 -
525 "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
525 "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
526 "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
526 "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
527 "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
527 "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
528 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull
528 "GET /?cmd=capabilities HTTP/1.1" 200 -
529 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
529 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
530 "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
530 "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
531 "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
531 "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
532 "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
532 "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
533 "GET /?cmd=changegroupsubset HTTP/1.1" 200 - x-hgarg-1:bases=d8f638ac69e9ae8dea4f09f11d696546a912d961&heads=d8f638ac69e9ae8dea4f09f11d696546a912d961+2c8d5d5ec612be65cdfdeac78b7662ab1696324a x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
533 "GET /?cmd=changegroupsubset HTTP/1.1" 200 - x-hgarg-1:bases=d8f638ac69e9ae8dea4f09f11d696546a912d961&heads=d8f638ac69e9ae8dea4f09f11d696546a912d961+2c8d5d5ec612be65cdfdeac78b7662ab1696324a x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
534 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
534 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
535 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull
535 "GET /?cmd=capabilities HTTP/1.1" 200 -
536 "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
536 "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
537 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
537 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
538 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
538 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
539 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
539 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
540 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
540 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
541 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
541 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
542 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+1827a5bb63e602382eb89dd58f2ac9f3b007ad91* (glob)
542 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+1827a5bb63e602382eb89dd58f2ac9f3b007ad91* (glob)
543 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
543 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
544 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull
544 "GET /?cmd=capabilities HTTP/1.1" 200 -
545 "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
545 "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
546 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull
546 "GET /?cmd=capabilities HTTP/1.1" 200 -
547 "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
547 "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
548 #else
548 #else
549 $ tstop show
549 $ tstop show
550 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull
550 "GET /?cmd=capabilities HTTP/1.1" 200 -
551 "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
551 "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
552 "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
552 "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
553 "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
553 "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
554 "GET /?cmd=changegroupsubset HTTP/1.1" 200 - x-hgarg-1:bases=d8f638ac69e9ae8dea4f09f11d696546a912d961&heads=d8f638ac69e9ae8dea4f09f11d696546a912d961 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
554 "GET /?cmd=changegroupsubset HTTP/1.1" 200 - x-hgarg-1:bases=d8f638ac69e9ae8dea4f09f11d696546a912d961&heads=d8f638ac69e9ae8dea4f09f11d696546a912d961 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
555 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
555 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
556 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull
556 "GET /?cmd=capabilities HTTP/1.1" 200 -
557 "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
557 "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
558 "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
558 "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
559 "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
559 "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
560 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull
560 "GET /?cmd=capabilities HTTP/1.1" 200 -
561 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
561 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
562 "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
562 "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
563 "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
563 "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
564 "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
564 "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
565 "GET /?cmd=changegroupsubset HTTP/1.1" 200 - x-hgarg-1:bases=d8f638ac69e9ae8dea4f09f11d696546a912d961&heads=d8f638ac69e9ae8dea4f09f11d696546a912d961+2c8d5d5ec612be65cdfdeac78b7662ab1696324a x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
565 "GET /?cmd=changegroupsubset HTTP/1.1" 200 - x-hgarg-1:bases=d8f638ac69e9ae8dea4f09f11d696546a912d961&heads=d8f638ac69e9ae8dea4f09f11d696546a912d961+2c8d5d5ec612be65cdfdeac78b7662ab1696324a x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
566 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
566 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
567 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull
567 "GET /?cmd=capabilities HTTP/1.1" 200 -
568 "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
568 "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
569 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
569 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
570 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
570 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
571 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
571 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
572 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
572 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
573 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
573 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
574 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+1827a5bb63e602382eb89dd58f2ac9f3b007ad91* (glob)
574 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+1827a5bb63e602382eb89dd58f2ac9f3b007ad91* (glob)
575 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
575 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
576 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull
576 "GET /?cmd=capabilities HTTP/1.1" 200 -
577 "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
577 "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
578 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull
578 "GET /?cmd=capabilities HTTP/1.1" 200 -
579 "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
579 "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
580 #endif
580 #endif
@@ -1,159 +1,159 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 - x-hgproto-1:partial-pull (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 - x-hgproto-1:partial-pull (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 - x-hgproto-1:partial-pull (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 - x-hgproto-1:partial-pull (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 - x-hgproto-1:partial-pull (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 - x-hgproto-1:partial-pull (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 - x-hgproto-1:partial-pull (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 - x-hgproto-1:partial-pull (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 - x-hgproto-1:partial-pull (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 - x-hgproto-1:partial-pull (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 - x-hgproto-1:partial-pull (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 - x-hgproto-1:partial-pull (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 - x-hgproto-1:partial-pull (glob)
96 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
97 $LOCALIP - - [$LOGDATE$] "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=$USUAL_COMPRESSIONS$ partial-pull (glob)
97 $LOCALIP - - [$LOGDATE$] "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=$USUAL_COMPRESSIONS$ partial-pull (glob)
98 $LOCALIP - - [$LOGDATE$] "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=$USUAL_COMPRESSIONS$ partial-pull (glob)
98 $LOCALIP - - [$LOGDATE$] "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=$USUAL_COMPRESSIONS$ partial-pull (glob)
99 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull (glob)
99 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
100 $LOCALIP - - [$LOGDATE$] "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=$USUAL_COMPRESSIONS$ partial-pull (glob)
100 $LOCALIP - - [$LOGDATE$] "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=$USUAL_COMPRESSIONS$ partial-pull (glob)
101 $LOCALIP - - [$LOGDATE$] "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=$USUAL_COMPRESSIONS$ partial-pull (glob)
101 $LOCALIP - - [$LOGDATE$] "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=$USUAL_COMPRESSIONS$ partial-pull (glob)
102 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull (glob)
102 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
103 $LOCALIP - - [$LOGDATE$] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=vier&one=eins&two=zwei x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
103 $LOCALIP - - [$LOGDATE$] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=vier&one=eins&two=zwei x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
104 $LOCALIP - - [$LOGDATE$] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=vier&one=eins&two=zwei x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
104 $LOCALIP - - [$LOGDATE$] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=vier&one=eins&two=zwei x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
105 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull (glob)
105 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
106 $LOCALIP - - [$LOGDATE$] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
106 $LOCALIP - - [$LOGDATE$] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
107 $LOCALIP - - [$LOGDATE$] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
107 $LOCALIP - - [$LOGDATE$] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
108 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull (glob)
108 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
109 $LOCALIP - - [$LOGDATE$] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
109 $LOCALIP - - [$LOGDATE$] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
110 $LOCALIP - - [$LOGDATE$] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
110 $LOCALIP - - [$LOGDATE$] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
111 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull (glob)
111 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
112 $LOCALIP - - [$LOGDATE$] "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=$USUAL_COMPRESSIONS$ partial-pull (glob)
112 $LOCALIP - - [$LOGDATE$] "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=$USUAL_COMPRESSIONS$ partial-pull (glob)
113 $LOCALIP - - [$LOGDATE$] "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=$USUAL_COMPRESSIONS$ partial-pull (glob)
113 $LOCALIP - - [$LOGDATE$] "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=$USUAL_COMPRESSIONS$ partial-pull (glob)
114
114
115 HTTP without the httpheader capability:
115 HTTP without the httpheader capability:
116
116
117 $ CAP=httpheader . "$TESTDIR/notcapable"
117 $ CAP=httpheader . "$TESTDIR/notcapable"
118
118
119 $ hg serve -R repo -p $HGPORT2 -d --pid-file=hg2.pid -E error2.log -A access2.log
119 $ hg serve -R repo -p $HGPORT2 -d --pid-file=hg2.pid -E error2.log -A access2.log
120 $ cat hg2.pid >> $DAEMON_PIDS
120 $ cat hg2.pid >> $DAEMON_PIDS
121
121
122 $ hg debugwireargs http://localhost:$HGPORT2/ un deux trois quatre
122 $ hg debugwireargs http://localhost:$HGPORT2/ un deux trois quatre
123 un deux trois quatre None
123 un deux trois quatre None
124 $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei --four vier
124 $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei --four vier
125 eins zwei None vier None
125 eins zwei None vier None
126 $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei
126 $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei
127 eins zwei None None None
127 eins zwei None None None
128 $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei --five fuenf
128 $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei --five fuenf
129 eins zwei None None None
129 eins zwei None None None
130 $ cat error2.log
130 $ cat error2.log
131 $ cat access2.log
131 $ cat access2.log
132 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull (glob)
132 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
133 $LOCALIP - - [$LOGDATE$] "GET /?cmd=debugwireargs&four=quatre&one=un&three=trois&two=deux HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
133 $LOCALIP - - [$LOGDATE$] "GET /?cmd=debugwireargs&four=quatre&one=un&three=trois&two=deux HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
134 $LOCALIP - - [$LOGDATE$] "GET /?cmd=debugwireargs&four=quatre&one=un&three=trois&two=deux HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
134 $LOCALIP - - [$LOGDATE$] "GET /?cmd=debugwireargs&four=quatre&one=un&three=trois&two=deux HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
135 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull (glob)
135 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
136 $LOCALIP - - [$LOGDATE$] "GET /?cmd=debugwireargs&four=vier&one=eins&two=zwei HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
136 $LOCALIP - - [$LOGDATE$] "GET /?cmd=debugwireargs&four=vier&one=eins&two=zwei HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
137 $LOCALIP - - [$LOGDATE$] "GET /?cmd=debugwireargs&four=vier&one=eins&two=zwei HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
137 $LOCALIP - - [$LOGDATE$] "GET /?cmd=debugwireargs&four=vier&one=eins&two=zwei HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
138 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull (glob)
138 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
139 $LOCALIP - - [$LOGDATE$] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
139 $LOCALIP - - [$LOGDATE$] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
140 $LOCALIP - - [$LOGDATE$] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
140 $LOCALIP - - [$LOGDATE$] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
141 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgproto-1:partial-pull (glob)
141 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
142 $LOCALIP - - [$LOGDATE$] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
142 $LOCALIP - - [$LOGDATE$] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
143 $LOCALIP - - [$LOGDATE$] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
143 $LOCALIP - - [$LOGDATE$] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
144
144
145 SSH (try to exercise the ssh functionality with a dummy script):
145 SSH (try to exercise the ssh functionality with a dummy script):
146
146
147 $ hg debugwireargs --ssh "\"$PYTHON\" $TESTDIR/dummyssh" ssh://user@dummy/repo uno due tre quattro
147 $ hg debugwireargs --ssh "\"$PYTHON\" $TESTDIR/dummyssh" ssh://user@dummy/repo uno due tre quattro
148 uno due tre quattro None
148 uno due tre quattro None
149 $ hg debugwireargs --ssh "\"$PYTHON\" $TESTDIR/dummyssh" ssh://user@dummy/repo eins zwei --four vier
149 $ hg debugwireargs --ssh "\"$PYTHON\" $TESTDIR/dummyssh" ssh://user@dummy/repo eins zwei --four vier
150 eins zwei None vier None
150 eins zwei None vier None
151 $ hg debugwireargs --ssh "\"$PYTHON\" $TESTDIR/dummyssh" ssh://user@dummy/repo eins zwei
151 $ hg debugwireargs --ssh "\"$PYTHON\" $TESTDIR/dummyssh" ssh://user@dummy/repo eins zwei
152 eins zwei None None None
152 eins zwei None None None
153 $ hg debugwireargs --ssh "\"$PYTHON\" $TESTDIR/dummyssh" ssh://user@dummy/repo eins zwei --five fuenf
153 $ hg debugwireargs --ssh "\"$PYTHON\" $TESTDIR/dummyssh" ssh://user@dummy/repo eins zwei --five fuenf
154 eins zwei None None None
154 eins zwei None None None
155
155
156 Explicitly kill daemons to let the test exit on Windows
156 Explicitly kill daemons to let the test exit on Windows
157
157
158 $ killdaemons.py
158 $ killdaemons.py
159
159
General Comments 0
You need to be logged in to leave comments. Login now