Mercurial > hg
comparison tests/test-http-bundle1.t @ 45839:ebee234d952a
errors: set detailed exit code to 100 for some remote errors
This is per https://www.mercurial-scm.org/wiki/ErrorCategoriesPlan.
Differential Revision: https://phab.mercurial-scm.org/D9309
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 22 Oct 2020 13:31:34 -0700 |
parents | 94faa2e84094 |
children | 84a93fa7ecfd |
comparison
equal
deleted
inserted
replaced
45838:ae00e170f2d1 | 45839:ebee234d952a |
---|---|
176 | 176 |
177 clone from invalid URL | 177 clone from invalid URL |
178 | 178 |
179 $ hg clone http://localhost:$HGPORT/bad | 179 $ hg clone http://localhost:$HGPORT/bad |
180 abort: HTTP Error 404: Not Found | 180 abort: HTTP Error 404: Not Found |
181 [255] | 181 [100] |
182 | 182 |
183 test http authentication | 183 test http authentication |
184 + use the same server to test server side streaming preference | 184 + use the same server to test server side streaming preference |
185 | 185 |
186 $ cd test | 186 $ cd test |
248 $ hg id http://user2@localhost:$HGPORT2/ | 248 $ hg id http://user2@localhost:$HGPORT2/ |
249 abort: http authorization required for http://localhost:$HGPORT2/ | 249 abort: http authorization required for http://localhost:$HGPORT2/ |
250 [255] | 250 [255] |
251 $ hg id http://user:pass2@localhost:$HGPORT2/ | 251 $ hg id http://user:pass2@localhost:$HGPORT2/ |
252 abort: HTTP Error 403: no | 252 abort: HTTP Error 403: no |
253 [255] | 253 [100] |
254 | 254 |
255 $ hg -R dest-pull tag -r tip top | 255 $ hg -R dest-pull tag -r tip top |
256 $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/ | 256 $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/ |
257 pushing to http://user:***@localhost:$HGPORT2/ | 257 pushing to http://user:***@localhost:$HGPORT2/ |
258 searching for changes | 258 searching for changes |
336 added 3 changesets with 7 changes to 7 files | 336 added 3 changesets with 7 changes to 7 files |
337 new changesets 8b6053c928fe:56f9bc90cce6 | 337 new changesets 8b6053c928fe:56f9bc90cce6 |
338 updating to branch default | 338 updating to branch default |
339 cloning subrepo sub from http://localhost:$HGPORT/sub | 339 cloning subrepo sub from http://localhost:$HGPORT/sub |
340 abort: HTTP Error 404: Not Found | 340 abort: HTTP Error 404: Not Found |
341 [255] | 341 [100] |
342 $ hg clone http://localhost:$HGPORT/ slash-clone | 342 $ hg clone http://localhost:$HGPORT/ slash-clone |
343 requesting all changes | 343 requesting all changes |
344 adding changesets | 344 adding changesets |
345 adding manifests | 345 adding manifests |
346 adding file changes | 346 adding file changes |
347 added 3 changesets with 7 changes to 7 files | 347 added 3 changesets with 7 changes to 7 files |
348 new changesets 8b6053c928fe:56f9bc90cce6 | 348 new changesets 8b6053c928fe:56f9bc90cce6 |
349 updating to branch default | 349 updating to branch default |
350 cloning subrepo sub from http://localhost:$HGPORT/sub | 350 cloning subrepo sub from http://localhost:$HGPORT/sub |
351 abort: HTTP Error 404: Not Found | 351 abort: HTTP Error 404: Not Found |
352 [255] | 352 [100] |
353 | 353 |
354 check error log | 354 check error log |
355 | 355 |
356 $ cat error.log | 356 $ cat error.log |
357 | 357 |
362 $ cat hg3.pid >> $DAEMON_PIDS | 362 $ cat hg3.pid >> $DAEMON_PIDS |
363 $ hg clone http://localhost:$HGPORT/ abort-clone | 363 $ hg clone http://localhost:$HGPORT/ abort-clone |
364 requesting all changes | 364 requesting all changes |
365 abort: remote error: | 365 abort: remote error: |
366 this is an exercise | 366 this is an exercise |
367 [255] | 367 [100] |
368 $ cat error.log | 368 $ cat error.log |
369 | 369 |
370 disable pull-based clones | 370 disable pull-based clones |
371 | 371 |
372 $ hg serve -R test -p $HGPORT1 -d --pid-file=hg4.pid -E error.log --config server.disablefullbundle=True | 372 $ hg serve -R test -p $HGPORT1 -d --pid-file=hg4.pid -E error.log --config server.disablefullbundle=True |
373 $ cat hg4.pid >> $DAEMON_PIDS | 373 $ cat hg4.pid >> $DAEMON_PIDS |
374 $ hg clone http://localhost:$HGPORT1/ disable-pull-clone | 374 $ hg clone http://localhost:$HGPORT1/ disable-pull-clone |
375 requesting all changes | 375 requesting all changes |
376 abort: remote error: | 376 abort: remote error: |
377 server has pull-based clones disabled | 377 server has pull-based clones disabled |
378 [255] | 378 [100] |
379 | 379 |
380 #if no-reposimplestore | 380 #if no-reposimplestore |
381 ... but keep stream clones working | 381 ... but keep stream clones working |
382 | 382 |
383 $ hg clone --stream --noupdate http://localhost:$HGPORT1/ test-stream-clone | 383 $ hg clone --stream --noupdate http://localhost:$HGPORT1/ test-stream-clone |