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 > [experimental] |
|
11 > bundle2-exp=False # < Mercurial-4.0 |
|
12 > [devel] |
|
13 > legacy.exchange=bundle1 |
|
14 > [extensions] |
|
15 > EOF |
|
16 |
|
17 $ mkcommit() { |
|
18 > echo "$1" > "$1" |
|
19 > hg add "$1" |
|
20 > hg ci -m "add $1" |
|
21 > } |
|
22 |
|
23 setup repo |
|
24 |
|
25 $ hg init server |
|
26 $ echo "[extensions]" >> ./server/.hg/hgrc |
|
27 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/simple4server.py" >> ./server/.hg/hgrc |
|
28 $ hg serve -R server -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
29 $ cat hg.pid >> $DAEMON_PIDS |
|
30 |
|
31 $ hg clone http://localhost:$HGPORT/ client |
|
32 no changes found |
|
33 updating to branch default |
|
34 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
35 $ cat ./errors.log |
|
36 $ echo "[extensions]" >> ./client/.hg/hgrc |
|
37 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> ./client/.hg/hgrc |
|
38 $ cp -r client other |
|
39 |
|
40 Smoke testing |
|
41 =============== |
|
42 |
|
43 $ cd client |
|
44 $ mkcommit 0 |
|
45 $ mkcommit a |
|
46 $ hg push |
|
47 pushing to http://localhost:$HGPORT/ |
|
48 searching for changes |
|
49 remote: adding changesets |
|
50 remote: adding manifests |
|
51 remote: adding file changes |
|
52 remote: added 2 changesets with 2 changes to 2 files |
|
53 $ hg pull |
|
54 pulling from http://localhost:$HGPORT/ |
|
55 searching for changes |
|
56 no changes found |
|
57 $ cat ../errors.log |
|
58 $ hg pull -R ../other |
|
59 pulling from http://localhost:$HGPORT/ |
|
60 requesting all changes |
|
61 adding changesets |
|
62 adding manifests |
|
63 adding file changes |
|
64 added 2 changesets with 2 changes to 2 files |
|
65 pull obsolescence markers |
|
66 (run 'hg update' to get a working copy) |
|
67 $ cat ../errors.log |
|
68 $ hg push -R ../other |
|
69 pushing to http://localhost:$HGPORT/ |
|
70 searching for changes |
|
71 no changes found |
|
72 [1] |
|
73 $ cat ../errors.log |
|
74 |
|
75 Capacity testing |
|
76 =================== |
|
77 |
|
78 $ curl -s http://localhost:$HGPORT/?cmd=hello |
|
79 capabilities: * _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_obshash_1 _evoext_getbundle_obscommon (glob) |
|
80 $ curl -s http://localhost:$HGPORT/?cmd=capabilities |
|
81 * _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_obshash_1 _evoext_getbundle_obscommon (no-eol) (glob) |
|
82 |
|
83 $ curl -s "http://localhost:$HGPORT/?cmd=listkeys&namespace=namespaces" | sort |
|
84 bookmarks |
|
85 namespaces |
|
86 obsolete |
|
87 phases |
|
88 |
|
89 Push |
|
90 ============= |
|
91 |
|
92 $ echo 'A' > a |
|
93 $ hg amend |
|
94 $ hg push |
|
95 pushing to http://localhost:$HGPORT/ |
|
96 searching for changes |
|
97 remote: adding changesets |
|
98 remote: adding manifests |
|
99 remote: adding file changes |
|
100 remote: added 1 changesets with 1 changes to 1 files (+1 heads) |
|
101 pushing 2 obsolescence markers (* bytes) (glob) |
|
102 $ cat ../errors.log |
|
103 $ hg push |
|
104 pushing to http://localhost:$HGPORT/ |
|
105 searching for changes |
|
106 no changes found |
|
107 [1] |
|
108 $ cat ../errors.log |
|
109 |
|
110 Pull |
|
111 ============= |
|
112 |
|
113 $ hg -R ../other pull |
|
114 pulling from http://localhost:$HGPORT/ |
|
115 searching for changes |
|
116 adding changesets |
|
117 adding manifests |
|
118 adding file changes |
|
119 added 1 changesets with 1 changes to [12] files \(\+1 heads\) (re) |
|
120 pull obsolescence markers |
|
121 2 obsolescence markers added |
|
122 (run 'hg heads' to see heads) |
|
123 $ cat ../errors.log |
|
124 $ hg -R ../other pull |
|
125 pulling from http://localhost:$HGPORT/ |
|
126 searching for changes |
|
127 no changes found |
|
128 $ cat ../errors.log |
|
129 |
|
130 $ cd .. |
|
131 |
|
132 Test disabling obsolete advertisement |
|
133 =========================================== |
|
134 (used by bitbucket to select which repo use evolve) |
|
135 |
|
136 $ curl -s "http://localhost:$HGPORT/?cmd=listkeys&namespace=namespaces" | sort |
|
137 bookmarks |
|
138 namespaces |
|
139 obsolete |
|
140 phases |
|
141 $ curl -s http://localhost:$HGPORT/?cmd=hello |
|
142 capabilities: * _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_obshash_1 _evoext_getbundle_obscommon (glob) |
|
143 $ curl -s http://localhost:$HGPORT/?cmd=capabilities |
|
144 * _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_obshash_1 _evoext_getbundle_obscommon (no-eol) (glob) |
|
145 |
|
146 $ echo '[__temporary__]' >> server/.hg/hgrc |
|
147 $ echo 'advertiseobsolete=False' >> server/.hg/hgrc |
|
148 $ $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
|
149 $ hg serve -R server -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
150 $ cat hg.pid >> $DAEMON_PIDS |
|
151 |
|
152 $ curl -s "http://localhost:$HGPORT/?cmd=listkeys&namespace=namespaces" | sort |
|
153 bookmarks |
|
154 namespaces |
|
155 phases |
|
156 $ curl -s http://localhost:$HGPORT/?cmd=hello | grep _evoext_pushobsmarkers_0 |
|
157 [1] |
|
158 $ curl -s http://localhost:$HGPORT/?cmd=capabilities | grep _evoext_pushobsmarkers_0 |
|
159 [1] |
|
160 |
|
161 $ echo 'advertiseobsolete=True' >> server/.hg/hgrc |
|
162 $ $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
|
163 $ hg serve -R server -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
164 $ cat hg.pid >> $DAEMON_PIDS |
|
165 |
|
166 $ curl -s "http://localhost:$HGPORT/?cmd=listkeys&namespace=namespaces" | sort |
|
167 bookmarks |
|
168 namespaces |
|
169 obsolete |
|
170 phases |
|
171 $ curl -s http://localhost:$HGPORT/?cmd=hello |
|
172 capabilities: * _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_obshash_1 _evoext_getbundle_obscommon (glob) |
|
173 $ curl -s http://localhost:$HGPORT/?cmd=capabilities |
|
174 * _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_obshash_1 _evoext_getbundle_obscommon (no-eol) (glob) |
|