Show More
@@ -1,181 +1,294 | |||||
1 | # exchangev2.py - repository exchange for wire protocol version 2 |
|
1 | # exchangev2.py - repository exchange for wire protocol version 2 | |
2 | # |
|
2 | # | |
3 | # Copyright 2018 Gregory Szorc <gregory.szorc@gmail.com> |
|
3 | # Copyright 2018 Gregory Szorc <gregory.szorc@gmail.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 | from __future__ import absolute_import |
|
8 | from __future__ import absolute_import | |
9 |
|
9 | |||
10 | import weakref |
|
10 | import weakref | |
11 |
|
11 | |||
12 | from .i18n import _ |
|
12 | from .i18n import _ | |
13 | from .node import ( |
|
13 | from .node import ( | |
14 | nullid, |
|
14 | nullid, | |
15 | short, |
|
15 | short, | |
16 | ) |
|
16 | ) | |
17 | from . import ( |
|
17 | from . import ( | |
18 | bookmarks, |
|
18 | bookmarks, | |
|
19 | error, | |||
19 | mdiff, |
|
20 | mdiff, | |
20 | phases, |
|
21 | phases, | |
21 | pycompat, |
|
22 | pycompat, | |
22 | setdiscovery, |
|
23 | setdiscovery, | |
23 | ) |
|
24 | ) | |
24 |
|
25 | |||
25 | def pull(pullop): |
|
26 | def pull(pullop): | |
26 | """Pull using wire protocol version 2.""" |
|
27 | """Pull using wire protocol version 2.""" | |
27 | repo = pullop.repo |
|
28 | repo = pullop.repo | |
28 | remote = pullop.remote |
|
29 | remote = pullop.remote | |
29 | tr = pullop.trmanager.transaction() |
|
30 | tr = pullop.trmanager.transaction() | |
30 |
|
31 | |||
31 | # Figure out what needs to be fetched. |
|
32 | # Figure out what needs to be fetched. | |
32 | common, fetch, remoteheads = _pullchangesetdiscovery( |
|
33 | common, fetch, remoteheads = _pullchangesetdiscovery( | |
33 | repo, remote, pullop.heads, abortwhenunrelated=pullop.force) |
|
34 | repo, remote, pullop.heads, abortwhenunrelated=pullop.force) | |
34 |
|
35 | |||
35 | # And fetch the data. |
|
36 | # And fetch the data. | |
36 | pullheads = pullop.heads or remoteheads |
|
37 | pullheads = pullop.heads or remoteheads | |
37 | csetres = _fetchchangesets(repo, tr, remote, common, fetch, pullheads) |
|
38 | csetres = _fetchchangesets(repo, tr, remote, common, fetch, pullheads) | |
38 |
|
39 | |||
39 | # New revisions are written to the changelog. But all other updates |
|
40 | # New revisions are written to the changelog. But all other updates | |
40 | # are deferred. Do those now. |
|
41 | # are deferred. Do those now. | |
41 |
|
42 | |||
42 | # Ensure all new changesets are draft by default. If the repo is |
|
43 | # Ensure all new changesets are draft by default. If the repo is | |
43 | # publishing, the phase will be adjusted by the loop below. |
|
44 | # publishing, the phase will be adjusted by the loop below. | |
44 | if csetres['added']: |
|
45 | if csetres['added']: | |
45 | phases.registernew(repo, tr, phases.draft, csetres['added']) |
|
46 | phases.registernew(repo, tr, phases.draft, csetres['added']) | |
46 |
|
47 | |||
47 | # And adjust the phase of all changesets accordingly. |
|
48 | # And adjust the phase of all changesets accordingly. | |
48 | for phase in phases.phasenames: |
|
49 | for phase in phases.phasenames: | |
49 | if phase == b'secret' or not csetres['nodesbyphase'][phase]: |
|
50 | if phase == b'secret' or not csetres['nodesbyphase'][phase]: | |
50 | continue |
|
51 | continue | |
51 |
|
52 | |||
52 | phases.advanceboundary(repo, tr, phases.phasenames.index(phase), |
|
53 | phases.advanceboundary(repo, tr, phases.phasenames.index(phase), | |
53 | csetres['nodesbyphase'][phase]) |
|
54 | csetres['nodesbyphase'][phase]) | |
54 |
|
55 | |||
55 | # Write bookmark updates. |
|
56 | # Write bookmark updates. | |
56 | bookmarks.updatefromremote(repo.ui, repo, csetres['bookmarks'], |
|
57 | bookmarks.updatefromremote(repo.ui, repo, csetres['bookmarks'], | |
57 | remote.url(), pullop.gettransaction, |
|
58 | remote.url(), pullop.gettransaction, | |
58 | explicit=pullop.explicitbookmarks) |
|
59 | explicit=pullop.explicitbookmarks) | |
59 |
|
60 | |||
|
61 | _fetchmanifests(repo, tr, remote, csetres['manifestnodes']) | |||
|
62 | ||||
60 | def _pullchangesetdiscovery(repo, remote, heads, abortwhenunrelated=True): |
|
63 | def _pullchangesetdiscovery(repo, remote, heads, abortwhenunrelated=True): | |
61 | """Determine which changesets need to be pulled.""" |
|
64 | """Determine which changesets need to be pulled.""" | |
62 |
|
65 | |||
63 | if heads: |
|
66 | if heads: | |
64 | knownnode = repo.changelog.hasnode |
|
67 | knownnode = repo.changelog.hasnode | |
65 | if all(knownnode(head) for head in heads): |
|
68 | if all(knownnode(head) for head in heads): | |
66 | return heads, False, heads |
|
69 | return heads, False, heads | |
67 |
|
70 | |||
68 | # TODO wire protocol version 2 is capable of more efficient discovery |
|
71 | # TODO wire protocol version 2 is capable of more efficient discovery | |
69 | # than setdiscovery. Consider implementing something better. |
|
72 | # than setdiscovery. Consider implementing something better. | |
70 | common, fetch, remoteheads = setdiscovery.findcommonheads( |
|
73 | common, fetch, remoteheads = setdiscovery.findcommonheads( | |
71 | repo.ui, repo, remote, abortwhenunrelated=abortwhenunrelated) |
|
74 | repo.ui, repo, remote, abortwhenunrelated=abortwhenunrelated) | |
72 |
|
75 | |||
73 | common = set(common) |
|
76 | common = set(common) | |
74 | remoteheads = set(remoteheads) |
|
77 | remoteheads = set(remoteheads) | |
75 |
|
78 | |||
76 | # If a remote head is filtered locally, put it back in the common set. |
|
79 | # If a remote head is filtered locally, put it back in the common set. | |
77 | # See the comment in exchange._pulldiscoverychangegroup() for more. |
|
80 | # See the comment in exchange._pulldiscoverychangegroup() for more. | |
78 |
|
81 | |||
79 | if fetch and remoteheads: |
|
82 | if fetch and remoteheads: | |
80 | nodemap = repo.unfiltered().changelog.nodemap |
|
83 | nodemap = repo.unfiltered().changelog.nodemap | |
81 |
|
84 | |||
82 | common |= {head for head in remoteheads if head in nodemap} |
|
85 | common |= {head for head in remoteheads if head in nodemap} | |
83 |
|
86 | |||
84 | if set(remoteheads).issubset(common): |
|
87 | if set(remoteheads).issubset(common): | |
85 | fetch = [] |
|
88 | fetch = [] | |
86 |
|
89 | |||
87 | common.discard(nullid) |
|
90 | common.discard(nullid) | |
88 |
|
91 | |||
89 | return common, fetch, remoteheads |
|
92 | return common, fetch, remoteheads | |
90 |
|
93 | |||
91 | def _fetchchangesets(repo, tr, remote, common, fetch, remoteheads): |
|
94 | def _fetchchangesets(repo, tr, remote, common, fetch, remoteheads): | |
92 | # TODO consider adding a step here where we obtain the DAG shape first |
|
95 | # TODO consider adding a step here where we obtain the DAG shape first | |
93 | # (or ask the server to slice changesets into chunks for us) so that |
|
96 | # (or ask the server to slice changesets into chunks for us) so that | |
94 | # we can perform multiple fetches in batches. This will facilitate |
|
97 | # we can perform multiple fetches in batches. This will facilitate | |
95 | # resuming interrupted clones, higher server-side cache hit rates due |
|
98 | # resuming interrupted clones, higher server-side cache hit rates due | |
96 | # to smaller segments, etc. |
|
99 | # to smaller segments, etc. | |
97 | with remote.commandexecutor() as e: |
|
100 | with remote.commandexecutor() as e: | |
98 | objs = e.callcommand(b'changesetdata', { |
|
101 | objs = e.callcommand(b'changesetdata', { | |
99 | b'noderange': [sorted(common), sorted(remoteheads)], |
|
102 | b'noderange': [sorted(common), sorted(remoteheads)], | |
100 | b'fields': {b'bookmarks', b'parents', b'phase', b'revision'}, |
|
103 | b'fields': {b'bookmarks', b'parents', b'phase', b'revision'}, | |
101 | }).result() |
|
104 | }).result() | |
102 |
|
105 | |||
103 | # The context manager waits on all response data when exiting. So |
|
106 | # The context manager waits on all response data when exiting. So | |
104 | # we need to remain in the context manager in order to stream data. |
|
107 | # we need to remain in the context manager in order to stream data. | |
105 | return _processchangesetdata(repo, tr, objs) |
|
108 | return _processchangesetdata(repo, tr, objs) | |
106 |
|
109 | |||
107 | def _processchangesetdata(repo, tr, objs): |
|
110 | def _processchangesetdata(repo, tr, objs): | |
108 | repo.hook('prechangegroup', throw=True, |
|
111 | repo.hook('prechangegroup', throw=True, | |
109 | **pycompat.strkwargs(tr.hookargs)) |
|
112 | **pycompat.strkwargs(tr.hookargs)) | |
110 |
|
113 | |||
111 | urepo = repo.unfiltered() |
|
114 | urepo = repo.unfiltered() | |
112 | cl = urepo.changelog |
|
115 | cl = urepo.changelog | |
113 |
|
116 | |||
114 | cl.delayupdate(tr) |
|
117 | cl.delayupdate(tr) | |
115 |
|
118 | |||
116 | # The first emitted object is a header describing the data that |
|
119 | # The first emitted object is a header describing the data that | |
117 | # follows. |
|
120 | # follows. | |
118 | meta = next(objs) |
|
121 | meta = next(objs) | |
119 |
|
122 | |||
120 | progress = repo.ui.makeprogress(_('changesets'), |
|
123 | progress = repo.ui.makeprogress(_('changesets'), | |
121 | unit=_('chunks'), |
|
124 | unit=_('chunks'), | |
122 | total=meta.get(b'totalitems')) |
|
125 | total=meta.get(b'totalitems')) | |
123 |
|
126 | |||
|
127 | manifestnodes = {} | |||
|
128 | ||||
124 | def linkrev(node): |
|
129 | def linkrev(node): | |
125 | repo.ui.debug('add changeset %s\n' % short(node)) |
|
130 | repo.ui.debug('add changeset %s\n' % short(node)) | |
126 | # Linkrev for changelog is always self. |
|
131 | # Linkrev for changelog is always self. | |
127 | return len(cl) |
|
132 | return len(cl) | |
128 |
|
133 | |||
129 | def onchangeset(cl, node): |
|
134 | def onchangeset(cl, node): | |
130 | progress.increment() |
|
135 | progress.increment() | |
131 |
|
136 | |||
|
137 | revision = cl.changelogrevision(node) | |||
|
138 | ||||
|
139 | # We need to preserve the mapping of changelog revision to node | |||
|
140 | # so we can set the linkrev accordingly when manifests are added. | |||
|
141 | manifestnodes[cl.rev(node)] = revision.manifest | |||
|
142 | ||||
132 | nodesbyphase = {phase: set() for phase in phases.phasenames} |
|
143 | nodesbyphase = {phase: set() for phase in phases.phasenames} | |
133 | remotebookmarks = {} |
|
144 | remotebookmarks = {} | |
134 |
|
145 | |||
135 | # addgroup() expects a 7-tuple describing revisions. This normalizes |
|
146 | # addgroup() expects a 7-tuple describing revisions. This normalizes | |
136 | # the wire data to that format. |
|
147 | # the wire data to that format. | |
137 | # |
|
148 | # | |
138 | # This loop also aggregates non-revision metadata, such as phase |
|
149 | # This loop also aggregates non-revision metadata, such as phase | |
139 | # data. |
|
150 | # data. | |
140 | def iterrevisions(): |
|
151 | def iterrevisions(): | |
141 | for cset in objs: |
|
152 | for cset in objs: | |
142 | node = cset[b'node'] |
|
153 | node = cset[b'node'] | |
143 |
|
154 | |||
144 | if b'phase' in cset: |
|
155 | if b'phase' in cset: | |
145 | nodesbyphase[cset[b'phase']].add(node) |
|
156 | nodesbyphase[cset[b'phase']].add(node) | |
146 |
|
157 | |||
147 | for mark in cset.get(b'bookmarks', []): |
|
158 | for mark in cset.get(b'bookmarks', []): | |
148 | remotebookmarks[mark] = node |
|
159 | remotebookmarks[mark] = node | |
149 |
|
160 | |||
150 | # TODO add mechanism for extensions to examine records so they |
|
161 | # TODO add mechanism for extensions to examine records so they | |
151 | # can siphon off custom data fields. |
|
162 | # can siphon off custom data fields. | |
152 |
|
163 | |||
153 | # Some entries might only be metadata only updates. |
|
164 | # Some entries might only be metadata only updates. | |
154 | if b'revisionsize' not in cset: |
|
165 | if b'revisionsize' not in cset: | |
155 | continue |
|
166 | continue | |
156 |
|
167 | |||
157 | data = next(objs) |
|
168 | data = next(objs) | |
158 |
|
169 | |||
159 | yield ( |
|
170 | yield ( | |
160 | node, |
|
171 | node, | |
161 | cset[b'parents'][0], |
|
172 | cset[b'parents'][0], | |
162 | cset[b'parents'][1], |
|
173 | cset[b'parents'][1], | |
163 | # Linknode is always itself for changesets. |
|
174 | # Linknode is always itself for changesets. | |
164 | cset[b'node'], |
|
175 | cset[b'node'], | |
165 | # We always send full revisions. So delta base is not set. |
|
176 | # We always send full revisions. So delta base is not set. | |
166 | nullid, |
|
177 | nullid, | |
167 | mdiff.trivialdiffheader(len(data)) + data, |
|
178 | mdiff.trivialdiffheader(len(data)) + data, | |
168 | # Flags not yet supported. |
|
179 | # Flags not yet supported. | |
169 | 0, |
|
180 | 0, | |
170 | ) |
|
181 | ) | |
171 |
|
182 | |||
172 | added = cl.addgroup(iterrevisions(), linkrev, weakref.proxy(tr), |
|
183 | added = cl.addgroup(iterrevisions(), linkrev, weakref.proxy(tr), | |
173 | addrevisioncb=onchangeset) |
|
184 | addrevisioncb=onchangeset) | |
174 |
|
185 | |||
175 | progress.complete() |
|
186 | progress.complete() | |
176 |
|
187 | |||
177 | return { |
|
188 | return { | |
178 | 'added': added, |
|
189 | 'added': added, | |
179 | 'nodesbyphase': nodesbyphase, |
|
190 | 'nodesbyphase': nodesbyphase, | |
180 | 'bookmarks': remotebookmarks, |
|
191 | 'bookmarks': remotebookmarks, | |
|
192 | 'manifestnodes': manifestnodes, | |||
181 | } |
|
193 | } | |
|
194 | ||||
|
195 | def _fetchmanifests(repo, tr, remote, manifestnodes): | |||
|
196 | rootmanifest = repo.manifestlog.getstorage(b'') | |||
|
197 | ||||
|
198 | # Some manifests can be shared between changesets. Filter out revisions | |||
|
199 | # we already know about. | |||
|
200 | fetchnodes = [] | |||
|
201 | linkrevs = {} | |||
|
202 | seen = set() | |||
|
203 | ||||
|
204 | for clrev, node in sorted(manifestnodes.iteritems()): | |||
|
205 | if node in seen: | |||
|
206 | continue | |||
|
207 | ||||
|
208 | try: | |||
|
209 | rootmanifest.rev(node) | |||
|
210 | except error.LookupError: | |||
|
211 | fetchnodes.append(node) | |||
|
212 | linkrevs[node] = clrev | |||
|
213 | ||||
|
214 | seen.add(node) | |||
|
215 | ||||
|
216 | # TODO handle tree manifests | |||
|
217 | ||||
|
218 | # addgroup() expects 7-tuple describing revisions. This normalizes | |||
|
219 | # the wire data to that format. | |||
|
220 | def iterrevisions(objs, progress): | |||
|
221 | for manifest in objs: | |||
|
222 | node = manifest[b'node'] | |||
|
223 | ||||
|
224 | if b'deltasize' in manifest: | |||
|
225 | basenode = manifest[b'deltabasenode'] | |||
|
226 | delta = next(objs) | |||
|
227 | elif b'revisionsize' in manifest: | |||
|
228 | basenode = nullid | |||
|
229 | revision = next(objs) | |||
|
230 | delta = mdiff.trivialdiffheader(len(revision)) + revision | |||
|
231 | else: | |||
|
232 | continue | |||
|
233 | ||||
|
234 | yield ( | |||
|
235 | node, | |||
|
236 | manifest[b'parents'][0], | |||
|
237 | manifest[b'parents'][1], | |||
|
238 | # The value passed in is passed to the lookup function passed | |||
|
239 | # to addgroup(). We already have a map of manifest node to | |||
|
240 | # changelog revision number. So we just pass in the | |||
|
241 | # manifest node here and use linkrevs.__getitem__ as the | |||
|
242 | # resolution function. | |||
|
243 | node, | |||
|
244 | basenode, | |||
|
245 | delta, | |||
|
246 | # Flags not yet supported. | |||
|
247 | 0 | |||
|
248 | ) | |||
|
249 | ||||
|
250 | progress.increment() | |||
|
251 | ||||
|
252 | progress = repo.ui.makeprogress(_('manifests'), unit=_('chunks'), | |||
|
253 | total=len(fetchnodes)) | |||
|
254 | ||||
|
255 | # Fetch manifests 10,000 per command. | |||
|
256 | # TODO have server advertise preferences? | |||
|
257 | # TODO make size configurable on client? | |||
|
258 | batchsize = 10000 | |||
|
259 | ||||
|
260 | # We send commands 1 at a time to the remote. This is not the most | |||
|
261 | # efficient because we incur a round trip at the end of each batch. | |||
|
262 | # However, the existing frame-based reactor keeps consuming server | |||
|
263 | # data in the background. And this results in response data buffering | |||
|
264 | # in memory. This can consume gigabytes of memory. | |||
|
265 | # TODO send multiple commands in a request once background buffering | |||
|
266 | # issues are resolved. | |||
|
267 | ||||
|
268 | added = [] | |||
|
269 | ||||
|
270 | for i in pycompat.xrange(0, len(fetchnodes), batchsize): | |||
|
271 | batch = [node for node in fetchnodes[i:i + batchsize]] | |||
|
272 | if not batch: | |||
|
273 | continue | |||
|
274 | ||||
|
275 | with remote.commandexecutor() as e: | |||
|
276 | objs = e.callcommand(b'manifestdata', { | |||
|
277 | b'tree': b'', | |||
|
278 | b'nodes': batch, | |||
|
279 | b'fields': {b'parents', b'revision'}, | |||
|
280 | }).result() | |||
|
281 | ||||
|
282 | # Chomp off header object. | |||
|
283 | next(objs) | |||
|
284 | ||||
|
285 | added.extend(rootmanifest.addgroup( | |||
|
286 | iterrevisions(objs, progress), | |||
|
287 | linkrevs.__getitem__, | |||
|
288 | weakref.proxy(tr))) | |||
|
289 | ||||
|
290 | progress.complete() | |||
|
291 | ||||
|
292 | return { | |||
|
293 | 'added': added, | |||
|
294 | } |
@@ -1,395 +1,485 | |||||
1 | Tests for wire protocol version 2 exchange. |
|
1 | Tests for wire protocol version 2 exchange. | |
2 | Tests in this file should be folded into existing tests once protocol |
|
2 | Tests in this file should be folded into existing tests once protocol | |
3 | v2 has enough features that it can be enabled via #testcase in existing |
|
3 | v2 has enough features that it can be enabled via #testcase in existing | |
4 | tests. |
|
4 | tests. | |
5 |
|
5 | |||
6 | $ . $TESTDIR/wireprotohelpers.sh |
|
6 | $ . $TESTDIR/wireprotohelpers.sh | |
7 | $ enablehttpv2client |
|
7 | $ enablehttpv2client | |
8 |
|
8 | |||
9 | $ hg init server-simple |
|
9 | $ hg init server-simple | |
10 | $ enablehttpv2 server-simple |
|
10 | $ enablehttpv2 server-simple | |
11 | $ cd server-simple |
|
11 | $ cd server-simple | |
12 | $ cat >> .hg/hgrc << EOF |
|
12 | $ cat >> .hg/hgrc << EOF | |
13 | > [phases] |
|
13 | > [phases] | |
14 | > publish = false |
|
14 | > publish = false | |
15 | > EOF |
|
15 | > EOF | |
16 | $ echo a0 > a |
|
16 | $ echo a0 > a | |
17 | $ echo b0 > b |
|
17 | $ echo b0 > b | |
18 | $ hg -q commit -A -m 'commit 0' |
|
18 | $ hg -q commit -A -m 'commit 0' | |
19 |
|
19 | |||
20 | $ echo a1 > a |
|
20 | $ echo a1 > a | |
21 | $ hg commit -m 'commit 1' |
|
21 | $ hg commit -m 'commit 1' | |
22 | $ hg phase --public -r . |
|
22 | $ hg phase --public -r . | |
23 | $ echo a2 > a |
|
23 | $ echo a2 > a | |
24 | $ hg commit -m 'commit 2' |
|
24 | $ hg commit -m 'commit 2' | |
25 |
|
25 | |||
26 | $ hg -q up -r 0 |
|
26 | $ hg -q up -r 0 | |
27 | $ echo b1 > b |
|
27 | $ echo b1 > b | |
28 | $ hg -q commit -m 'head 2 commit 1' |
|
28 | $ hg -q commit -m 'head 2 commit 1' | |
29 | $ echo b2 > b |
|
29 | $ echo b2 > b | |
30 | $ hg -q commit -m 'head 2 commit 2' |
|
30 | $ hg -q commit -m 'head 2 commit 2' | |
31 |
|
31 | |||
32 | $ hg serve -p $HGPORT -d --pid-file hg.pid -E error.log |
|
32 | $ hg serve -p $HGPORT -d --pid-file hg.pid -E error.log | |
33 | $ cat hg.pid > $DAEMON_PIDS |
|
33 | $ cat hg.pid > $DAEMON_PIDS | |
34 |
|
34 | |||
35 | $ cd .. |
|
35 | $ cd .. | |
36 |
|
36 | |||
37 | Test basic clone |
|
37 | Test basic clone | |
38 |
|
38 | |||
39 | $ hg --debug clone -U http://localhost:$HGPORT client-simple |
|
39 | $ hg --debug clone -U http://localhost:$HGPORT client-simple | |
40 | using http://localhost:$HGPORT/ |
|
40 | using http://localhost:$HGPORT/ | |
41 | sending capabilities command |
|
41 | sending capabilities command | |
42 | query 1; heads |
|
42 | query 1; heads | |
43 | sending 2 commands |
|
43 | sending 2 commands | |
44 | sending command heads: {} |
|
44 | sending command heads: {} | |
45 | sending command known: { |
|
45 | sending command known: { | |
46 | 'nodes': [] |
|
46 | 'nodes': [] | |
47 | } |
|
47 | } | |
48 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) |
|
48 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) | |
49 | received frame(size=43; request=1; stream=2; streamflags=; type=command-response; flags=continuation) |
|
49 | received frame(size=43; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |
50 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) |
|
50 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
51 | received frame(size=11; request=3; stream=2; streamflags=; type=command-response; flags=continuation) |
|
51 | received frame(size=11; request=3; stream=2; streamflags=; type=command-response; flags=continuation) | |
52 | received frame(size=1; request=3; stream=2; streamflags=; type=command-response; flags=continuation) |
|
52 | received frame(size=1; request=3; stream=2; streamflags=; type=command-response; flags=continuation) | |
53 | received frame(size=0; request=3; stream=2; streamflags=; type=command-response; flags=eos) |
|
53 | received frame(size=0; request=3; stream=2; streamflags=; type=command-response; flags=eos) | |
54 | sending 1 commands |
|
54 | sending 1 commands | |
55 | sending command changesetdata: { |
|
55 | sending command changesetdata: { | |
56 | 'fields': set([ |
|
56 | 'fields': set([ | |
57 | 'bookmarks', |
|
57 | 'bookmarks', | |
58 | 'parents', |
|
58 | 'parents', | |
59 | 'phase', |
|
59 | 'phase', | |
60 | 'revision' |
|
60 | 'revision' | |
61 | ]), |
|
61 | ]), | |
62 | 'noderange': [ |
|
62 | 'noderange': [ | |
63 | [], |
|
63 | [], | |
64 | [ |
|
64 | [ | |
65 | '\xca\xa2\xa4eE\x1d\xd1\xfa\xcd\xa0\xf5\xb1#\x12\xc3UXA\x88\xa1', |
|
65 | '\xca\xa2\xa4eE\x1d\xd1\xfa\xcd\xa0\xf5\xb1#\x12\xc3UXA\x88\xa1', | |
66 | '\xcd%4vk\xec\xe18\xc7\xc1\xaf\xdch%0/\x0fb\xd8\x1f' |
|
66 | '\xcd%4vk\xec\xe18\xc7\xc1\xaf\xdch%0/\x0fb\xd8\x1f' | |
67 | ] |
|
67 | ] | |
68 | ] |
|
68 | ] | |
69 | } |
|
69 | } | |
70 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) |
|
70 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) | |
71 | received frame(size=871; request=1; stream=2; streamflags=; type=command-response; flags=continuation) |
|
71 | received frame(size=871; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |
72 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) |
|
72 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
73 | add changeset 3390ef850073 |
|
73 | add changeset 3390ef850073 | |
74 | add changeset 4432d83626e8 |
|
74 | add changeset 4432d83626e8 | |
75 | add changeset cd2534766bec |
|
75 | add changeset cd2534766bec | |
76 | add changeset e96ae20f4188 |
|
76 | add changeset e96ae20f4188 | |
77 | add changeset caa2a465451d |
|
77 | add changeset caa2a465451d | |
78 | checking for updated bookmarks |
|
78 | checking for updated bookmarks | |
|
79 | sending 1 commands | |||
|
80 | sending command manifestdata: { | |||
|
81 | 'fields': set([ | |||
|
82 | 'parents', | |||
|
83 | 'revision' | |||
|
84 | ]), | |||
|
85 | 'nodes': [ | |||
|
86 | '\x99/Gy\x02\x9a=\xf8\xd0fm\x00\xbb\x92OicN&A', | |||
|
87 | '\xa9\x88\xfbCX>\x87\x1d\x1e\xd5u\x0e\xe0t\xc6\xd8@\xbb\xbf\xc8', | |||
|
88 | '\xec\x80NH\x8c \x88\xc25\t\x9a\x10 u\x13\xbe\xcd\xc3\xdd\xa5', | |||
|
89 | '\x04\\\x7f9\'\xda\x13\xe7Z\xf8\xf0\xe4\xf0HI\xe4a\xa9x\x0f', | |||
|
90 | '7\x9c\xb0\xc2\xe6d\\y\xdd\xc5\x9a\x1dG\'\xa9\xfb\x83\n\xeb&' | |||
|
91 | ], | |||
|
92 | 'tree': '' | |||
|
93 | } | |||
|
94 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) | |||
|
95 | received frame(size=922; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |||
|
96 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |||
79 | updating the branch cache |
|
97 | updating the branch cache | |
80 | new changesets 3390ef850073:caa2a465451d (3 drafts) |
|
98 | new changesets 3390ef850073:caa2a465451d (3 drafts) | |
81 |
|
99 | |||
82 | All changesets should have been transferred |
|
100 | All changesets should have been transferred | |
83 |
|
101 | |||
84 | $ hg -R client-simple debugindex -c |
|
102 | $ hg -R client-simple debugindex -c | |
85 | rev linkrev nodeid p1 p2 |
|
103 | rev linkrev nodeid p1 p2 | |
86 | 0 0 3390ef850073 000000000000 000000000000 |
|
104 | 0 0 3390ef850073 000000000000 000000000000 | |
87 | 1 1 4432d83626e8 3390ef850073 000000000000 |
|
105 | 1 1 4432d83626e8 3390ef850073 000000000000 | |
88 | 2 2 cd2534766bec 4432d83626e8 000000000000 |
|
106 | 2 2 cd2534766bec 4432d83626e8 000000000000 | |
89 | 3 3 e96ae20f4188 3390ef850073 000000000000 |
|
107 | 3 3 e96ae20f4188 3390ef850073 000000000000 | |
90 | 4 4 caa2a465451d e96ae20f4188 000000000000 |
|
108 | 4 4 caa2a465451d e96ae20f4188 000000000000 | |
91 |
|
109 | |||
92 | $ hg -R client-simple log -G -T '{rev} {node} {phase}\n' |
|
110 | $ hg -R client-simple log -G -T '{rev} {node} {phase}\n' | |
93 | o 4 caa2a465451dd1facda0f5b12312c355584188a1 draft |
|
111 | o 4 caa2a465451dd1facda0f5b12312c355584188a1 draft | |
94 | | |
|
112 | | | |
95 | o 3 e96ae20f4188487b9ae4ef3941c27c81143146e5 draft |
|
113 | o 3 e96ae20f4188487b9ae4ef3941c27c81143146e5 draft | |
96 | | |
|
114 | | | |
97 | | o 2 cd2534766bece138c7c1afdc6825302f0f62d81f draft |
|
115 | | o 2 cd2534766bece138c7c1afdc6825302f0f62d81f draft | |
98 | | | |
|
116 | | | | |
99 | | o 1 4432d83626e8a98655f062ec1f2a43b07f7fbbb0 public |
|
117 | | o 1 4432d83626e8a98655f062ec1f2a43b07f7fbbb0 public | |
100 | |/ |
|
118 | |/ | |
101 | o 0 3390ef850073fbc2f0dfff2244342c8e9229013a public |
|
119 | o 0 3390ef850073fbc2f0dfff2244342c8e9229013a public | |
102 |
|
120 | |||
103 |
|
121 | |||
|
122 | All manifests should have been transferred | |||
|
123 | ||||
|
124 | $ hg -R client-simple debugindex -m | |||
|
125 | rev linkrev nodeid p1 p2 | |||
|
126 | 0 0 992f4779029a 000000000000 000000000000 | |||
|
127 | 1 1 a988fb43583e 992f4779029a 000000000000 | |||
|
128 | 2 2 ec804e488c20 a988fb43583e 000000000000 | |||
|
129 | 3 3 045c7f3927da 992f4779029a 000000000000 | |||
|
130 | 4 4 379cb0c2e664 045c7f3927da 000000000000 | |||
|
131 | ||||
104 | Cloning only a specific revision works |
|
132 | Cloning only a specific revision works | |
105 |
|
133 | |||
106 | $ hg --debug clone -U -r 4432d83626e8 http://localhost:$HGPORT client-singlehead |
|
134 | $ hg --debug clone -U -r 4432d83626e8 http://localhost:$HGPORT client-singlehead | |
107 | using http://localhost:$HGPORT/ |
|
135 | using http://localhost:$HGPORT/ | |
108 | sending capabilities command |
|
136 | sending capabilities command | |
109 | sending 1 commands |
|
137 | sending 1 commands | |
110 | sending command lookup: { |
|
138 | sending command lookup: { | |
111 | 'key': '4432d83626e8' |
|
139 | 'key': '4432d83626e8' | |
112 | } |
|
140 | } | |
113 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) |
|
141 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) | |
114 | received frame(size=21; request=1; stream=2; streamflags=; type=command-response; flags=continuation) |
|
142 | received frame(size=21; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |
115 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) |
|
143 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
116 | query 1; heads |
|
144 | query 1; heads | |
117 | sending 2 commands |
|
145 | sending 2 commands | |
118 | sending command heads: {} |
|
146 | sending command heads: {} | |
119 | sending command known: { |
|
147 | sending command known: { | |
120 | 'nodes': [] |
|
148 | 'nodes': [] | |
121 | } |
|
149 | } | |
122 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) |
|
150 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) | |
123 | received frame(size=43; request=1; stream=2; streamflags=; type=command-response; flags=continuation) |
|
151 | received frame(size=43; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |
124 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) |
|
152 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
125 | received frame(size=11; request=3; stream=2; streamflags=; type=command-response; flags=continuation) |
|
153 | received frame(size=11; request=3; stream=2; streamflags=; type=command-response; flags=continuation) | |
126 | received frame(size=1; request=3; stream=2; streamflags=; type=command-response; flags=continuation) |
|
154 | received frame(size=1; request=3; stream=2; streamflags=; type=command-response; flags=continuation) | |
127 | received frame(size=0; request=3; stream=2; streamflags=; type=command-response; flags=eos) |
|
155 | received frame(size=0; request=3; stream=2; streamflags=; type=command-response; flags=eos) | |
128 | sending 1 commands |
|
156 | sending 1 commands | |
129 | sending command changesetdata: { |
|
157 | sending command changesetdata: { | |
130 | 'fields': set([ |
|
158 | 'fields': set([ | |
131 | 'bookmarks', |
|
159 | 'bookmarks', | |
132 | 'parents', |
|
160 | 'parents', | |
133 | 'phase', |
|
161 | 'phase', | |
134 | 'revision' |
|
162 | 'revision' | |
135 | ]), |
|
163 | ]), | |
136 | 'noderange': [ |
|
164 | 'noderange': [ | |
137 | [], |
|
165 | [], | |
138 | [ |
|
166 | [ | |
139 | 'D2\xd86&\xe8\xa9\x86U\xf0b\xec\x1f*C\xb0\x7f\x7f\xbb\xb0' |
|
167 | 'D2\xd86&\xe8\xa9\x86U\xf0b\xec\x1f*C\xb0\x7f\x7f\xbb\xb0' | |
140 | ] |
|
168 | ] | |
141 | ] |
|
169 | ] | |
142 | } |
|
170 | } | |
143 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) |
|
171 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) | |
144 | received frame(size=353; request=1; stream=2; streamflags=; type=command-response; flags=continuation) |
|
172 | received frame(size=353; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |
145 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) |
|
173 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
146 | add changeset 3390ef850073 |
|
174 | add changeset 3390ef850073 | |
147 | add changeset 4432d83626e8 |
|
175 | add changeset 4432d83626e8 | |
148 | checking for updated bookmarks |
|
176 | checking for updated bookmarks | |
|
177 | sending 1 commands | |||
|
178 | sending command manifestdata: { | |||
|
179 | 'fields': set([ | |||
|
180 | 'parents', | |||
|
181 | 'revision' | |||
|
182 | ]), | |||
|
183 | 'nodes': [ | |||
|
184 | '\x99/Gy\x02\x9a=\xf8\xd0fm\x00\xbb\x92OicN&A', | |||
|
185 | '\xa9\x88\xfbCX>\x87\x1d\x1e\xd5u\x0e\xe0t\xc6\xd8@\xbb\xbf\xc8' | |||
|
186 | ], | |||
|
187 | 'tree': '' | |||
|
188 | } | |||
|
189 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) | |||
|
190 | received frame(size=376; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |||
|
191 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |||
149 | updating the branch cache |
|
192 | updating the branch cache | |
150 | new changesets 3390ef850073:4432d83626e8 |
|
193 | new changesets 3390ef850073:4432d83626e8 | |
151 |
|
194 | |||
152 | $ cd client-singlehead |
|
195 | $ cd client-singlehead | |
153 |
|
196 | |||
154 | $ hg log -G -T '{rev} {node} {phase}\n' |
|
197 | $ hg log -G -T '{rev} {node} {phase}\n' | |
155 | o 1 4432d83626e8a98655f062ec1f2a43b07f7fbbb0 public |
|
198 | o 1 4432d83626e8a98655f062ec1f2a43b07f7fbbb0 public | |
156 | | |
|
199 | | | |
157 | o 0 3390ef850073fbc2f0dfff2244342c8e9229013a public |
|
200 | o 0 3390ef850073fbc2f0dfff2244342c8e9229013a public | |
158 |
|
201 | |||
159 |
|
202 | |||
|
203 | $ hg debugindex -m | |||
|
204 | rev linkrev nodeid p1 p2 | |||
|
205 | 0 0 992f4779029a 000000000000 000000000000 | |||
|
206 | 1 1 a988fb43583e 992f4779029a 000000000000 | |||
|
207 | ||||
160 | Incremental pull works |
|
208 | Incremental pull works | |
161 |
|
209 | |||
162 | $ hg --debug pull |
|
210 | $ hg --debug pull | |
163 | pulling from http://localhost:$HGPORT/ |
|
211 | pulling from http://localhost:$HGPORT/ | |
164 | using http://localhost:$HGPORT/ |
|
212 | using http://localhost:$HGPORT/ | |
165 | sending capabilities command |
|
213 | sending capabilities command | |
166 | query 1; heads |
|
214 | query 1; heads | |
167 | sending 2 commands |
|
215 | sending 2 commands | |
168 | sending command heads: {} |
|
216 | sending command heads: {} | |
169 | sending command known: { |
|
217 | sending command known: { | |
170 | 'nodes': [ |
|
218 | 'nodes': [ | |
171 | 'D2\xd86&\xe8\xa9\x86U\xf0b\xec\x1f*C\xb0\x7f\x7f\xbb\xb0' |
|
219 | 'D2\xd86&\xe8\xa9\x86U\xf0b\xec\x1f*C\xb0\x7f\x7f\xbb\xb0' | |
172 | ] |
|
220 | ] | |
173 | } |
|
221 | } | |
174 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) |
|
222 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) | |
175 | received frame(size=43; request=1; stream=2; streamflags=; type=command-response; flags=continuation) |
|
223 | received frame(size=43; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |
176 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) |
|
224 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
177 | received frame(size=11; request=3; stream=2; streamflags=; type=command-response; flags=continuation) |
|
225 | received frame(size=11; request=3; stream=2; streamflags=; type=command-response; flags=continuation) | |
178 | received frame(size=2; request=3; stream=2; streamflags=; type=command-response; flags=continuation) |
|
226 | received frame(size=2; request=3; stream=2; streamflags=; type=command-response; flags=continuation) | |
179 | received frame(size=0; request=3; stream=2; streamflags=; type=command-response; flags=eos) |
|
227 | received frame(size=0; request=3; stream=2; streamflags=; type=command-response; flags=eos) | |
180 | searching for changes |
|
228 | searching for changes | |
181 | all local heads known remotely |
|
229 | all local heads known remotely | |
182 | sending 1 commands |
|
230 | sending 1 commands | |
183 | sending command changesetdata: { |
|
231 | sending command changesetdata: { | |
184 | 'fields': set([ |
|
232 | 'fields': set([ | |
185 | 'bookmarks', |
|
233 | 'bookmarks', | |
186 | 'parents', |
|
234 | 'parents', | |
187 | 'phase', |
|
235 | 'phase', | |
188 | 'revision' |
|
236 | 'revision' | |
189 | ]), |
|
237 | ]), | |
190 | 'noderange': [ |
|
238 | 'noderange': [ | |
191 | [ |
|
239 | [ | |
192 | 'D2\xd86&\xe8\xa9\x86U\xf0b\xec\x1f*C\xb0\x7f\x7f\xbb\xb0' |
|
240 | 'D2\xd86&\xe8\xa9\x86U\xf0b\xec\x1f*C\xb0\x7f\x7f\xbb\xb0' | |
193 | ], |
|
241 | ], | |
194 | [ |
|
242 | [ | |
195 | '\xca\xa2\xa4eE\x1d\xd1\xfa\xcd\xa0\xf5\xb1#\x12\xc3UXA\x88\xa1', |
|
243 | '\xca\xa2\xa4eE\x1d\xd1\xfa\xcd\xa0\xf5\xb1#\x12\xc3UXA\x88\xa1', | |
196 | '\xcd%4vk\xec\xe18\xc7\xc1\xaf\xdch%0/\x0fb\xd8\x1f' |
|
244 | '\xcd%4vk\xec\xe18\xc7\xc1\xaf\xdch%0/\x0fb\xd8\x1f' | |
197 | ] |
|
245 | ] | |
198 | ] |
|
246 | ] | |
199 | } |
|
247 | } | |
200 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) |
|
248 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) | |
201 | received frame(size=571; request=1; stream=2; streamflags=; type=command-response; flags=continuation) |
|
249 | received frame(size=571; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |
202 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) |
|
250 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
203 | add changeset cd2534766bec |
|
251 | add changeset cd2534766bec | |
204 | add changeset e96ae20f4188 |
|
252 | add changeset e96ae20f4188 | |
205 | add changeset caa2a465451d |
|
253 | add changeset caa2a465451d | |
206 | checking for updated bookmarks |
|
254 | checking for updated bookmarks | |
|
255 | sending 1 commands | |||
|
256 | sending command manifestdata: { | |||
|
257 | 'fields': set([ | |||
|
258 | 'parents', | |||
|
259 | 'revision' | |||
|
260 | ]), | |||
|
261 | 'nodes': [ | |||
|
262 | '\xec\x80NH\x8c \x88\xc25\t\x9a\x10 u\x13\xbe\xcd\xc3\xdd\xa5', | |||
|
263 | '\x04\\\x7f9\'\xda\x13\xe7Z\xf8\xf0\xe4\xf0HI\xe4a\xa9x\x0f', | |||
|
264 | '7\x9c\xb0\xc2\xe6d\\y\xdd\xc5\x9a\x1dG\'\xa9\xfb\x83\n\xeb&' | |||
|
265 | ], | |||
|
266 | 'tree': '' | |||
|
267 | } | |||
|
268 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) | |||
|
269 | received frame(size=559; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |||
|
270 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |||
207 | updating the branch cache |
|
271 | updating the branch cache | |
208 | new changesets cd2534766bec:caa2a465451d (3 drafts) |
|
272 | new changesets cd2534766bec:caa2a465451d (3 drafts) | |
209 | (run 'hg update' to get a working copy) |
|
273 | (run 'hg update' to get a working copy) | |
210 |
|
274 | |||
211 | $ hg log -G -T '{rev} {node} {phase}\n' |
|
275 | $ hg log -G -T '{rev} {node} {phase}\n' | |
212 | o 4 caa2a465451dd1facda0f5b12312c355584188a1 draft |
|
276 | o 4 caa2a465451dd1facda0f5b12312c355584188a1 draft | |
213 | | |
|
277 | | | |
214 | o 3 e96ae20f4188487b9ae4ef3941c27c81143146e5 draft |
|
278 | o 3 e96ae20f4188487b9ae4ef3941c27c81143146e5 draft | |
215 | | |
|
279 | | | |
216 | | o 2 cd2534766bece138c7c1afdc6825302f0f62d81f draft |
|
280 | | o 2 cd2534766bece138c7c1afdc6825302f0f62d81f draft | |
217 | | | |
|
281 | | | | |
218 | | o 1 4432d83626e8a98655f062ec1f2a43b07f7fbbb0 public |
|
282 | | o 1 4432d83626e8a98655f062ec1f2a43b07f7fbbb0 public | |
219 | |/ |
|
283 | |/ | |
220 | o 0 3390ef850073fbc2f0dfff2244342c8e9229013a public |
|
284 | o 0 3390ef850073fbc2f0dfff2244342c8e9229013a public | |
221 |
|
285 | |||
222 |
|
286 | |||
|
287 | $ hg debugindex -m | |||
|
288 | rev linkrev nodeid p1 p2 | |||
|
289 | 0 0 992f4779029a 000000000000 000000000000 | |||
|
290 | 1 1 a988fb43583e 992f4779029a 000000000000 | |||
|
291 | 2 2 ec804e488c20 a988fb43583e 000000000000 | |||
|
292 | 3 3 045c7f3927da 992f4779029a 000000000000 | |||
|
293 | 4 4 379cb0c2e664 045c7f3927da 000000000000 | |||
|
294 | ||||
223 | Phase-only update works |
|
295 | Phase-only update works | |
224 |
|
296 | |||
225 | $ hg -R ../server-simple phase --public -r caa2a465451dd |
|
297 | $ hg -R ../server-simple phase --public -r caa2a465451dd | |
226 | $ hg --debug pull |
|
298 | $ hg --debug pull | |
227 | pulling from http://localhost:$HGPORT/ |
|
299 | pulling from http://localhost:$HGPORT/ | |
228 | using http://localhost:$HGPORT/ |
|
300 | using http://localhost:$HGPORT/ | |
229 | sending capabilities command |
|
301 | sending capabilities command | |
230 | query 1; heads |
|
302 | query 1; heads | |
231 | sending 2 commands |
|
303 | sending 2 commands | |
232 | sending command heads: {} |
|
304 | sending command heads: {} | |
233 | sending command known: { |
|
305 | sending command known: { | |
234 | 'nodes': [ |
|
306 | 'nodes': [ | |
235 | '\xcd%4vk\xec\xe18\xc7\xc1\xaf\xdch%0/\x0fb\xd8\x1f', |
|
307 | '\xcd%4vk\xec\xe18\xc7\xc1\xaf\xdch%0/\x0fb\xd8\x1f', | |
236 | '\xca\xa2\xa4eE\x1d\xd1\xfa\xcd\xa0\xf5\xb1#\x12\xc3UXA\x88\xa1' |
|
308 | '\xca\xa2\xa4eE\x1d\xd1\xfa\xcd\xa0\xf5\xb1#\x12\xc3UXA\x88\xa1' | |
237 | ] |
|
309 | ] | |
238 | } |
|
310 | } | |
239 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) |
|
311 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) | |
240 | received frame(size=43; request=1; stream=2; streamflags=; type=command-response; flags=continuation) |
|
312 | received frame(size=43; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |
241 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) |
|
313 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
242 | received frame(size=11; request=3; stream=2; streamflags=; type=command-response; flags=continuation) |
|
314 | received frame(size=11; request=3; stream=2; streamflags=; type=command-response; flags=continuation) | |
243 | received frame(size=3; request=3; stream=2; streamflags=; type=command-response; flags=continuation) |
|
315 | received frame(size=3; request=3; stream=2; streamflags=; type=command-response; flags=continuation) | |
244 | received frame(size=0; request=3; stream=2; streamflags=; type=command-response; flags=eos) |
|
316 | received frame(size=0; request=3; stream=2; streamflags=; type=command-response; flags=eos) | |
245 | searching for changes |
|
317 | searching for changes | |
246 | all remote heads known locally |
|
318 | all remote heads known locally | |
247 | sending 1 commands |
|
319 | sending 1 commands | |
248 | sending command changesetdata: { |
|
320 | sending command changesetdata: { | |
249 | 'fields': set([ |
|
321 | 'fields': set([ | |
250 | 'bookmarks', |
|
322 | 'bookmarks', | |
251 | 'parents', |
|
323 | 'parents', | |
252 | 'phase', |
|
324 | 'phase', | |
253 | 'revision' |
|
325 | 'revision' | |
254 | ]), |
|
326 | ]), | |
255 | 'noderange': [ |
|
327 | 'noderange': [ | |
256 | [ |
|
328 | [ | |
257 | '\xca\xa2\xa4eE\x1d\xd1\xfa\xcd\xa0\xf5\xb1#\x12\xc3UXA\x88\xa1', |
|
329 | '\xca\xa2\xa4eE\x1d\xd1\xfa\xcd\xa0\xf5\xb1#\x12\xc3UXA\x88\xa1', | |
258 | '\xcd%4vk\xec\xe18\xc7\xc1\xaf\xdch%0/\x0fb\xd8\x1f' |
|
330 | '\xcd%4vk\xec\xe18\xc7\xc1\xaf\xdch%0/\x0fb\xd8\x1f' | |
259 | ], |
|
331 | ], | |
260 | [ |
|
332 | [ | |
261 | '\xca\xa2\xa4eE\x1d\xd1\xfa\xcd\xa0\xf5\xb1#\x12\xc3UXA\x88\xa1', |
|
333 | '\xca\xa2\xa4eE\x1d\xd1\xfa\xcd\xa0\xf5\xb1#\x12\xc3UXA\x88\xa1', | |
262 | '\xcd%4vk\xec\xe18\xc7\xc1\xaf\xdch%0/\x0fb\xd8\x1f' |
|
334 | '\xcd%4vk\xec\xe18\xc7\xc1\xaf\xdch%0/\x0fb\xd8\x1f' | |
263 | ] |
|
335 | ] | |
264 | ] |
|
336 | ] | |
265 | } |
|
337 | } | |
266 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) |
|
338 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) | |
267 | received frame(size=92; request=1; stream=2; streamflags=; type=command-response; flags=continuation) |
|
339 | received frame(size=92; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |
268 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) |
|
340 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
269 | checking for updated bookmarks |
|
341 | checking for updated bookmarks | |
270 | 2 local changesets published |
|
342 | 2 local changesets published | |
271 | (run 'hg update' to get a working copy) |
|
343 | (run 'hg update' to get a working copy) | |
272 |
|
344 | |||
273 | $ hg log -G -T '{rev} {node} {phase}\n' |
|
345 | $ hg log -G -T '{rev} {node} {phase}\n' | |
274 | o 4 caa2a465451dd1facda0f5b12312c355584188a1 public |
|
346 | o 4 caa2a465451dd1facda0f5b12312c355584188a1 public | |
275 | | |
|
347 | | | |
276 | o 3 e96ae20f4188487b9ae4ef3941c27c81143146e5 public |
|
348 | o 3 e96ae20f4188487b9ae4ef3941c27c81143146e5 public | |
277 | | |
|
349 | | | |
278 | | o 2 cd2534766bece138c7c1afdc6825302f0f62d81f draft |
|
350 | | o 2 cd2534766bece138c7c1afdc6825302f0f62d81f draft | |
279 | | | |
|
351 | | | | |
280 | | o 1 4432d83626e8a98655f062ec1f2a43b07f7fbbb0 public |
|
352 | | o 1 4432d83626e8a98655f062ec1f2a43b07f7fbbb0 public | |
281 | |/ |
|
353 | |/ | |
282 | o 0 3390ef850073fbc2f0dfff2244342c8e9229013a public |
|
354 | o 0 3390ef850073fbc2f0dfff2244342c8e9229013a public | |
283 |
|
355 | |||
284 |
|
356 | |||
285 | $ cd .. |
|
357 | $ cd .. | |
286 |
|
358 | |||
287 | Bookmarks are transferred on clone |
|
359 | Bookmarks are transferred on clone | |
288 |
|
360 | |||
289 | $ hg -R server-simple bookmark -r 3390ef850073fbc2f0dfff2244342c8e9229013a book-1 |
|
361 | $ hg -R server-simple bookmark -r 3390ef850073fbc2f0dfff2244342c8e9229013a book-1 | |
290 | $ hg -R server-simple bookmark -r cd2534766bece138c7c1afdc6825302f0f62d81f book-2 |
|
362 | $ hg -R server-simple bookmark -r cd2534766bece138c7c1afdc6825302f0f62d81f book-2 | |
291 |
|
363 | |||
292 | $ hg --debug clone -U http://localhost:$HGPORT/ client-bookmarks |
|
364 | $ hg --debug clone -U http://localhost:$HGPORT/ client-bookmarks | |
293 | using http://localhost:$HGPORT/ |
|
365 | using http://localhost:$HGPORT/ | |
294 | sending capabilities command |
|
366 | sending capabilities command | |
295 | query 1; heads |
|
367 | query 1; heads | |
296 | sending 2 commands |
|
368 | sending 2 commands | |
297 | sending command heads: {} |
|
369 | sending command heads: {} | |
298 | sending command known: { |
|
370 | sending command known: { | |
299 | 'nodes': [] |
|
371 | 'nodes': [] | |
300 | } |
|
372 | } | |
301 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) |
|
373 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) | |
302 | received frame(size=43; request=1; stream=2; streamflags=; type=command-response; flags=continuation) |
|
374 | received frame(size=43; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |
303 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) |
|
375 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
304 | received frame(size=11; request=3; stream=2; streamflags=; type=command-response; flags=continuation) |
|
376 | received frame(size=11; request=3; stream=2; streamflags=; type=command-response; flags=continuation) | |
305 | received frame(size=1; request=3; stream=2; streamflags=; type=command-response; flags=continuation) |
|
377 | received frame(size=1; request=3; stream=2; streamflags=; type=command-response; flags=continuation) | |
306 | received frame(size=0; request=3; stream=2; streamflags=; type=command-response; flags=eos) |
|
378 | received frame(size=0; request=3; stream=2; streamflags=; type=command-response; flags=eos) | |
307 | sending 1 commands |
|
379 | sending 1 commands | |
308 | sending command changesetdata: { |
|
380 | sending command changesetdata: { | |
309 | 'fields': set([ |
|
381 | 'fields': set([ | |
310 | 'bookmarks', |
|
382 | 'bookmarks', | |
311 | 'parents', |
|
383 | 'parents', | |
312 | 'phase', |
|
384 | 'phase', | |
313 | 'revision' |
|
385 | 'revision' | |
314 | ]), |
|
386 | ]), | |
315 | 'noderange': [ |
|
387 | 'noderange': [ | |
316 | [], |
|
388 | [], | |
317 | [ |
|
389 | [ | |
318 | '\xca\xa2\xa4eE\x1d\xd1\xfa\xcd\xa0\xf5\xb1#\x12\xc3UXA\x88\xa1', |
|
390 | '\xca\xa2\xa4eE\x1d\xd1\xfa\xcd\xa0\xf5\xb1#\x12\xc3UXA\x88\xa1', | |
319 | '\xcd%4vk\xec\xe18\xc7\xc1\xaf\xdch%0/\x0fb\xd8\x1f' |
|
391 | '\xcd%4vk\xec\xe18\xc7\xc1\xaf\xdch%0/\x0fb\xd8\x1f' | |
320 | ] |
|
392 | ] | |
321 | ] |
|
393 | ] | |
322 | } |
|
394 | } | |
323 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) |
|
395 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) | |
324 | received frame(size=909; request=1; stream=2; streamflags=; type=command-response; flags=continuation) |
|
396 | received frame(size=909; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |
325 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) |
|
397 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
326 | add changeset 3390ef850073 |
|
398 | add changeset 3390ef850073 | |
327 | add changeset 4432d83626e8 |
|
399 | add changeset 4432d83626e8 | |
328 | add changeset cd2534766bec |
|
400 | add changeset cd2534766bec | |
329 | add changeset e96ae20f4188 |
|
401 | add changeset e96ae20f4188 | |
330 | add changeset caa2a465451d |
|
402 | add changeset caa2a465451d | |
331 | checking for updated bookmarks |
|
403 | checking for updated bookmarks | |
332 | adding remote bookmark book-1 |
|
404 | adding remote bookmark book-1 | |
333 | adding remote bookmark book-2 |
|
405 | adding remote bookmark book-2 | |
|
406 | sending 1 commands | |||
|
407 | sending command manifestdata: { | |||
|
408 | 'fields': set([ | |||
|
409 | 'parents', | |||
|
410 | 'revision' | |||
|
411 | ]), | |||
|
412 | 'nodes': [ | |||
|
413 | '\x99/Gy\x02\x9a=\xf8\xd0fm\x00\xbb\x92OicN&A', | |||
|
414 | '\xa9\x88\xfbCX>\x87\x1d\x1e\xd5u\x0e\xe0t\xc6\xd8@\xbb\xbf\xc8', | |||
|
415 | '\xec\x80NH\x8c \x88\xc25\t\x9a\x10 u\x13\xbe\xcd\xc3\xdd\xa5', | |||
|
416 | '\x04\\\x7f9\'\xda\x13\xe7Z\xf8\xf0\xe4\xf0HI\xe4a\xa9x\x0f', | |||
|
417 | '7\x9c\xb0\xc2\xe6d\\y\xdd\xc5\x9a\x1dG\'\xa9\xfb\x83\n\xeb&' | |||
|
418 | ], | |||
|
419 | 'tree': '' | |||
|
420 | } | |||
|
421 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) | |||
|
422 | received frame(size=922; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |||
|
423 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |||
334 | updating the branch cache |
|
424 | updating the branch cache | |
335 | new changesets 3390ef850073:caa2a465451d (1 drafts) |
|
425 | new changesets 3390ef850073:caa2a465451d (1 drafts) | |
336 |
|
426 | |||
337 | $ hg -R client-bookmarks bookmarks |
|
427 | $ hg -R client-bookmarks bookmarks | |
338 | book-1 0:3390ef850073 |
|
428 | book-1 0:3390ef850073 | |
339 | book-2 2:cd2534766bec |
|
429 | book-2 2:cd2534766bec | |
340 |
|
430 | |||
341 | Server-side bookmark moves are reflected during `hg pull` |
|
431 | Server-side bookmark moves are reflected during `hg pull` | |
342 |
|
432 | |||
343 | $ hg -R server-simple bookmark -r cd2534766bece138c7c1afdc6825302f0f62d81f book-1 |
|
433 | $ hg -R server-simple bookmark -r cd2534766bece138c7c1afdc6825302f0f62d81f book-1 | |
344 | moving bookmark 'book-1' forward from 3390ef850073 |
|
434 | moving bookmark 'book-1' forward from 3390ef850073 | |
345 |
|
435 | |||
346 | $ hg -R client-bookmarks --debug pull |
|
436 | $ hg -R client-bookmarks --debug pull | |
347 | pulling from http://localhost:$HGPORT/ |
|
437 | pulling from http://localhost:$HGPORT/ | |
348 | using http://localhost:$HGPORT/ |
|
438 | using http://localhost:$HGPORT/ | |
349 | sending capabilities command |
|
439 | sending capabilities command | |
350 | query 1; heads |
|
440 | query 1; heads | |
351 | sending 2 commands |
|
441 | sending 2 commands | |
352 | sending command heads: {} |
|
442 | sending command heads: {} | |
353 | sending command known: { |
|
443 | sending command known: { | |
354 | 'nodes': [ |
|
444 | 'nodes': [ | |
355 | '\xcd%4vk\xec\xe18\xc7\xc1\xaf\xdch%0/\x0fb\xd8\x1f', |
|
445 | '\xcd%4vk\xec\xe18\xc7\xc1\xaf\xdch%0/\x0fb\xd8\x1f', | |
356 | '\xca\xa2\xa4eE\x1d\xd1\xfa\xcd\xa0\xf5\xb1#\x12\xc3UXA\x88\xa1' |
|
446 | '\xca\xa2\xa4eE\x1d\xd1\xfa\xcd\xa0\xf5\xb1#\x12\xc3UXA\x88\xa1' | |
357 | ] |
|
447 | ] | |
358 | } |
|
448 | } | |
359 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) |
|
449 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) | |
360 | received frame(size=43; request=1; stream=2; streamflags=; type=command-response; flags=continuation) |
|
450 | received frame(size=43; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |
361 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) |
|
451 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
362 | received frame(size=11; request=3; stream=2; streamflags=; type=command-response; flags=continuation) |
|
452 | received frame(size=11; request=3; stream=2; streamflags=; type=command-response; flags=continuation) | |
363 | received frame(size=3; request=3; stream=2; streamflags=; type=command-response; flags=continuation) |
|
453 | received frame(size=3; request=3; stream=2; streamflags=; type=command-response; flags=continuation) | |
364 | received frame(size=0; request=3; stream=2; streamflags=; type=command-response; flags=eos) |
|
454 | received frame(size=0; request=3; stream=2; streamflags=; type=command-response; flags=eos) | |
365 | searching for changes |
|
455 | searching for changes | |
366 | all remote heads known locally |
|
456 | all remote heads known locally | |
367 | sending 1 commands |
|
457 | sending 1 commands | |
368 | sending command changesetdata: { |
|
458 | sending command changesetdata: { | |
369 | 'fields': set([ |
|
459 | 'fields': set([ | |
370 | 'bookmarks', |
|
460 | 'bookmarks', | |
371 | 'parents', |
|
461 | 'parents', | |
372 | 'phase', |
|
462 | 'phase', | |
373 | 'revision' |
|
463 | 'revision' | |
374 | ]), |
|
464 | ]), | |
375 | 'noderange': [ |
|
465 | 'noderange': [ | |
376 | [ |
|
466 | [ | |
377 | '\xca\xa2\xa4eE\x1d\xd1\xfa\xcd\xa0\xf5\xb1#\x12\xc3UXA\x88\xa1', |
|
467 | '\xca\xa2\xa4eE\x1d\xd1\xfa\xcd\xa0\xf5\xb1#\x12\xc3UXA\x88\xa1', | |
378 | '\xcd%4vk\xec\xe18\xc7\xc1\xaf\xdch%0/\x0fb\xd8\x1f' |
|
468 | '\xcd%4vk\xec\xe18\xc7\xc1\xaf\xdch%0/\x0fb\xd8\x1f' | |
379 | ], |
|
469 | ], | |
380 | [ |
|
470 | [ | |
381 | '\xca\xa2\xa4eE\x1d\xd1\xfa\xcd\xa0\xf5\xb1#\x12\xc3UXA\x88\xa1', |
|
471 | '\xca\xa2\xa4eE\x1d\xd1\xfa\xcd\xa0\xf5\xb1#\x12\xc3UXA\x88\xa1', | |
382 | '\xcd%4vk\xec\xe18\xc7\xc1\xaf\xdch%0/\x0fb\xd8\x1f' |
|
472 | '\xcd%4vk\xec\xe18\xc7\xc1\xaf\xdch%0/\x0fb\xd8\x1f' | |
383 | ] |
|
473 | ] | |
384 | ] |
|
474 | ] | |
385 | } |
|
475 | } | |
386 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) |
|
476 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) | |
387 | received frame(size=144; request=1; stream=2; streamflags=; type=command-response; flags=continuation) |
|
477 | received frame(size=144; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |
388 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) |
|
478 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
389 | checking for updated bookmarks |
|
479 | checking for updated bookmarks | |
390 | updating bookmark book-1 |
|
480 | updating bookmark book-1 | |
391 | (run 'hg update' to get a working copy) |
|
481 | (run 'hg update' to get a working copy) | |
392 |
|
482 | |||
393 | $ hg -R client-bookmarks bookmarks |
|
483 | $ hg -R client-bookmarks bookmarks | |
394 | book-1 2:cd2534766bec |
|
484 | book-1 2:cd2534766bec | |
395 | book-2 2:cd2534766bec |
|
485 | book-2 2:cd2534766bec |
General Comments 0
You need to be logged in to leave comments.
Login now