Mercurial > hg
annotate tests/test-server-view.t @ 41840:d6569f1e9b37
server: allow customizing the default repo filter
hgweb has the (undocument) configuration option web.view that allows
restricting visible revisions to immutable. This is useful for serving
the same storage as publishing and non-publishing repo. Add the new
server.view option to serve the same purpose by changing the default
behavior of `getdispatchrepo`. Drop the hard-coded 'served' filter in the
batch handler of v1 of the wire proto, this is a left-over from the days
before `getdispatchrepo` existed.
Differential Revision: https://phab.mercurial-scm.org/D5946
author | Joerg Sonnenberger <joerg@bec.de> |
---|---|
date | Tue, 12 Feb 2019 19:08:17 +0100 |
parents | |
children | bcf59ddc6173 |
rev | line source |
---|---|
41840
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
1 $ hg init test |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
2 $ cd test |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
3 $ hg debugbuilddag '+2' |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
4 $ hg phase --public 0 |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
5 |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
6 $ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
7 $ cat hg.pid >> $DAEMON_PIDS |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
8 $ cd .. |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
9 $ hg init test2 |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
10 $ cd test2 |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
11 $ hg incoming http://foo:xyzzy@localhost:$HGPORT/ |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
12 comparing with http://foo:***@localhost:$HGPORT/ |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
13 changeset: 0:1ea73414a91b |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
14 user: debugbuilddag |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
15 date: Thu Jan 01 00:00:00 1970 +0000 |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
16 summary: r0 |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
17 |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
18 changeset: 1:66f7d451a68b |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
19 tag: tip |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
20 user: debugbuilddag |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
21 date: Thu Jan 01 00:00:01 1970 +0000 |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
22 summary: r1 |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
23 |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
24 $ killdaemons.py |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
25 |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
26 $ cd ../test |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
27 $ hg --config server.view=immutable serve -p $HGPORT -d --pid-file=hg.pid -E errors.log |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
28 $ cat hg.pid >> $DAEMON_PIDS |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
29 $ cd ../test2 |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
30 $ hg incoming http://foo:xyzzy@localhost:$HGPORT/ |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
31 comparing with http://foo:***@localhost:$HGPORT/ |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
32 changeset: 0:1ea73414a91b |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
33 tag: tip |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
34 user: debugbuilddag |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
35 date: Thu Jan 01 00:00:00 1970 +0000 |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
36 summary: r0 |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
37 |
d6569f1e9b37
server: allow customizing the default repo filter
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
38 $ killdaemons.py |