Mercurial > hg
annotate tests/test-wireproto-command-pushkey.t @ 42120:2f8147521e59
branchcache: add functions to validate changelog nodes
This patch adds functions to validate closed nodes, validate nodes for a certain
branch and for all the branches. These functions will be used in upcoming
patches.
Differential Revision: https://phab.mercurial-scm.org/D6207
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Tue, 19 Mar 2019 16:52:15 +0300 |
parents | a732d70253b0 |
children |
rev | line source |
---|---|
37537
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1 $ . $TESTDIR/wireprotohelpers.sh |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
2 |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
3 $ hg init server |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
4 $ enablehttpv2 server |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
5 $ cd server |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
6 $ cat >> .hg/hgrc << EOF |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
7 > [web] |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
8 > push_ssl = false |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
9 > allow-push = * |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
10 > EOF |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
11 $ hg debugdrawdag << EOF |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
12 > C D |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
13 > |/ |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
14 > B |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
15 > | |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
16 > A |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
17 > EOF |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
18 |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
19 $ hg serve -p $HGPORT -d --pid-file hg.pid -E error.log |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
20 $ cat hg.pid > $DAEMON_PIDS |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
21 |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
22 pushkey for a bookmark works |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
23 |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
24 $ sendhttpv2peer << EOF |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
25 > command pushkey |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
26 > namespace bookmarks |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
27 > key @ |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
28 > old |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
29 > new 426bada5c67598ca65036d57d9e4b64b0c1ce7a0 |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
30 > EOF |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
31 creating http peer for wire protocol version 2 |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
32 sending pushkey command |
37721
f7673845b167
wireprotov2: decode responses to their expected types
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37719
diff
changeset
|
33 response: True |
37537
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
34 |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
35 $ sendhttpv2peer << EOF |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
36 > command listkeys |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
37 > namespace bookmarks |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
38 > EOF |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
39 creating http peer for wire protocol version 2 |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
40 sending listkeys command |
39378
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37725
diff
changeset
|
41 response: { |
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37725
diff
changeset
|
42 b'@': b'426bada5c67598ca65036d57d9e4b64b0c1ce7a0' |
0f549da54379
stringutil: teach pprint() to indent
Gregory Szorc <gregory.szorc@gmail.com>
parents:
37725
diff
changeset
|
43 } |
37537
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
44 |
be5d4749edc0
wireproto: port pushkey command to wire protocol version 2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
45 $ cat error.log |