comparison tests/test-simple4server-bundle2.t @ 1161:ae233fe4529e stable

test: add an explicit test for simple4server with bundle2 This makes it more likely to we catch issue with the iteration of these two.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 14 Nov 2014 09:54:55 +0000
parents tests/test-simple4server.t@be31c34bb341
children 63a9a22d3f7f
comparison
equal deleted inserted replaced
1160:e29a813f6af5 1161:ae233fe4529e
1
2 $ cat >> $HGRCPATH <<EOF
3 > [defaults]
4 > amend=-d "0 0"
5 > [web]
6 > push_ssl = false
7 > allow_push = *
8 > [phases]
9 > publish = False
10 > [extensions]
11 > hgext.rebase=
12 > [experimental]
13 > bundle2-exp=True
14 > EOF
15
16 $ mkcommit() {
17 > echo "$1" > "$1"
18 > hg add "$1"
19 > hg ci -m "add $1"
20 > }
21
22 setup repo
23
24 $ hg init server
25 $ echo "[extensions]" >> ./server/.hg/hgrc
26 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/simple4server.py" >> ./server/.hg/hgrc
27 $ hg serve -R server -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
28 $ cat hg.pid >> $DAEMON_PIDS
29
30 $ hg clone http://localhost:$HGPORT/ client
31 no changes found
32 updating to branch default
33 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
34 $ cat ./errors.log
35 $ echo "[extensions]" >> ./client/.hg/hgrc
36 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> ./client/.hg/hgrc
37 $ cp -r client other
38
39 Smoke testing
40 ===============
41
42 $ cd client
43 $ mkcommit 0
44 $ mkcommit a
45 $ hg push
46 pushing to http://localhost:$HGPORT/
47 searching for changes
48 remote: adding changesets
49 remote: adding manifests
50 remote: adding file changes
51 remote: added 2 changesets with 2 changes to 2 files
52 $ hg pull
53 pulling from http://localhost:$HGPORT/
54 searching for changes
55 no changes found
56 $ cat ../errors.log
57 $ hg pull -R ../other
58 pulling from http://localhost:$HGPORT/
59 requesting all changes
60 adding changesets
61 adding manifests
62 adding file changes
63 added 2 changesets with 2 changes to 2 files
64 (run 'hg update' to get a working copy)
65 $ cat ../errors.log
66 $ hg push -R ../other
67 pushing to http://localhost:$HGPORT/
68 searching for changes
69 no changes found
70 [1]
71 $ cat ../errors.log
72
73 Capacity testing
74 ===================
75
76 $ curl --silent http://localhost:$HGPORT/?cmd=hello
77 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream bundle2-exp=HG2Y%0Ab2x%253Achangegroup%3D01%2C02%0Ab2x%253Alistkeys%0Ab2x%253Aobsmarkers%3DV0%2CV1%0Ab2x%253Apushkey%0Ab2x%253Aremote-changegroup%3Dhttp%2Chttps%0Adigests%3Dmd5%2Csha1%2Csha512 unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_getbundle_obscommon
78 $ curl --silent http://localhost:$HGPORT/?cmd=capabilities
79 lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream bundle2-exp=HG2Y%0Ab2x%253Achangegroup%3D01%2C02%0Ab2x%253Alistkeys%0Ab2x%253Aobsmarkers%3DV0%2CV1%0Ab2x%253Apushkey%0Ab2x%253Aremote-changegroup%3Dhttp%2Chttps%0Adigests%3Dmd5%2Csha1%2Csha512 unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_getbundle_obscommon (no-eol)
80
81 $ curl --silent "http://localhost:$HGPORT/?cmd=listkeys&namespace=namespaces" | sort
82 bookmarks
83 namespaces
84 obsolete
85 phases
86
87 Push
88 =============
89
90 $ echo 'A' > a
91 $ hg amend
92 $ hg push
93 pushing to http://localhost:$HGPORT/
94 searching for changes
95 remote: adding changesets
96 remote: adding manifests
97 remote: adding file changes
98 remote: added 1 changesets with 1 changes to 1 files (+1 heads)
99 remote: 2 new obsolescence markers
100 $ cat ../errors.log
101 $ hg push
102 pushing to http://localhost:$HGPORT/
103 searching for changes
104 no changes found
105 [1]
106 $ cat ../errors.log
107
108 Pull
109 =============
110
111 $ hg -R ../other pull
112 pulling from http://localhost:$HGPORT/
113 searching for changes
114 adding changesets
115 adding manifests
116 adding file changes
117 added 1 changesets with 1 changes to [12] files \(\+1 heads\) (re)
118 2 new obsolescence markers
119 (run 'hg heads' to see heads, 'hg merge' to merge)
120 $ cat ../errors.log
121 $ hg -R ../other pull
122 pulling from http://localhost:$HGPORT/
123 searching for changes
124 no changes found
125 $ cat ../errors.log
126
127 $ cd ..
128
129 Test disabling obsolete advertisement
130 ===========================================
131 (used by bitbucket to select which repo use evolve)
132
133 $ curl --silent "http://localhost:$HGPORT/?cmd=listkeys&namespace=namespaces" | sort
134 bookmarks
135 namespaces
136 obsolete
137 phases
138 $ curl --silent http://localhost:$HGPORT/?cmd=hello
139 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream bundle2-exp=HG2Y%0Ab2x%253Achangegroup%3D01%2C02%0Ab2x%253Alistkeys%0Ab2x%253Aobsmarkers%3DV0%2CV1%0Ab2x%253Apushkey%0Ab2x%253Aremote-changegroup%3Dhttp%2Chttps%0Adigests%3Dmd5%2Csha1%2Csha512 unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_getbundle_obscommon
140 $ curl --silent http://localhost:$HGPORT/?cmd=capabilities
141 lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream bundle2-exp=HG2Y%0Ab2x%253Achangegroup%3D01%2C02%0Ab2x%253Alistkeys%0Ab2x%253Aobsmarkers%3DV0%2CV1%0Ab2x%253Apushkey%0Ab2x%253Aremote-changegroup%3Dhttp%2Chttps%0Adigests%3Dmd5%2Csha1%2Csha512 unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_getbundle_obscommon (no-eol)
142
143 $ echo '[__temporary__]' >> server/.hg/hgrc
144 $ echo 'advertiseobsolete=False' >> server/.hg/hgrc
145 $ $TESTDIR/killdaemons.py
146 $ hg serve -R server -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
147 $ cat hg.pid >> $DAEMON_PIDS
148
149 $ curl --silent "http://localhost:$HGPORT/?cmd=listkeys&namespace=namespaces" | sort
150 bookmarks
151 namespaces
152 phases
153 $ curl --silent http://localhost:$HGPORT/?cmd=hello
154 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream bundle2-exp=HG2Y%0Ab2x%253Achangegroup%3D01%2C02%0Ab2x%253Alistkeys%0Ab2x%253Aobsmarkers%3DV0%2CV1%0Ab2x%253Apushkey%0Ab2x%253Aremote-changegroup%3Dhttp%2Chttps%0Adigests%3Dmd5%2Csha1%2Csha512 unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024
155 $ curl --silent http://localhost:$HGPORT/?cmd=capabilities
156 lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream bundle2-exp=HG2Y%0Ab2x%253Achangegroup%3D01%2C02%0Ab2x%253Alistkeys%0Ab2x%253Aobsmarkers%3DV0%2CV1%0Ab2x%253Apushkey%0Ab2x%253Aremote-changegroup%3Dhttp%2Chttps%0Adigests%3Dmd5%2Csha1%2Csha512 unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 (no-eol)
157
158 $ echo 'advertiseobsolete=True' >> server/.hg/hgrc
159 $ $TESTDIR/killdaemons.py
160 $ hg serve -R server -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
161 $ cat hg.pid >> $DAEMON_PIDS
162
163 $ curl --silent "http://localhost:$HGPORT/?cmd=listkeys&namespace=namespaces" | sort
164 bookmarks
165 namespaces
166 obsolete
167 phases
168 $ curl --silent http://localhost:$HGPORT/?cmd=hello
169 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream bundle2-exp=HG2Y%0Ab2x%253Achangegroup%3D01%2C02%0Ab2x%253Alistkeys%0Ab2x%253Aobsmarkers%3DV0%2CV1%0Ab2x%253Apushkey%0Ab2x%253Aremote-changegroup%3Dhttp%2Chttps%0Adigests%3Dmd5%2Csha1%2Csha512 unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_getbundle_obscommon
170 $ curl --silent http://localhost:$HGPORT/?cmd=capabilities
171 lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream bundle2-exp=HG2Y%0Ab2x%253Achangegroup%3D01%2C02%0Ab2x%253Alistkeys%0Ab2x%253Aobsmarkers%3DV0%2CV1%0Ab2x%253Apushkey%0Ab2x%253Aremote-changegroup%3Dhttp%2Chttps%0Adigests%3Dmd5%2Csha1%2Csha512 unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_getbundle_obscommon (no-eol)