annotate tests/test-simple4server.t @ 2046:994d81caec68

test: update test to check for various way to import the serveronly things We add a "setup script" that update the PYTHONPATH to allow direct import of the extension code. Then we tests that all way to import the extensions works.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Tue, 07 Mar 2017 12:10:05 +0100
parents 6942750831bb
children 4c195eb4d2c5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2046
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1838
diff changeset
1
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1838
diff changeset
2 $ . ${TESTDIR}/testlib/pythonpath.sh
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
3
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
4 $ cat >> $HGRCPATH <<EOF
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
5 > [defaults]
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
6 > amend=-d "0 0"
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
7 > [web]
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
8 > push_ssl = false
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
9 > allow_push = *
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
10 > [phases]
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
11 > publish = False
1356
aff6bc2a6b2d test: adapt to change in mercurial core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1248
diff changeset
12 > [experimental]
1721
d3429d25e0cb test: also use 'devel.legacy.exchange=bundle1' in test
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1522
diff changeset
13 > bundle2-exp=False # < Mercurial-4.0
d3429d25e0cb test: also use 'devel.legacy.exchange=bundle1' in test
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1522
diff changeset
14 > [devel]
d3429d25e0cb test: also use 'devel.legacy.exchange=bundle1' in test
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1522
diff changeset
15 > legacy.exchange=bundle1
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
16 > [extensions]
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
17 > EOF
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
18
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
19 $ mkcommit() {
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
20 > echo "$1" > "$1"
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
21 > hg add "$1"
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
22 > hg ci -m "add $1"
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
23 > }
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
24
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
25
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
26 $ hg init server
2046
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1838
diff changeset
27
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1838
diff changeset
28 Try the multiple ways to setup the extension
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1838
diff changeset
29
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1838
diff changeset
30 $ hg -R server log --config 'extensions.evolve.serveronly='
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1838
diff changeset
31 $ hg -R server log --config "extensions.evolve.serveronly=${SRCDIR}/hgext3rd/evolve/serveronly.py"
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1838
diff changeset
32 $ PYTHONPATH=$HGTEST_ORIG_PYTHONPATH hg -R server log --config "extensions.evolve.serveronly=${SRCDIR}/hgext3rd/evolve/serveronly.py"
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1838
diff changeset
33
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1838
diff changeset
34 setup repo
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1838
diff changeset
35
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
36 $ echo "[extensions]" >> ./server/.hg/hgrc
2046
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1838
diff changeset
37 $ echo "evolve.serveronly=" >> ./server/.hg/hgrc
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1838
diff changeset
38 $ hg serve -R server -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log --traceback
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
39 $ cat hg.pid >> $DAEMON_PIDS
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
40
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
41 $ hg clone http://localhost:$HGPORT/ client
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
42 no changes found
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
43 updating to branch default
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
44 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1087
82873af0cf10 test-simple4server: add error output for http
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1042
diff changeset
45 $ cat ./errors.log
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
46 $ echo "[extensions]" >> ./client/.hg/hgrc
2046
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1838
diff changeset
47 $ echo "evolve=" >> ./client/.hg/hgrc
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
48 $ cp -r client other
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
49
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
50 Smoke testing
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
51 ===============
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
52
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
53 $ cd client
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
54 $ mkcommit 0
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
55 $ mkcommit a
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
56 $ hg push
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
57 pushing to http://localhost:$HGPORT/
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
58 searching for changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
59 remote: adding changesets
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
60 remote: adding manifests
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
61 remote: adding file changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
62 remote: added 2 changesets with 2 changes to 2 files
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
63 $ hg pull
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
64 pulling from http://localhost:$HGPORT/
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
65 searching for changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
66 no changes found
1087
82873af0cf10 test-simple4server: add error output for http
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1042
diff changeset
67 $ cat ../errors.log
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
68 $ hg pull -R ../other
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
69 pulling from http://localhost:$HGPORT/
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
70 requesting all changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
71 adding changesets
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
72 adding manifests
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
73 adding file changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
74 added 2 changesets with 2 changes to 2 files
1038
45c4739e85dc evolve: make the "pulling obsolescence marker" message important
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1037
diff changeset
75 pull obsolescence markers
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
76 (run 'hg update' to get a working copy)
1087
82873af0cf10 test-simple4server: add error output for http
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1042
diff changeset
77 $ cat ../errors.log
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
78 $ hg push -R ../other
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
79 pushing to http://localhost:$HGPORT/
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
80 searching for changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
81 no changes found
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
82 [1]
1087
82873af0cf10 test-simple4server: add error output for http
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1042
diff changeset
83 $ cat ../errors.log
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
84
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
85 Capacity testing
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
86 ===================
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
87
1768
e036dfc8cfcc tests: use curl instead of wget
Simon Farnsworth <simonfar@fb.com>
parents: 1721
diff changeset
88 $ curl -s http://localhost:$HGPORT/?cmd=hello
1365
8ac1b7bd46ea tests: ignores other core output in capability testing
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1356
diff changeset
89 capabilities: * _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_obshash_1 _evoext_getbundle_obscommon (glob)
1768
e036dfc8cfcc tests: use curl instead of wget
Simon Farnsworth <simonfar@fb.com>
parents: 1721
diff changeset
90 $ curl -s http://localhost:$HGPORT/?cmd=capabilities
1365
8ac1b7bd46ea tests: ignores other core output in capability testing
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1356
diff changeset
91 * _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_obshash_1 _evoext_getbundle_obscommon (no-eol) (glob)
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
92
1768
e036dfc8cfcc tests: use curl instead of wget
Simon Farnsworth <simonfar@fb.com>
parents: 1721
diff changeset
93 $ curl -s "http://localhost:$HGPORT/?cmd=listkeys&namespace=namespaces" | sort
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
94 bookmarks
906
24f59f38a202 test: sort output of listkey command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 885
diff changeset
95 namespaces
24f59f38a202 test: sort output of listkey command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 885
diff changeset
96 obsolete
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
97 phases
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
98
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
99 Push
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
100 =============
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
101
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
102 $ echo 'A' > a
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
103 $ hg amend
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
104 $ hg push
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
105 pushing to http://localhost:$HGPORT/
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
106 searching for changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
107 remote: adding changesets
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
108 remote: adding manifests
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
109 remote: adding file changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
110 remote: added 1 changesets with 1 changes to 1 files (+1 heads)
1453
8ca31deb8db7 merge with stable
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1451
diff changeset
111 pushing 2 obsolescence markers (* bytes) (glob)
1838
6942750831bb serveronly: deduplicate code with the main evolve extension
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1808
diff changeset
112 remote: 2 obsolescence markers added
1087
82873af0cf10 test-simple4server: add error output for http
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1042
diff changeset
113 $ cat ../errors.log
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
114 $ hg push
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
115 pushing to http://localhost:$HGPORT/
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
116 searching for changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
117 no changes found
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
118 [1]
1087
82873af0cf10 test-simple4server: add error output for http
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1042
diff changeset
119 $ cat ../errors.log
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
120
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
121 Pull
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
122 =============
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
123
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
124 $ hg -R ../other pull
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
125 pulling from http://localhost:$HGPORT/
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
126 searching for changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
127 adding changesets
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
128 adding manifests
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
129 adding file changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
130 added 1 changesets with 1 changes to [12] files \(\+1 heads\) (re)
1038
45c4739e85dc evolve: make the "pulling obsolescence marker" message important
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1037
diff changeset
131 pull obsolescence markers
1040
640f3280559e evolve: add "obsolescence" in front of marked in the previous message
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1039
diff changeset
132 2 obsolescence markers added
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
133 (run 'hg heads' to see heads)
1087
82873af0cf10 test-simple4server: add error output for http
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1042
diff changeset
134 $ cat ../errors.log
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
135 $ hg -R ../other pull
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
136 pulling from http://localhost:$HGPORT/
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
137 searching for changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
138 no changes found
1087
82873af0cf10 test-simple4server: add error output for http
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1042
diff changeset
139 $ cat ../errors.log
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
140
882
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
141 $ cd ..
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
142
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
143 Test disabling obsolete advertisement
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
144 ===========================================
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
145 (used by bitbucket to select which repo use evolve)
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
146
1768
e036dfc8cfcc tests: use curl instead of wget
Simon Farnsworth <simonfar@fb.com>
parents: 1721
diff changeset
147 $ curl -s "http://localhost:$HGPORT/?cmd=listkeys&namespace=namespaces" | sort
882
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
148 bookmarks
906
24f59f38a202 test: sort output of listkey command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 885
diff changeset
149 namespaces
24f59f38a202 test: sort output of listkey command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 885
diff changeset
150 obsolete
882
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
151 phases
1768
e036dfc8cfcc tests: use curl instead of wget
Simon Farnsworth <simonfar@fb.com>
parents: 1721
diff changeset
152 $ curl -s http://localhost:$HGPORT/?cmd=hello
1365
8ac1b7bd46ea tests: ignores other core output in capability testing
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1356
diff changeset
153 capabilities: * _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_obshash_1 _evoext_getbundle_obscommon (glob)
1768
e036dfc8cfcc tests: use curl instead of wget
Simon Farnsworth <simonfar@fb.com>
parents: 1721
diff changeset
154 $ curl -s http://localhost:$HGPORT/?cmd=capabilities
1365
8ac1b7bd46ea tests: ignores other core output in capability testing
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1356
diff changeset
155 * _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_obshash_1 _evoext_getbundle_obscommon (no-eol) (glob)
882
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
156
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
157 $ echo '[__temporary__]' >> server/.hg/hgrc
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
158 $ echo 'advertiseobsolete=False' >> server/.hg/hgrc
1522
97b9141cbf72 test: use 'killdaemons.py' from the run-tests directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1453
diff changeset
159 $ $RUNTESTDIR/killdaemons.py $DAEMON_PIDS
882
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
160 $ hg serve -R server -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
161 $ cat hg.pid >> $DAEMON_PIDS
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
162
1768
e036dfc8cfcc tests: use curl instead of wget
Simon Farnsworth <simonfar@fb.com>
parents: 1721
diff changeset
163 $ curl -s "http://localhost:$HGPORT/?cmd=listkeys&namespace=namespaces" | sort
882
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
164 bookmarks
906
24f59f38a202 test: sort output of listkey command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 885
diff changeset
165 namespaces
882
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
166 phases
1768
e036dfc8cfcc tests: use curl instead of wget
Simon Farnsworth <simonfar@fb.com>
parents: 1721
diff changeset
167 $ curl -s http://localhost:$HGPORT/?cmd=hello | grep _evoext_pushobsmarkers_0
1365
8ac1b7bd46ea tests: ignores other core output in capability testing
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1356
diff changeset
168 [1]
1768
e036dfc8cfcc tests: use curl instead of wget
Simon Farnsworth <simonfar@fb.com>
parents: 1721
diff changeset
169 $ curl -s http://localhost:$HGPORT/?cmd=capabilities | grep _evoext_pushobsmarkers_0
1365
8ac1b7bd46ea tests: ignores other core output in capability testing
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1356
diff changeset
170 [1]
882
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
171
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
172 $ echo 'advertiseobsolete=True' >> server/.hg/hgrc
1522
97b9141cbf72 test: use 'killdaemons.py' from the run-tests directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1453
diff changeset
173 $ $RUNTESTDIR/killdaemons.py $DAEMON_PIDS
882
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
174 $ hg serve -R server -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
175 $ cat hg.pid >> $DAEMON_PIDS
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
176
1768
e036dfc8cfcc tests: use curl instead of wget
Simon Farnsworth <simonfar@fb.com>
parents: 1721
diff changeset
177 $ curl -s "http://localhost:$HGPORT/?cmd=listkeys&namespace=namespaces" | sort
882
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
178 bookmarks
906
24f59f38a202 test: sort output of listkey command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 885
diff changeset
179 namespaces
24f59f38a202 test: sort output of listkey command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 885
diff changeset
180 obsolete
882
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
181 phases
1768
e036dfc8cfcc tests: use curl instead of wget
Simon Farnsworth <simonfar@fb.com>
parents: 1721
diff changeset
182 $ curl -s http://localhost:$HGPORT/?cmd=hello
1365
8ac1b7bd46ea tests: ignores other core output in capability testing
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1356
diff changeset
183 capabilities: * _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_obshash_1 _evoext_getbundle_obscommon (glob)
1768
e036dfc8cfcc tests: use curl instead of wget
Simon Farnsworth <simonfar@fb.com>
parents: 1721
diff changeset
184 $ curl -s http://localhost:$HGPORT/?cmd=capabilities
1365
8ac1b7bd46ea tests: ignores other core output in capability testing
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1356
diff changeset
185 * _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_obshash_1 _evoext_getbundle_obscommon (no-eol) (glob)