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