##// END OF EJS Templates
tests: relax "Connection refused" match...
Augie Fackler -
r29514:28052824 default
parent child Browse files
Show More
@@ -1,21 +1,15
1 #require serve killdaemons
1 #require serve killdaemons
2
2
3 #if windows
4 $ hg clone http://localhost:$HGPORT/ copy
3 $ hg clone http://localhost:$HGPORT/ copy
5 abort: * (glob)
4 abort: * (glob)
6 [255]
5 [255]
7 #else
8 $ hg clone http://localhost:$HGPORT/ copy
9 abort: error: Connection refused
10 [255]
11 #endif
12
6
13 $ test -d copy
7 $ test -d copy
14 [1]
8 [1]
15
9
16 $ python "$TESTDIR/dumbhttp.py" -p $HGPORT --pid dumb.pid
10 $ python "$TESTDIR/dumbhttp.py" -p $HGPORT --pid dumb.pid
17 $ cat dumb.pid >> $DAEMON_PIDS
11 $ cat dumb.pid >> $DAEMON_PIDS
18 $ hg clone http://localhost:$HGPORT/foo copy2
12 $ hg clone http://localhost:$HGPORT/foo copy2
19 abort: HTTP Error 404: * (glob)
13 abort: HTTP Error 404: * (glob)
20 [255]
14 [255]
21 $ killdaemons.py
15 $ killdaemons.py
@@ -1,163 +1,157
1 #require killdaemons
1 #require killdaemons
2
2
3 #if windows
4 $ hg clone http://localhost:$HGPORT/ copy
3 $ hg clone http://localhost:$HGPORT/ copy
5 abort: * (glob)
4 abort: * (glob)
6 [255]
5 [255]
7 #else
8 $ hg clone http://localhost:$HGPORT/ copy
9 abort: error: Connection refused
10 [255]
11 #endif
12 $ test -d copy
6 $ test -d copy
13 [1]
7 [1]
14
8
15 This server doesn't do range requests so it's basically only good for
9 This server doesn't do range requests so it's basically only good for
16 one pull
10 one pull
17
11
18 $ python "$TESTDIR/dumbhttp.py" -p $HGPORT --pid dumb.pid
12 $ python "$TESTDIR/dumbhttp.py" -p $HGPORT --pid dumb.pid
19 $ cat dumb.pid >> $DAEMON_PIDS
13 $ cat dumb.pid >> $DAEMON_PIDS
20 $ hg init remote
14 $ hg init remote
21 $ cd remote
15 $ cd remote
22 $ echo foo > bar
16 $ echo foo > bar
23 $ echo c2 > '.dotfile with spaces'
17 $ echo c2 > '.dotfile with spaces'
24 $ hg add
18 $ hg add
25 adding .dotfile with spaces
19 adding .dotfile with spaces
26 adding bar
20 adding bar
27 $ hg commit -m"test"
21 $ hg commit -m"test"
28 $ hg tip
22 $ hg tip
29 changeset: 0:02770d679fb8
23 changeset: 0:02770d679fb8
30 tag: tip
24 tag: tip
31 user: test
25 user: test
32 date: Thu Jan 01 00:00:00 1970 +0000
26 date: Thu Jan 01 00:00:00 1970 +0000
33 summary: test
27 summary: test
34
28
35 $ cd ..
29 $ cd ..
36 $ hg clone static-http://localhost:$HGPORT/remote local
30 $ hg clone static-http://localhost:$HGPORT/remote local
37 requesting all changes
31 requesting all changes
38 adding changesets
32 adding changesets
39 adding manifests
33 adding manifests
40 adding file changes
34 adding file changes
41 added 1 changesets with 2 changes to 2 files
35 added 1 changesets with 2 changes to 2 files
42 updating to branch default
36 updating to branch default
43 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
37 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
44 $ cd local
38 $ cd local
45 $ hg verify
39 $ hg verify
46 checking changesets
40 checking changesets
47 checking manifests
41 checking manifests
48 crosschecking files in changesets and manifests
42 crosschecking files in changesets and manifests
49 checking files
43 checking files
50 2 files, 1 changesets, 2 total revisions
44 2 files, 1 changesets, 2 total revisions
51 $ cat bar
45 $ cat bar
52 foo
46 foo
53 $ cd ../remote
47 $ cd ../remote
54 $ echo baz > quux
48 $ echo baz > quux
55 $ hg commit -A -mtest2
49 $ hg commit -A -mtest2
56 adding quux
50 adding quux
57
51
58 check for HTTP opener failures when cachefile does not exist
52 check for HTTP opener failures when cachefile does not exist
59
53
60 $ rm .hg/cache/*
54 $ rm .hg/cache/*
61 $ cd ../local
55 $ cd ../local
62 $ echo '[hooks]' >> .hg/hgrc
56 $ echo '[hooks]' >> .hg/hgrc
63 $ echo "changegroup = printenv.py changegroup" >> .hg/hgrc
57 $ echo "changegroup = printenv.py changegroup" >> .hg/hgrc
64 $ hg pull
58 $ hg pull
65 pulling from static-http://localhost:$HGPORT/remote
59 pulling from static-http://localhost:$HGPORT/remote
66 searching for changes
60 searching for changes
67 adding changesets
61 adding changesets
68 adding manifests
62 adding manifests
69 adding file changes
63 adding file changes
70 added 1 changesets with 1 changes to 1 files
64 added 1 changesets with 1 changes to 1 files
71 changegroup hook: HG_NODE=4ac2e3648604439c580c69b09ec9d93a88d93432 HG_NODE_LAST=4ac2e3648604439c580c69b09ec9d93a88d93432 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=http://localhost:$HGPORT/remote (glob)
65 changegroup hook: HG_NODE=4ac2e3648604439c580c69b09ec9d93a88d93432 HG_NODE_LAST=4ac2e3648604439c580c69b09ec9d93a88d93432 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=http://localhost:$HGPORT/remote (glob)
72 (run 'hg update' to get a working copy)
66 (run 'hg update' to get a working copy)
73
67
74 trying to push
68 trying to push
75
69
76 $ hg update
70 $ hg update
77 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
71 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
78 $ echo more foo >> bar
72 $ echo more foo >> bar
79 $ hg commit -m"test"
73 $ hg commit -m"test"
80 $ hg push
74 $ hg push
81 pushing to static-http://localhost:$HGPORT/remote
75 pushing to static-http://localhost:$HGPORT/remote
82 abort: destination does not support push
76 abort: destination does not support push
83 [255]
77 [255]
84
78
85 trying clone -r
79 trying clone -r
86
80
87 $ cd ..
81 $ cd ..
88 $ hg clone -r doesnotexist static-http://localhost:$HGPORT/remote local0
82 $ hg clone -r doesnotexist static-http://localhost:$HGPORT/remote local0
89 abort: unknown revision 'doesnotexist'!
83 abort: unknown revision 'doesnotexist'!
90 [255]
84 [255]
91 $ hg clone -r 0 static-http://localhost:$HGPORT/remote local0
85 $ hg clone -r 0 static-http://localhost:$HGPORT/remote local0
92 adding changesets
86 adding changesets
93 adding manifests
87 adding manifests
94 adding file changes
88 adding file changes
95 added 1 changesets with 2 changes to 2 files
89 added 1 changesets with 2 changes to 2 files
96 updating to branch default
90 updating to branch default
97 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
91 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
98
92
99 test with "/" URI (issue747) and subrepo
93 test with "/" URI (issue747) and subrepo
100
94
101 $ hg init
95 $ hg init
102 $ hg init sub
96 $ hg init sub
103 $ touch sub/test
97 $ touch sub/test
104 $ hg -R sub commit -A -m "test"
98 $ hg -R sub commit -A -m "test"
105 adding test
99 adding test
106 $ hg -R sub tag not-empty
100 $ hg -R sub tag not-empty
107 $ echo sub=sub > .hgsub
101 $ echo sub=sub > .hgsub
108 $ echo a > a
102 $ echo a > a
109 $ hg add a .hgsub
103 $ hg add a .hgsub
110 $ hg -q ci -ma
104 $ hg -q ci -ma
111 $ hg clone static-http://localhost:$HGPORT/ local2
105 $ hg clone static-http://localhost:$HGPORT/ local2
112 requesting all changes
106 requesting all changes
113 adding changesets
107 adding changesets
114 adding manifests
108 adding manifests
115 adding file changes
109 adding file changes
116 added 1 changesets with 3 changes to 3 files
110 added 1 changesets with 3 changes to 3 files
117 updating to branch default
111 updating to branch default
118 cloning subrepo sub from static-http://localhost:$HGPORT/sub
112 cloning subrepo sub from static-http://localhost:$HGPORT/sub
119 requesting all changes
113 requesting all changes
120 adding changesets
114 adding changesets
121 adding manifests
115 adding manifests
122 adding file changes
116 adding file changes
123 added 2 changesets with 2 changes to 2 files
117 added 2 changesets with 2 changes to 2 files
124 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
118 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
125 $ cd local2
119 $ cd local2
126 $ hg verify
120 $ hg verify
127 checking changesets
121 checking changesets
128 checking manifests
122 checking manifests
129 crosschecking files in changesets and manifests
123 crosschecking files in changesets and manifests
130 checking files
124 checking files
131 3 files, 1 changesets, 3 total revisions
125 3 files, 1 changesets, 3 total revisions
132 checking subrepo links
126 checking subrepo links
133 $ cat a
127 $ cat a
134 a
128 a
135 $ hg paths
129 $ hg paths
136 default = static-http://localhost:$HGPORT/
130 default = static-http://localhost:$HGPORT/
137
131
138 test with empty repo (issue965)
132 test with empty repo (issue965)
139
133
140 $ cd ..
134 $ cd ..
141 $ hg init remotempty
135 $ hg init remotempty
142 $ hg clone static-http://localhost:$HGPORT/remotempty local3
136 $ hg clone static-http://localhost:$HGPORT/remotempty local3
143 no changes found
137 no changes found
144 updating to branch default
138 updating to branch default
145 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
139 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
146 $ cd local3
140 $ cd local3
147 $ hg verify
141 $ hg verify
148 checking changesets
142 checking changesets
149 checking manifests
143 checking manifests
150 crosschecking files in changesets and manifests
144 crosschecking files in changesets and manifests
151 checking files
145 checking files
152 0 files, 0 changesets, 0 total revisions
146 0 files, 0 changesets, 0 total revisions
153 $ hg paths
147 $ hg paths
154 default = static-http://localhost:$HGPORT/remotempty
148 default = static-http://localhost:$HGPORT/remotempty
155
149
156 test with non-repo
150 test with non-repo
157
151
158 $ cd ..
152 $ cd ..
159 $ mkdir notarepo
153 $ mkdir notarepo
160 $ hg clone static-http://localhost:$HGPORT/notarepo local3
154 $ hg clone static-http://localhost:$HGPORT/notarepo local3
161 abort: 'http://localhost:$HGPORT/notarepo' does not appear to be an hg repository!
155 abort: 'http://localhost:$HGPORT/notarepo' does not appear to be an hg repository!
162 [255]
156 [255]
163 $ killdaemons.py
157 $ killdaemons.py
General Comments 0
You need to be logged in to leave comments. Login now