Mercurial > hg-git
annotate tests/test-http.t @ 1029:a510bdf00fa0
tests: glob out server address for hg 4.2+
author | Kevin Bullock <kbullock@ringworld.org> |
---|---|
date | Mon, 24 Jul 2017 16:03:22 -0500 |
parents | 7c80e9f8131f |
children | 3a7daf4e1cae |
rev | line source |
---|---|
924
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
1 #require serve |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
2 |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
3 $ hg init test |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
4 $ cd test |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
5 $ echo foo>foo |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
6 $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
7 $ echo foo>foo.d/foo |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
8 $ echo bar>foo.d/bAr.hg.d/BaR |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
9 $ echo bar>foo.d/baR.d.hg/bAR |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
10 $ hg commit -A -m 1 |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
11 adding foo |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
12 adding foo.d/bAr.hg.d/BaR |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
13 adding foo.d/baR.d.hg/bAR |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
14 adding foo.d/foo |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
15 $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
16 $ hg --config server.uncompressed=False serve -p $HGPORT1 -d --pid-file=../hg2.pid |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
17 |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
18 Test server address cannot be reused |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
19 |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
20 #if windows |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
21 $ hg serve -p $HGPORT1 2>&1 |
1029
a510bdf00fa0
tests: glob out server address for hg 4.2+
Kevin Bullock <kbullock@ringworld.org>
parents:
924
diff
changeset
|
22 abort: cannot start server at '*:$HGPORT1': * (glob) |
924
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
23 [255] |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
24 #else |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
25 $ hg serve -p $HGPORT1 2>&1 |
1029
a510bdf00fa0
tests: glob out server address for hg 4.2+
Kevin Bullock <kbullock@ringworld.org>
parents:
924
diff
changeset
|
26 abort: cannot start server at '*:$HGPORT1': Address already in use (glob) |
924
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
27 [255] |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
28 #endif |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
29 $ cd .. |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
30 $ cat hg1.pid hg2.pid >> $DAEMON_PIDS |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
31 |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
32 Load commonly used test logic |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
33 $ . "$TESTDIR/testutil" |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
34 |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
35 Make sure that clone regular mercurial repos over http doesn't break |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
36 |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
37 $ hg clone http://localhost:$HGPORT/ copy 2>&1 |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
38 requesting all changes |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
39 adding changesets |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
40 adding manifests |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
41 adding file changes |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
42 added 1 changesets with 4 changes to 4 files |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
43 updating to branch default |
7c80e9f8131f
init: fix default hg breakage by returning the right type
Sean Farley <sean@farley.io>
parents:
diff
changeset
|
44 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |