Show More
@@ -1,281 +1,323 b'' | |||
|
1 | 1 | Tests discovery against servers without getbundle support: |
|
2 | 2 | |
|
3 | 3 | $ CAP=getbundle |
|
4 | 4 | $ . "$TESTDIR/notcapable" |
|
5 | 5 | $ cat >> $HGRCPATH <<EOF |
|
6 | 6 | > [ui] |
|
7 | 7 | > logtemplate="{rev} {node|short}: {desc} {branches}\n" |
|
8 | 8 | > [extensions] |
|
9 | 9 | > graphlog= |
|
10 | 10 | > EOF |
|
11 | 11 | |
|
12 | 12 | Setup HTTP server control: |
|
13 | 13 | |
|
14 | 14 | $ remote=http://localhost:$HGPORT/ |
|
15 | 15 | $ export remote |
|
16 | 16 | $ start() { |
|
17 | 17 | > echo '[web]' > $1/.hg/hgrc |
|
18 | 18 | > echo 'push_ssl = false' >> $1/.hg/hgrc |
|
19 | 19 | > echo 'allow_push = *' >> $1/.hg/hgrc |
|
20 | 20 | > hg serve -R $1 -p $HGPORT -d --pid-file=hg.pid -E errors.log |
|
21 | 21 | > cat hg.pid >> $DAEMON_PIDS |
|
22 | 22 | > } |
|
23 | 23 | $ stop() { |
|
24 | 24 | > "$TESTDIR/killdaemons.py" |
|
25 | 25 | > } |
|
26 | 26 | |
|
27 | 27 | Both are empty: |
|
28 | 28 | |
|
29 | 29 | $ hg init empty1 |
|
30 | 30 | $ hg init empty2 |
|
31 | 31 | $ start empty2 |
|
32 | 32 | $ hg incoming -R empty1 $remote |
|
33 | 33 | comparing with http://localhost:$HGPORT/ |
|
34 | 34 | no changes found |
|
35 | 35 | [1] |
|
36 | 36 | $ hg outgoing -R empty1 $remote |
|
37 | 37 | comparing with http://localhost:$HGPORT/ |
|
38 | 38 | no changes found |
|
39 | 39 | [1] |
|
40 | 40 | $ hg pull -R empty1 $remote |
|
41 | 41 | pulling from http://localhost:$HGPORT/ |
|
42 | 42 | no changes found |
|
43 | 43 | $ hg push -R empty1 $remote |
|
44 | 44 | pushing to http://localhost:$HGPORT/ |
|
45 | 45 | no changes found |
|
46 | 46 | $ stop |
|
47 | 47 | |
|
48 | 48 | Base repo: |
|
49 | 49 | |
|
50 | 50 | $ hg init main |
|
51 | 51 | $ cd main |
|
52 | 52 | $ hg debugbuilddag -mo '+2:tbase @name1 +3:thead1 <tbase @name2 +4:thead2 @both /thead1 +2:tmaintip' |
|
53 | 53 | $ hg glog |
|
54 | 54 | o 11 a19bfa7e7328: r11 both |
|
55 | 55 | | |
|
56 | 56 | o 10 8b6bad1512e1: r10 both |
|
57 | 57 | | |
|
58 | 58 | o 9 025829e08038: r9 both |
|
59 | 59 | |\ |
|
60 | 60 | | o 8 d8f638ac69e9: r8 name2 |
|
61 | 61 | | | |
|
62 | 62 | | o 7 b6b4d315a2ac: r7 name2 |
|
63 | 63 | | | |
|
64 | 64 | | o 6 6c6f5d5f3c11: r6 name2 |
|
65 | 65 | | | |
|
66 | 66 | | o 5 70314b29987d: r5 name2 |
|
67 | 67 | | | |
|
68 | 68 | o | 4 e71dbbc70e03: r4 name1 |
|
69 | 69 | | | |
|
70 | 70 | o | 3 2c8d5d5ec612: r3 name1 |
|
71 | 71 | | | |
|
72 | 72 | o | 2 a7892891da29: r2 name1 |
|
73 | 73 | |/ |
|
74 | 74 | o 1 0019a3b924fd: r1 |
|
75 | 75 | | |
|
76 | 76 | o 0 d57206cc072a: r0 |
|
77 | 77 | |
|
78 | 78 | $ cd .. |
|
79 | 79 | $ start main |
|
80 | 80 | |
|
81 | 81 | Full clone: |
|
82 | 82 | |
|
83 | 83 | $ hg clone main full |
|
84 | 84 | updating to branch default |
|
85 | 85 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
86 | 86 | $ cd full |
|
87 | 87 | $ hg incoming $remote |
|
88 | 88 | comparing with http://localhost:$HGPORT/ |
|
89 | 89 | searching for changes |
|
90 | 90 | no changes found |
|
91 | 91 | [1] |
|
92 | 92 | $ hg outgoing $remote |
|
93 | 93 | comparing with http://localhost:$HGPORT/ |
|
94 | 94 | searching for changes |
|
95 | 95 | no changes found |
|
96 | 96 | [1] |
|
97 | 97 | $ hg pull $remote |
|
98 | 98 | pulling from http://localhost:$HGPORT/ |
|
99 | 99 | searching for changes |
|
100 | 100 | no changes found |
|
101 | 101 | $ hg push $remote |
|
102 | 102 | pushing to http://localhost:$HGPORT/ |
|
103 | 103 | searching for changes |
|
104 | 104 | no changes found |
|
105 | 105 | $ cd .. |
|
106 | 106 | |
|
107 | 107 | Local is empty: |
|
108 | 108 | |
|
109 | 109 | $ cd empty1 |
|
110 | 110 | $ hg incoming $remote |
|
111 | 111 | comparing with http://localhost:$HGPORT/ |
|
112 | 112 | 0 d57206cc072a: r0 |
|
113 | 113 | 1 0019a3b924fd: r1 |
|
114 | 114 | 2 a7892891da29: r2 name1 |
|
115 | 115 | 3 2c8d5d5ec612: r3 name1 |
|
116 | 116 | 4 e71dbbc70e03: r4 name1 |
|
117 | 117 | 5 70314b29987d: r5 name2 |
|
118 | 118 | 6 6c6f5d5f3c11: r6 name2 |
|
119 | 119 | 7 b6b4d315a2ac: r7 name2 |
|
120 | 120 | 8 d8f638ac69e9: r8 name2 |
|
121 | 121 | 9 025829e08038: r9 both |
|
122 | 122 | 10 8b6bad1512e1: r10 both |
|
123 | 123 | 11 a19bfa7e7328: r11 both |
|
124 | 124 | $ hg outgoing $remote |
|
125 | 125 | comparing with http://localhost:$HGPORT/ |
|
126 | 126 | no changes found |
|
127 | 127 | [1] |
|
128 | 128 | $ hg push $remote |
|
129 | 129 | pushing to http://localhost:$HGPORT/ |
|
130 | 130 | no changes found |
|
131 | 131 | $ hg pull $remote |
|
132 | 132 | pulling from http://localhost:$HGPORT/ |
|
133 | 133 | requesting all changes |
|
134 | 134 | adding changesets |
|
135 | 135 | adding manifests |
|
136 | 136 | adding file changes |
|
137 | 137 | added 12 changesets with 24 changes to 2 files |
|
138 | 138 | (run 'hg update' to get a working copy) |
|
139 | 139 | $ hg incoming $remote |
|
140 | 140 | comparing with http://localhost:$HGPORT/ |
|
141 | 141 | searching for changes |
|
142 | 142 | no changes found |
|
143 | 143 | [1] |
|
144 | 144 | $ cd .. |
|
145 | 145 | |
|
146 | 146 | Local is subset: |
|
147 | 147 | |
|
148 | 148 | $ hg clone main subset --rev name2 ; cd subset |
|
149 | 149 | adding changesets |
|
150 | 150 | adding manifests |
|
151 | 151 | adding file changes |
|
152 | 152 | added 6 changesets with 12 changes to 2 files |
|
153 | 153 | updating to branch name2 |
|
154 | 154 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
155 | 155 | $ hg incoming $remote |
|
156 | 156 | comparing with http://localhost:$HGPORT/ |
|
157 | 157 | searching for changes |
|
158 | 158 | 6 a7892891da29: r2 name1 |
|
159 | 159 | 7 2c8d5d5ec612: r3 name1 |
|
160 | 160 | 8 e71dbbc70e03: r4 name1 |
|
161 | 161 | 9 025829e08038: r9 both |
|
162 | 162 | 10 8b6bad1512e1: r10 both |
|
163 | 163 | 11 a19bfa7e7328: r11 both |
|
164 | 164 | $ hg outgoing $remote |
|
165 | 165 | comparing with http://localhost:$HGPORT/ |
|
166 | 166 | searching for changes |
|
167 | 167 | no changes found |
|
168 | 168 | [1] |
|
169 | 169 | $ hg push $remote |
|
170 | 170 | pushing to http://localhost:$HGPORT/ |
|
171 | 171 | searching for changes |
|
172 | 172 | no changes found |
|
173 | 173 | $ hg pull $remote |
|
174 | 174 | pulling from http://localhost:$HGPORT/ |
|
175 | 175 | searching for changes |
|
176 | 176 | adding changesets |
|
177 | 177 | adding manifests |
|
178 | 178 | adding file changes |
|
179 | 179 | added 6 changesets with 12 changes to 2 files |
|
180 | 180 | (run 'hg update' to get a working copy) |
|
181 | 181 | $ hg incoming $remote |
|
182 | 182 | comparing with http://localhost:$HGPORT/ |
|
183 | 183 | searching for changes |
|
184 | 184 | no changes found |
|
185 | 185 | [1] |
|
186 | 186 | $ cd .. |
|
187 | 187 | |
|
188 | 188 | Remote is empty: |
|
189 | 189 | |
|
190 | 190 | $ stop ; start empty2 |
|
191 | 191 | $ cd main |
|
192 | 192 | $ hg incoming $remote |
|
193 | 193 | comparing with http://localhost:$HGPORT/ |
|
194 | 194 | searching for changes |
|
195 | 195 | no changes found |
|
196 | 196 | [1] |
|
197 | 197 | $ hg outgoing $remote |
|
198 | 198 | comparing with http://localhost:$HGPORT/ |
|
199 | 199 | searching for changes |
|
200 | 200 | 0 d57206cc072a: r0 |
|
201 | 201 | 1 0019a3b924fd: r1 |
|
202 | 202 | 2 a7892891da29: r2 name1 |
|
203 | 203 | 3 2c8d5d5ec612: r3 name1 |
|
204 | 204 | 4 e71dbbc70e03: r4 name1 |
|
205 | 205 | 5 70314b29987d: r5 name2 |
|
206 | 206 | 6 6c6f5d5f3c11: r6 name2 |
|
207 | 207 | 7 b6b4d315a2ac: r7 name2 |
|
208 | 208 | 8 d8f638ac69e9: r8 name2 |
|
209 | 209 | 9 025829e08038: r9 both |
|
210 | 210 | 10 8b6bad1512e1: r10 both |
|
211 | 211 | 11 a19bfa7e7328: r11 both |
|
212 | 212 | $ hg pull $remote |
|
213 | 213 | pulling from http://localhost:$HGPORT/ |
|
214 | 214 | searching for changes |
|
215 | 215 | no changes found |
|
216 | 216 | $ hg push $remote |
|
217 | 217 | pushing to http://localhost:$HGPORT/ |
|
218 | 218 | searching for changes |
|
219 | 219 | remote: adding changesets |
|
220 | 220 | remote: adding manifests |
|
221 | 221 | remote: adding file changes |
|
222 | 222 | remote: added 12 changesets with 24 changes to 2 files |
|
223 | 223 | $ hg outgoing $remote |
|
224 | 224 | comparing with http://localhost:$HGPORT/ |
|
225 | 225 | searching for changes |
|
226 | 226 | no changes found |
|
227 | 227 | [1] |
|
228 | 228 | $ cd .. |
|
229 | 229 | |
|
230 | 230 | Local is superset: |
|
231 | 231 | |
|
232 | 232 | $ stop |
|
233 | 233 | $ hg clone main subset2 --rev name2 |
|
234 | 234 | adding changesets |
|
235 | 235 | adding manifests |
|
236 | 236 | adding file changes |
|
237 | 237 | added 6 changesets with 12 changes to 2 files |
|
238 | 238 | updating to branch name2 |
|
239 | 239 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
240 | 240 | $ start subset2 |
|
241 | 241 | $ cd main |
|
242 | 242 | $ hg incoming $remote |
|
243 | 243 | comparing with http://localhost:$HGPORT/ |
|
244 | 244 | searching for changes |
|
245 | 245 | no changes found |
|
246 | 246 | [1] |
|
247 | 247 | $ hg outgoing $remote |
|
248 | 248 | comparing with http://localhost:$HGPORT/ |
|
249 | 249 | searching for changes |
|
250 | 250 | 2 a7892891da29: r2 name1 |
|
251 | 251 | 3 2c8d5d5ec612: r3 name1 |
|
252 | 252 | 4 e71dbbc70e03: r4 name1 |
|
253 | 253 | 9 025829e08038: r9 both |
|
254 | 254 | 10 8b6bad1512e1: r10 both |
|
255 | 255 | 11 a19bfa7e7328: r11 both |
|
256 | 256 | $ hg pull $remote |
|
257 | 257 | pulling from http://localhost:$HGPORT/ |
|
258 | 258 | searching for changes |
|
259 | 259 | no changes found |
|
260 | 260 | $ hg push $remote |
|
261 | 261 | pushing to http://localhost:$HGPORT/ |
|
262 | 262 | searching for changes |
|
263 | 263 | abort: push creates new remote branches: both, name1! |
|
264 | 264 | (use 'hg push --new-branch' to create new remote branches) |
|
265 | 265 | [255] |
|
266 | 266 | $ hg push $remote --new-branch |
|
267 | 267 | pushing to http://localhost:$HGPORT/ |
|
268 | 268 | searching for changes |
|
269 | 269 | remote: adding changesets |
|
270 | 270 | remote: adding manifests |
|
271 | 271 | remote: adding file changes |
|
272 | 272 | remote: added 6 changesets with 12 changes to 2 files |
|
273 | 273 | $ hg outgoing $remote |
|
274 | 274 | comparing with http://localhost:$HGPORT/ |
|
275 | 275 | searching for changes |
|
276 | 276 | no changes found |
|
277 | 277 | [1] |
|
278 | 278 | $ cd .. |
|
279 | 279 | |
|
280 | Partial pull: | |
|
281 | ||
|
282 | $ stop ; start main | |
|
283 | $ hg clone $remote partial --rev name2 | |
|
284 | adding changesets | |
|
285 | adding manifests | |
|
286 | adding file changes | |
|
287 | added 6 changesets with 12 changes to 2 files | |
|
288 | updating to branch name2 | |
|
289 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
290 | $ cd partial | |
|
291 | $ hg incoming $remote | |
|
292 | comparing with http://localhost:$HGPORT/ | |
|
293 | searching for changes | |
|
294 | 6 a7892891da29: r2 name1 | |
|
295 | 7 2c8d5d5ec612: r3 name1 | |
|
296 | 8 e71dbbc70e03: r4 name1 | |
|
297 | 9 025829e08038: r9 both | |
|
298 | 10 8b6bad1512e1: r10 both | |
|
299 | 11 a19bfa7e7328: r11 both | |
|
300 | $ hg incoming $remote --rev name1 | |
|
301 | comparing with http://localhost:$HGPORT/ | |
|
302 | searching for changes | |
|
303 | 6 a7892891da29: r2 name1 | |
|
304 | 7 2c8d5d5ec612: r3 name1 | |
|
305 | 8 e71dbbc70e03: r4 name1 | |
|
306 | $ hg pull $remote --rev name1 | |
|
307 | pulling from http://localhost:$HGPORT/ | |
|
308 | searching for changes | |
|
309 | adding changesets | |
|
310 | adding manifests | |
|
311 | adding file changes | |
|
312 | added 3 changesets with 6 changes to 2 files (+1 heads) | |
|
313 | (run 'hg heads' to see heads) | |
|
314 | $ hg incoming $remote | |
|
315 | comparing with http://localhost:$HGPORT/ | |
|
316 | searching for changes | |
|
317 | 9 025829e08038: r9 both | |
|
318 | 10 8b6bad1512e1: r10 both | |
|
319 | 11 a19bfa7e7328: r11 both | |
|
320 | $ cd .. | |
|
321 | ||
|
280 | 322 | $ stop |
|
281 | 323 |
General Comments 0
You need to be logged in to leave comments.
Login now