Debian Codegraph @

tests/test-server-view.t

raw
1 $ hg init test
2 $ cd test
3 $ hg debugbuilddag '+2'
4 $ hg phase --public 0
5
6 $ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
7 $ cat hg.pid >> $DAEMON_PIDS
8 $ cd ..
9 $ hg init test2
10 $ cd test2
11 $ hg incoming http://foo:xyzzy@localhost:$HGPORT/ -T '{desc}\n'
12 comparing with http://foo:***@localhost:$HGPORT/
13 r0
14 r1
15 $ hg incoming ../test -T '{desc}\n'
16 comparing with ../test
17 r0
18 r1
19 $ killdaemons.py
20
21 $ cd ..
22 $ hg -R test --config server.view=immutable serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
23 $ cat hg.pid >> $DAEMON_PIDS
24 $ hg -R test2 incoming http://foo:xyzzy@localhost:$HGPORT/ -T '{desc}\n'
25 comparing with http://foo:***@localhost:$HGPORT/
26 r0
27 $ hg -R test2 --config server.view=immutable incoming test -T '{desc}\n'
28 comparing with test
29 r0
30
31 Check same result using `experimental.extra-filter-revs`
32
33 $ hg -R test --config experimental.extra-filter-revs='not public()' serve -p $HGPORT1 -d --pid-file=hg2.pid -E errors.log
34 $ cat hg2.pid >> $DAEMON_PIDS
35 $ hg -R test2 incoming http://foo:xyzzy@localhost:$HGPORT1/
36 comparing with http://foo:***@localhost:$HGPORT1/
37 changeset: 0:1ea73414a91b
38 tag: tip
39 user: debugbuilddag
40 date: Thu Jan 01 00:00:00 1970 +0000
41 summary: r0
42
43 $ hg -R test2 --config experimental.extra-filter-revs='not public()' incoming test
44 comparing with test
45 changeset: 0:1ea73414a91b
46 user: debugbuilddag
47 date: Thu Jan 01 00:00:00 1970 +0000
48 summary: r0
49
50 $ hg -R test --config experimental.extra-filter-revs='not public()' debugupdatecache
51 $ ls -1 test/.hg/cache/
52 branch2-base%89c45d2fa07e
53 branch2-served
54 hgtagsfnodes1
55 rbc-names-v2
56 rbc-revs-v2
57 tags2
58 tags2-served%89c45d2fa07e
59
60 cleanup
61
62 $ cat errors.log
63 $ killdaemons.py
64
65 Check the behavior is other filtered revision exists
66 ----------------------------------------------------
67
68 add more content and complexity to the repository too
69
70 $ hg -R test debugbuilddag '+6:branchpoint.:left+4*branchpoint.:right+5' --from-existing
71 $ hg -R test phase --public 'desc("re:^r11$")'
72 $ hg -R test phase --secret --force 'desc("re:^r9$")'
73 $ hg -R test log -G -T '{desc} {phase}\n'
74 o r17 draft
75 |
76 o r16 draft
77 |
78 o r15 draft
79 |
80 o r14 draft
81 |
82 o r13 draft
83 |
84 o r12 draft
85 |
86 o r11 public
87 |
88 | o r10 secret
89 | |
90 | o r9 secret
91 | |
92 | o r8 draft
93 | |
94 | o r7 draft
95 | |
96 | o r6 draft
97 |/
98 o r5 public
99 |
100 o r4 public
101 |
102 o r3 public
103 |
104 o r2 public
105 |
106 o r1 public
107 |
108 o r0 public
109
110 $ hg -R test --config experimental.extra-filter-revs='(desc("re:^r13$") + desc("re:^r10$"))::' serve -p $HGPORT1 -d --pid-file=hg2.pid -E errors.log
111 $ cat hg2.pid >> $DAEMON_PIDS
112 $ hg -R test2 incoming http://foo:xyzzy@localhost:$HGPORT1/ -T '{desc}\n'
113 comparing with http://foo:***@localhost:$HGPORT1/
114 r0
115 r1
116 r2
117 r3
118 r4
119 r5
120 r6
121 r7
122 r8
123 r11
124 r12
125
126 Note that the option applies to both `test` and `test2` repositories here.
127
128 $ hg -R test2 --config experimental.extra-filter-revs='(desc("re:^r13$") + desc("re:^r10$"))::' incoming test -T '{desc}\n'
129 comparing with test
130 r0
131 r1
132 r2
133 r3
134 r4
135 r5
136 r6
137 r7
138 r8
139 r11
140 r12
141
142 cleanups
143
144 $ cat errors.log
145 $ killdaemons.py