##// END OF EJS Templates
http: minor tweaks to long arg handling...
Matt Mackall -
r14094:d10c6835 default
parent child Browse files
Show More
@@ -1,86 +1,88 b''
1 #
1 #
2 # Copyright 21 May 2005 - (c) 2005 Jake Edge <jake@edge2.net>
2 # Copyright 21 May 2005 - (c) 2005 Jake Edge <jake@edge2.net>
3 # Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
3 # Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
4 #
4 #
5 # This software may be used and distributed according to the terms of the
5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version.
6 # GNU General Public License version 2 or any later version.
7
7
8 import cgi, cStringIO, itertools, zlib, sys, urllib
8 import cgi, cStringIO, zlib, sys, urllib
9 from mercurial import util, wireproto
9 from mercurial import util, wireproto
10 from common import HTTP_OK
10 from common import HTTP_OK
11
11
12 HGTYPE = 'application/mercurial-0.1'
12 HGTYPE = 'application/mercurial-0.1'
13
13
14 class webproto(object):
14 class webproto(object):
15 def __init__(self, req):
15 def __init__(self, req):
16 self.req = req
16 self.req = req
17 self.response = ''
17 self.response = ''
18 def getargs(self, args):
18 def getargs(self, args):
19 knownargs = self._args()
19 knownargs = self._args()
20 data = {}
20 data = {}
21 keys = args.split()
21 keys = args.split()
22 for k in keys:
22 for k in keys:
23 if k == '*':
23 if k == '*':
24 star = {}
24 star = {}
25 for key in knownargs.keys():
25 for key in knownargs.keys():
26 if key != 'cmd' and key not in keys:
26 if key != 'cmd' and key not in keys:
27 star[key] = knownargs[key][0]
27 star[key] = knownargs[key][0]
28 data['*'] = star
28 data['*'] = star
29 else:
29 else:
30 data[k] = knownargs[k][0]
30 data[k] = knownargs[k][0]
31 return [data[k] for k in keys]
31 return [data[k] for k in keys]
32 def _args(self):
32 def _args(self):
33 args = self.req.form.copy()
33 args = self.req.form.copy()
34 chunks = []
34 chunks = []
35 for i in itertools.count(1):
35 i = 1
36 h = self.req.env.get('HTTP_X_ARG_' + str(i))
36 while 1:
37 h = self.req.env.get('HTTP_X_HGARG_' + str(i))
37 if h is None:
38 if h is None:
38 break
39 break
39 chunks += [h]
40 chunks += [h]
41 i += 1
40 args.update(cgi.parse_qs(''.join(chunks), keep_blank_values=True))
42 args.update(cgi.parse_qs(''.join(chunks), keep_blank_values=True))
41 return args
43 return args
42 def getfile(self, fp):
44 def getfile(self, fp):
43 length = int(self.req.env['CONTENT_LENGTH'])
45 length = int(self.req.env['CONTENT_LENGTH'])
44 for s in util.filechunkiter(self.req, limit=length):
46 for s in util.filechunkiter(self.req, limit=length):
45 fp.write(s)
47 fp.write(s)
46 def redirect(self):
48 def redirect(self):
47 self.oldio = sys.stdout, sys.stderr
49 self.oldio = sys.stdout, sys.stderr
48 sys.stderr = sys.stdout = cStringIO.StringIO()
50 sys.stderr = sys.stdout = cStringIO.StringIO()
49 def groupchunks(self, cg):
51 def groupchunks(self, cg):
50 z = zlib.compressobj()
52 z = zlib.compressobj()
51 while 1:
53 while 1:
52 chunk = cg.read(4096)
54 chunk = cg.read(4096)
53 if not chunk:
55 if not chunk:
54 break
56 break
55 yield z.compress(chunk)
57 yield z.compress(chunk)
56 yield z.flush()
58 yield z.flush()
57 def _client(self):
59 def _client(self):
58 return 'remote:%s:%s:%s' % (
60 return 'remote:%s:%s:%s' % (
59 self.req.env.get('wsgi.url_scheme') or 'http',
61 self.req.env.get('wsgi.url_scheme') or 'http',
60 urllib.quote(self.req.env.get('REMOTE_HOST', '')),
62 urllib.quote(self.req.env.get('REMOTE_HOST', '')),
61 urllib.quote(self.req.env.get('REMOTE_USER', '')))
63 urllib.quote(self.req.env.get('REMOTE_USER', '')))
62
64
63 def iscmd(cmd):
65 def iscmd(cmd):
64 return cmd in wireproto.commands
66 return cmd in wireproto.commands
65
67
66 def call(repo, req, cmd):
68 def call(repo, req, cmd):
67 p = webproto(req)
69 p = webproto(req)
68 rsp = wireproto.dispatch(repo, p, cmd)
70 rsp = wireproto.dispatch(repo, p, cmd)
69 if isinstance(rsp, str):
71 if isinstance(rsp, str):
70 req.respond(HTTP_OK, HGTYPE, length=len(rsp))
72 req.respond(HTTP_OK, HGTYPE, length=len(rsp))
71 return [rsp]
73 return [rsp]
72 elif isinstance(rsp, wireproto.streamres):
74 elif isinstance(rsp, wireproto.streamres):
73 req.respond(HTTP_OK, HGTYPE)
75 req.respond(HTTP_OK, HGTYPE)
74 return rsp.gen
76 return rsp.gen
75 elif isinstance(rsp, wireproto.pushres):
77 elif isinstance(rsp, wireproto.pushres):
76 val = sys.stdout.getvalue()
78 val = sys.stdout.getvalue()
77 sys.stdout, sys.stderr = p.oldio
79 sys.stdout, sys.stderr = p.oldio
78 req.respond(HTTP_OK, HGTYPE)
80 req.respond(HTTP_OK, HGTYPE)
79 return ['%d\n%s' % (rsp.res, val)]
81 return ['%d\n%s' % (rsp.res, val)]
80 elif isinstance(rsp, wireproto.pusherr):
82 elif isinstance(rsp, wireproto.pusherr):
81 # drain the incoming bundle
83 # drain the incoming bundle
82 req.drain()
84 req.drain()
83 sys.stdout, sys.stderr = p.oldio
85 sys.stdout, sys.stderr = p.oldio
84 rsp = '0\n%s\n' % rsp.res
86 rsp = '0\n%s\n' % rsp.res
85 req.respond(HTTP_OK, HGTYPE, length=len(rsp))
87 req.respond(HTTP_OK, HGTYPE, length=len(rsp))
86 return [rsp]
88 return [rsp]
@@ -1,229 +1,229 b''
1 # httprepo.py - HTTP repository proxy classes for mercurial
1 # httprepo.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 node import nullid
9 from node import nullid
10 from i18n import _
10 from i18n import _
11 import changegroup, statichttprepo, error, url, util, wireproto
11 import changegroup, statichttprepo, error, url, util, wireproto
12 import os, urllib, urllib2, zlib, httplib
12 import os, urllib, urllib2, zlib, httplib
13 import errno, socket
13 import errno, socket
14
14
15 def zgenerator(f):
15 def zgenerator(f):
16 zd = zlib.decompressobj()
16 zd = zlib.decompressobj()
17 try:
17 try:
18 for chunk in util.filechunkiter(f):
18 for chunk in util.filechunkiter(f):
19 while chunk:
19 while chunk:
20 yield zd.decompress(chunk, 2**18)
20 yield zd.decompress(chunk, 2**18)
21 chunk = zd.unconsumed_tail
21 chunk = zd.unconsumed_tail
22 except httplib.HTTPException:
22 except httplib.HTTPException:
23 raise IOError(None, _('connection ended unexpectedly'))
23 raise IOError(None, _('connection ended unexpectedly'))
24 yield zd.flush()
24 yield zd.flush()
25
25
26 class httprepository(wireproto.wirerepository):
26 class httprepository(wireproto.wirerepository):
27 def __init__(self, ui, path):
27 def __init__(self, ui, path):
28 self.path = path
28 self.path = path
29 self.caps = None
29 self.caps = None
30 self.handler = None
30 self.handler = None
31 u = util.url(path)
31 u = util.url(path)
32 if u.query or u.fragment:
32 if u.query or u.fragment:
33 raise util.Abort(_('unsupported URL component: "%s"') %
33 raise util.Abort(_('unsupported URL component: "%s"') %
34 (u.query or u.fragment))
34 (u.query or u.fragment))
35
35
36 # urllib cannot handle URLs with embedded user or passwd
36 # urllib cannot handle URLs with embedded user or passwd
37 self._url, authinfo = u.authinfo()
37 self._url, authinfo = u.authinfo()
38
38
39 self.ui = ui
39 self.ui = ui
40 self.ui.debug('using %s\n' % self._url)
40 self.ui.debug('using %s\n' % self._url)
41
41
42 self.urlopener = url.opener(ui, authinfo)
42 self.urlopener = url.opener(ui, authinfo)
43
43
44 def __del__(self):
44 def __del__(self):
45 for h in self.urlopener.handlers:
45 for h in self.urlopener.handlers:
46 h.close()
46 h.close()
47 if hasattr(h, "close_all"):
47 if hasattr(h, "close_all"):
48 h.close_all()
48 h.close_all()
49
49
50 def url(self):
50 def url(self):
51 return self.path
51 return self.path
52
52
53 # look up capabilities only when needed
53 # look up capabilities only when needed
54
54
55 def _fetchcaps(self):
55 def _fetchcaps(self):
56 self.caps = set(self._call('capabilities').split())
56 self.caps = set(self._call('capabilities').split())
57
57
58 def get_caps(self):
58 def get_caps(self):
59 if self.caps is None:
59 if self.caps is None:
60 try:
60 try:
61 self._fetchcaps()
61 self._fetchcaps()
62 except error.RepoError:
62 except error.RepoError:
63 self.caps = set()
63 self.caps = set()
64 self.ui.debug('capabilities: %s\n' %
64 self.ui.debug('capabilities: %s\n' %
65 (' '.join(self.caps or ['none'])))
65 (' '.join(self.caps or ['none'])))
66 return self.caps
66 return self.caps
67
67
68 capabilities = property(get_caps)
68 capabilities = property(get_caps)
69
69
70 def lock(self):
70 def lock(self):
71 raise util.Abort(_('operation not supported over http'))
71 raise util.Abort(_('operation not supported over http'))
72
72
73 def _callstream(self, cmd, **args):
73 def _callstream(self, cmd, **args):
74 if cmd == 'pushkey':
74 if cmd == 'pushkey':
75 args['data'] = ''
75 args['data'] = ''
76 data = args.pop('data', None)
76 data = args.pop('data', None)
77 headers = args.pop('headers', {})
77 headers = args.pop('headers', {})
78 self.ui.debug("sending %s command\n" % cmd)
78 self.ui.debug("sending %s command\n" % cmd)
79 q = [('cmd', cmd)]
79 q = [('cmd', cmd)]
80 headersize = 0
80 headersize = 0
81 if len(args) > 0:
81 if len(args) > 0:
82 httpheader = self.capable('httpheader')
82 httpheader = self.capable('httpheader')
83 if httpheader:
83 if httpheader:
84 headersize = int(httpheader.split(',')[0])
84 headersize = int(httpheader.split(',')[0])
85 if headersize > 0:
85 if headersize > 0:
86 # The headers can typically carry more data than the URL.
86 # The headers can typically carry more data than the URL.
87 encargs = urllib.urlencode(sorted(args.items()))
87 encargs = urllib.urlencode(sorted(args.items()))
88 headerfmt = 'X-Arg-%s'
88 headerfmt = 'X-HgArg-%s'
89 contentlen = headersize - len(headerfmt % '000' + ': \r\n')
89 contentlen = headersize - len(headerfmt % '000' + ': \r\n')
90 headernum = 0
90 headernum = 0
91 for i in xrange(0, len(encargs), contentlen):
91 for i in xrange(0, len(encargs), contentlen):
92 headernum += 1
92 headernum += 1
93 header = headerfmt % str(headernum)
93 header = headerfmt % str(headernum)
94 headers[header] = encargs[i:i + contentlen]
94 headers[header] = encargs[i:i + contentlen]
95 varyheaders = [headerfmt % str(h) for h in range(1, headernum + 1)]
95 varyheaders = [headerfmt % str(h) for h in range(1, headernum + 1)]
96 headers['Vary'] = ','.join(varyheaders)
96 headers['Vary'] = ','.join(varyheaders)
97 else:
97 else:
98 q += sorted(args.items())
98 q += sorted(args.items())
99 qs = '?%s' % urllib.urlencode(q)
99 qs = '?%s' % urllib.urlencode(q)
100 cu = "%s%s" % (self._url, qs)
100 cu = "%s%s" % (self._url, qs)
101 req = urllib2.Request(cu, data, headers)
101 req = urllib2.Request(cu, data, headers)
102 if data is not None:
102 if data is not None:
103 # len(data) is broken if data doesn't fit into Py_ssize_t
103 # len(data) is broken if data doesn't fit into Py_ssize_t
104 # add the header ourself to avoid OverflowError
104 # add the header ourself to avoid OverflowError
105 size = data.__len__()
105 size = data.__len__()
106 self.ui.debug("sending %s bytes\n" % size)
106 self.ui.debug("sending %s bytes\n" % size)
107 req.add_unredirected_header('Content-Length', '%d' % size)
107 req.add_unredirected_header('Content-Length', '%d' % size)
108 try:
108 try:
109 resp = self.urlopener.open(req)
109 resp = self.urlopener.open(req)
110 except urllib2.HTTPError, inst:
110 except urllib2.HTTPError, inst:
111 if inst.code == 401:
111 if inst.code == 401:
112 raise util.Abort(_('authorization failed'))
112 raise util.Abort(_('authorization failed'))
113 raise
113 raise
114 except httplib.HTTPException, inst:
114 except httplib.HTTPException, inst:
115 self.ui.debug('http error while sending %s command\n' % cmd)
115 self.ui.debug('http error while sending %s command\n' % cmd)
116 self.ui.traceback()
116 self.ui.traceback()
117 raise IOError(None, inst)
117 raise IOError(None, inst)
118 except IndexError:
118 except IndexError:
119 # this only happens with Python 2.3, later versions raise URLError
119 # this only happens with Python 2.3, later versions raise URLError
120 raise util.Abort(_('http error, possibly caused by proxy setting'))
120 raise util.Abort(_('http error, possibly caused by proxy setting'))
121 # record the url we got redirected to
121 # record the url we got redirected to
122 resp_url = resp.geturl()
122 resp_url = resp.geturl()
123 if resp_url.endswith(qs):
123 if resp_url.endswith(qs):
124 resp_url = resp_url[:-len(qs)]
124 resp_url = resp_url[:-len(qs)]
125 if self._url.rstrip('/') != resp_url.rstrip('/'):
125 if self._url.rstrip('/') != resp_url.rstrip('/'):
126 self.ui.status(_('real URL is %s\n') % resp_url)
126 self.ui.status(_('real URL is %s\n') % resp_url)
127 self._url = resp_url
127 self._url = resp_url
128 try:
128 try:
129 proto = resp.getheader('content-type')
129 proto = resp.getheader('content-type')
130 except AttributeError:
130 except AttributeError:
131 proto = resp.headers['content-type']
131 proto = resp.headers['content-type']
132
132
133 safeurl = util.hidepassword(self._url)
133 safeurl = util.hidepassword(self._url)
134 # accept old "text/plain" and "application/hg-changegroup" for now
134 # accept old "text/plain" and "application/hg-changegroup" for now
135 if not (proto.startswith('application/mercurial-') or
135 if not (proto.startswith('application/mercurial-') or
136 proto.startswith('text/plain') or
136 proto.startswith('text/plain') or
137 proto.startswith('application/hg-changegroup')):
137 proto.startswith('application/hg-changegroup')):
138 self.ui.debug("requested URL: '%s'\n" % util.hidepassword(cu))
138 self.ui.debug("requested URL: '%s'\n" % util.hidepassword(cu))
139 raise error.RepoError(
139 raise error.RepoError(
140 _("'%s' does not appear to be an hg repository:\n"
140 _("'%s' does not appear to be an hg repository:\n"
141 "---%%<--- (%s)\n%s\n---%%<---\n")
141 "---%%<--- (%s)\n%s\n---%%<---\n")
142 % (safeurl, proto, resp.read()))
142 % (safeurl, proto, resp.read()))
143
143
144 if proto.startswith('application/mercurial-'):
144 if proto.startswith('application/mercurial-'):
145 try:
145 try:
146 version = proto.split('-', 1)[1]
146 version = proto.split('-', 1)[1]
147 version_info = tuple([int(n) for n in version.split('.')])
147 version_info = tuple([int(n) for n in version.split('.')])
148 except ValueError:
148 except ValueError:
149 raise error.RepoError(_("'%s' sent a broken Content-Type "
149 raise error.RepoError(_("'%s' sent a broken Content-Type "
150 "header (%s)") % (safeurl, proto))
150 "header (%s)") % (safeurl, proto))
151 if version_info > (0, 1):
151 if version_info > (0, 1):
152 raise error.RepoError(_("'%s' uses newer protocol %s") %
152 raise error.RepoError(_("'%s' uses newer protocol %s") %
153 (safeurl, version))
153 (safeurl, version))
154
154
155 return resp
155 return resp
156
156
157 def _call(self, cmd, **args):
157 def _call(self, cmd, **args):
158 fp = self._callstream(cmd, **args)
158 fp = self._callstream(cmd, **args)
159 try:
159 try:
160 return fp.read()
160 return fp.read()
161 finally:
161 finally:
162 # if using keepalive, allow connection to be reused
162 # if using keepalive, allow connection to be reused
163 fp.close()
163 fp.close()
164
164
165 def _callpush(self, cmd, cg, **args):
165 def _callpush(self, cmd, cg, **args):
166 # have to stream bundle to a temp file because we do not have
166 # have to stream bundle to a temp file because we do not have
167 # http 1.1 chunked transfer.
167 # http 1.1 chunked transfer.
168
168
169 types = self.capable('unbundle')
169 types = self.capable('unbundle')
170 try:
170 try:
171 types = types.split(',')
171 types = types.split(',')
172 except AttributeError:
172 except AttributeError:
173 # servers older than d1b16a746db6 will send 'unbundle' as a
173 # servers older than d1b16a746db6 will send 'unbundle' as a
174 # boolean capability. They only support headerless/uncompressed
174 # boolean capability. They only support headerless/uncompressed
175 # bundles.
175 # bundles.
176 types = [""]
176 types = [""]
177 for x in types:
177 for x in types:
178 if x in changegroup.bundletypes:
178 if x in changegroup.bundletypes:
179 type = x
179 type = x
180 break
180 break
181
181
182 tempname = changegroup.writebundle(cg, None, type)
182 tempname = changegroup.writebundle(cg, None, type)
183 fp = url.httpsendfile(self.ui, tempname, "rb")
183 fp = url.httpsendfile(self.ui, tempname, "rb")
184 headers = {'Content-Type': 'application/mercurial-0.1'}
184 headers = {'Content-Type': 'application/mercurial-0.1'}
185
185
186 try:
186 try:
187 try:
187 try:
188 r = self._call(cmd, data=fp, headers=headers, **args)
188 r = self._call(cmd, data=fp, headers=headers, **args)
189 return r.split('\n', 1)
189 return r.split('\n', 1)
190 except socket.error, err:
190 except socket.error, err:
191 if err.args[0] in (errno.ECONNRESET, errno.EPIPE):
191 if err.args[0] in (errno.ECONNRESET, errno.EPIPE):
192 raise util.Abort(_('push failed: %s') % err.args[1])
192 raise util.Abort(_('push failed: %s') % err.args[1])
193 raise util.Abort(err.args[1])
193 raise util.Abort(err.args[1])
194 finally:
194 finally:
195 fp.close()
195 fp.close()
196 os.unlink(tempname)
196 os.unlink(tempname)
197
197
198 def _abort(self, exception):
198 def _abort(self, exception):
199 raise exception
199 raise exception
200
200
201 def _decompress(self, stream):
201 def _decompress(self, stream):
202 return util.chunkbuffer(zgenerator(stream))
202 return util.chunkbuffer(zgenerator(stream))
203
203
204 class httpsrepository(httprepository):
204 class httpsrepository(httprepository):
205 def __init__(self, ui, path):
205 def __init__(self, ui, path):
206 if not url.has_https:
206 if not url.has_https:
207 raise util.Abort(_('Python support for SSL and HTTPS '
207 raise util.Abort(_('Python support for SSL and HTTPS '
208 'is not installed'))
208 'is not installed'))
209 httprepository.__init__(self, ui, path)
209 httprepository.__init__(self, ui, path)
210
210
211 def instance(ui, path, create):
211 def instance(ui, path, create):
212 if create:
212 if create:
213 raise util.Abort(_('cannot create new http repository'))
213 raise util.Abort(_('cannot create new http repository'))
214 try:
214 try:
215 if path.startswith('https:'):
215 if path.startswith('https:'):
216 inst = httpsrepository(ui, path)
216 inst = httpsrepository(ui, path)
217 else:
217 else:
218 inst = httprepository(ui, path)
218 inst = httprepository(ui, path)
219 try:
219 try:
220 # Try to do useful work when checking compatibility.
220 # Try to do useful work when checking compatibility.
221 # Usually saves a roundtrip since we want the caps anyway.
221 # Usually saves a roundtrip since we want the caps anyway.
222 inst._fetchcaps()
222 inst._fetchcaps()
223 except error.RepoError:
223 except error.RepoError:
224 # No luck, try older compatibility check.
224 # No luck, try older compatibility check.
225 inst.between([(nullid, nullid)])
225 inst.between([(nullid, nullid)])
226 return inst
226 return inst
227 except error.RepoError:
227 except error.RepoError:
228 ui.note('(falling back to static-http)\n')
228 ui.note('(falling back to static-http)\n')
229 return statichttprepo.instance(ui, "static-" + path, create)
229 return statichttprepo.instance(ui, "static-" + path, create)
@@ -1,253 +1,253 b''
1
1
2 = Test the getbundle() protocol function =
2 = Test the getbundle() protocol function =
3
3
4 Enable graphlog extension:
4 Enable graphlog extension:
5
5
6 $ echo "[extensions]" >> $HGRCPATH
6 $ echo "[extensions]" >> $HGRCPATH
7 $ echo "graphlog=" >> $HGRCPATH
7 $ echo "graphlog=" >> $HGRCPATH
8
8
9 Create a test repository:
9 Create a test repository:
10
10
11 $ hg init repo
11 $ hg init repo
12 $ cd repo
12 $ cd repo
13 $ hg debugbuilddag -n -m '+2 :fork +5 :p1 *fork +6 :p2 /p1 :m1 +3' > /dev/null
13 $ hg debugbuilddag -n -m '+2 :fork +5 :p1 *fork +6 :p2 /p1 :m1 +3' > /dev/null
14 $ hg glog --template '{node}\n'
14 $ hg glog --template '{node}\n'
15 @ 2bba2f40f321484159b395a43f20101d4bb7ead0
15 @ 2bba2f40f321484159b395a43f20101d4bb7ead0
16 |
16 |
17 o d9e5488323c782fe684573f3043369d199038b6f
17 o d9e5488323c782fe684573f3043369d199038b6f
18 |
18 |
19 o 6e9a5adf5437e49c746288cf95c5ac34fa8f2f72
19 o 6e9a5adf5437e49c746288cf95c5ac34fa8f2f72
20 |
20 |
21 o 733bf0910832b26b768a09172f325f995b5476e1
21 o 733bf0910832b26b768a09172f325f995b5476e1
22 |\
22 |\
23 | o b5af5d6ea56d73ce24c40bc3cd19a862f74888ac
23 | o b5af5d6ea56d73ce24c40bc3cd19a862f74888ac
24 | |
24 | |
25 | o 6b57ee934bb2996050540f84cdfc8dcad1e7267d
25 | o 6b57ee934bb2996050540f84cdfc8dcad1e7267d
26 | |
26 | |
27 | o 2c0ec49482e8abe888b7bd090b5827acfc22b3d7
27 | o 2c0ec49482e8abe888b7bd090b5827acfc22b3d7
28 | |
28 | |
29 | o c1818a9f5977dd4139a48f93f5425c67d44a9368
29 | o c1818a9f5977dd4139a48f93f5425c67d44a9368
30 | |
30 | |
31 | o 6c725a58ad10aea441540bfd06c507f63e8b9cdd
31 | o 6c725a58ad10aea441540bfd06c507f63e8b9cdd
32 | |
32 | |
33 | o 18063366a155bd56b5618229ae2ac3e91849aa5e
33 | o 18063366a155bd56b5618229ae2ac3e91849aa5e
34 | |
34 | |
35 | o a21d913c992197a2eb60b298521ec0f045a04799
35 | o a21d913c992197a2eb60b298521ec0f045a04799
36 | |
36 | |
37 o | b6b2b682253df2ffedc10e9415e4114202b303c5
37 o | b6b2b682253df2ffedc10e9415e4114202b303c5
38 | |
38 | |
39 o | 2114148793524fd045998f71a45b0aaf139f752b
39 o | 2114148793524fd045998f71a45b0aaf139f752b
40 | |
40 | |
41 o | 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc
41 o | 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc
42 | |
42 | |
43 o | ea919464b16e003894c48b6cb68df3cd9411b544
43 o | ea919464b16e003894c48b6cb68df3cd9411b544
44 | |
44 | |
45 o | 0f82d97ec2778746743fbc996740d409558fda22
45 o | 0f82d97ec2778746743fbc996740d409558fda22
46 |/
46 |/
47 o 6e23b016bc0f0e79c7bd9dd372ccee07055d7fd4
47 o 6e23b016bc0f0e79c7bd9dd372ccee07055d7fd4
48 |
48 |
49 o 10e64d654571f11577745b4d8372e859d9e4df63
49 o 10e64d654571f11577745b4d8372e859d9e4df63
50
50
51 $ cd ..
51 $ cd ..
52
52
53
53
54 = Test locally =
54 = Test locally =
55
55
56 Get everything:
56 Get everything:
57
57
58 $ hg debuggetbundle repo bundle
58 $ hg debuggetbundle repo bundle
59 $ hg debugbundle bundle
59 $ hg debugbundle bundle
60 10e64d654571f11577745b4d8372e859d9e4df63
60 10e64d654571f11577745b4d8372e859d9e4df63
61 6e23b016bc0f0e79c7bd9dd372ccee07055d7fd4
61 6e23b016bc0f0e79c7bd9dd372ccee07055d7fd4
62 0f82d97ec2778746743fbc996740d409558fda22
62 0f82d97ec2778746743fbc996740d409558fda22
63 ea919464b16e003894c48b6cb68df3cd9411b544
63 ea919464b16e003894c48b6cb68df3cd9411b544
64 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc
64 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc
65 2114148793524fd045998f71a45b0aaf139f752b
65 2114148793524fd045998f71a45b0aaf139f752b
66 b6b2b682253df2ffedc10e9415e4114202b303c5
66 b6b2b682253df2ffedc10e9415e4114202b303c5
67 a21d913c992197a2eb60b298521ec0f045a04799
67 a21d913c992197a2eb60b298521ec0f045a04799
68 18063366a155bd56b5618229ae2ac3e91849aa5e
68 18063366a155bd56b5618229ae2ac3e91849aa5e
69 6c725a58ad10aea441540bfd06c507f63e8b9cdd
69 6c725a58ad10aea441540bfd06c507f63e8b9cdd
70 c1818a9f5977dd4139a48f93f5425c67d44a9368
70 c1818a9f5977dd4139a48f93f5425c67d44a9368
71 2c0ec49482e8abe888b7bd090b5827acfc22b3d7
71 2c0ec49482e8abe888b7bd090b5827acfc22b3d7
72 6b57ee934bb2996050540f84cdfc8dcad1e7267d
72 6b57ee934bb2996050540f84cdfc8dcad1e7267d
73 b5af5d6ea56d73ce24c40bc3cd19a862f74888ac
73 b5af5d6ea56d73ce24c40bc3cd19a862f74888ac
74 733bf0910832b26b768a09172f325f995b5476e1
74 733bf0910832b26b768a09172f325f995b5476e1
75 6e9a5adf5437e49c746288cf95c5ac34fa8f2f72
75 6e9a5adf5437e49c746288cf95c5ac34fa8f2f72
76 d9e5488323c782fe684573f3043369d199038b6f
76 d9e5488323c782fe684573f3043369d199038b6f
77 2bba2f40f321484159b395a43f20101d4bb7ead0
77 2bba2f40f321484159b395a43f20101d4bb7ead0
78
78
79 Get part of linear run:
79 Get part of linear run:
80
80
81 $ hg debuggetbundle repo bundle -H d9e5488323c782fe684573f3043369d199038b6f -C 733bf0910832b26b768a09172f325f995b5476e1
81 $ hg debuggetbundle repo bundle -H d9e5488323c782fe684573f3043369d199038b6f -C 733bf0910832b26b768a09172f325f995b5476e1
82 $ hg debugbundle bundle
82 $ hg debugbundle bundle
83 6e9a5adf5437e49c746288cf95c5ac34fa8f2f72
83 6e9a5adf5437e49c746288cf95c5ac34fa8f2f72
84 d9e5488323c782fe684573f3043369d199038b6f
84 d9e5488323c782fe684573f3043369d199038b6f
85
85
86 Get missing branch and merge:
86 Get missing branch and merge:
87
87
88 $ hg debuggetbundle repo bundle -H d9e5488323c782fe684573f3043369d199038b6f -C 6b57ee934bb2996050540f84cdfc8dcad1e7267d
88 $ hg debuggetbundle repo bundle -H d9e5488323c782fe684573f3043369d199038b6f -C 6b57ee934bb2996050540f84cdfc8dcad1e7267d
89 $ hg debugbundle bundle
89 $ hg debugbundle bundle
90 0f82d97ec2778746743fbc996740d409558fda22
90 0f82d97ec2778746743fbc996740d409558fda22
91 ea919464b16e003894c48b6cb68df3cd9411b544
91 ea919464b16e003894c48b6cb68df3cd9411b544
92 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc
92 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc
93 2114148793524fd045998f71a45b0aaf139f752b
93 2114148793524fd045998f71a45b0aaf139f752b
94 b6b2b682253df2ffedc10e9415e4114202b303c5
94 b6b2b682253df2ffedc10e9415e4114202b303c5
95 b5af5d6ea56d73ce24c40bc3cd19a862f74888ac
95 b5af5d6ea56d73ce24c40bc3cd19a862f74888ac
96 733bf0910832b26b768a09172f325f995b5476e1
96 733bf0910832b26b768a09172f325f995b5476e1
97 6e9a5adf5437e49c746288cf95c5ac34fa8f2f72
97 6e9a5adf5437e49c746288cf95c5ac34fa8f2f72
98 d9e5488323c782fe684573f3043369d199038b6f
98 d9e5488323c782fe684573f3043369d199038b6f
99
99
100 Get from only one head:
100 Get from only one head:
101
101
102 $ hg debuggetbundle repo bundle -H 6c725a58ad10aea441540bfd06c507f63e8b9cdd -C 6e23b016bc0f0e79c7bd9dd372ccee07055d7fd4
102 $ hg debuggetbundle repo bundle -H 6c725a58ad10aea441540bfd06c507f63e8b9cdd -C 6e23b016bc0f0e79c7bd9dd372ccee07055d7fd4
103 $ hg debugbundle bundle
103 $ hg debugbundle bundle
104 a21d913c992197a2eb60b298521ec0f045a04799
104 a21d913c992197a2eb60b298521ec0f045a04799
105 18063366a155bd56b5618229ae2ac3e91849aa5e
105 18063366a155bd56b5618229ae2ac3e91849aa5e
106 6c725a58ad10aea441540bfd06c507f63e8b9cdd
106 6c725a58ad10aea441540bfd06c507f63e8b9cdd
107
107
108 Get parts of two branches:
108 Get parts of two branches:
109
109
110 $ hg debuggetbundle repo bundle -H 6b57ee934bb2996050540f84cdfc8dcad1e7267d -C c1818a9f5977dd4139a48f93f5425c67d44a9368 -H 2114148793524fd045998f71a45b0aaf139f752b -C ea919464b16e003894c48b6cb68df3cd9411b544
110 $ hg debuggetbundle repo bundle -H 6b57ee934bb2996050540f84cdfc8dcad1e7267d -C c1818a9f5977dd4139a48f93f5425c67d44a9368 -H 2114148793524fd045998f71a45b0aaf139f752b -C ea919464b16e003894c48b6cb68df3cd9411b544
111 $ hg debugbundle bundle
111 $ hg debugbundle bundle
112 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc
112 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc
113 2114148793524fd045998f71a45b0aaf139f752b
113 2114148793524fd045998f71a45b0aaf139f752b
114 2c0ec49482e8abe888b7bd090b5827acfc22b3d7
114 2c0ec49482e8abe888b7bd090b5827acfc22b3d7
115 6b57ee934bb2996050540f84cdfc8dcad1e7267d
115 6b57ee934bb2996050540f84cdfc8dcad1e7267d
116
116
117 Check that we get all needed file changes:
117 Check that we get all needed file changes:
118
118
119 $ hg debugbundle bundle --all
119 $ hg debugbundle bundle --all
120 format: id, p1, p2, cset, len(delta)
120 format: id, p1, p2, cset, len(delta)
121
121
122 changelog
122 changelog
123 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc ea919464b16e003894c48b6cb68df3cd9411b544 0000000000000000000000000000000000000000 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc 99
123 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc ea919464b16e003894c48b6cb68df3cd9411b544 0000000000000000000000000000000000000000 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc 99
124 2114148793524fd045998f71a45b0aaf139f752b 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc 0000000000000000000000000000000000000000 2114148793524fd045998f71a45b0aaf139f752b 99
124 2114148793524fd045998f71a45b0aaf139f752b 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc 0000000000000000000000000000000000000000 2114148793524fd045998f71a45b0aaf139f752b 99
125 2c0ec49482e8abe888b7bd090b5827acfc22b3d7 c1818a9f5977dd4139a48f93f5425c67d44a9368 0000000000000000000000000000000000000000 2c0ec49482e8abe888b7bd090b5827acfc22b3d7 102
125 2c0ec49482e8abe888b7bd090b5827acfc22b3d7 c1818a9f5977dd4139a48f93f5425c67d44a9368 0000000000000000000000000000000000000000 2c0ec49482e8abe888b7bd090b5827acfc22b3d7 102
126 6b57ee934bb2996050540f84cdfc8dcad1e7267d 2c0ec49482e8abe888b7bd090b5827acfc22b3d7 0000000000000000000000000000000000000000 6b57ee934bb2996050540f84cdfc8dcad1e7267d 102
126 6b57ee934bb2996050540f84cdfc8dcad1e7267d 2c0ec49482e8abe888b7bd090b5827acfc22b3d7 0000000000000000000000000000000000000000 6b57ee934bb2996050540f84cdfc8dcad1e7267d 102
127
127
128 manifest
128 manifest
129 dac7984588fc4eea7acbf39693a9c1b06f5b175d 591f732a3faf1fb903815273f3c199a514a61ccb 0000000000000000000000000000000000000000 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc 113
129 dac7984588fc4eea7acbf39693a9c1b06f5b175d 591f732a3faf1fb903815273f3c199a514a61ccb 0000000000000000000000000000000000000000 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc 113
130 0772616e6b48a76afb6c1458e193cbb3dae2e4ff dac7984588fc4eea7acbf39693a9c1b06f5b175d 0000000000000000000000000000000000000000 2114148793524fd045998f71a45b0aaf139f752b 113
130 0772616e6b48a76afb6c1458e193cbb3dae2e4ff dac7984588fc4eea7acbf39693a9c1b06f5b175d 0000000000000000000000000000000000000000 2114148793524fd045998f71a45b0aaf139f752b 113
131 eb498cd9af6c44108e43041e951ce829e29f6c80 bff2f4817ced57b386caf7c4e3e36a4bc9af7e93 0000000000000000000000000000000000000000 2c0ec49482e8abe888b7bd090b5827acfc22b3d7 295
131 eb498cd9af6c44108e43041e951ce829e29f6c80 bff2f4817ced57b386caf7c4e3e36a4bc9af7e93 0000000000000000000000000000000000000000 2c0ec49482e8abe888b7bd090b5827acfc22b3d7 295
132 b15709c071ddd2d93188508ba156196ab4f19620 eb498cd9af6c44108e43041e951ce829e29f6c80 0000000000000000000000000000000000000000 6b57ee934bb2996050540f84cdfc8dcad1e7267d 114
132 b15709c071ddd2d93188508ba156196ab4f19620 eb498cd9af6c44108e43041e951ce829e29f6c80 0000000000000000000000000000000000000000 6b57ee934bb2996050540f84cdfc8dcad1e7267d 114
133
133
134 mf
134 mf
135 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 301ca08d026bb72cb4258a9d211bdf7ca0bcd810 0000000000000000000000000000000000000000 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc 17
135 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 301ca08d026bb72cb4258a9d211bdf7ca0bcd810 0000000000000000000000000000000000000000 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc 17
136 c7b583de053293870e145f45bd2d61643563fd06 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 0000000000000000000000000000000000000000 2114148793524fd045998f71a45b0aaf139f752b 18
136 c7b583de053293870e145f45bd2d61643563fd06 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 0000000000000000000000000000000000000000 2114148793524fd045998f71a45b0aaf139f752b 18
137 266ee3c0302a5a18f1cf96817ac79a51836179e9 edc0f6b8db80d68ae6aff2b19f7e5347ab68fa63 0000000000000000000000000000000000000000 2c0ec49482e8abe888b7bd090b5827acfc22b3d7 149
137 266ee3c0302a5a18f1cf96817ac79a51836179e9 edc0f6b8db80d68ae6aff2b19f7e5347ab68fa63 0000000000000000000000000000000000000000 2c0ec49482e8abe888b7bd090b5827acfc22b3d7 149
138 698c6a36220548cd3903ca7dada27c59aa500c52 266ee3c0302a5a18f1cf96817ac79a51836179e9 0000000000000000000000000000000000000000 6b57ee934bb2996050540f84cdfc8dcad1e7267d 19
138 698c6a36220548cd3903ca7dada27c59aa500c52 266ee3c0302a5a18f1cf96817ac79a51836179e9 0000000000000000000000000000000000000000 6b57ee934bb2996050540f84cdfc8dcad1e7267d 19
139
139
140 nf11
140 nf11
141 33fbc651630ffa7ccbebfe4eb91320a873e7291c 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 2c0ec49482e8abe888b7bd090b5827acfc22b3d7 16
141 33fbc651630ffa7ccbebfe4eb91320a873e7291c 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 2c0ec49482e8abe888b7bd090b5827acfc22b3d7 16
142
142
143 nf12
143 nf12
144 ddce0544363f037e9fb889faca058f52dc01c0a5 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 6b57ee934bb2996050540f84cdfc8dcad1e7267d 16
144 ddce0544363f037e9fb889faca058f52dc01c0a5 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 6b57ee934bb2996050540f84cdfc8dcad1e7267d 16
145
145
146 nf4
146 nf4
147 3c1407305701051cbed9f9cb9a68bdfb5997c235 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc 15
147 3c1407305701051cbed9f9cb9a68bdfb5997c235 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc 15
148
148
149 nf5
149 nf5
150 0dbd89c185f53a1727c54cd1ce256482fa23968e 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 2114148793524fd045998f71a45b0aaf139f752b 15
150 0dbd89c185f53a1727c54cd1ce256482fa23968e 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 2114148793524fd045998f71a45b0aaf139f752b 15
151
151
152 Get branch and merge:
152 Get branch and merge:
153
153
154 $ hg debuggetbundle repo bundle -C 10e64d654571f11577745b4d8372e859d9e4df63 -H 6e9a5adf5437e49c746288cf95c5ac34fa8f2f72
154 $ hg debuggetbundle repo bundle -C 10e64d654571f11577745b4d8372e859d9e4df63 -H 6e9a5adf5437e49c746288cf95c5ac34fa8f2f72
155 $ hg debugbundle bundle
155 $ hg debugbundle bundle
156 6e23b016bc0f0e79c7bd9dd372ccee07055d7fd4
156 6e23b016bc0f0e79c7bd9dd372ccee07055d7fd4
157 0f82d97ec2778746743fbc996740d409558fda22
157 0f82d97ec2778746743fbc996740d409558fda22
158 ea919464b16e003894c48b6cb68df3cd9411b544
158 ea919464b16e003894c48b6cb68df3cd9411b544
159 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc
159 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc
160 2114148793524fd045998f71a45b0aaf139f752b
160 2114148793524fd045998f71a45b0aaf139f752b
161 b6b2b682253df2ffedc10e9415e4114202b303c5
161 b6b2b682253df2ffedc10e9415e4114202b303c5
162 a21d913c992197a2eb60b298521ec0f045a04799
162 a21d913c992197a2eb60b298521ec0f045a04799
163 18063366a155bd56b5618229ae2ac3e91849aa5e
163 18063366a155bd56b5618229ae2ac3e91849aa5e
164 6c725a58ad10aea441540bfd06c507f63e8b9cdd
164 6c725a58ad10aea441540bfd06c507f63e8b9cdd
165 c1818a9f5977dd4139a48f93f5425c67d44a9368
165 c1818a9f5977dd4139a48f93f5425c67d44a9368
166 2c0ec49482e8abe888b7bd090b5827acfc22b3d7
166 2c0ec49482e8abe888b7bd090b5827acfc22b3d7
167 6b57ee934bb2996050540f84cdfc8dcad1e7267d
167 6b57ee934bb2996050540f84cdfc8dcad1e7267d
168 b5af5d6ea56d73ce24c40bc3cd19a862f74888ac
168 b5af5d6ea56d73ce24c40bc3cd19a862f74888ac
169 733bf0910832b26b768a09172f325f995b5476e1
169 733bf0910832b26b768a09172f325f995b5476e1
170 6e9a5adf5437e49c746288cf95c5ac34fa8f2f72
170 6e9a5adf5437e49c746288cf95c5ac34fa8f2f72
171
171
172
172
173 = Test via HTTP =
173 = Test via HTTP =
174
174
175 Get everything:
175 Get everything:
176
176
177 $ hg serve -R repo -p $HGPORT -d --pid-file=hg.pid -E error.log -A access.log
177 $ hg serve -R repo -p $HGPORT -d --pid-file=hg.pid -E error.log -A access.log
178 $ cat hg.pid >> $DAEMON_PIDS
178 $ cat hg.pid >> $DAEMON_PIDS
179 $ hg debuggetbundle http://localhost:$HGPORT/ bundle
179 $ hg debuggetbundle http://localhost:$HGPORT/ bundle
180 $ hg debugbundle bundle
180 $ hg debugbundle bundle
181 10e64d654571f11577745b4d8372e859d9e4df63
181 10e64d654571f11577745b4d8372e859d9e4df63
182 6e23b016bc0f0e79c7bd9dd372ccee07055d7fd4
182 6e23b016bc0f0e79c7bd9dd372ccee07055d7fd4
183 0f82d97ec2778746743fbc996740d409558fda22
183 0f82d97ec2778746743fbc996740d409558fda22
184 ea919464b16e003894c48b6cb68df3cd9411b544
184 ea919464b16e003894c48b6cb68df3cd9411b544
185 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc
185 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc
186 2114148793524fd045998f71a45b0aaf139f752b
186 2114148793524fd045998f71a45b0aaf139f752b
187 b6b2b682253df2ffedc10e9415e4114202b303c5
187 b6b2b682253df2ffedc10e9415e4114202b303c5
188 a21d913c992197a2eb60b298521ec0f045a04799
188 a21d913c992197a2eb60b298521ec0f045a04799
189 18063366a155bd56b5618229ae2ac3e91849aa5e
189 18063366a155bd56b5618229ae2ac3e91849aa5e
190 6c725a58ad10aea441540bfd06c507f63e8b9cdd
190 6c725a58ad10aea441540bfd06c507f63e8b9cdd
191 c1818a9f5977dd4139a48f93f5425c67d44a9368
191 c1818a9f5977dd4139a48f93f5425c67d44a9368
192 2c0ec49482e8abe888b7bd090b5827acfc22b3d7
192 2c0ec49482e8abe888b7bd090b5827acfc22b3d7
193 6b57ee934bb2996050540f84cdfc8dcad1e7267d
193 6b57ee934bb2996050540f84cdfc8dcad1e7267d
194 b5af5d6ea56d73ce24c40bc3cd19a862f74888ac
194 b5af5d6ea56d73ce24c40bc3cd19a862f74888ac
195 733bf0910832b26b768a09172f325f995b5476e1
195 733bf0910832b26b768a09172f325f995b5476e1
196 6e9a5adf5437e49c746288cf95c5ac34fa8f2f72
196 6e9a5adf5437e49c746288cf95c5ac34fa8f2f72
197 d9e5488323c782fe684573f3043369d199038b6f
197 d9e5488323c782fe684573f3043369d199038b6f
198 2bba2f40f321484159b395a43f20101d4bb7ead0
198 2bba2f40f321484159b395a43f20101d4bb7ead0
199
199
200 Get parts of two branches:
200 Get parts of two branches:
201
201
202 $ hg debuggetbundle http://localhost:$HGPORT/ bundle -H 6b57ee934bb2996050540f84cdfc8dcad1e7267d -C c1818a9f5977dd4139a48f93f5425c67d44a9368 -H 2114148793524fd045998f71a45b0aaf139f752b -C ea919464b16e003894c48b6cb68df3cd9411b544
202 $ hg debuggetbundle http://localhost:$HGPORT/ bundle -H 6b57ee934bb2996050540f84cdfc8dcad1e7267d -C c1818a9f5977dd4139a48f93f5425c67d44a9368 -H 2114148793524fd045998f71a45b0aaf139f752b -C ea919464b16e003894c48b6cb68df3cd9411b544
203 $ hg debugbundle bundle
203 $ hg debugbundle bundle
204 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc
204 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc
205 2114148793524fd045998f71a45b0aaf139f752b
205 2114148793524fd045998f71a45b0aaf139f752b
206 2c0ec49482e8abe888b7bd090b5827acfc22b3d7
206 2c0ec49482e8abe888b7bd090b5827acfc22b3d7
207 6b57ee934bb2996050540f84cdfc8dcad1e7267d
207 6b57ee934bb2996050540f84cdfc8dcad1e7267d
208
208
209 Check that we get all needed file changes:
209 Check that we get all needed file changes:
210
210
211 $ hg debugbundle bundle --all
211 $ hg debugbundle bundle --all
212 format: id, p1, p2, cset, len(delta)
212 format: id, p1, p2, cset, len(delta)
213
213
214 changelog
214 changelog
215 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc ea919464b16e003894c48b6cb68df3cd9411b544 0000000000000000000000000000000000000000 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc 99
215 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc ea919464b16e003894c48b6cb68df3cd9411b544 0000000000000000000000000000000000000000 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc 99
216 2114148793524fd045998f71a45b0aaf139f752b 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc 0000000000000000000000000000000000000000 2114148793524fd045998f71a45b0aaf139f752b 99
216 2114148793524fd045998f71a45b0aaf139f752b 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc 0000000000000000000000000000000000000000 2114148793524fd045998f71a45b0aaf139f752b 99
217 2c0ec49482e8abe888b7bd090b5827acfc22b3d7 c1818a9f5977dd4139a48f93f5425c67d44a9368 0000000000000000000000000000000000000000 2c0ec49482e8abe888b7bd090b5827acfc22b3d7 102
217 2c0ec49482e8abe888b7bd090b5827acfc22b3d7 c1818a9f5977dd4139a48f93f5425c67d44a9368 0000000000000000000000000000000000000000 2c0ec49482e8abe888b7bd090b5827acfc22b3d7 102
218 6b57ee934bb2996050540f84cdfc8dcad1e7267d 2c0ec49482e8abe888b7bd090b5827acfc22b3d7 0000000000000000000000000000000000000000 6b57ee934bb2996050540f84cdfc8dcad1e7267d 102
218 6b57ee934bb2996050540f84cdfc8dcad1e7267d 2c0ec49482e8abe888b7bd090b5827acfc22b3d7 0000000000000000000000000000000000000000 6b57ee934bb2996050540f84cdfc8dcad1e7267d 102
219
219
220 manifest
220 manifest
221 dac7984588fc4eea7acbf39693a9c1b06f5b175d 591f732a3faf1fb903815273f3c199a514a61ccb 0000000000000000000000000000000000000000 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc 113
221 dac7984588fc4eea7acbf39693a9c1b06f5b175d 591f732a3faf1fb903815273f3c199a514a61ccb 0000000000000000000000000000000000000000 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc 113
222 0772616e6b48a76afb6c1458e193cbb3dae2e4ff dac7984588fc4eea7acbf39693a9c1b06f5b175d 0000000000000000000000000000000000000000 2114148793524fd045998f71a45b0aaf139f752b 113
222 0772616e6b48a76afb6c1458e193cbb3dae2e4ff dac7984588fc4eea7acbf39693a9c1b06f5b175d 0000000000000000000000000000000000000000 2114148793524fd045998f71a45b0aaf139f752b 113
223 eb498cd9af6c44108e43041e951ce829e29f6c80 bff2f4817ced57b386caf7c4e3e36a4bc9af7e93 0000000000000000000000000000000000000000 2c0ec49482e8abe888b7bd090b5827acfc22b3d7 295
223 eb498cd9af6c44108e43041e951ce829e29f6c80 bff2f4817ced57b386caf7c4e3e36a4bc9af7e93 0000000000000000000000000000000000000000 2c0ec49482e8abe888b7bd090b5827acfc22b3d7 295
224 b15709c071ddd2d93188508ba156196ab4f19620 eb498cd9af6c44108e43041e951ce829e29f6c80 0000000000000000000000000000000000000000 6b57ee934bb2996050540f84cdfc8dcad1e7267d 114
224 b15709c071ddd2d93188508ba156196ab4f19620 eb498cd9af6c44108e43041e951ce829e29f6c80 0000000000000000000000000000000000000000 6b57ee934bb2996050540f84cdfc8dcad1e7267d 114
225
225
226 mf
226 mf
227 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 301ca08d026bb72cb4258a9d211bdf7ca0bcd810 0000000000000000000000000000000000000000 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc 17
227 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 301ca08d026bb72cb4258a9d211bdf7ca0bcd810 0000000000000000000000000000000000000000 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc 17
228 c7b583de053293870e145f45bd2d61643563fd06 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 0000000000000000000000000000000000000000 2114148793524fd045998f71a45b0aaf139f752b 18
228 c7b583de053293870e145f45bd2d61643563fd06 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 0000000000000000000000000000000000000000 2114148793524fd045998f71a45b0aaf139f752b 18
229 266ee3c0302a5a18f1cf96817ac79a51836179e9 edc0f6b8db80d68ae6aff2b19f7e5347ab68fa63 0000000000000000000000000000000000000000 2c0ec49482e8abe888b7bd090b5827acfc22b3d7 149
229 266ee3c0302a5a18f1cf96817ac79a51836179e9 edc0f6b8db80d68ae6aff2b19f7e5347ab68fa63 0000000000000000000000000000000000000000 2c0ec49482e8abe888b7bd090b5827acfc22b3d7 149
230 698c6a36220548cd3903ca7dada27c59aa500c52 266ee3c0302a5a18f1cf96817ac79a51836179e9 0000000000000000000000000000000000000000 6b57ee934bb2996050540f84cdfc8dcad1e7267d 19
230 698c6a36220548cd3903ca7dada27c59aa500c52 266ee3c0302a5a18f1cf96817ac79a51836179e9 0000000000000000000000000000000000000000 6b57ee934bb2996050540f84cdfc8dcad1e7267d 19
231
231
232 nf11
232 nf11
233 33fbc651630ffa7ccbebfe4eb91320a873e7291c 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 2c0ec49482e8abe888b7bd090b5827acfc22b3d7 16
233 33fbc651630ffa7ccbebfe4eb91320a873e7291c 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 2c0ec49482e8abe888b7bd090b5827acfc22b3d7 16
234
234
235 nf12
235 nf12
236 ddce0544363f037e9fb889faca058f52dc01c0a5 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 6b57ee934bb2996050540f84cdfc8dcad1e7267d 16
236 ddce0544363f037e9fb889faca058f52dc01c0a5 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 6b57ee934bb2996050540f84cdfc8dcad1e7267d 16
237
237
238 nf4
238 nf4
239 3c1407305701051cbed9f9cb9a68bdfb5997c235 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc 15
239 3c1407305701051cbed9f9cb9a68bdfb5997c235 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 74a573f2ae100f1cedfad9aa7b96f8eaab1dabfc 15
240
240
241 nf5
241 nf5
242 0dbd89c185f53a1727c54cd1ce256482fa23968e 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 2114148793524fd045998f71a45b0aaf139f752b 15
242 0dbd89c185f53a1727c54cd1ce256482fa23968e 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 2114148793524fd045998f71a45b0aaf139f752b 15
243
243
244 Verify we hit the HTTP server:
244 Verify we hit the HTTP server:
245
245
246 $ cat access.log
246 $ cat access.log
247 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
247 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
248 * - - [*] "GET /?cmd=getbundle HTTP/1.1" 200 - (glob)
248 * - - [*] "GET /?cmd=getbundle HTTP/1.1" 200 - (glob)
249 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
249 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
250 * - - [*] "GET /?cmd=getbundle HTTP/1.1" 200 - x-arg-1:common=c1818a9f5977dd4139a48f93f5425c67d44a9368+ea919464b16e003894c48b6cb68df3cd9411b544&heads=6b57ee934bb2996050540f84cdfc8dcad1e7267d+2114148793524fd045998f71a45b0aaf139f752b (glob)
250 * - - [*] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:common=c1818a9f5977dd4139a48f93f5425c67d44a9368+ea919464b16e003894c48b6cb68df3cd9411b544&heads=6b57ee934bb2996050540f84cdfc8dcad1e7267d+2114148793524fd045998f71a45b0aaf139f752b (glob)
251
251
252 $ cat error.log
252 $ cat error.log
253
253
@@ -1,120 +1,120 b''
1
1
2 $ hg init a
2 $ hg init a
3 $ cd a
3 $ cd a
4 $ echo a > a
4 $ echo a > a
5 $ hg ci -Ama -d '1123456789 0'
5 $ hg ci -Ama -d '1123456789 0'
6 adding a
6 adding a
7 $ hg --config server.uncompressed=True serve -p $HGPORT -d --pid-file=hg.pid
7 $ hg --config server.uncompressed=True serve -p $HGPORT -d --pid-file=hg.pid
8 $ cat hg.pid >> $DAEMON_PIDS
8 $ cat hg.pid >> $DAEMON_PIDS
9 $ cd ..
9 $ cd ..
10 $ ("$TESTDIR/tinyproxy.py" $HGPORT1 localhost >proxy.log 2>&1 </dev/null &
10 $ ("$TESTDIR/tinyproxy.py" $HGPORT1 localhost >proxy.log 2>&1 </dev/null &
11 $ echo $! > proxy.pid)
11 $ echo $! > proxy.pid)
12 $ cat proxy.pid >> $DAEMON_PIDS
12 $ cat proxy.pid >> $DAEMON_PIDS
13 $ sleep 2
13 $ sleep 2
14
14
15 url for proxy, stream
15 url for proxy, stream
16
16
17 $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone --uncompressed http://localhost:$HGPORT/ b
17 $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone --uncompressed http://localhost:$HGPORT/ b
18 streaming all changes
18 streaming all changes
19 3 files to transfer, 303 bytes of data
19 3 files to transfer, 303 bytes of data
20 transferred * bytes in * seconds (*/sec) (glob)
20 transferred * bytes in * seconds (*/sec) (glob)
21 updating to branch default
21 updating to branch default
22 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
22 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
23 $ cd b
23 $ cd b
24 $ hg verify
24 $ hg verify
25 checking changesets
25 checking changesets
26 checking manifests
26 checking manifests
27 crosschecking files in changesets and manifests
27 crosschecking files in changesets and manifests
28 checking files
28 checking files
29 1 files, 1 changesets, 1 total revisions
29 1 files, 1 changesets, 1 total revisions
30 $ cd ..
30 $ cd ..
31
31
32 url for proxy, pull
32 url for proxy, pull
33
33
34 $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone http://localhost:$HGPORT/ b-pull
34 $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone http://localhost:$HGPORT/ b-pull
35 requesting all changes
35 requesting all changes
36 adding changesets
36 adding changesets
37 adding manifests
37 adding manifests
38 adding file changes
38 adding file changes
39 added 1 changesets with 1 changes to 1 files
39 added 1 changesets with 1 changes to 1 files
40 updating to branch default
40 updating to branch default
41 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
41 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
42 $ cd b-pull
42 $ cd b-pull
43 $ hg verify
43 $ hg verify
44 checking changesets
44 checking changesets
45 checking manifests
45 checking manifests
46 crosschecking files in changesets and manifests
46 crosschecking files in changesets and manifests
47 checking files
47 checking files
48 1 files, 1 changesets, 1 total revisions
48 1 files, 1 changesets, 1 total revisions
49 $ cd ..
49 $ cd ..
50
50
51 host:port for proxy
51 host:port for proxy
52
52
53 $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ c
53 $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ c
54 requesting all changes
54 requesting all changes
55 adding changesets
55 adding changesets
56 adding manifests
56 adding manifests
57 adding file changes
57 adding file changes
58 added 1 changesets with 1 changes to 1 files
58 added 1 changesets with 1 changes to 1 files
59 updating to branch default
59 updating to branch default
60 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
60 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
61
61
62 proxy url with user name and password
62 proxy url with user name and password
63
63
64 $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ d
64 $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ d
65 requesting all changes
65 requesting all changes
66 adding changesets
66 adding changesets
67 adding manifests
67 adding manifests
68 adding file changes
68 adding file changes
69 added 1 changesets with 1 changes to 1 files
69 added 1 changesets with 1 changes to 1 files
70 updating to branch default
70 updating to branch default
71 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
71 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
72
72
73 url with user name and password
73 url with user name and password
74
74
75 $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://user:passwd@localhost:$HGPORT/ e
75 $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://user:passwd@localhost:$HGPORT/ e
76 requesting all changes
76 requesting all changes
77 adding changesets
77 adding changesets
78 adding manifests
78 adding manifests
79 adding file changes
79 adding file changes
80 added 1 changesets with 1 changes to 1 files
80 added 1 changesets with 1 changes to 1 files
81 updating to branch default
81 updating to branch default
82 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
82 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
83
83
84 bad host:port for proxy
84 bad host:port for proxy
85
85
86 $ http_proxy=localhost:$HGPORT2 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ f
86 $ http_proxy=localhost:$HGPORT2 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ f
87 abort: error: Connection refused
87 abort: error: Connection refused
88 [255]
88 [255]
89
89
90 do not use the proxy if it is in the no list
90 do not use the proxy if it is in the no list
91
91
92 $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.no=localhost http://localhost:$HGPORT/ g
92 $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.no=localhost http://localhost:$HGPORT/ g
93 requesting all changes
93 requesting all changes
94 adding changesets
94 adding changesets
95 adding manifests
95 adding manifests
96 adding file changes
96 adding file changes
97 added 1 changesets with 1 changes to 1 files
97 added 1 changesets with 1 changes to 1 files
98 updating to branch default
98 updating to branch default
99 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
99 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
100 $ cat proxy.log
100 $ cat proxy.log
101 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
101 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
102 * - - [*] "GET http://localhost:$HGPORT/?cmd=stream_out HTTP/1.1" - - (glob)
102 * - - [*] "GET http://localhost:$HGPORT/?cmd=stream_out HTTP/1.1" - - (glob)
103 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-arg-1:namespace=bookmarks (glob)
103 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
104 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
104 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
105 * - - [*] "GET http://localhost:$HGPORT/?cmd=heads HTTP/1.1" - - (glob)
105 * - - [*] "GET http://localhost:$HGPORT/?cmd=heads HTTP/1.1" - - (glob)
106 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-arg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
106 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
107 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-arg-1:namespace=bookmarks (glob)
107 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
108 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
108 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
109 * - - [*] "GET http://localhost:$HGPORT/?cmd=heads HTTP/1.1" - - (glob)
109 * - - [*] "GET http://localhost:$HGPORT/?cmd=heads HTTP/1.1" - - (glob)
110 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-arg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
110 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
111 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-arg-1:namespace=bookmarks (glob)
111 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
112 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
112 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
113 * - - [*] "GET http://localhost:$HGPORT/?cmd=heads HTTP/1.1" - - (glob)
113 * - - [*] "GET http://localhost:$HGPORT/?cmd=heads HTTP/1.1" - - (glob)
114 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-arg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
114 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
115 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-arg-1:namespace=bookmarks (glob)
115 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
116 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
116 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
117 * - - [*] "GET http://localhost:$HGPORT/?cmd=heads HTTP/1.1" - - (glob)
117 * - - [*] "GET http://localhost:$HGPORT/?cmd=heads HTTP/1.1" - - (glob)
118 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-arg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
118 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
119 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-arg-1:namespace=bookmarks (glob)
119 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
120
120
@@ -1,31 +1,31 b''
1
1
2 Test wire protocol unbundle with hashed heads (capability: unbundlehash)
2 Test wire protocol unbundle with hashed heads (capability: unbundlehash)
3
3
4 Create a remote repository.
4 Create a remote repository.
5
5
6 $ hg init remote
6 $ hg init remote
7 $ hg serve -R remote --config web.push_ssl=False --config web.allow_push=* -p $HGPORT -d --pid-file=hg1.pid -E error.log -A access.log
7 $ hg serve -R remote --config web.push_ssl=False --config web.allow_push=* -p $HGPORT -d --pid-file=hg1.pid -E error.log -A access.log
8 $ cat hg1.pid >> $DAEMON_PIDS
8 $ cat hg1.pid >> $DAEMON_PIDS
9
9
10 Clone the repository and push a change.
10 Clone the repository and push a change.
11
11
12 $ hg clone http://localhost:$HGPORT/ local
12 $ hg clone http://localhost:$HGPORT/ local
13 no changes found
13 no changes found
14 updating to branch default
14 updating to branch default
15 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
15 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
16 $ touch local/README
16 $ touch local/README
17 $ hg ci -R local -A -m hoge
17 $ hg ci -R local -A -m hoge
18 adding README
18 adding README
19 $ hg push -R local
19 $ hg push -R local
20 pushing to http://localhost:$HGPORT/
20 pushing to http://localhost:$HGPORT/
21 searching for changes
21 searching for changes
22 remote: adding changesets
22 remote: adding changesets
23 remote: adding manifests
23 remote: adding manifests
24 remote: adding file changes
24 remote: adding file changes
25 remote: added 1 changesets with 1 changes to 1 files
25 remote: added 1 changesets with 1 changes to 1 files
26
26
27 Ensure hashed heads format is used.
27 Ensure hashed heads format is used.
28 The hash here is always the same since the remote repository only has the null head.
28 The hash here is always the same since the remote repository only has the null head.
29
29
30 $ cat access.log | grep unbundle
30 $ cat access.log | grep unbundle
31 * - - [*] "POST /?cmd=unbundle HTTP/1.1" 200 - x-arg-1:heads=686173686564+6768033e216468247bd031a0a2d9876d79818f8f (glob)
31 * - - [*] "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+6768033e216468247bd031a0a2d9876d79818f8f (glob)
@@ -1,112 +1,112 b''
1
1
2 Test wire protocol argument passing
2 Test wire protocol argument passing
3
3
4 Setup repo:
4 Setup repo:
5
5
6 $ hg init repo
6 $ hg init repo
7
7
8 Local:
8 Local:
9
9
10 $ hg debugwireargs repo eins zwei --three drei --four vier
10 $ hg debugwireargs repo eins zwei --three drei --four vier
11 eins zwei drei vier None
11 eins zwei drei vier None
12 $ hg debugwireargs repo eins zwei --four vier
12 $ hg debugwireargs repo eins zwei --four vier
13 eins zwei None vier None
13 eins zwei None vier None
14 $ hg debugwireargs repo eins zwei
14 $ hg debugwireargs repo eins zwei
15 eins zwei None None None
15 eins zwei None None None
16 $ hg debugwireargs repo eins zwei --five fuenf
16 $ hg debugwireargs repo eins zwei --five fuenf
17 eins zwei None None fuenf
17 eins zwei None None fuenf
18
18
19 HTTP:
19 HTTP:
20
20
21 $ hg serve -R repo -p $HGPORT -d --pid-file=hg1.pid -E error.log -A access.log
21 $ hg serve -R repo -p $HGPORT -d --pid-file=hg1.pid -E error.log -A access.log
22 $ cat hg1.pid >> $DAEMON_PIDS
22 $ cat hg1.pid >> $DAEMON_PIDS
23
23
24 $ hg debugwireargs http://localhost:$HGPORT/ un deux trois quatre
24 $ hg debugwireargs http://localhost:$HGPORT/ un deux trois quatre
25 un deux trois quatre None
25 un deux trois quatre None
26 $ hg debugwireargs http://localhost:$HGPORT/ \ un deux trois\ qu\ \ atre
26 $ hg debugwireargs http://localhost:$HGPORT/ \ un deux trois\ qu\ \ atre
27 un deux trois qu atre None
27 un deux trois qu atre None
28 $ hg debugwireargs http://localhost:$HGPORT/ eins zwei --four vier
28 $ hg debugwireargs http://localhost:$HGPORT/ eins zwei --four vier
29 eins zwei None vier None
29 eins zwei None vier None
30 $ hg debugwireargs http://localhost:$HGPORT/ eins zwei
30 $ hg debugwireargs http://localhost:$HGPORT/ eins zwei
31 eins zwei None None None
31 eins zwei None None None
32 $ hg debugwireargs http://localhost:$HGPORT/ eins zwei --five fuenf
32 $ hg debugwireargs http://localhost:$HGPORT/ eins zwei --five fuenf
33 eins zwei None None None
33 eins zwei None None None
34 $ hg debugwireargs http://localhost:$HGPORT/ un deux trois onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx None
36 $ cat error.log
36 $ cat error.log
37 $ cat access.log
37 $ cat access.log
38 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
38 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
39 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-arg-1:four=quatre&one=un&three=trois&two=deux (glob)
39 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=quatre&one=un&three=trois&two=deux (glob)
40 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-arg-1:four=quatre&one=un&three=trois&two=deux (glob)
40 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=quatre&one=un&three=trois&two=deux (glob)
41 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
41 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
42 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-arg-1:four=qu++atre&one=+un&three=trois+&two=deux (glob)
42 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=qu++atre&one=+un&three=trois+&two=deux (glob)
43 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-arg-1:four=qu++atre&one=+un&three=trois+&two=deux (glob)
43 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=qu++atre&one=+un&three=trois+&two=deux (glob)
44 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
44 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
45 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-arg-1:four=vier&one=eins&two=zwei (glob)
45 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=vier&one=eins&two=zwei (glob)
46 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-arg-1:four=vier&one=eins&two=zwei (glob)
46 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=vier&one=eins&two=zwei (glob)
47 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
47 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
48 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-arg-1:one=eins&two=zwei (glob)
48 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei (glob)
49 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-arg-1:one=eins&two=zwei (glob)
49 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei (glob)
50 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
50 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
51 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-arg-1:one=eins&two=zwei (glob)
51 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei (glob)
52 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-arg-1:one=eins&two=zwei (glob)
52 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei (glob)
53 * - - [*] "GET /?c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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&one x-hgarg-2:=un&three=trois&two=deux (glob)
56
56
57 HTTP without the httpheader capability:
57 HTTP without the httpheader capability:
58
58
59 $ HGRCPATH="`pwd`/repo/.hgrc"
59 $ HGRCPATH="`pwd`/repo/.hgrc"
60 $ CAP=httpheader
60 $ CAP=httpheader
61 $ . "$TESTDIR/notcapable"
61 $ . "$TESTDIR/notcapable"
62
62
63 $ hg serve -R repo -p $HGPORT2 -d --pid-file=hg2.pid -E error2.log -A access2.log
63 $ hg serve -R repo -p $HGPORT2 -d --pid-file=hg2.pid -E error2.log -A access2.log
64 $ cat hg2.pid >> $DAEMON_PIDS
64 $ cat hg2.pid >> $DAEMON_PIDS
65
65
66 $ hg debugwireargs http://localhost:$HGPORT2/ un deux trois quatre
66 $ hg debugwireargs http://localhost:$HGPORT2/ un deux trois quatre
67 un deux trois quatre None
67 un deux trois quatre None
68 $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei --four vier
68 $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei --four vier
69 eins zwei None vier None
69 eins zwei None vier None
70 $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei
70 $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei
71 eins zwei None None None
71 eins zwei None None None
72 $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei --five fuenf
72 $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei --five fuenf
73 eins zwei None None None
73 eins zwei None None None
74 $ cat error2.log
74 $ cat error2.log
75 $ cat access2.log
75 $ cat access2.log
76 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
76 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
77 * - - [*] "GET /?cmd=debugwireargs&four=quatre&one=un&three=trois&two=deux HTTP/1.1" 200 - (glob)
77 * - - [*] "GET /?cmd=debugwireargs&four=quatre&one=un&three=trois&two=deux HTTP/1.1" 200 - (glob)
78 * - - [*] "GET /?cmd=debugwireargs&four=quatre&one=un&three=trois&two=deux HTTP/1.1" 200 - (glob)
78 * - - [*] "GET /?cmd=debugwireargs&four=quatre&one=un&three=trois&two=deux HTTP/1.1" 200 - (glob)
79 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
79 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
80 * - - [*] "GET /?cmd=debugwireargs&four=vier&one=eins&two=zwei HTTP/1.1" 200 - (glob)
80 * - - [*] "GET /?cmd=debugwireargs&four=vier&one=eins&two=zwei HTTP/1.1" 200 - (glob)
81 * - - [*] "GET /?cmd=debugwireargs&four=vier&one=eins&two=zwei HTTP/1.1" 200 - (glob)
81 * - - [*] "GET /?cmd=debugwireargs&four=vier&one=eins&two=zwei HTTP/1.1" 200 - (glob)
82 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
82 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
83 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob)
83 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob)
84 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob)
84 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob)
85 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
85 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
86 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob)
86 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob)
87 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob)
87 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob)
88
88
89 SSH (try to exercise the ssh functionality with a dummy script):
89 SSH (try to exercise the ssh functionality with a dummy script):
90
90
91 $ cat <<EOF > dummyssh
91 $ cat <<EOF > dummyssh
92 > import sys
92 > import sys
93 > import os
93 > import os
94 > os.chdir(os.path.dirname(sys.argv[0]))
94 > os.chdir(os.path.dirname(sys.argv[0]))
95 > if sys.argv[1] != "user@dummy":
95 > if sys.argv[1] != "user@dummy":
96 > sys.exit(-1)
96 > sys.exit(-1)
97 > if not os.path.exists("dummyssh"):
97 > if not os.path.exists("dummyssh"):
98 > sys.exit(-1)
98 > sys.exit(-1)
99 > os.environ["SSH_CLIENT"] = "127.0.0.1 1 2"
99 > os.environ["SSH_CLIENT"] = "127.0.0.1 1 2"
100 > r = os.system(sys.argv[2])
100 > r = os.system(sys.argv[2])
101 > sys.exit(bool(r))
101 > sys.exit(bool(r))
102 > EOF
102 > EOF
103
103
104 $ hg debugwireargs --ssh "python ./dummyssh" ssh://user@dummy/repo uno due tre quattro
104 $ hg debugwireargs --ssh "python ./dummyssh" ssh://user@dummy/repo uno due tre quattro
105 uno due tre quattro None
105 uno due tre quattro None
106 $ hg debugwireargs --ssh "python ./dummyssh" ssh://user@dummy/repo eins zwei --four vier
106 $ hg debugwireargs --ssh "python ./dummyssh" ssh://user@dummy/repo eins zwei --four vier
107 eins zwei None vier None
107 eins zwei None vier None
108 $ hg debugwireargs --ssh "python ./dummyssh" ssh://user@dummy/repo eins zwei
108 $ hg debugwireargs --ssh "python ./dummyssh" ssh://user@dummy/repo eins zwei
109 eins zwei None None None
109 eins zwei None None None
110 $ hg debugwireargs --ssh "python ./dummyssh" ssh://user@dummy/repo eins zwei --five fuenf
110 $ hg debugwireargs --ssh "python ./dummyssh" ssh://user@dummy/repo eins zwei --five fuenf
111 eins zwei None None None
111 eins zwei None None None
112
112
General Comments 0
You need to be logged in to leave comments. Login now