Mercurial > hg
annotate tests/test-wireproto-command-listkeys.t @ 40343:a69d5823af6d
tests: add test for widening from an empty clone
Narrow clones that track no paths currently don't even include the
root manifest (which is the only manifest when using flat
manifests). That means that when we widen from such a clone, we need
to make sure that we send the root manifest (and other manifests if
using tree manifests). That currently works because we always resend
all manifest that match the new narrowspec. However, we're about to
stop resending manifests that the client already has and there's a
risk of this breaking then, so let's add a test.
Differential Revision: https://phab.mercurial-scm.org/D5143
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 17 Oct 2018 09:30:07 -0700 |
parents | a732d70253b0 |
children |
rev | line source |
---|---|
37487
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1 $ . $TESTDIR/wireprotohelpers.sh |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
2 |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
3 $ hg init server |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
4 $ enablehttpv2 server |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
5 $ cd server |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
6 $ hg debugdrawdag << EOF |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
7 > C D |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
8 > |/ |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
9 > B |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
10 > | |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
11 > A |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
12 > EOF |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
13 |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
14 $ hg phase --public -r C |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
15 $ hg book -r C @ |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
16 |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
17 $ hg log -T '{rev}:{node} {desc}\n' |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
18 3:be0ef73c17ade3fc89dc41701eb9fc3a91b58282 D |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
19 2:26805aba1e600a82e93661149f2313866a221a7b C |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
20 1:112478962961147124edd43549aedd1a335e44bf B |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
21 0:426bada5c67598ca65036d57d9e4b64b0c1ce7a0 A |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
22 |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
23 $ hg serve -p $HGPORT -d --pid-file hg.pid -E error.log |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
24 $ cat hg.pid > $DAEMON_PIDS |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
25 |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
26 Request for namespaces works |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
27 |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
28 $ sendhttpv2peer << EOF |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
29 > command listkeys |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
30 > namespace namespaces |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
31 > EOF |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
32 creating http peer for wire protocol version 2 |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
33 sending listkeys command |
39378
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37725
diff
changeset
|
34 response: { |
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37725
diff
changeset
|
35 b'bookmarks': b'', |
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37725
diff
changeset
|
36 b'namespaces': b'', |
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37725
diff
changeset
|
37 b'phases': b'' |
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37725
diff
changeset
|
38 } |
37487
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
39 |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
40 Request for phases works |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
41 |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
42 $ sendhttpv2peer << EOF |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
43 > command listkeys |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
44 > namespace phases |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
45 > EOF |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
46 creating http peer for wire protocol version 2 |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
47 sending listkeys command |
39378
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37725
diff
changeset
|
48 response: { |
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37725
diff
changeset
|
49 b'be0ef73c17ade3fc89dc41701eb9fc3a91b58282': b'1', |
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37725
diff
changeset
|
50 b'publishing': b'True' |
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37725
diff
changeset
|
51 } |
37487
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
52 |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
53 Request for bookmarks works |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
54 |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
55 $ sendhttpv2peer << EOF |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
56 > command listkeys |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
57 > namespace bookmarks |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
58 > EOF |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
59 creating http peer for wire protocol version 2 |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
60 sending listkeys command |
39378
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37725
diff
changeset
|
61 response: { |
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37725
diff
changeset
|
62 b'@': b'26805aba1e600a82e93661149f2313866a221a7b' |
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37725
diff
changeset
|
63 } |
37487
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
64 |
68915b9f8e96
wireproto: port listkeys commands to wire protocol v2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
65 $ cat error.log |