Show More
@@ -1,616 +1,616 b'' | |||||
1 | #require serve |
|
1 | #require serve | |
2 |
|
2 | |||
3 | $ hg init test |
|
3 | $ hg init test | |
4 | $ cd test |
|
4 | $ cd test | |
5 | $ echo foo>foo |
|
5 | $ echo foo>foo | |
6 | $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg |
|
6 | $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg | |
7 | $ echo foo>foo.d/foo |
|
7 | $ echo foo>foo.d/foo | |
8 | $ echo bar>foo.d/bAr.hg.d/BaR |
|
8 | $ echo bar>foo.d/bAr.hg.d/BaR | |
9 | $ echo bar>foo.d/baR.d.hg/bAR |
|
9 | $ echo bar>foo.d/baR.d.hg/bAR | |
10 | $ hg commit -A -m 1 |
|
10 | $ hg commit -A -m 1 | |
11 | adding foo |
|
11 | adding foo | |
12 | adding foo.d/bAr.hg.d/BaR |
|
12 | adding foo.d/bAr.hg.d/BaR | |
13 | adding foo.d/baR.d.hg/bAR |
|
13 | adding foo.d/baR.d.hg/bAR | |
14 | adding foo.d/foo |
|
14 | adding foo.d/foo | |
15 | $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log |
|
15 | $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log | |
16 | $ hg serve --config server.uncompressed=False -p $HGPORT1 -d --pid-file=../hg2.pid |
|
16 | $ hg serve --config server.uncompressed=False -p $HGPORT1 -d --pid-file=../hg2.pid | |
17 |
|
17 | |||
18 | Test server address cannot be reused |
|
18 | Test server address cannot be reused | |
19 |
|
19 | |||
20 | $ hg serve -p $HGPORT1 2>&1 |
|
20 | $ hg serve -p $HGPORT1 2>&1 | |
21 | abort: cannot start server at 'localhost:$HGPORT1': $EADDRINUSE$ |
|
21 | abort: cannot start server at 'localhost:$HGPORT1': $EADDRINUSE$ | |
22 | [255] |
|
22 | [255] | |
23 |
|
23 | |||
24 | $ cd .. |
|
24 | $ cd .. | |
25 | $ cat hg1.pid hg2.pid >> $DAEMON_PIDS |
|
25 | $ cat hg1.pid hg2.pid >> $DAEMON_PIDS | |
26 |
|
26 | |||
27 | clone via stream |
|
27 | clone via stream | |
28 |
|
28 | |||
29 | #if no-reposimplestore |
|
29 | #if no-reposimplestore | |
30 | $ hg clone --stream http://localhost:$HGPORT/ copy 2>&1 |
|
30 | $ hg clone --stream http://localhost:$HGPORT/ copy 2>&1 | |
31 | streaming all changes |
|
31 | streaming all changes | |
32 | 9 files to transfer, 715 bytes of data |
|
32 | 9 files to transfer, 715 bytes of data | |
33 | transferred * bytes in * seconds (*/sec) (glob) |
|
33 | transferred * bytes in * seconds (*/sec) (glob) | |
34 | updating to branch default |
|
34 | updating to branch default | |
35 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
35 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
36 | $ hg verify -R copy |
|
36 | $ hg verify -R copy | |
37 | checking changesets |
|
37 | checking changesets | |
38 | checking manifests |
|
38 | checking manifests | |
39 | crosschecking files in changesets and manifests |
|
39 | crosschecking files in changesets and manifests | |
40 | checking files |
|
40 | checking files | |
41 | checked 1 changesets with 4 changes to 4 files |
|
41 | checked 1 changesets with 4 changes to 4 files | |
42 | #endif |
|
42 | #endif | |
43 |
|
43 | |||
44 | try to clone via stream, should use pull instead |
|
44 | try to clone via stream, should use pull instead | |
45 |
|
45 | |||
46 | $ hg clone --stream http://localhost:$HGPORT1/ copy2 |
|
46 | $ hg clone --stream http://localhost:$HGPORT1/ copy2 | |
47 | warning: stream clone requested but server has them disabled |
|
47 | warning: stream clone requested but server has them disabled | |
48 | requesting all changes |
|
48 | requesting all changes | |
49 | adding changesets |
|
49 | adding changesets | |
50 | adding manifests |
|
50 | adding manifests | |
51 | adding file changes |
|
51 | adding file changes | |
52 | added 1 changesets with 4 changes to 4 files |
|
52 | added 1 changesets with 4 changes to 4 files | |
53 | new changesets 8b6053c928fe |
|
53 | new changesets 8b6053c928fe | |
54 | updating to branch default |
|
54 | updating to branch default | |
55 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
55 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
56 |
|
56 | |||
57 | try to clone via stream but missing requirements, so should use pull instead |
|
57 | try to clone via stream but missing requirements, so should use pull instead | |
58 |
|
58 | |||
59 | $ cat > $TESTTMP/removesupportedformat.py << EOF |
|
59 | $ cat > $TESTTMP/removesupportedformat.py << EOF | |
60 | > from mercurial import localrepo |
|
60 | > from mercurial import localrepo | |
61 | > def extsetup(ui): |
|
61 | > def extsetup(ui): | |
62 | > localrepo.localrepository.supportedformats.remove(b'generaldelta') |
|
62 | > localrepo.localrepository.supportedformats.remove(b'generaldelta') | |
63 | > EOF |
|
63 | > EOF | |
64 |
|
64 | |||
65 | $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --stream http://localhost:$HGPORT/ copy3 |
|
65 | $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --stream http://localhost:$HGPORT/ copy3 | |
66 | warning: stream clone requested but client is missing requirements: generaldelta |
|
66 | warning: stream clone requested but client is missing requirements: generaldelta | |
67 | (see https://www.mercurial-scm.org/wiki/MissingRequirement for more information) |
|
67 | (see https://www.mercurial-scm.org/wiki/MissingRequirement for more information) | |
68 | requesting all changes |
|
68 | requesting all changes | |
69 | adding changesets |
|
69 | adding changesets | |
70 | adding manifests |
|
70 | adding manifests | |
71 | adding file changes |
|
71 | adding file changes | |
72 | added 1 changesets with 4 changes to 4 files |
|
72 | added 1 changesets with 4 changes to 4 files | |
73 | new changesets 8b6053c928fe |
|
73 | new changesets 8b6053c928fe | |
74 | updating to branch default |
|
74 | updating to branch default | |
75 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
75 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
76 |
|
76 | |||
77 | clone via pull |
|
77 | clone via pull | |
78 |
|
78 | |||
79 | $ hg clone http://localhost:$HGPORT1/ copy-pull |
|
79 | $ hg clone http://localhost:$HGPORT1/ copy-pull | |
80 | requesting all changes |
|
80 | requesting all changes | |
81 | adding changesets |
|
81 | adding changesets | |
82 | adding manifests |
|
82 | adding manifests | |
83 | adding file changes |
|
83 | adding file changes | |
84 | added 1 changesets with 4 changes to 4 files |
|
84 | added 1 changesets with 4 changes to 4 files | |
85 | new changesets 8b6053c928fe |
|
85 | new changesets 8b6053c928fe | |
86 | updating to branch default |
|
86 | updating to branch default | |
87 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
87 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
88 | $ hg verify -R copy-pull |
|
88 | $ hg verify -R copy-pull | |
89 | checking changesets |
|
89 | checking changesets | |
90 | checking manifests |
|
90 | checking manifests | |
91 | crosschecking files in changesets and manifests |
|
91 | crosschecking files in changesets and manifests | |
92 | checking files |
|
92 | checking files | |
93 | checked 1 changesets with 4 changes to 4 files |
|
93 | checked 1 changesets with 4 changes to 4 files | |
94 | $ cd test |
|
94 | $ cd test | |
95 | $ echo bar > bar |
|
95 | $ echo bar > bar | |
96 | $ hg commit -A -d '1 0' -m 2 |
|
96 | $ hg commit -A -d '1 0' -m 2 | |
97 | adding bar |
|
97 | adding bar | |
98 | $ cd .. |
|
98 | $ cd .. | |
99 |
|
99 | |||
100 | clone over http with --update |
|
100 | clone over http with --update | |
101 |
|
101 | |||
102 | $ hg clone http://localhost:$HGPORT1/ updated --update 0 |
|
102 | $ hg clone http://localhost:$HGPORT1/ updated --update 0 | |
103 | requesting all changes |
|
103 | requesting all changes | |
104 | adding changesets |
|
104 | adding changesets | |
105 | adding manifests |
|
105 | adding manifests | |
106 | adding file changes |
|
106 | adding file changes | |
107 | added 2 changesets with 5 changes to 5 files |
|
107 | added 2 changesets with 5 changes to 5 files | |
108 | new changesets 8b6053c928fe:5fed3813f7f5 |
|
108 | new changesets 8b6053c928fe:5fed3813f7f5 | |
109 | updating to branch default |
|
109 | updating to branch default | |
110 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
110 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
111 | $ hg log -r . -R updated |
|
111 | $ hg log -r . -R updated | |
112 | changeset: 0:8b6053c928fe |
|
112 | changeset: 0:8b6053c928fe | |
113 | user: test |
|
113 | user: test | |
114 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
114 | date: Thu Jan 01 00:00:00 1970 +0000 | |
115 | summary: 1 |
|
115 | summary: 1 | |
116 |
|
116 | |||
117 | $ rm -rf updated |
|
117 | $ rm -rf updated | |
118 |
|
118 | |||
119 | incoming via HTTP |
|
119 | incoming via HTTP | |
120 |
|
120 | |||
121 | $ hg clone http://localhost:$HGPORT1/ --rev 0 partial |
|
121 | $ hg clone http://localhost:$HGPORT1/ --rev 0 partial | |
122 | adding changesets |
|
122 | adding changesets | |
123 | adding manifests |
|
123 | adding manifests | |
124 | adding file changes |
|
124 | adding file changes | |
125 | added 1 changesets with 4 changes to 4 files |
|
125 | added 1 changesets with 4 changes to 4 files | |
126 | new changesets 8b6053c928fe |
|
126 | new changesets 8b6053c928fe | |
127 | updating to branch default |
|
127 | updating to branch default | |
128 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
128 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
129 | $ cd partial |
|
129 | $ cd partial | |
130 | $ touch LOCAL |
|
130 | $ touch LOCAL | |
131 | $ hg ci -qAm LOCAL |
|
131 | $ hg ci -qAm LOCAL | |
132 | $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n' |
|
132 | $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n' | |
133 | comparing with http://localhost:$HGPORT1/ |
|
133 | comparing with http://localhost:$HGPORT1/ | |
134 | searching for changes |
|
134 | searching for changes | |
135 | 2 |
|
135 | 2 | |
136 | $ cd .. |
|
136 | $ cd .. | |
137 |
|
137 | |||
138 | pull |
|
138 | pull | |
139 |
|
139 | |||
140 | $ cd copy-pull |
|
140 | $ cd copy-pull | |
141 | $ cat >> .hg/hgrc <<EOF |
|
141 | $ cat >> .hg/hgrc <<EOF | |
142 | > [hooks] |
|
142 | > [hooks] | |
143 | > changegroup = sh -c "printenv.py --line changegroup" |
|
143 | > changegroup = sh -c "printenv.py --line changegroup" | |
144 | > EOF |
|
144 | > EOF | |
145 | $ hg pull |
|
145 | $ hg pull | |
146 | pulling from http://localhost:$HGPORT1/ |
|
146 | pulling from http://localhost:$HGPORT1/ | |
147 | searching for changes |
|
147 | searching for changes | |
148 | adding changesets |
|
148 | adding changesets | |
149 | adding manifests |
|
149 | adding manifests | |
150 | adding file changes |
|
150 | adding file changes | |
151 | added 1 changesets with 1 changes to 1 files |
|
151 | added 1 changesets with 1 changes to 1 files | |
152 | new changesets 5fed3813f7f5 |
|
152 | new changesets 5fed3813f7f5 | |
153 | changegroup hook: HG_HOOKNAME=changegroup |
|
153 | changegroup hook: HG_HOOKNAME=changegroup | |
154 | HG_HOOKTYPE=changegroup |
|
154 | HG_HOOKTYPE=changegroup | |
155 | HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d |
|
155 | HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d | |
156 | HG_NODE_LAST=5fed3813f7f5e1824344fdc9cf8f63bb662c292d |
|
156 | HG_NODE_LAST=5fed3813f7f5e1824344fdc9cf8f63bb662c292d | |
157 | HG_SOURCE=pull |
|
157 | HG_SOURCE=pull | |
158 | HG_TXNID=TXN:$ID$ |
|
158 | HG_TXNID=TXN:$ID$ | |
159 | HG_TXNNAME=pull |
|
159 | HG_TXNNAME=pull | |
160 | http://localhost:$HGPORT1/ |
|
160 | http://localhost:$HGPORT1/ | |
161 | HG_URL=http://localhost:$HGPORT1/ |
|
161 | HG_URL=http://localhost:$HGPORT1/ | |
162 |
|
162 | |||
163 | (run 'hg update' to get a working copy) |
|
163 | (run 'hg update' to get a working copy) | |
164 | $ cd .. |
|
164 | $ cd .. | |
165 |
|
165 | |||
166 | clone from invalid URL |
|
166 | clone from invalid URL | |
167 |
|
167 | |||
168 | $ hg clone http://localhost:$HGPORT/bad |
|
168 | $ hg clone http://localhost:$HGPORT/bad | |
169 | abort: HTTP Error 404: Not Found |
|
169 | abort: HTTP Error 404: Not Found | |
170 | [100] |
|
170 | [100] | |
171 |
|
171 | |||
172 | test http authentication |
|
172 | test http authentication | |
173 | + use the same server to test server side streaming preference |
|
173 | + use the same server to test server side streaming preference | |
174 |
|
174 | |||
175 | $ cd test |
|
175 | $ cd test | |
176 |
|
176 | |||
177 | $ hg serve --config extensions.x=$TESTDIR/httpserverauth.py -p $HGPORT2 -d \ |
|
177 | $ hg serve --config extensions.x=$TESTDIR/httpserverauth.py -p $HGPORT2 -d \ | |
178 | > --pid-file=pid --config server.preferuncompressed=True -E ../errors2.log \ |
|
178 | > --pid-file=pid --config server.preferuncompressed=True -E ../errors2.log \ | |
179 | > --config web.push_ssl=False --config web.allow_push=* -A ../access.log |
|
179 | > --config web.push_ssl=False --config web.allow_push=* -A ../access.log | |
180 | $ cat pid >> $DAEMON_PIDS |
|
180 | $ cat pid >> $DAEMON_PIDS | |
181 |
|
181 | |||
182 | $ cat << EOF > get_pass.py |
|
182 | $ cat << EOF > get_pass.py | |
183 | > import getpass |
|
183 | > import getpass | |
184 | > def newgetpass(arg): |
|
184 | > def newgetpass(arg): | |
185 | > return "pass" |
|
185 | > return "pass" | |
186 | > getpass.getpass = newgetpass |
|
186 | > getpass.getpass = newgetpass | |
187 | > EOF |
|
187 | > EOF | |
188 |
|
188 | |||
189 | $ hg id http://localhost:$HGPORT2/ |
|
189 | $ hg id http://localhost:$HGPORT2/ | |
190 | abort: http authorization required for http://localhost:$HGPORT2/ |
|
190 | abort: http authorization required for http://localhost:$HGPORT2/ | |
191 | [255] |
|
191 | [255] | |
192 | $ hg id http://localhost:$HGPORT2/ |
|
192 | $ hg id http://localhost:$HGPORT2/ | |
193 | abort: http authorization required for http://localhost:$HGPORT2/ |
|
193 | abort: http authorization required for http://localhost:$HGPORT2/ | |
194 | [255] |
|
194 | [255] | |
195 | $ hg id --config ui.interactive=true --debug http://localhost:$HGPORT2/ |
|
195 | $ hg id --config ui.interactive=true --debug http://localhost:$HGPORT2/ | |
196 | using http://localhost:$HGPORT2/ |
|
196 | using http://localhost:$HGPORT2/ | |
197 | sending capabilities command |
|
197 | sending capabilities command | |
198 | http authorization required for http://localhost:$HGPORT2/ |
|
198 | http authorization required for http://localhost:$HGPORT2/ | |
199 | realm: mercurial |
|
199 | realm: mercurial | |
200 | user: abort: response expected |
|
200 | user: abort: response expected | |
201 | [255] |
|
201 | [255] | |
202 | $ cat <<'EOF' | hg id --config ui.interactive=true --config ui.nontty=true --debug http://localhost:$HGPORT2/ |
|
202 | $ cat <<'EOF' | hg id --config ui.interactive=true --config ui.nontty=true --debug http://localhost:$HGPORT2/ | |
203 | > |
|
203 | > | |
204 | > EOF |
|
204 | > EOF | |
205 | using http://localhost:$HGPORT2/ |
|
205 | using http://localhost:$HGPORT2/ | |
206 | sending capabilities command |
|
206 | sending capabilities command | |
207 | http authorization required for http://localhost:$HGPORT2/ |
|
207 | http authorization required for http://localhost:$HGPORT2/ | |
208 | realm: mercurial |
|
208 | realm: mercurial | |
209 | user: |
|
209 | user: | |
210 | password: abort: response expected |
|
210 | password: abort: response expected | |
211 | [255] |
|
211 | [255] | |
212 | $ cat <<'EOF' | hg id --config ui.interactive=true --config ui.nontty=true --debug http://localhost:$HGPORT2/ |
|
212 | $ cat <<'EOF' | hg id --config ui.interactive=true --config ui.nontty=true --debug http://localhost:$HGPORT2/ | |
213 | > |
|
213 | > | |
214 | > |
|
214 | > | |
215 | > EOF |
|
215 | > EOF | |
216 | using http://localhost:$HGPORT2/ |
|
216 | using http://localhost:$HGPORT2/ | |
217 | sending capabilities command |
|
217 | sending capabilities command | |
218 | http authorization required for http://localhost:$HGPORT2/ |
|
218 | http authorization required for http://localhost:$HGPORT2/ | |
219 | realm: mercurial |
|
219 | realm: mercurial | |
220 | user: |
|
220 | user: | |
221 | password: abort: authorization failed |
|
221 | password: abort: authorization failed | |
222 | [255] |
|
222 | [255] | |
223 | $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/ |
|
223 | $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/ | |
224 | http authorization required for http://localhost:$HGPORT2/ |
|
224 | http authorization required for http://localhost:$HGPORT2/ | |
225 | realm: mercurial |
|
225 | realm: mercurial | |
226 | user: user |
|
226 | user: user | |
227 | password: 5fed3813f7f5 |
|
227 | password: 5fed3813f7f5 | |
228 | $ hg id http://user:pass@localhost:$HGPORT2/ |
|
228 | $ hg id http://user:pass@localhost:$HGPORT2/ | |
229 | 5fed3813f7f5 |
|
229 | 5fed3813f7f5 | |
230 | $ echo '[auth]' >> .hg/hgrc |
|
230 | $ echo '[auth]' >> .hg/hgrc | |
231 | $ echo 'l.schemes=http' >> .hg/hgrc |
|
231 | $ echo 'l.schemes=http' >> .hg/hgrc | |
232 | $ echo 'l.prefix=lo' >> .hg/hgrc |
|
232 | $ echo 'l.prefix=lo' >> .hg/hgrc | |
233 | $ echo 'l.username=user' >> .hg/hgrc |
|
233 | $ echo 'l.username=user' >> .hg/hgrc | |
234 | $ echo 'l.password=pass' >> .hg/hgrc |
|
234 | $ echo 'l.password=pass' >> .hg/hgrc | |
235 | $ hg id http://localhost:$HGPORT2/ |
|
235 | $ hg id http://localhost:$HGPORT2/ | |
236 | 5fed3813f7f5 |
|
236 | 5fed3813f7f5 | |
237 | $ hg id http://localhost:$HGPORT2/ |
|
237 | $ hg id http://localhost:$HGPORT2/ | |
238 | 5fed3813f7f5 |
|
238 | 5fed3813f7f5 | |
239 | $ hg id http://user@localhost:$HGPORT2/ |
|
239 | $ hg id http://user@localhost:$HGPORT2/ | |
240 | 5fed3813f7f5 |
|
240 | 5fed3813f7f5 | |
241 |
|
241 | |||
242 | $ cat > use_digests.py << EOF |
|
242 | $ cat > use_digests.py << EOF | |
243 | > from mercurial import ( |
|
243 | > from mercurial import ( | |
244 | > exthelper, |
|
244 | > exthelper, | |
245 | > url, |
|
245 | > url, | |
246 | > ) |
|
246 | > ) | |
247 | > |
|
247 | > | |
248 | > eh = exthelper.exthelper() |
|
248 | > eh = exthelper.exthelper() | |
249 | > uisetup = eh.finaluisetup |
|
249 | > uisetup = eh.finaluisetup | |
250 | > |
|
250 | > | |
251 | > @eh.wrapfunction(url, 'opener') |
|
251 | > @eh.wrapfunction(url, 'opener') | |
252 | > def urlopener(orig, *args, **kwargs): |
|
252 | > def urlopener(orig, *args, **kwargs): | |
253 | > opener = orig(*args, **kwargs) |
|
253 | > opener = orig(*args, **kwargs) | |
254 | > opener.addheaders.append((r'X-HgTest-AuthType', r'Digest')) |
|
254 | > opener.addheaders.append((r'X-HgTest-AuthType', r'Digest')) | |
255 | > return opener |
|
255 | > return opener | |
256 | > EOF |
|
256 | > EOF | |
257 |
|
257 | |||
258 | $ hg id http://localhost:$HGPORT2/ --config extensions.x=use_digests.py |
|
258 | $ hg id http://localhost:$HGPORT2/ --config extensions.x=use_digests.py | |
259 | 5fed3813f7f5 |
|
259 | 5fed3813f7f5 | |
260 |
|
260 | |||
261 | #if no-reposimplestore |
|
261 | #if no-reposimplestore | |
262 | $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1 |
|
262 | $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1 | |
263 | streaming all changes |
|
263 | streaming all changes | |
264 | 10 files to transfer, 1.01 KB of data |
|
264 | 10 files to transfer, 1.01 KB of data | |
265 | transferred * KB in * seconds (*/sec) (glob) |
|
265 | transferred * KB in * seconds (*/sec) (glob) | |
266 | updating to branch default |
|
266 | updating to branch default | |
267 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
267 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
268 | #endif |
|
268 | #endif | |
269 |
|
269 | |||
270 | --pull should override server's preferuncompressed |
|
270 | --pull should override server's preferuncompressed | |
271 | $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1 |
|
271 | $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1 | |
272 | requesting all changes |
|
272 | requesting all changes | |
273 | adding changesets |
|
273 | adding changesets | |
274 | adding manifests |
|
274 | adding manifests | |
275 | adding file changes |
|
275 | adding file changes | |
276 | added 2 changesets with 5 changes to 5 files |
|
276 | added 2 changesets with 5 changes to 5 files | |
277 | new changesets 8b6053c928fe:5fed3813f7f5 |
|
277 | new changesets 8b6053c928fe:5fed3813f7f5 | |
278 | updating to branch default |
|
278 | updating to branch default | |
279 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
279 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
280 |
|
280 | |||
281 | $ hg id http://user2@localhost:$HGPORT2/ |
|
281 | $ hg id http://user2@localhost:$HGPORT2/ | |
282 | abort: http authorization required for http://localhost:$HGPORT2/ |
|
282 | abort: http authorization required for http://localhost:$HGPORT2/ | |
283 | [255] |
|
283 | [255] | |
284 | $ hg id http://user:pass2@localhost:$HGPORT2/ |
|
284 | $ hg id http://user:pass2@localhost:$HGPORT2/ | |
285 | abort: HTTP Error 403: no |
|
285 | abort: HTTP Error 403: no | |
286 | [100] |
|
286 | [100] | |
287 |
|
287 | |||
288 | $ hg -R dest-pull tag -r tip top |
|
288 | $ hg -R dest-pull tag -r tip top | |
289 | $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/ |
|
289 | $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/ | |
290 | pushing to http://user:***@localhost:$HGPORT2/ |
|
290 | pushing to http://user:***@localhost:$HGPORT2/ | |
291 | searching for changes |
|
291 | searching for changes | |
292 | remote: adding changesets |
|
292 | remote: adding changesets | |
293 | remote: adding manifests |
|
293 | remote: adding manifests | |
294 | remote: adding file changes |
|
294 | remote: adding file changes | |
295 | remote: added 1 changesets with 1 changes to 1 files |
|
295 | remote: added 1 changesets with 1 changes to 1 files | |
296 | $ hg rollback -q |
|
296 | $ hg rollback -q | |
297 | $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/ --debug --config devel.debug.peer-request=yes |
|
297 | $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/ --debug --config devel.debug.peer-request=yes | |
298 | pushing to http://user:***@localhost:$HGPORT2/ |
|
298 | pushing to http://user:***@localhost:$HGPORT2/ | |
299 | using http://localhost:$HGPORT2/ |
|
299 | using http://localhost:$HGPORT2/ | |
300 | http auth: user user, password **** |
|
300 | http auth: user user, password **** | |
301 | sending capabilities command |
|
301 | sending capabilities command | |
302 | devel-peer-request: GET http://localhost:$HGPORT2/?cmd=capabilities |
|
302 | devel-peer-request: GET http://localhost:$HGPORT2/?cmd=capabilities | |
303 | http auth: user user, password **** |
|
303 | http auth: user user, password **** | |
304 | devel-peer-request: finished in *.???? seconds (200) (glob) |
|
304 | devel-peer-request: finished in *.???? seconds (200) (glob) | |
305 | query 1; heads |
|
305 | query 1; heads | |
306 | devel-peer-request: batched-content |
|
306 | devel-peer-request: batched-content | |
307 | devel-peer-request: - heads (0 arguments) |
|
307 | devel-peer-request: - heads (0 arguments) | |
308 | devel-peer-request: - known (1 arguments) |
|
308 | devel-peer-request: - known (1 arguments) | |
309 | sending batch command |
|
309 | sending batch command | |
310 | devel-peer-request: GET http://localhost:$HGPORT2/?cmd=batch |
|
310 | devel-peer-request: GET http://localhost:$HGPORT2/?cmd=batch | |
311 | devel-peer-request: Vary X-HgArg-1,X-HgProto-1 |
|
311 | devel-peer-request: Vary X-HgArg-1,X-HgProto-1 | |
312 | devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
312 | devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
313 | devel-peer-request: 68 bytes of commands arguments in headers |
|
313 | devel-peer-request: 68 bytes of commands arguments in headers | |
314 | devel-peer-request: finished in *.???? seconds (200) (glob) |
|
314 | devel-peer-request: finished in *.???? seconds (200) (glob) | |
315 | searching for changes |
|
315 | searching for changes | |
316 | all remote heads known locally |
|
316 | all remote heads known locally | |
317 | preparing listkeys for "phases" |
|
317 | preparing listkeys for "phases" | |
318 | sending listkeys command |
|
318 | sending listkeys command | |
319 | devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys |
|
319 | devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys | |
320 | devel-peer-request: Vary X-HgArg-1,X-HgProto-1 |
|
320 | devel-peer-request: Vary X-HgArg-1,X-HgProto-1 | |
321 | devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
321 | devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
322 | devel-peer-request: 16 bytes of commands arguments in headers |
|
322 | devel-peer-request: 16 bytes of commands arguments in headers | |
323 | devel-peer-request: finished in *.???? seconds (200) (glob) |
|
323 | devel-peer-request: finished in *.???? seconds (200) (glob) | |
324 | received listkey for "phases": 58 bytes |
|
324 | received listkey for "phases": 58 bytes | |
325 | checking for updated bookmarks |
|
325 | checking for updated bookmarks | |
326 | preparing listkeys for "bookmarks" |
|
326 | preparing listkeys for "bookmarks" | |
327 | sending listkeys command |
|
327 | sending listkeys command | |
328 | devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys |
|
328 | devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys | |
329 | devel-peer-request: Vary X-HgArg-1,X-HgProto-1 |
|
329 | devel-peer-request: Vary X-HgArg-1,X-HgProto-1 | |
330 | devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
330 | devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
331 | devel-peer-request: 19 bytes of commands arguments in headers |
|
331 | devel-peer-request: 19 bytes of commands arguments in headers | |
332 | devel-peer-request: finished in *.???? seconds (200) (glob) |
|
332 | devel-peer-request: finished in *.???? seconds (200) (glob) | |
333 | received listkey for "bookmarks": 0 bytes |
|
333 | received listkey for "bookmarks": 0 bytes | |
334 | sending branchmap command |
|
334 | sending branchmap command | |
335 | devel-peer-request: GET http://localhost:$HGPORT2/?cmd=branchmap |
|
335 | devel-peer-request: GET http://localhost:$HGPORT2/?cmd=branchmap | |
336 | devel-peer-request: Vary X-HgProto-1 |
|
336 | devel-peer-request: Vary X-HgProto-1 | |
337 | devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
337 | devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
338 | devel-peer-request: finished in *.???? seconds (200) (glob) |
|
338 | devel-peer-request: finished in *.???? seconds (200) (glob) | |
339 | preparing listkeys for "bookmarks" |
|
339 | preparing listkeys for "bookmarks" | |
340 | sending listkeys command |
|
340 | sending listkeys command | |
341 | devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys |
|
341 | devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys | |
342 | devel-peer-request: Vary X-HgArg-1,X-HgProto-1 |
|
342 | devel-peer-request: Vary X-HgArg-1,X-HgProto-1 | |
343 | devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
343 | devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
344 | devel-peer-request: 19 bytes of commands arguments in headers |
|
344 | devel-peer-request: 19 bytes of commands arguments in headers | |
345 | devel-peer-request: finished in *.???? seconds (200) (glob) |
|
345 | devel-peer-request: finished in *.???? seconds (200) (glob) | |
346 | received listkey for "bookmarks": 0 bytes |
|
346 | received listkey for "bookmarks": 0 bytes | |
347 | 1 changesets found |
|
347 | 1 changesets found | |
348 | list of changesets: |
|
348 | list of changesets: | |
349 | 7f4e523d01f2cc3765ac8934da3d14db775ff872 |
|
349 | 7f4e523d01f2cc3765ac8934da3d14db775ff872 | |
350 | bundle2-output-bundle: "HG20", 5 parts total |
|
350 | bundle2-output-bundle: "HG20", 5 parts total | |
351 | bundle2-output-part: "replycaps" 207 bytes payload |
|
351 | bundle2-output-part: "replycaps" 207 bytes payload | |
352 | bundle2-output-part: "check:phases" 24 bytes payload |
|
352 | bundle2-output-part: "check:phases" 24 bytes payload | |
353 | bundle2-output-part: "check:updated-heads" streamed payload |
|
353 | bundle2-output-part: "check:updated-heads" streamed payload | |
354 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
354 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
355 | bundle2-output-part: "phase-heads" 24 bytes payload |
|
355 | bundle2-output-part: "phase-heads" 24 bytes payload | |
356 | sending unbundle command |
|
356 | sending unbundle command | |
357 | sending 1023 bytes |
|
357 | sending 1023 bytes | |
358 | devel-peer-request: POST http://localhost:$HGPORT2/?cmd=unbundle |
|
358 | devel-peer-request: POST http://localhost:$HGPORT2/?cmd=unbundle | |
359 | devel-peer-request: Content-length 1023 |
|
359 | devel-peer-request: Content-length 1023 | |
360 | devel-peer-request: Content-type application/mercurial-0.1 |
|
360 | devel-peer-request: Content-type application/mercurial-0.1 | |
361 | devel-peer-request: Vary X-HgArg-1,X-HgProto-1 |
|
361 | devel-peer-request: Vary X-HgArg-1,X-HgProto-1 | |
362 | devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
362 | devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
363 | devel-peer-request: 16 bytes of commands arguments in headers |
|
363 | devel-peer-request: 16 bytes of commands arguments in headers | |
364 | devel-peer-request: 1023 bytes of data |
|
364 | devel-peer-request: 1023 bytes of data | |
365 | devel-peer-request: finished in *.???? seconds (200) (glob) |
|
365 | devel-peer-request: finished in *.???? seconds (200) (glob) | |
366 | bundle2-input-bundle: no-transaction |
|
366 | bundle2-input-bundle: no-transaction | |
367 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
367 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | |
368 | bundle2-input-part: "output" (advisory) (params: 0 advisory) supported |
|
368 | bundle2-input-part: "output" (advisory) (params: 0 advisory) supported | |
369 | bundle2-input-part: total payload size 55 |
|
369 | bundle2-input-part: total payload size 55 | |
370 | remote: adding changesets |
|
370 | remote: adding changesets | |
371 | remote: adding manifests |
|
371 | remote: adding manifests | |
372 | remote: adding file changes |
|
372 | remote: adding file changes | |
373 | bundle2-input-part: "output" (advisory) supported |
|
373 | bundle2-input-part: "output" (advisory) supported | |
374 | bundle2-input-part: total payload size 45 |
|
374 | bundle2-input-part: total payload size 45 | |
375 | remote: added 1 changesets with 1 changes to 1 files |
|
375 | remote: added 1 changesets with 1 changes to 1 files | |
376 | bundle2-input-bundle: 3 parts total |
|
376 | bundle2-input-bundle: 3 parts total | |
377 | preparing listkeys for "phases" |
|
377 | preparing listkeys for "phases" | |
378 | sending listkeys command |
|
378 | sending listkeys command | |
379 | devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys |
|
379 | devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys | |
380 | devel-peer-request: Vary X-HgArg-1,X-HgProto-1 |
|
380 | devel-peer-request: Vary X-HgArg-1,X-HgProto-1 | |
381 | devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
381 | devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
382 | devel-peer-request: 16 bytes of commands arguments in headers |
|
382 | devel-peer-request: 16 bytes of commands arguments in headers | |
383 | devel-peer-request: finished in *.???? seconds (200) (glob) |
|
383 | devel-peer-request: finished in *.???? seconds (200) (glob) | |
384 | received listkey for "phases": 15 bytes |
|
384 | received listkey for "phases": 15 bytes | |
385 |
(sent 9 HTTP requests and |
|
385 | (sent 9 HTTP requests and * bytes; received * bytes in responses) (glob) (?) | |
386 | $ hg rollback -q |
|
386 | $ hg rollback -q | |
387 |
|
387 | |||
388 | $ sed 's/.*] "/"/' < ../access.log |
|
388 | $ sed 's/.*] "/"/' < ../access.log | |
389 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
389 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
390 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
390 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
391 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
391 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
392 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
392 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
393 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
393 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
394 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
394 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
395 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
395 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
396 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
396 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
397 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
397 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
398 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
398 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
399 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
399 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
400 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
400 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
401 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
401 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
402 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
402 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
403 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
403 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
404 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
404 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
405 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
405 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
406 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
406 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
407 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
407 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
408 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
408 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
409 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
409 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
410 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
410 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
411 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
411 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
412 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
412 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
413 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
413 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
414 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
414 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
415 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
415 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
416 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
416 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
417 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
417 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
418 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
418 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
419 | "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgtest-authtype:Digest |
|
419 | "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgtest-authtype:Digest | |
420 | "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgtest-authtype:Digest |
|
420 | "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgtest-authtype:Digest | |
421 | "GET /?cmd=lookup HTTP/1.1" 401 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest |
|
421 | "GET /?cmd=lookup HTTP/1.1" 401 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest | |
422 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest |
|
422 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest | |
423 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest |
|
423 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest | |
424 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest |
|
424 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest | |
425 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest |
|
425 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest | |
426 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest |
|
426 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest | |
427 | "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !) |
|
427 | "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !) | |
428 | "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !) |
|
428 | "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !) | |
429 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !) |
|
429 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !) | |
430 | "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=bookmarks&stream=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !) |
|
430 | "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=bookmarks&stream=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !) | |
431 | "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !) |
|
431 | "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !) | |
432 | "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !) |
|
432 | "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !) | |
433 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
433 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
434 | "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
434 | "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
435 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
435 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
436 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
436 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
437 | "GET /?cmd=capabilities HTTP/1.1" 403 - |
|
437 | "GET /?cmd=capabilities HTTP/1.1" 403 - | |
438 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
438 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
439 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
439 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
440 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
440 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
441 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
441 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
442 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
442 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
443 | "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
443 | "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
444 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
444 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
445 | "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365* (glob) |
|
445 | "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365* (glob) | |
446 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
446 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
447 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
447 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
448 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
448 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
449 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
449 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
450 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
450 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
451 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
451 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
452 | "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
452 | "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
453 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
453 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
454 | "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
454 | "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
455 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull |
|
455 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull | |
456 |
|
456 | |||
457 | $ cd .. |
|
457 | $ cd .. | |
458 |
|
458 | |||
459 | clone of serve with repo in root and unserved subrepo (issue2970) |
|
459 | clone of serve with repo in root and unserved subrepo (issue2970) | |
460 |
|
460 | |||
461 | $ hg --cwd test init sub |
|
461 | $ hg --cwd test init sub | |
462 | $ echo empty > test/sub/empty |
|
462 | $ echo empty > test/sub/empty | |
463 | $ hg --cwd test/sub add empty |
|
463 | $ hg --cwd test/sub add empty | |
464 | $ hg --cwd test/sub commit -qm 'add empty' |
|
464 | $ hg --cwd test/sub commit -qm 'add empty' | |
465 | $ hg --cwd test/sub tag -r 0 something |
|
465 | $ hg --cwd test/sub tag -r 0 something | |
466 | $ echo sub = sub > test/.hgsub |
|
466 | $ echo sub = sub > test/.hgsub | |
467 | $ hg --cwd test add .hgsub |
|
467 | $ hg --cwd test add .hgsub | |
468 | $ hg --cwd test commit -qm 'add subrepo' |
|
468 | $ hg --cwd test commit -qm 'add subrepo' | |
469 | $ hg clone http://localhost:$HGPORT noslash-clone |
|
469 | $ hg clone http://localhost:$HGPORT noslash-clone | |
470 | requesting all changes |
|
470 | requesting all changes | |
471 | adding changesets |
|
471 | adding changesets | |
472 | adding manifests |
|
472 | adding manifests | |
473 | adding file changes |
|
473 | adding file changes | |
474 | added 3 changesets with 7 changes to 7 files |
|
474 | added 3 changesets with 7 changes to 7 files | |
475 | new changesets 8b6053c928fe:56f9bc90cce6 |
|
475 | new changesets 8b6053c928fe:56f9bc90cce6 | |
476 | updating to branch default |
|
476 | updating to branch default | |
477 | cloning subrepo sub from http://localhost:$HGPORT/sub |
|
477 | cloning subrepo sub from http://localhost:$HGPORT/sub | |
478 | abort: HTTP Error 404: Not Found |
|
478 | abort: HTTP Error 404: Not Found | |
479 | [100] |
|
479 | [100] | |
480 | $ hg clone http://localhost:$HGPORT/ slash-clone |
|
480 | $ hg clone http://localhost:$HGPORT/ slash-clone | |
481 | requesting all changes |
|
481 | requesting all changes | |
482 | adding changesets |
|
482 | adding changesets | |
483 | adding manifests |
|
483 | adding manifests | |
484 | adding file changes |
|
484 | adding file changes | |
485 | added 3 changesets with 7 changes to 7 files |
|
485 | added 3 changesets with 7 changes to 7 files | |
486 | new changesets 8b6053c928fe:56f9bc90cce6 |
|
486 | new changesets 8b6053c928fe:56f9bc90cce6 | |
487 | updating to branch default |
|
487 | updating to branch default | |
488 | cloning subrepo sub from http://localhost:$HGPORT/sub |
|
488 | cloning subrepo sub from http://localhost:$HGPORT/sub | |
489 | abort: HTTP Error 404: Not Found |
|
489 | abort: HTTP Error 404: Not Found | |
490 | [100] |
|
490 | [100] | |
491 |
|
491 | |||
492 | check error log |
|
492 | check error log | |
493 |
|
493 | |||
494 | $ cat error.log |
|
494 | $ cat error.log | |
495 |
|
495 | |||
496 | $ cat errors2.log |
|
496 | $ cat errors2.log | |
497 |
|
497 | |||
498 | check abort error reporting while pulling/cloning |
|
498 | check abort error reporting while pulling/cloning | |
499 |
|
499 | |||
500 | $ $RUNTESTDIR/killdaemons.py |
|
500 | $ $RUNTESTDIR/killdaemons.py | |
501 | $ hg serve -R test -p $HGPORT -d --pid-file=hg3.pid -E error.log --config extensions.crash=${TESTDIR}/crashgetbundler.py |
|
501 | $ hg serve -R test -p $HGPORT -d --pid-file=hg3.pid -E error.log --config extensions.crash=${TESTDIR}/crashgetbundler.py | |
502 | $ cat hg3.pid >> $DAEMON_PIDS |
|
502 | $ cat hg3.pid >> $DAEMON_PIDS | |
503 | $ hg clone http://localhost:$HGPORT/ abort-clone |
|
503 | $ hg clone http://localhost:$HGPORT/ abort-clone | |
504 | requesting all changes |
|
504 | requesting all changes | |
505 | remote: abort: this is an exercise |
|
505 | remote: abort: this is an exercise | |
506 | abort: pull failed on remote |
|
506 | abort: pull failed on remote | |
507 | [255] |
|
507 | [255] | |
508 | $ cat error.log |
|
508 | $ cat error.log | |
509 |
|
509 | |||
510 | disable pull-based clones |
|
510 | disable pull-based clones | |
511 |
|
511 | |||
512 | $ hg serve -R test -p $HGPORT1 -d --pid-file=hg4.pid -E error.log --config server.disablefullbundle=True |
|
512 | $ hg serve -R test -p $HGPORT1 -d --pid-file=hg4.pid -E error.log --config server.disablefullbundle=True | |
513 | $ cat hg4.pid >> $DAEMON_PIDS |
|
513 | $ cat hg4.pid >> $DAEMON_PIDS | |
514 | $ hg clone http://localhost:$HGPORT1/ disable-pull-clone |
|
514 | $ hg clone http://localhost:$HGPORT1/ disable-pull-clone | |
515 | requesting all changes |
|
515 | requesting all changes | |
516 | remote: abort: server has pull-based clones disabled |
|
516 | remote: abort: server has pull-based clones disabled | |
517 | abort: pull failed on remote |
|
517 | abort: pull failed on remote | |
518 | (remove --pull if specified or upgrade Mercurial) |
|
518 | (remove --pull if specified or upgrade Mercurial) | |
519 | [255] |
|
519 | [255] | |
520 |
|
520 | |||
521 | #if no-reposimplestore |
|
521 | #if no-reposimplestore | |
522 | ... but keep stream clones working |
|
522 | ... but keep stream clones working | |
523 |
|
523 | |||
524 | $ hg clone --stream --noupdate http://localhost:$HGPORT1/ test-stream-clone |
|
524 | $ hg clone --stream --noupdate http://localhost:$HGPORT1/ test-stream-clone | |
525 | streaming all changes |
|
525 | streaming all changes | |
526 | * files to transfer, * of data (glob) |
|
526 | * files to transfer, * of data (glob) | |
527 | transferred * in * seconds (*/sec) (glob) |
|
527 | transferred * in * seconds (*/sec) (glob) | |
528 | $ cat error.log |
|
528 | $ cat error.log | |
529 | #endif |
|
529 | #endif | |
530 |
|
530 | |||
531 | ... and also keep partial clones and pulls working |
|
531 | ... and also keep partial clones and pulls working | |
532 | $ hg clone http://localhost:$HGPORT1 --rev 0 test/partial/clone |
|
532 | $ hg clone http://localhost:$HGPORT1 --rev 0 test/partial/clone | |
533 | adding changesets |
|
533 | adding changesets | |
534 | adding manifests |
|
534 | adding manifests | |
535 | adding file changes |
|
535 | adding file changes | |
536 | added 1 changesets with 4 changes to 4 files |
|
536 | added 1 changesets with 4 changes to 4 files | |
537 | new changesets 8b6053c928fe |
|
537 | new changesets 8b6053c928fe | |
538 | updating to branch default |
|
538 | updating to branch default | |
539 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
539 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
540 | $ hg pull -R test/partial/clone |
|
540 | $ hg pull -R test/partial/clone | |
541 | pulling from http://localhost:$HGPORT1/ |
|
541 | pulling from http://localhost:$HGPORT1/ | |
542 | searching for changes |
|
542 | searching for changes | |
543 | adding changesets |
|
543 | adding changesets | |
544 | adding manifests |
|
544 | adding manifests | |
545 | adding file changes |
|
545 | adding file changes | |
546 | added 2 changesets with 3 changes to 3 files |
|
546 | added 2 changesets with 3 changes to 3 files | |
547 | new changesets 5fed3813f7f5:56f9bc90cce6 |
|
547 | new changesets 5fed3813f7f5:56f9bc90cce6 | |
548 | (run 'hg update' to get a working copy) |
|
548 | (run 'hg update' to get a working copy) | |
549 |
|
549 | |||
550 | $ hg clone -U -r 0 test/partial/clone test/another/clone |
|
550 | $ hg clone -U -r 0 test/partial/clone test/another/clone | |
551 | adding changesets |
|
551 | adding changesets | |
552 | adding manifests |
|
552 | adding manifests | |
553 | adding file changes |
|
553 | adding file changes | |
554 | added 1 changesets with 4 changes to 4 files |
|
554 | added 1 changesets with 4 changes to 4 files | |
555 | new changesets 8b6053c928fe |
|
555 | new changesets 8b6053c928fe | |
556 |
|
556 | |||
557 | corrupt cookies file should yield a warning |
|
557 | corrupt cookies file should yield a warning | |
558 |
|
558 | |||
559 | $ cat > $TESTTMP/cookies.txt << EOF |
|
559 | $ cat > $TESTTMP/cookies.txt << EOF | |
560 | > bad format |
|
560 | > bad format | |
561 | > EOF |
|
561 | > EOF | |
562 |
|
562 | |||
563 | $ hg --config auth.cookiefile=$TESTTMP/cookies.txt id http://localhost:$HGPORT/ |
|
563 | $ hg --config auth.cookiefile=$TESTTMP/cookies.txt id http://localhost:$HGPORT/ | |
564 | (error loading cookie file $TESTTMP/cookies.txt: '*/cookies.txt' does not look like a Netscape format cookies file; continuing without cookies) (glob) |
|
564 | (error loading cookie file $TESTTMP/cookies.txt: '*/cookies.txt' does not look like a Netscape format cookies file; continuing without cookies) (glob) | |
565 | 56f9bc90cce6 |
|
565 | 56f9bc90cce6 | |
566 |
|
566 | |||
567 | $ killdaemons.py |
|
567 | $ killdaemons.py | |
568 |
|
568 | |||
569 | Create dummy authentication handler that looks for cookies. It doesn't do anything |
|
569 | Create dummy authentication handler that looks for cookies. It doesn't do anything | |
570 | useful. It just raises an HTTP 500 with details about the Cookie request header. |
|
570 | useful. It just raises an HTTP 500 with details about the Cookie request header. | |
571 | We raise HTTP 500 because its message is printed in the abort message. |
|
571 | We raise HTTP 500 because its message is printed in the abort message. | |
572 |
|
572 | |||
573 | $ cat > cookieauth.py << EOF |
|
573 | $ cat > cookieauth.py << EOF | |
574 | > from mercurial import util |
|
574 | > from mercurial import util | |
575 | > from mercurial.hgweb import common |
|
575 | > from mercurial.hgweb import common | |
576 | > def perform_authentication(hgweb, req, op): |
|
576 | > def perform_authentication(hgweb, req, op): | |
577 | > cookie = req.headers.get(b'Cookie') |
|
577 | > cookie = req.headers.get(b'Cookie') | |
578 | > if not cookie: |
|
578 | > if not cookie: | |
579 | > raise common.ErrorResponse(common.HTTP_SERVER_ERROR, b'no-cookie') |
|
579 | > raise common.ErrorResponse(common.HTTP_SERVER_ERROR, b'no-cookie') | |
580 | > raise common.ErrorResponse(common.HTTP_SERVER_ERROR, b'Cookie: %s' % cookie) |
|
580 | > raise common.ErrorResponse(common.HTTP_SERVER_ERROR, b'Cookie: %s' % cookie) | |
581 | > def extsetup(ui): |
|
581 | > def extsetup(ui): | |
582 | > common.permhooks.insert(0, perform_authentication) |
|
582 | > common.permhooks.insert(0, perform_authentication) | |
583 | > EOF |
|
583 | > EOF | |
584 |
|
584 | |||
585 | $ hg serve --config extensions.cookieauth=cookieauth.py -R test -p $HGPORT -d --pid-file=pid |
|
585 | $ hg serve --config extensions.cookieauth=cookieauth.py -R test -p $HGPORT -d --pid-file=pid | |
586 | $ cat pid > $DAEMON_PIDS |
|
586 | $ cat pid > $DAEMON_PIDS | |
587 |
|
587 | |||
588 | Request without cookie sent should fail due to lack of cookie |
|
588 | Request without cookie sent should fail due to lack of cookie | |
589 |
|
589 | |||
590 | $ hg id http://localhost:$HGPORT |
|
590 | $ hg id http://localhost:$HGPORT | |
591 | abort: HTTP Error 500: no-cookie |
|
591 | abort: HTTP Error 500: no-cookie | |
592 | [100] |
|
592 | [100] | |
593 |
|
593 | |||
594 | Populate a cookies file |
|
594 | Populate a cookies file | |
595 |
|
595 | |||
596 | $ cat > cookies.txt << EOF |
|
596 | $ cat > cookies.txt << EOF | |
597 | > # HTTP Cookie File |
|
597 | > # HTTP Cookie File | |
598 | > # Expiration is 2030-01-01 at midnight |
|
598 | > # Expiration is 2030-01-01 at midnight | |
599 | > .example.com TRUE / FALSE 1893456000 hgkey examplevalue |
|
599 | > .example.com TRUE / FALSE 1893456000 hgkey examplevalue | |
600 | > EOF |
|
600 | > EOF | |
601 |
|
601 | |||
602 | Should not send a cookie for another domain |
|
602 | Should not send a cookie for another domain | |
603 |
|
603 | |||
604 | $ hg --config auth.cookiefile=cookies.txt id http://localhost:$HGPORT/ |
|
604 | $ hg --config auth.cookiefile=cookies.txt id http://localhost:$HGPORT/ | |
605 | abort: HTTP Error 500: no-cookie |
|
605 | abort: HTTP Error 500: no-cookie | |
606 | [100] |
|
606 | [100] | |
607 |
|
607 | |||
608 | Add a cookie entry for our test server and verify it is sent |
|
608 | Add a cookie entry for our test server and verify it is sent | |
609 |
|
609 | |||
610 | $ cat >> cookies.txt << EOF |
|
610 | $ cat >> cookies.txt << EOF | |
611 | > localhost.local FALSE / FALSE 1893456000 hgkey localhostvalue |
|
611 | > localhost.local FALSE / FALSE 1893456000 hgkey localhostvalue | |
612 | > EOF |
|
612 | > EOF | |
613 |
|
613 | |||
614 | $ hg --config auth.cookiefile=cookies.txt id http://localhost:$HGPORT/ |
|
614 | $ hg --config auth.cookiefile=cookies.txt id http://localhost:$HGPORT/ | |
615 | abort: HTTP Error 500: Cookie: hgkey=localhostvalue |
|
615 | abort: HTTP Error 500: Cookie: hgkey=localhostvalue | |
616 | [100] |
|
616 | [100] |
@@ -1,694 +1,694 b'' | |||||
1 | #testcases lfsremote-on lfsremote-off |
|
1 | #testcases lfsremote-on lfsremote-off | |
2 | #require serve no-reposimplestore no-chg |
|
2 | #require serve no-reposimplestore no-chg | |
3 |
|
3 | |||
4 | This test splits `hg serve` with and without using the extension into separate |
|
4 | This test splits `hg serve` with and without using the extension into separate | |
5 | tests cases. The tests are broken down as follows, where "LFS"/"No-LFS" |
|
5 | tests cases. The tests are broken down as follows, where "LFS"/"No-LFS" | |
6 | indicates whether or not there are commits that use an LFS file, and "D"/"E" |
|
6 | indicates whether or not there are commits that use an LFS file, and "D"/"E" | |
7 | indicates whether or not the extension is loaded. The "X" cases are not tested |
|
7 | indicates whether or not the extension is loaded. The "X" cases are not tested | |
8 | individually, because the lfs requirement causes the process to bail early if |
|
8 | individually, because the lfs requirement causes the process to bail early if | |
9 | the extension is disabled. |
|
9 | the extension is disabled. | |
10 |
|
10 | |||
11 | . Server |
|
11 | . Server | |
12 | . |
|
12 | . | |
13 | . No-LFS LFS |
|
13 | . No-LFS LFS | |
14 | . +----------------------------+ |
|
14 | . +----------------------------+ | |
15 | . | || D | E | D | E | |
|
15 | . | || D | E | D | E | | |
16 | . |---++=======================| |
|
16 | . |---++=======================| | |
17 | . C | D || N/A | #1 | X | #4 | |
|
17 | . C | D || N/A | #1 | X | #4 | | |
18 | . l No +---++-----------------------| |
|
18 | . l No +---++-----------------------| | |
19 | . i LFS | E || #2 | #2 | X | #5 | |
|
19 | . i LFS | E || #2 | #2 | X | #5 | | |
20 | . e +---++-----------------------| |
|
20 | . e +---++-----------------------| | |
21 | . n | D || X | X | X | X | |
|
21 | . n | D || X | X | X | X | | |
22 | . t LFS |---++-----------------------| |
|
22 | . t LFS |---++-----------------------| | |
23 | . | E || #3 | #3 | X | #6 | |
|
23 | . | E || #3 | #3 | X | #6 | | |
24 | . |---++-----------------------+ |
|
24 | . |---++-----------------------+ | |
25 |
|
25 | |||
26 | make command server magic visible |
|
26 | make command server magic visible | |
27 |
|
27 | |||
28 | #if windows |
|
28 | #if windows | |
29 | $ PYTHONPATH="$TESTDIR/../contrib;$PYTHONPATH" |
|
29 | $ PYTHONPATH="$TESTDIR/../contrib;$PYTHONPATH" | |
30 | #else |
|
30 | #else | |
31 | $ PYTHONPATH="$TESTDIR/../contrib:$PYTHONPATH" |
|
31 | $ PYTHONPATH="$TESTDIR/../contrib:$PYTHONPATH" | |
32 | #endif |
|
32 | #endif | |
33 | $ export PYTHONPATH |
|
33 | $ export PYTHONPATH | |
34 |
|
34 | |||
35 | $ hg init server |
|
35 | $ hg init server | |
36 | $ SERVER_REQUIRES="$TESTTMP/server/.hg/requires" |
|
36 | $ SERVER_REQUIRES="$TESTTMP/server/.hg/requires" | |
37 |
|
37 | |||
38 | $ cat > $TESTTMP/debugprocessors.py <<EOF |
|
38 | $ cat > $TESTTMP/debugprocessors.py <<EOF | |
39 | > from mercurial import ( |
|
39 | > from mercurial import ( | |
40 | > cmdutil, |
|
40 | > cmdutil, | |
41 | > commands, |
|
41 | > commands, | |
42 | > pycompat, |
|
42 | > pycompat, | |
43 | > registrar, |
|
43 | > registrar, | |
44 | > ) |
|
44 | > ) | |
45 | > cmdtable = {} |
|
45 | > cmdtable = {} | |
46 | > command = registrar.command(cmdtable) |
|
46 | > command = registrar.command(cmdtable) | |
47 | > @command(b'debugprocessors', [], b'FILE') |
|
47 | > @command(b'debugprocessors', [], b'FILE') | |
48 | > def debugprocessors(ui, repo, file_=None, **opts): |
|
48 | > def debugprocessors(ui, repo, file_=None, **opts): | |
49 | > opts = pycompat.byteskwargs(opts) |
|
49 | > opts = pycompat.byteskwargs(opts) | |
50 | > opts[b'changelog'] = False |
|
50 | > opts[b'changelog'] = False | |
51 | > opts[b'manifest'] = False |
|
51 | > opts[b'manifest'] = False | |
52 | > opts[b'dir'] = False |
|
52 | > opts[b'dir'] = False | |
53 | > rl = cmdutil.openrevlog(repo, b'debugprocessors', file_, opts) |
|
53 | > rl = cmdutil.openrevlog(repo, b'debugprocessors', file_, opts) | |
54 | > for flag, proc in rl._flagprocessors.items(): |
|
54 | > for flag, proc in rl._flagprocessors.items(): | |
55 | > ui.status(b"registered processor '%#x'\n" % (flag)) |
|
55 | > ui.status(b"registered processor '%#x'\n" % (flag)) | |
56 | > EOF |
|
56 | > EOF | |
57 |
|
57 | |||
58 | Skip the experimental.changegroup3=True config. Failure to agree on this comes |
|
58 | Skip the experimental.changegroup3=True config. Failure to agree on this comes | |
59 | first, and causes an "abort: no common changegroup version" if the extension is |
|
59 | first, and causes an "abort: no common changegroup version" if the extension is | |
60 | only loaded on one side. If that *is* enabled, the subsequent failure is "abort: |
|
60 | only loaded on one side. If that *is* enabled, the subsequent failure is "abort: | |
61 | missing processor for flag '0x2000'!" if the extension is only loaded on one side |
|
61 | missing processor for flag '0x2000'!" if the extension is only loaded on one side | |
62 | (possibly also masked by the Internal Server Error message). |
|
62 | (possibly also masked by the Internal Server Error message). | |
63 | $ cat >> $HGRCPATH <<EOF |
|
63 | $ cat >> $HGRCPATH <<EOF | |
64 | > [extensions] |
|
64 | > [extensions] | |
65 | > debugprocessors = $TESTTMP/debugprocessors.py |
|
65 | > debugprocessors = $TESTTMP/debugprocessors.py | |
66 | > [experimental] |
|
66 | > [experimental] | |
67 | > lfs.disableusercache = True |
|
67 | > lfs.disableusercache = True | |
68 | > lfs.worker-enable = False |
|
68 | > lfs.worker-enable = False | |
69 | > [lfs] |
|
69 | > [lfs] | |
70 | > threshold=10 |
|
70 | > threshold=10 | |
71 | > [web] |
|
71 | > [web] | |
72 | > allow_push=* |
|
72 | > allow_push=* | |
73 | > push_ssl=False |
|
73 | > push_ssl=False | |
74 | > EOF |
|
74 | > EOF | |
75 |
|
75 | |||
76 | $ cp $HGRCPATH $HGRCPATH.orig |
|
76 | $ cp $HGRCPATH $HGRCPATH.orig | |
77 |
|
77 | |||
78 | #if lfsremote-on |
|
78 | #if lfsremote-on | |
79 | $ hg --config extensions.lfs= -R server \ |
|
79 | $ hg --config extensions.lfs= -R server \ | |
80 | > serve -p $HGPORT -d --pid-file=hg.pid --errorlog=$TESTTMP/errors.log |
|
80 | > serve -p $HGPORT -d --pid-file=hg.pid --errorlog=$TESTTMP/errors.log | |
81 | #else |
|
81 | #else | |
82 | $ hg --config extensions.lfs=! -R server \ |
|
82 | $ hg --config extensions.lfs=! -R server \ | |
83 | > serve -p $HGPORT -d --pid-file=hg.pid --errorlog=$TESTTMP/errors.log |
|
83 | > serve -p $HGPORT -d --pid-file=hg.pid --errorlog=$TESTTMP/errors.log | |
84 | #endif |
|
84 | #endif | |
85 |
|
85 | |||
86 | $ cat hg.pid >> $DAEMON_PIDS |
|
86 | $ cat hg.pid >> $DAEMON_PIDS | |
87 | $ hg clone -q http://localhost:$HGPORT client |
|
87 | $ hg clone -q http://localhost:$HGPORT client | |
88 | $ grep 'lfs' client/.hg/requires $SERVER_REQUIRES |
|
88 | $ grep 'lfs' client/.hg/requires $SERVER_REQUIRES | |
89 | [1] |
|
89 | [1] | |
90 |
|
90 | |||
91 | This trivial repo will force commandserver to load the extension, but not call |
|
91 | This trivial repo will force commandserver to load the extension, but not call | |
92 | reposetup() on another repo actually being operated on. This gives coverage |
|
92 | reposetup() on another repo actually being operated on. This gives coverage | |
93 | that wrapper functions are not assuming reposetup() was called. |
|
93 | that wrapper functions are not assuming reposetup() was called. | |
94 |
|
94 | |||
95 | $ hg init $TESTTMP/cmdservelfs |
|
95 | $ hg init $TESTTMP/cmdservelfs | |
96 | $ cat >> $TESTTMP/cmdservelfs/.hg/hgrc << EOF |
|
96 | $ cat >> $TESTTMP/cmdservelfs/.hg/hgrc << EOF | |
97 | > [extensions] |
|
97 | > [extensions] | |
98 | > lfs = |
|
98 | > lfs = | |
99 | > EOF |
|
99 | > EOF | |
100 |
|
100 | |||
101 | -------------------------------------------------------------------------------- |
|
101 | -------------------------------------------------------------------------------- | |
102 | Case #1: client with non-lfs content and the extension disabled; server with |
|
102 | Case #1: client with non-lfs content and the extension disabled; server with | |
103 | non-lfs content, and the extension enabled. |
|
103 | non-lfs content, and the extension enabled. | |
104 |
|
104 | |||
105 | $ cd client |
|
105 | $ cd client | |
106 | $ echo 'non-lfs' > nonlfs.txt |
|
106 | $ echo 'non-lfs' > nonlfs.txt | |
107 | >>> from __future__ import absolute_import |
|
107 | >>> from __future__ import absolute_import | |
108 | >>> from hgclient import check, readchannel, runcommand |
|
108 | >>> from hgclient import check, readchannel, runcommand | |
109 | >>> @check |
|
109 | >>> @check | |
110 | ... def diff(server): |
|
110 | ... def diff(server): | |
111 | ... readchannel(server) |
|
111 | ... readchannel(server) | |
112 | ... # run an arbitrary command in the repo with the extension loaded |
|
112 | ... # run an arbitrary command in the repo with the extension loaded | |
113 | ... runcommand(server, [b'id', b'-R', b'../cmdservelfs']) |
|
113 | ... runcommand(server, [b'id', b'-R', b'../cmdservelfs']) | |
114 | ... # now run a command in a repo without the extension to ensure that |
|
114 | ... # now run a command in a repo without the extension to ensure that | |
115 | ... # files are added safely.. |
|
115 | ... # files are added safely.. | |
116 | ... runcommand(server, [b'ci', b'-Aqm', b'non-lfs']) |
|
116 | ... runcommand(server, [b'ci', b'-Aqm', b'non-lfs']) | |
117 | ... # .. and that scmutil.prefetchfiles() safely no-ops.. |
|
117 | ... # .. and that scmutil.prefetchfiles() safely no-ops.. | |
118 | ... runcommand(server, [b'diff', b'-r', b'.~1']) |
|
118 | ... runcommand(server, [b'diff', b'-r', b'.~1']) | |
119 | ... # .. and that debugupgraderepo safely no-ops. |
|
119 | ... # .. and that debugupgraderepo safely no-ops. | |
120 | ... runcommand(server, [b'debugupgraderepo', b'-q', b'--run']) |
|
120 | ... runcommand(server, [b'debugupgraderepo', b'-q', b'--run']) | |
121 | *** runcommand id -R ../cmdservelfs |
|
121 | *** runcommand id -R ../cmdservelfs | |
122 | 000000000000 tip |
|
122 | 000000000000 tip | |
123 | *** runcommand ci -Aqm non-lfs |
|
123 | *** runcommand ci -Aqm non-lfs | |
124 | *** runcommand diff -r .~1 |
|
124 | *** runcommand diff -r .~1 | |
125 | diff -r 000000000000 nonlfs.txt |
|
125 | diff -r 000000000000 nonlfs.txt | |
126 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
126 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
127 | +++ b/nonlfs.txt Thu Jan 01 00:00:00 1970 +0000 |
|
127 | +++ b/nonlfs.txt Thu Jan 01 00:00:00 1970 +0000 | |
128 | @@ -0,0 +1,1 @@ |
|
128 | @@ -0,0 +1,1 @@ | |
129 | +non-lfs |
|
129 | +non-lfs | |
130 | *** runcommand debugupgraderepo -q --run |
|
130 | *** runcommand debugupgraderepo -q --run | |
131 |
|
131 | |||
132 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES |
|
132 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES | |
133 | [1] |
|
133 | [1] | |
134 |
|
134 | |||
135 | #if lfsremote-on |
|
135 | #if lfsremote-on | |
136 |
|
136 | |||
137 | $ hg push -q |
|
137 | $ hg push -q | |
138 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES |
|
138 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES | |
139 | [1] |
|
139 | [1] | |
140 |
|
140 | |||
141 | $ hg clone -q http://localhost:$HGPORT $TESTTMP/client1_clone |
|
141 | $ hg clone -q http://localhost:$HGPORT $TESTTMP/client1_clone | |
142 | $ grep 'lfs' $TESTTMP/client1_clone/.hg/requires $SERVER_REQUIRES |
|
142 | $ grep 'lfs' $TESTTMP/client1_clone/.hg/requires $SERVER_REQUIRES | |
143 | [1] |
|
143 | [1] | |
144 |
|
144 | |||
145 | $ hg init $TESTTMP/client1_pull |
|
145 | $ hg init $TESTTMP/client1_pull | |
146 | $ hg -R $TESTTMP/client1_pull pull -q http://localhost:$HGPORT |
|
146 | $ hg -R $TESTTMP/client1_pull pull -q http://localhost:$HGPORT | |
147 | $ grep 'lfs' $TESTTMP/client1_pull/.hg/requires $SERVER_REQUIRES |
|
147 | $ grep 'lfs' $TESTTMP/client1_pull/.hg/requires $SERVER_REQUIRES | |
148 | [1] |
|
148 | [1] | |
149 |
|
149 | |||
150 | $ hg identify http://localhost:$HGPORT |
|
150 | $ hg identify http://localhost:$HGPORT | |
151 | d437e1d24fbd |
|
151 | d437e1d24fbd | |
152 |
|
152 | |||
153 | #endif |
|
153 | #endif | |
154 |
|
154 | |||
155 | -------------------------------------------------------------------------------- |
|
155 | -------------------------------------------------------------------------------- | |
156 | Case #2: client with non-lfs content and the extension enabled; server with |
|
156 | Case #2: client with non-lfs content and the extension enabled; server with | |
157 | non-lfs content, and the extension state controlled by #testcases. |
|
157 | non-lfs content, and the extension state controlled by #testcases. | |
158 |
|
158 | |||
159 | $ cat >> $HGRCPATH <<EOF |
|
159 | $ cat >> $HGRCPATH <<EOF | |
160 | > [extensions] |
|
160 | > [extensions] | |
161 | > lfs = |
|
161 | > lfs = | |
162 | > EOF |
|
162 | > EOF | |
163 | $ echo 'non-lfs' > nonlfs2.txt |
|
163 | $ echo 'non-lfs' > nonlfs2.txt | |
164 | $ hg ci -Aqm 'non-lfs file with lfs client' |
|
164 | $ hg ci -Aqm 'non-lfs file with lfs client' | |
165 |
|
165 | |||
166 | Since no lfs content has been added yet, the push is allowed, even when the |
|
166 | Since no lfs content has been added yet, the push is allowed, even when the | |
167 | extension is not enabled remotely. |
|
167 | extension is not enabled remotely. | |
168 |
|
168 | |||
169 | $ hg push -q |
|
169 | $ hg push -q | |
170 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES |
|
170 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES | |
171 | [1] |
|
171 | [1] | |
172 |
|
172 | |||
173 | $ hg clone -q http://localhost:$HGPORT $TESTTMP/client2_clone |
|
173 | $ hg clone -q http://localhost:$HGPORT $TESTTMP/client2_clone | |
174 | $ grep 'lfs' $TESTTMP/client2_clone/.hg/requires $SERVER_REQUIRES |
|
174 | $ grep 'lfs' $TESTTMP/client2_clone/.hg/requires $SERVER_REQUIRES | |
175 | [1] |
|
175 | [1] | |
176 |
|
176 | |||
177 | $ hg init $TESTTMP/client2_pull |
|
177 | $ hg init $TESTTMP/client2_pull | |
178 | $ hg -R $TESTTMP/client2_pull pull -q http://localhost:$HGPORT |
|
178 | $ hg -R $TESTTMP/client2_pull pull -q http://localhost:$HGPORT | |
179 | $ grep 'lfs' $TESTTMP/client2_pull/.hg/requires $SERVER_REQUIRES |
|
179 | $ grep 'lfs' $TESTTMP/client2_pull/.hg/requires $SERVER_REQUIRES | |
180 | [1] |
|
180 | [1] | |
181 |
|
181 | |||
182 | $ hg identify http://localhost:$HGPORT |
|
182 | $ hg identify http://localhost:$HGPORT | |
183 | 1477875038c6 |
|
183 | 1477875038c6 | |
184 |
|
184 | |||
185 | -------------------------------------------------------------------------------- |
|
185 | -------------------------------------------------------------------------------- | |
186 | Case #3: client with lfs content and the extension enabled; server with |
|
186 | Case #3: client with lfs content and the extension enabled; server with | |
187 | non-lfs content, and the extension state controlled by #testcases. The server |
|
187 | non-lfs content, and the extension state controlled by #testcases. The server | |
188 | should have an 'lfs' requirement after it picks up its first commit with a blob. |
|
188 | should have an 'lfs' requirement after it picks up its first commit with a blob. | |
189 |
|
189 | |||
190 | $ echo 'this is a big lfs file' > lfs.bin |
|
190 | $ echo 'this is a big lfs file' > lfs.bin | |
191 | $ hg ci -Aqm 'lfs' |
|
191 | $ hg ci -Aqm 'lfs' | |
192 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES |
|
192 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES | |
193 | .hg/requires:lfs |
|
193 | .hg/requires:lfs | |
194 |
|
194 | |||
195 | #if lfsremote-off |
|
195 | #if lfsremote-off | |
196 | $ hg push -q |
|
196 | $ hg push -q | |
197 | abort: required features are not supported in the destination: lfs |
|
197 | abort: required features are not supported in the destination: lfs | |
198 | (enable the lfs extension on the server) |
|
198 | (enable the lfs extension on the server) | |
199 | [255] |
|
199 | [255] | |
200 | #else |
|
200 | #else | |
201 | $ hg push -q |
|
201 | $ hg push -q | |
202 | #endif |
|
202 | #endif | |
203 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES |
|
203 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES | |
204 | .hg/requires:lfs |
|
204 | .hg/requires:lfs | |
205 | $TESTTMP/server/.hg/requires:lfs (lfsremote-on !) |
|
205 | $TESTTMP/server/.hg/requires:lfs (lfsremote-on !) | |
206 |
|
206 | |||
207 | $ hg clone -q http://localhost:$HGPORT $TESTTMP/client3_clone |
|
207 | $ hg clone -q http://localhost:$HGPORT $TESTTMP/client3_clone | |
208 | $ grep 'lfs' $TESTTMP/client3_clone/.hg/requires $SERVER_REQUIRES || true |
|
208 | $ grep 'lfs' $TESTTMP/client3_clone/.hg/requires $SERVER_REQUIRES || true | |
209 | $TESTTMP/client3_clone/.hg/requires:lfs (lfsremote-on !) |
|
209 | $TESTTMP/client3_clone/.hg/requires:lfs (lfsremote-on !) | |
210 | $TESTTMP/server/.hg/requires:lfs (lfsremote-on !) |
|
210 | $TESTTMP/server/.hg/requires:lfs (lfsremote-on !) | |
211 |
|
211 | |||
212 | $ hg init $TESTTMP/client3_pull |
|
212 | $ hg init $TESTTMP/client3_pull | |
213 | $ hg -R $TESTTMP/client3_pull pull -q http://localhost:$HGPORT |
|
213 | $ hg -R $TESTTMP/client3_pull pull -q http://localhost:$HGPORT | |
214 | $ grep 'lfs' $TESTTMP/client3_pull/.hg/requires $SERVER_REQUIRES || true |
|
214 | $ grep 'lfs' $TESTTMP/client3_pull/.hg/requires $SERVER_REQUIRES || true | |
215 | $TESTTMP/client3_pull/.hg/requires:lfs (lfsremote-on !) |
|
215 | $TESTTMP/client3_pull/.hg/requires:lfs (lfsremote-on !) | |
216 | $TESTTMP/server/.hg/requires:lfs (lfsremote-on !) |
|
216 | $TESTTMP/server/.hg/requires:lfs (lfsremote-on !) | |
217 |
|
217 | |||
218 | Test that the commit/changegroup requirement check hook can be run multiple |
|
218 | Test that the commit/changegroup requirement check hook can be run multiple | |
219 | times. |
|
219 | times. | |
220 |
|
220 | |||
221 | $ hg clone -qr 0 http://localhost:$HGPORT $TESTTMP/cmdserve_client3 |
|
221 | $ hg clone -qr 0 http://localhost:$HGPORT $TESTTMP/cmdserve_client3 | |
222 |
|
222 | |||
223 | $ cd ../cmdserve_client3 |
|
223 | $ cd ../cmdserve_client3 | |
224 |
|
224 | |||
225 | >>> from __future__ import absolute_import |
|
225 | >>> from __future__ import absolute_import | |
226 | >>> from hgclient import check, readchannel, runcommand |
|
226 | >>> from hgclient import check, readchannel, runcommand | |
227 | >>> @check |
|
227 | >>> @check | |
228 | ... def addrequirement(server): |
|
228 | ... def addrequirement(server): | |
229 | ... readchannel(server) |
|
229 | ... readchannel(server) | |
230 | ... # change the repo in a way that adds the lfs requirement |
|
230 | ... # change the repo in a way that adds the lfs requirement | |
231 | ... runcommand(server, [b'pull', b'-qu']) |
|
231 | ... runcommand(server, [b'pull', b'-qu']) | |
232 | ... # Now cause the requirement adding hook to fire again, without going |
|
232 | ... # Now cause the requirement adding hook to fire again, without going | |
233 | ... # through reposetup() again. |
|
233 | ... # through reposetup() again. | |
234 | ... with open('file.txt', 'wb') as fp: |
|
234 | ... with open('file.txt', 'wb') as fp: | |
235 | ... fp.write(b'data') |
|
235 | ... fp.write(b'data') | |
236 | ... runcommand(server, [b'ci', b'-Aqm', b'non-lfs']) |
|
236 | ... runcommand(server, [b'ci', b'-Aqm', b'non-lfs']) | |
237 | *** runcommand pull -qu |
|
237 | *** runcommand pull -qu | |
238 | *** runcommand ci -Aqm non-lfs |
|
238 | *** runcommand ci -Aqm non-lfs | |
239 |
|
239 | |||
240 | $ cd ../client |
|
240 | $ cd ../client | |
241 |
|
241 | |||
242 | The difference here is the push failed above when the extension isn't |
|
242 | The difference here is the push failed above when the extension isn't | |
243 | enabled on the server. |
|
243 | enabled on the server. | |
244 | $ hg identify http://localhost:$HGPORT |
|
244 | $ hg identify http://localhost:$HGPORT | |
245 | 8374dc4052cb (lfsremote-on !) |
|
245 | 8374dc4052cb (lfsremote-on !) | |
246 | 1477875038c6 (lfsremote-off !) |
|
246 | 1477875038c6 (lfsremote-off !) | |
247 |
|
247 | |||
248 | Don't bother testing the lfsremote-off cases- the server won't be able |
|
248 | Don't bother testing the lfsremote-off cases- the server won't be able | |
249 | to launch if there's lfs content and the extension is disabled. |
|
249 | to launch if there's lfs content and the extension is disabled. | |
250 |
|
250 | |||
251 | #if lfsremote-on |
|
251 | #if lfsremote-on | |
252 |
|
252 | |||
253 | -------------------------------------------------------------------------------- |
|
253 | -------------------------------------------------------------------------------- | |
254 | Case #4: client with non-lfs content and the extension disabled; server with |
|
254 | Case #4: client with non-lfs content and the extension disabled; server with | |
255 | lfs content, and the extension enabled. |
|
255 | lfs content, and the extension enabled. | |
256 |
|
256 | |||
257 | $ cat >> $HGRCPATH <<EOF |
|
257 | $ cat >> $HGRCPATH <<EOF | |
258 | > [extensions] |
|
258 | > [extensions] | |
259 | > lfs = ! |
|
259 | > lfs = ! | |
260 | > EOF |
|
260 | > EOF | |
261 |
|
261 | |||
262 | $ hg init $TESTTMP/client4 |
|
262 | $ hg init $TESTTMP/client4 | |
263 | $ cd $TESTTMP/client4 |
|
263 | $ cd $TESTTMP/client4 | |
264 | $ cat >> .hg/hgrc <<EOF |
|
264 | $ cat >> .hg/hgrc <<EOF | |
265 | > [paths] |
|
265 | > [paths] | |
266 | > default = http://localhost:$HGPORT |
|
266 | > default = http://localhost:$HGPORT | |
267 | > EOF |
|
267 | > EOF | |
268 | $ echo 'non-lfs' > nonlfs2.txt |
|
268 | $ echo 'non-lfs' > nonlfs2.txt | |
269 | $ hg ci -Aqm 'non-lfs' |
|
269 | $ hg ci -Aqm 'non-lfs' | |
270 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES |
|
270 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES | |
271 | $TESTTMP/server/.hg/requires:lfs |
|
271 | $TESTTMP/server/.hg/requires:lfs | |
272 |
|
272 | |||
273 | $ hg push -q --force |
|
273 | $ hg push -q --force | |
274 | warning: repository is unrelated |
|
274 | warning: repository is unrelated | |
275 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES |
|
275 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES | |
276 | $TESTTMP/server/.hg/requires:lfs |
|
276 | $TESTTMP/server/.hg/requires:lfs | |
277 |
|
277 | |||
278 | $ hg clone http://localhost:$HGPORT $TESTTMP/client4_clone |
|
278 | $ hg clone http://localhost:$HGPORT $TESTTMP/client4_clone | |
279 | (remote is using large file support (lfs), but it is explicitly disabled in the local configuration) |
|
279 | (remote is using large file support (lfs), but it is explicitly disabled in the local configuration) | |
280 | abort: repository requires features unknown to this Mercurial: lfs |
|
280 | abort: repository requires features unknown to this Mercurial: lfs | |
281 | (see https://mercurial-scm.org/wiki/MissingRequirement for more information) |
|
281 | (see https://mercurial-scm.org/wiki/MissingRequirement for more information) | |
282 | [255] |
|
282 | [255] | |
283 | $ grep 'lfs' $TESTTMP/client4_clone/.hg/requires $SERVER_REQUIRES |
|
283 | $ grep 'lfs' $TESTTMP/client4_clone/.hg/requires $SERVER_REQUIRES | |
284 | grep: $TESTTMP/client4_clone/.hg/requires: $ENOENT$ |
|
284 | grep: $TESTTMP/client4_clone/.hg/requires: $ENOENT$ | |
285 | $TESTTMP/server/.hg/requires:lfs |
|
285 | $TESTTMP/server/.hg/requires:lfs | |
286 | [2] |
|
286 | [2] | |
287 |
|
287 | |||
288 | TODO: fail more gracefully. |
|
288 | TODO: fail more gracefully. | |
289 |
|
289 | |||
290 | $ hg init $TESTTMP/client4_pull |
|
290 | $ hg init $TESTTMP/client4_pull | |
291 | $ hg -R $TESTTMP/client4_pull pull http://localhost:$HGPORT |
|
291 | $ hg -R $TESTTMP/client4_pull pull http://localhost:$HGPORT | |
292 | pulling from http://localhost:$HGPORT/ |
|
292 | pulling from http://localhost:$HGPORT/ | |
293 | requesting all changes |
|
293 | requesting all changes | |
294 | remote: abort: no common changegroup version |
|
294 | remote: abort: no common changegroup version | |
295 | abort: pull failed on remote |
|
295 | abort: pull failed on remote | |
296 | [255] |
|
296 | [255] | |
297 | $ grep 'lfs' $TESTTMP/client4_pull/.hg/requires $SERVER_REQUIRES |
|
297 | $ grep 'lfs' $TESTTMP/client4_pull/.hg/requires $SERVER_REQUIRES | |
298 | $TESTTMP/server/.hg/requires:lfs |
|
298 | $TESTTMP/server/.hg/requires:lfs | |
299 |
|
299 | |||
300 | $ hg identify http://localhost:$HGPORT |
|
300 | $ hg identify http://localhost:$HGPORT | |
301 | 03b080fa9d93 |
|
301 | 03b080fa9d93 | |
302 |
|
302 | |||
303 | -------------------------------------------------------------------------------- |
|
303 | -------------------------------------------------------------------------------- | |
304 | Case #5: client with non-lfs content and the extension enabled; server with |
|
304 | Case #5: client with non-lfs content and the extension enabled; server with | |
305 | lfs content, and the extension enabled. |
|
305 | lfs content, and the extension enabled. | |
306 |
|
306 | |||
307 | $ cat >> $HGRCPATH <<EOF |
|
307 | $ cat >> $HGRCPATH <<EOF | |
308 | > [extensions] |
|
308 | > [extensions] | |
309 | > lfs = |
|
309 | > lfs = | |
310 | > EOF |
|
310 | > EOF | |
311 | $ echo 'non-lfs' > nonlfs3.txt |
|
311 | $ echo 'non-lfs' > nonlfs3.txt | |
312 | $ hg ci -Aqm 'non-lfs file with lfs client' |
|
312 | $ hg ci -Aqm 'non-lfs file with lfs client' | |
313 |
|
313 | |||
314 | $ hg push -q |
|
314 | $ hg push -q | |
315 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES |
|
315 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES | |
316 | $TESTTMP/server/.hg/requires:lfs |
|
316 | $TESTTMP/server/.hg/requires:lfs | |
317 |
|
317 | |||
318 | $ hg clone -q http://localhost:$HGPORT $TESTTMP/client5_clone |
|
318 | $ hg clone -q http://localhost:$HGPORT $TESTTMP/client5_clone | |
319 | $ grep 'lfs' $TESTTMP/client5_clone/.hg/requires $SERVER_REQUIRES |
|
319 | $ grep 'lfs' $TESTTMP/client5_clone/.hg/requires $SERVER_REQUIRES | |
320 | $TESTTMP/client5_clone/.hg/requires:lfs |
|
320 | $TESTTMP/client5_clone/.hg/requires:lfs | |
321 | $TESTTMP/server/.hg/requires:lfs |
|
321 | $TESTTMP/server/.hg/requires:lfs | |
322 |
|
322 | |||
323 | $ hg init $TESTTMP/client5_pull |
|
323 | $ hg init $TESTTMP/client5_pull | |
324 | $ hg -R $TESTTMP/client5_pull pull -q http://localhost:$HGPORT |
|
324 | $ hg -R $TESTTMP/client5_pull pull -q http://localhost:$HGPORT | |
325 | $ grep 'lfs' $TESTTMP/client5_pull/.hg/requires $SERVER_REQUIRES |
|
325 | $ grep 'lfs' $TESTTMP/client5_pull/.hg/requires $SERVER_REQUIRES | |
326 | $TESTTMP/client5_pull/.hg/requires:lfs |
|
326 | $TESTTMP/client5_pull/.hg/requires:lfs | |
327 | $TESTTMP/server/.hg/requires:lfs |
|
327 | $TESTTMP/server/.hg/requires:lfs | |
328 |
|
328 | |||
329 | $ hg identify http://localhost:$HGPORT |
|
329 | $ hg identify http://localhost:$HGPORT | |
330 | c729025cc5e3 |
|
330 | c729025cc5e3 | |
331 |
|
331 | |||
332 | $ mv $HGRCPATH $HGRCPATH.tmp |
|
332 | $ mv $HGRCPATH $HGRCPATH.tmp | |
333 | $ cp $HGRCPATH.orig $HGRCPATH |
|
333 | $ cp $HGRCPATH.orig $HGRCPATH | |
334 |
|
334 | |||
335 | >>> from __future__ import absolute_import |
|
335 | >>> from __future__ import absolute_import | |
336 | >>> from hgclient import bprint, check, readchannel, runcommand, stdout |
|
336 | >>> from hgclient import bprint, check, readchannel, runcommand, stdout | |
337 | >>> @check |
|
337 | >>> @check | |
338 | ... def checkflags(server): |
|
338 | ... def checkflags(server): | |
339 | ... readchannel(server) |
|
339 | ... readchannel(server) | |
340 | ... bprint(b'') |
|
340 | ... bprint(b'') | |
341 | ... bprint(b'# LFS required- both lfs and non-lfs revlogs have 0x2000 flag') |
|
341 | ... bprint(b'# LFS required- both lfs and non-lfs revlogs have 0x2000 flag') | |
342 | ... stdout.flush() |
|
342 | ... stdout.flush() | |
343 | ... runcommand(server, [b'debugprocessors', b'lfs.bin', b'-R', |
|
343 | ... runcommand(server, [b'debugprocessors', b'lfs.bin', b'-R', | |
344 | ... b'../server']) |
|
344 | ... b'../server']) | |
345 | ... runcommand(server, [b'debugprocessors', b'nonlfs2.txt', b'-R', |
|
345 | ... runcommand(server, [b'debugprocessors', b'nonlfs2.txt', b'-R', | |
346 | ... b'../server']) |
|
346 | ... b'../server']) | |
347 | ... runcommand(server, [b'config', b'extensions', b'--cwd', |
|
347 | ... runcommand(server, [b'config', b'extensions', b'--cwd', | |
348 | ... b'../server']) |
|
348 | ... b'../server']) | |
349 | ... |
|
349 | ... | |
350 | ... bprint(b"\n# LFS not enabled- revlogs don't have 0x2000 flag") |
|
350 | ... bprint(b"\n# LFS not enabled- revlogs don't have 0x2000 flag") | |
351 | ... stdout.flush() |
|
351 | ... stdout.flush() | |
352 | ... runcommand(server, [b'debugprocessors', b'nonlfs3.txt']) |
|
352 | ... runcommand(server, [b'debugprocessors', b'nonlfs3.txt']) | |
353 | ... runcommand(server, [b'config', b'extensions']) |
|
353 | ... runcommand(server, [b'config', b'extensions']) | |
354 |
|
354 | |||
355 | # LFS required- both lfs and non-lfs revlogs have 0x2000 flag |
|
355 | # LFS required- both lfs and non-lfs revlogs have 0x2000 flag | |
356 | *** runcommand debugprocessors lfs.bin -R ../server |
|
356 | *** runcommand debugprocessors lfs.bin -R ../server | |
357 | registered processor '0x8000' |
|
357 | registered processor '0x8000' | |
358 | registered processor '0x800' |
|
358 | registered processor '0x800' | |
359 | registered processor '0x2000' |
|
359 | registered processor '0x2000' | |
360 | *** runcommand debugprocessors nonlfs2.txt -R ../server |
|
360 | *** runcommand debugprocessors nonlfs2.txt -R ../server | |
361 | registered processor '0x8000' |
|
361 | registered processor '0x8000' | |
362 | registered processor '0x800' |
|
362 | registered processor '0x800' | |
363 | registered processor '0x2000' |
|
363 | registered processor '0x2000' | |
364 | *** runcommand config extensions --cwd ../server |
|
364 | *** runcommand config extensions --cwd ../server | |
365 | extensions.debugprocessors=$TESTTMP/debugprocessors.py |
|
365 | extensions.debugprocessors=$TESTTMP/debugprocessors.py | |
366 | extensions.lfs= |
|
366 | extensions.lfs= | |
367 |
|
367 | |||
368 | # LFS not enabled- revlogs don't have 0x2000 flag |
|
368 | # LFS not enabled- revlogs don't have 0x2000 flag | |
369 | *** runcommand debugprocessors nonlfs3.txt |
|
369 | *** runcommand debugprocessors nonlfs3.txt | |
370 | registered processor '0x8000' |
|
370 | registered processor '0x8000' | |
371 | registered processor '0x800' |
|
371 | registered processor '0x800' | |
372 | *** runcommand config extensions |
|
372 | *** runcommand config extensions | |
373 | extensions.debugprocessors=$TESTTMP/debugprocessors.py |
|
373 | extensions.debugprocessors=$TESTTMP/debugprocessors.py | |
374 |
|
374 | |||
375 | $ rm $HGRCPATH |
|
375 | $ rm $HGRCPATH | |
376 | $ mv $HGRCPATH.tmp $HGRCPATH |
|
376 | $ mv $HGRCPATH.tmp $HGRCPATH | |
377 |
|
377 | |||
378 | $ hg clone $TESTTMP/client $TESTTMP/nonlfs -qr 0 --config extensions.lfs= |
|
378 | $ hg clone $TESTTMP/client $TESTTMP/nonlfs -qr 0 --config extensions.lfs= | |
379 | $ cat >> $TESTTMP/nonlfs/.hg/hgrc <<EOF |
|
379 | $ cat >> $TESTTMP/nonlfs/.hg/hgrc <<EOF | |
380 | > [extensions] |
|
380 | > [extensions] | |
381 | > lfs = ! |
|
381 | > lfs = ! | |
382 | > EOF |
|
382 | > EOF | |
383 |
|
383 | |||
384 | >>> from __future__ import absolute_import, print_function |
|
384 | >>> from __future__ import absolute_import, print_function | |
385 | >>> from hgclient import bprint, check, readchannel, runcommand, stdout |
|
385 | >>> from hgclient import bprint, check, readchannel, runcommand, stdout | |
386 | >>> @check |
|
386 | >>> @check | |
387 | ... def checkflags2(server): |
|
387 | ... def checkflags2(server): | |
388 | ... readchannel(server) |
|
388 | ... readchannel(server) | |
389 | ... bprint(b'') |
|
389 | ... bprint(b'') | |
390 | ... bprint(b'# LFS enabled- both lfs and non-lfs revlogs have 0x2000 flag') |
|
390 | ... bprint(b'# LFS enabled- both lfs and non-lfs revlogs have 0x2000 flag') | |
391 | ... stdout.flush() |
|
391 | ... stdout.flush() | |
392 | ... runcommand(server, [b'debugprocessors', b'lfs.bin', b'-R', |
|
392 | ... runcommand(server, [b'debugprocessors', b'lfs.bin', b'-R', | |
393 | ... b'../server']) |
|
393 | ... b'../server']) | |
394 | ... runcommand(server, [b'debugprocessors', b'nonlfs2.txt', b'-R', |
|
394 | ... runcommand(server, [b'debugprocessors', b'nonlfs2.txt', b'-R', | |
395 | ... b'../server']) |
|
395 | ... b'../server']) | |
396 | ... runcommand(server, [b'config', b'extensions', b'--cwd', |
|
396 | ... runcommand(server, [b'config', b'extensions', b'--cwd', | |
397 | ... b'../server']) |
|
397 | ... b'../server']) | |
398 | ... |
|
398 | ... | |
399 | ... bprint(b'\n# LFS enabled without requirement- revlogs have 0x2000 flag') |
|
399 | ... bprint(b'\n# LFS enabled without requirement- revlogs have 0x2000 flag') | |
400 | ... stdout.flush() |
|
400 | ... stdout.flush() | |
401 | ... runcommand(server, [b'debugprocessors', b'nonlfs3.txt']) |
|
401 | ... runcommand(server, [b'debugprocessors', b'nonlfs3.txt']) | |
402 | ... runcommand(server, [b'config', b'extensions']) |
|
402 | ... runcommand(server, [b'config', b'extensions']) | |
403 | ... |
|
403 | ... | |
404 | ... bprint(b"\n# LFS disabled locally- revlogs don't have 0x2000 flag") |
|
404 | ... bprint(b"\n# LFS disabled locally- revlogs don't have 0x2000 flag") | |
405 | ... stdout.flush() |
|
405 | ... stdout.flush() | |
406 | ... runcommand(server, [b'debugprocessors', b'nonlfs.txt', b'-R', |
|
406 | ... runcommand(server, [b'debugprocessors', b'nonlfs.txt', b'-R', | |
407 | ... b'../nonlfs']) |
|
407 | ... b'../nonlfs']) | |
408 | ... runcommand(server, [b'config', b'extensions', b'--cwd', |
|
408 | ... runcommand(server, [b'config', b'extensions', b'--cwd', | |
409 | ... b'../nonlfs']) |
|
409 | ... b'../nonlfs']) | |
410 |
|
410 | |||
411 | # LFS enabled- both lfs and non-lfs revlogs have 0x2000 flag |
|
411 | # LFS enabled- both lfs and non-lfs revlogs have 0x2000 flag | |
412 | *** runcommand debugprocessors lfs.bin -R ../server |
|
412 | *** runcommand debugprocessors lfs.bin -R ../server | |
413 | registered processor '0x8000' |
|
413 | registered processor '0x8000' | |
414 | registered processor '0x800' |
|
414 | registered processor '0x800' | |
415 | registered processor '0x2000' |
|
415 | registered processor '0x2000' | |
416 | *** runcommand debugprocessors nonlfs2.txt -R ../server |
|
416 | *** runcommand debugprocessors nonlfs2.txt -R ../server | |
417 | registered processor '0x8000' |
|
417 | registered processor '0x8000' | |
418 | registered processor '0x800' |
|
418 | registered processor '0x800' | |
419 | registered processor '0x2000' |
|
419 | registered processor '0x2000' | |
420 | *** runcommand config extensions --cwd ../server |
|
420 | *** runcommand config extensions --cwd ../server | |
421 | extensions.debugprocessors=$TESTTMP/debugprocessors.py |
|
421 | extensions.debugprocessors=$TESTTMP/debugprocessors.py | |
422 | extensions.lfs= |
|
422 | extensions.lfs= | |
423 |
|
423 | |||
424 | # LFS enabled without requirement- revlogs have 0x2000 flag |
|
424 | # LFS enabled without requirement- revlogs have 0x2000 flag | |
425 | *** runcommand debugprocessors nonlfs3.txt |
|
425 | *** runcommand debugprocessors nonlfs3.txt | |
426 | registered processor '0x8000' |
|
426 | registered processor '0x8000' | |
427 | registered processor '0x800' |
|
427 | registered processor '0x800' | |
428 | registered processor '0x2000' |
|
428 | registered processor '0x2000' | |
429 | *** runcommand config extensions |
|
429 | *** runcommand config extensions | |
430 | extensions.debugprocessors=$TESTTMP/debugprocessors.py |
|
430 | extensions.debugprocessors=$TESTTMP/debugprocessors.py | |
431 | extensions.lfs= |
|
431 | extensions.lfs= | |
432 |
|
432 | |||
433 | # LFS disabled locally- revlogs don't have 0x2000 flag |
|
433 | # LFS disabled locally- revlogs don't have 0x2000 flag | |
434 | *** runcommand debugprocessors nonlfs.txt -R ../nonlfs |
|
434 | *** runcommand debugprocessors nonlfs.txt -R ../nonlfs | |
435 | registered processor '0x8000' |
|
435 | registered processor '0x8000' | |
436 | registered processor '0x800' |
|
436 | registered processor '0x800' | |
437 | *** runcommand config extensions --cwd ../nonlfs |
|
437 | *** runcommand config extensions --cwd ../nonlfs | |
438 | extensions.debugprocessors=$TESTTMP/debugprocessors.py |
|
438 | extensions.debugprocessors=$TESTTMP/debugprocessors.py | |
439 | extensions.lfs=! |
|
439 | extensions.lfs=! | |
440 |
|
440 | |||
441 | -------------------------------------------------------------------------------- |
|
441 | -------------------------------------------------------------------------------- | |
442 | Case #6: client with lfs content and the extension enabled; server with |
|
442 | Case #6: client with lfs content and the extension enabled; server with | |
443 | lfs content, and the extension enabled. |
|
443 | lfs content, and the extension enabled. | |
444 |
|
444 | |||
445 | $ echo 'this is another lfs file' > lfs2.txt |
|
445 | $ echo 'this is another lfs file' > lfs2.txt | |
446 | $ hg ci -Aqm 'lfs file with lfs client' |
|
446 | $ hg ci -Aqm 'lfs file with lfs client' | |
447 |
|
447 | |||
448 | $ hg --config paths.default= push -v http://localhost:$HGPORT |
|
448 | $ hg --config paths.default= push -v http://localhost:$HGPORT | |
449 | pushing to http://localhost:$HGPORT/ |
|
449 | pushing to http://localhost:$HGPORT/ | |
450 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs |
|
450 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
451 | searching for changes |
|
451 | searching for changes | |
452 | remote has heads on branch 'default' that are not known locally: 8374dc4052cb |
|
452 | remote has heads on branch 'default' that are not known locally: 8374dc4052cb | |
453 | lfs: uploading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes) |
|
453 | lfs: uploading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes) | |
454 | lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de |
|
454 | lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de | |
455 | lfs: uploaded 1 files (25 bytes) |
|
455 | lfs: uploaded 1 files (25 bytes) | |
456 | 1 changesets found |
|
456 | 1 changesets found | |
457 | uncompressed size of bundle content: |
|
457 | uncompressed size of bundle content: | |
458 | 206 (changelog) |
|
458 | 206 (changelog) | |
459 | 172 (manifests) |
|
459 | 172 (manifests) | |
460 | 275 lfs2.txt |
|
460 | 275 lfs2.txt | |
461 | remote: adding changesets |
|
461 | remote: adding changesets | |
462 | remote: adding manifests |
|
462 | remote: adding manifests | |
463 | remote: adding file changes |
|
463 | remote: adding file changes | |
464 | remote: added 1 changesets with 1 changes to 1 files |
|
464 | remote: added 1 changesets with 1 changes to 1 files | |
465 |
(sent 8 HTTP requests and |
|
465 | (sent 8 HTTP requests and * bytes; received * bytes in responses) (glob) (?) | |
466 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES |
|
466 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES | |
467 | .hg/requires:lfs |
|
467 | .hg/requires:lfs | |
468 | $TESTTMP/server/.hg/requires:lfs |
|
468 | $TESTTMP/server/.hg/requires:lfs | |
469 |
|
469 | |||
470 | $ hg clone -q http://localhost:$HGPORT $TESTTMP/client6_clone |
|
470 | $ hg clone -q http://localhost:$HGPORT $TESTTMP/client6_clone | |
471 | $ grep 'lfs' $TESTTMP/client6_clone/.hg/requires $SERVER_REQUIRES |
|
471 | $ grep 'lfs' $TESTTMP/client6_clone/.hg/requires $SERVER_REQUIRES | |
472 | $TESTTMP/client6_clone/.hg/requires:lfs |
|
472 | $TESTTMP/client6_clone/.hg/requires:lfs | |
473 | $TESTTMP/server/.hg/requires:lfs |
|
473 | $TESTTMP/server/.hg/requires:lfs | |
474 |
|
474 | |||
475 | $ hg init $TESTTMP/client6_pull |
|
475 | $ hg init $TESTTMP/client6_pull | |
476 | $ hg -R $TESTTMP/client6_pull pull -u -v http://localhost:$HGPORT |
|
476 | $ hg -R $TESTTMP/client6_pull pull -u -v http://localhost:$HGPORT | |
477 | pulling from http://localhost:$HGPORT/ |
|
477 | pulling from http://localhost:$HGPORT/ | |
478 | requesting all changes |
|
478 | requesting all changes | |
479 | adding changesets |
|
479 | adding changesets | |
480 | adding manifests |
|
480 | adding manifests | |
481 | adding file changes |
|
481 | adding file changes | |
482 | calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs |
|
482 | calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs | |
483 | added 6 changesets with 5 changes to 5 files (+1 heads) |
|
483 | added 6 changesets with 5 changes to 5 files (+1 heads) | |
484 | new changesets d437e1d24fbd:d3b84d50eacb |
|
484 | new changesets d437e1d24fbd:d3b84d50eacb | |
485 | resolving manifests |
|
485 | resolving manifests | |
486 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs |
|
486 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
487 | lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes) |
|
487 | lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes) | |
488 | lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de |
|
488 | lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de | |
489 | lfs: downloaded 1 files (25 bytes) |
|
489 | lfs: downloaded 1 files (25 bytes) | |
490 | getting lfs2.txt |
|
490 | getting lfs2.txt | |
491 | lfs: found a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de in the local lfs store |
|
491 | lfs: found a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de in the local lfs store | |
492 | getting nonlfs2.txt |
|
492 | getting nonlfs2.txt | |
493 | getting nonlfs3.txt |
|
493 | getting nonlfs3.txt | |
494 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
494 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
495 | updated to "d3b84d50eacb: lfs file with lfs client" |
|
495 | updated to "d3b84d50eacb: lfs file with lfs client" | |
496 | 1 other heads for branch "default" |
|
496 | 1 other heads for branch "default" | |
497 | (sent 3 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
497 | (sent 3 HTTP requests and * bytes; received * bytes in responses) (glob) | |
498 | $ grep 'lfs' $TESTTMP/client6_pull/.hg/requires $SERVER_REQUIRES |
|
498 | $ grep 'lfs' $TESTTMP/client6_pull/.hg/requires $SERVER_REQUIRES | |
499 | $TESTTMP/client6_pull/.hg/requires:lfs |
|
499 | $TESTTMP/client6_pull/.hg/requires:lfs | |
500 | $TESTTMP/server/.hg/requires:lfs |
|
500 | $TESTTMP/server/.hg/requires:lfs | |
501 |
|
501 | |||
502 | $ hg identify http://localhost:$HGPORT |
|
502 | $ hg identify http://localhost:$HGPORT | |
503 | d3b84d50eacb |
|
503 | d3b84d50eacb | |
504 |
|
504 | |||
505 | -------------------------------------------------------------------------------- |
|
505 | -------------------------------------------------------------------------------- | |
506 | Misc: process dies early if a requirement exists and the extension is disabled |
|
506 | Misc: process dies early if a requirement exists and the extension is disabled | |
507 |
|
507 | |||
508 | $ hg --config extensions.lfs=! summary |
|
508 | $ hg --config extensions.lfs=! summary | |
509 | abort: repository requires features unknown to this Mercurial: lfs |
|
509 | abort: repository requires features unknown to this Mercurial: lfs | |
510 | (see https://mercurial-scm.org/wiki/MissingRequirement for more information) |
|
510 | (see https://mercurial-scm.org/wiki/MissingRequirement for more information) | |
511 | [255] |
|
511 | [255] | |
512 |
|
512 | |||
513 | $ echo 'this is an lfs file' > $TESTTMP/client6_clone/lfspair1.bin |
|
513 | $ echo 'this is an lfs file' > $TESTTMP/client6_clone/lfspair1.bin | |
514 | $ echo 'this is an lfs file too' > $TESTTMP/client6_clone/lfspair2.bin |
|
514 | $ echo 'this is an lfs file too' > $TESTTMP/client6_clone/lfspair2.bin | |
515 | $ hg -R $TESTTMP/client6_clone ci -Aqm 'add lfs pair' |
|
515 | $ hg -R $TESTTMP/client6_clone ci -Aqm 'add lfs pair' | |
516 | $ hg -R $TESTTMP/client6_clone push -q |
|
516 | $ hg -R $TESTTMP/client6_clone push -q | |
517 |
|
517 | |||
518 | $ hg clone -qU http://localhost:$HGPORT $TESTTMP/bulkfetch |
|
518 | $ hg clone -qU http://localhost:$HGPORT $TESTTMP/bulkfetch | |
519 |
|
519 | |||
520 | Cat doesn't prefetch unless data is needed (e.g. '-T {rawdata}' doesn't need it) |
|
520 | Cat doesn't prefetch unless data is needed (e.g. '-T {rawdata}' doesn't need it) | |
521 |
|
521 | |||
522 | $ hg --cwd $TESTTMP/bulkfetch cat -vr tip lfspair1.bin -T '{rawdata}\n{path}\n' |
|
522 | $ hg --cwd $TESTTMP/bulkfetch cat -vr tip lfspair1.bin -T '{rawdata}\n{path}\n' | |
523 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs |
|
523 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
524 | version https://git-lfs.github.com/spec/v1 |
|
524 | version https://git-lfs.github.com/spec/v1 | |
525 | oid sha256:cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 |
|
525 | oid sha256:cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 | |
526 | size 20 |
|
526 | size 20 | |
527 | x-is-binary 0 |
|
527 | x-is-binary 0 | |
528 |
|
528 | |||
529 | lfspair1.bin |
|
529 | lfspair1.bin | |
530 |
|
530 | |||
531 | $ hg --cwd $TESTTMP/bulkfetch cat -vr tip lfspair1.bin -T json |
|
531 | $ hg --cwd $TESTTMP/bulkfetch cat -vr tip lfspair1.bin -T json | |
532 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs |
|
532 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
533 | [lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs |
|
533 | [lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
534 | lfs: downloading cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 (20 bytes) |
|
534 | lfs: downloading cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 (20 bytes) | |
535 | lfs: processed: cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 |
|
535 | lfs: processed: cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 | |
536 | lfs: downloaded 1 files (20 bytes) |
|
536 | lfs: downloaded 1 files (20 bytes) | |
537 | lfs: found cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 in the local lfs store |
|
537 | lfs: found cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 in the local lfs store | |
538 |
|
538 | |||
539 | { |
|
539 | { | |
540 | "data": "this is an lfs file\n", |
|
540 | "data": "this is an lfs file\n", | |
541 | "path": "lfspair1.bin", |
|
541 | "path": "lfspair1.bin", | |
542 | "rawdata": "version https://git-lfs.github.com/spec/v1\noid sha256:cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782\nsize 20\nx-is-binary 0\n" |
|
542 | "rawdata": "version https://git-lfs.github.com/spec/v1\noid sha256:cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782\nsize 20\nx-is-binary 0\n" | |
543 | } |
|
543 | } | |
544 | ] |
|
544 | ] | |
545 |
|
545 | |||
546 | $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs |
|
546 | $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs | |
547 |
|
547 | |||
548 | $ hg --cwd $TESTTMP/bulkfetch cat -vr tip lfspair1.bin -T '{data}\n' |
|
548 | $ hg --cwd $TESTTMP/bulkfetch cat -vr tip lfspair1.bin -T '{data}\n' | |
549 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs |
|
549 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
550 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs |
|
550 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
551 | lfs: downloading cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 (20 bytes) |
|
551 | lfs: downloading cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 (20 bytes) | |
552 | lfs: processed: cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 |
|
552 | lfs: processed: cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 | |
553 | lfs: downloaded 1 files (20 bytes) |
|
553 | lfs: downloaded 1 files (20 bytes) | |
554 | lfs: found cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 in the local lfs store |
|
554 | lfs: found cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 in the local lfs store | |
555 | this is an lfs file |
|
555 | this is an lfs file | |
556 |
|
556 | |||
557 | $ hg --cwd $TESTTMP/bulkfetch cat -vr tip lfspair2.bin |
|
557 | $ hg --cwd $TESTTMP/bulkfetch cat -vr tip lfspair2.bin | |
558 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs |
|
558 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
559 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs |
|
559 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
560 | lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes) |
|
560 | lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes) | |
561 | lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e |
|
561 | lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e | |
562 | lfs: downloaded 1 files (24 bytes) |
|
562 | lfs: downloaded 1 files (24 bytes) | |
563 | lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store |
|
563 | lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store | |
564 | this is an lfs file too |
|
564 | this is an lfs file too | |
565 |
|
565 | |||
566 | Export will prefetch all needed files across all needed revisions |
|
566 | Export will prefetch all needed files across all needed revisions | |
567 |
|
567 | |||
568 | $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs |
|
568 | $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs | |
569 | $ hg -R $TESTTMP/bulkfetch -v export -r 0:tip -o all.export |
|
569 | $ hg -R $TESTTMP/bulkfetch -v export -r 0:tip -o all.export | |
570 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs |
|
570 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
571 | exporting patches: |
|
571 | exporting patches: | |
572 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs |
|
572 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
573 | lfs: need to transfer 4 objects (92 bytes) |
|
573 | lfs: need to transfer 4 objects (92 bytes) | |
574 | lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes) |
|
574 | lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes) | |
575 | lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de |
|
575 | lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de | |
576 | lfs: downloading bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc (23 bytes) |
|
576 | lfs: downloading bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc (23 bytes) | |
577 | lfs: processed: bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc |
|
577 | lfs: processed: bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc | |
578 | lfs: downloading cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 (20 bytes) |
|
578 | lfs: downloading cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 (20 bytes) | |
579 | lfs: processed: cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 |
|
579 | lfs: processed: cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 | |
580 | lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes) |
|
580 | lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes) | |
581 | lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e |
|
581 | lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e | |
582 | lfs: downloaded 4 files (92 bytes) |
|
582 | lfs: downloaded 4 files (92 bytes) | |
583 | all.export |
|
583 | all.export | |
584 | lfs: found bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc in the local lfs store |
|
584 | lfs: found bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc in the local lfs store | |
585 | lfs: found a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de in the local lfs store |
|
585 | lfs: found a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de in the local lfs store | |
586 | lfs: found cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 in the local lfs store |
|
586 | lfs: found cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 in the local lfs store | |
587 | lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store |
|
587 | lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store | |
588 |
|
588 | |||
589 | Export with selected files is used with `extdiff --patch` |
|
589 | Export with selected files is used with `extdiff --patch` | |
590 |
|
590 | |||
591 | $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs |
|
591 | $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs | |
592 | $ hg --config extensions.extdiff= \ |
|
592 | $ hg --config extensions.extdiff= \ | |
593 | > -R $TESTTMP/bulkfetch -v extdiff -r 2:tip --patch $TESTTMP/bulkfetch/lfs.bin |
|
593 | > -R $TESTTMP/bulkfetch -v extdiff -r 2:tip --patch $TESTTMP/bulkfetch/lfs.bin | |
594 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs |
|
594 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
595 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs |
|
595 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
596 | lfs: downloading bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc (23 bytes) |
|
596 | lfs: downloading bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc (23 bytes) | |
597 | lfs: processed: bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc |
|
597 | lfs: processed: bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc | |
598 | lfs: downloaded 1 files (23 bytes) |
|
598 | lfs: downloaded 1 files (23 bytes) | |
599 | */hg-8374dc4052cb.patch (glob) |
|
599 | */hg-8374dc4052cb.patch (glob) | |
600 | lfs: found bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc in the local lfs store |
|
600 | lfs: found bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc in the local lfs store | |
601 | */hg-9640b57e77b1.patch (glob) |
|
601 | */hg-9640b57e77b1.patch (glob) | |
602 | --- */hg-8374dc4052cb.patch * (glob) |
|
602 | --- */hg-8374dc4052cb.patch * (glob) | |
603 | +++ */hg-9640b57e77b1.patch * (glob) |
|
603 | +++ */hg-9640b57e77b1.patch * (glob) | |
604 | @@ -2,12 +2,7 @@ |
|
604 | @@ -2,12 +2,7 @@ | |
605 | # User test |
|
605 | # User test | |
606 | # Date 0 0 |
|
606 | # Date 0 0 | |
607 | # Thu Jan 01 00:00:00 1970 +0000 |
|
607 | # Thu Jan 01 00:00:00 1970 +0000 | |
608 | -# Node ID 8374dc4052cbd388e79d9dc4ddb29784097aa354 |
|
608 | -# Node ID 8374dc4052cbd388e79d9dc4ddb29784097aa354 | |
609 | -# Parent 1477875038c60152e391238920a16381c627b487 |
|
609 | -# Parent 1477875038c60152e391238920a16381c627b487 | |
610 | -lfs |
|
610 | -lfs | |
611 | +# Node ID 9640b57e77b14c3a0144fb4478b6cc13e13ea0d1 |
|
611 | +# Node ID 9640b57e77b14c3a0144fb4478b6cc13e13ea0d1 | |
612 | +# Parent d3b84d50eacbd56638e11abce6b8616aaba54420 |
|
612 | +# Parent d3b84d50eacbd56638e11abce6b8616aaba54420 | |
613 | +add lfs pair |
|
613 | +add lfs pair | |
614 |
|
614 | |||
615 | -diff -r 1477875038c6 -r 8374dc4052cb lfs.bin |
|
615 | -diff -r 1477875038c6 -r 8374dc4052cb lfs.bin | |
616 | ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
616 | ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
617 | -+++ b/lfs.bin Thu Jan 01 00:00:00 1970 +0000 |
|
617 | -+++ b/lfs.bin Thu Jan 01 00:00:00 1970 +0000 | |
618 | -@@ -0,0 +1,1 @@ |
|
618 | -@@ -0,0 +1,1 @@ | |
619 | -+this is a big lfs file |
|
619 | -+this is a big lfs file | |
620 | cleaning up temp directory |
|
620 | cleaning up temp directory | |
621 | [1] |
|
621 | [1] | |
622 |
|
622 | |||
623 | Diff will prefetch files |
|
623 | Diff will prefetch files | |
624 |
|
624 | |||
625 | $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs |
|
625 | $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs | |
626 | $ hg -R $TESTTMP/bulkfetch -v diff -r 2:tip |
|
626 | $ hg -R $TESTTMP/bulkfetch -v diff -r 2:tip | |
627 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs |
|
627 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
628 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs |
|
628 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
629 | lfs: need to transfer 4 objects (92 bytes) |
|
629 | lfs: need to transfer 4 objects (92 bytes) | |
630 | lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes) |
|
630 | lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes) | |
631 | lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de |
|
631 | lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de | |
632 | lfs: downloading bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc (23 bytes) |
|
632 | lfs: downloading bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc (23 bytes) | |
633 | lfs: processed: bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc |
|
633 | lfs: processed: bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc | |
634 | lfs: downloading cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 (20 bytes) |
|
634 | lfs: downloading cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 (20 bytes) | |
635 | lfs: processed: cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 |
|
635 | lfs: processed: cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 | |
636 | lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes) |
|
636 | lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes) | |
637 | lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e |
|
637 | lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e | |
638 | lfs: downloaded 4 files (92 bytes) |
|
638 | lfs: downloaded 4 files (92 bytes) | |
639 | lfs: found bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc in the local lfs store |
|
639 | lfs: found bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc in the local lfs store | |
640 | lfs: found a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de in the local lfs store |
|
640 | lfs: found a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de in the local lfs store | |
641 | lfs: found cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 in the local lfs store |
|
641 | lfs: found cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 in the local lfs store | |
642 | lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store |
|
642 | lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store | |
643 | diff -r 8374dc4052cb -r 9640b57e77b1 lfs.bin |
|
643 | diff -r 8374dc4052cb -r 9640b57e77b1 lfs.bin | |
644 | --- a/lfs.bin Thu Jan 01 00:00:00 1970 +0000 |
|
644 | --- a/lfs.bin Thu Jan 01 00:00:00 1970 +0000 | |
645 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
645 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
646 | @@ -1,1 +0,0 @@ |
|
646 | @@ -1,1 +0,0 @@ | |
647 | -this is a big lfs file |
|
647 | -this is a big lfs file | |
648 | diff -r 8374dc4052cb -r 9640b57e77b1 lfs2.txt |
|
648 | diff -r 8374dc4052cb -r 9640b57e77b1 lfs2.txt | |
649 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
649 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
650 | +++ b/lfs2.txt Thu Jan 01 00:00:00 1970 +0000 |
|
650 | +++ b/lfs2.txt Thu Jan 01 00:00:00 1970 +0000 | |
651 | @@ -0,0 +1,1 @@ |
|
651 | @@ -0,0 +1,1 @@ | |
652 | +this is another lfs file |
|
652 | +this is another lfs file | |
653 | diff -r 8374dc4052cb -r 9640b57e77b1 lfspair1.bin |
|
653 | diff -r 8374dc4052cb -r 9640b57e77b1 lfspair1.bin | |
654 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
654 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
655 | +++ b/lfspair1.bin Thu Jan 01 00:00:00 1970 +0000 |
|
655 | +++ b/lfspair1.bin Thu Jan 01 00:00:00 1970 +0000 | |
656 | @@ -0,0 +1,1 @@ |
|
656 | @@ -0,0 +1,1 @@ | |
657 | +this is an lfs file |
|
657 | +this is an lfs file | |
658 | diff -r 8374dc4052cb -r 9640b57e77b1 lfspair2.bin |
|
658 | diff -r 8374dc4052cb -r 9640b57e77b1 lfspair2.bin | |
659 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
659 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
660 | +++ b/lfspair2.bin Thu Jan 01 00:00:00 1970 +0000 |
|
660 | +++ b/lfspair2.bin Thu Jan 01 00:00:00 1970 +0000 | |
661 | @@ -0,0 +1,1 @@ |
|
661 | @@ -0,0 +1,1 @@ | |
662 | +this is an lfs file too |
|
662 | +this is an lfs file too | |
663 | diff -r 8374dc4052cb -r 9640b57e77b1 nonlfs.txt |
|
663 | diff -r 8374dc4052cb -r 9640b57e77b1 nonlfs.txt | |
664 | --- a/nonlfs.txt Thu Jan 01 00:00:00 1970 +0000 |
|
664 | --- a/nonlfs.txt Thu Jan 01 00:00:00 1970 +0000 | |
665 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
665 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
666 | @@ -1,1 +0,0 @@ |
|
666 | @@ -1,1 +0,0 @@ | |
667 | -non-lfs |
|
667 | -non-lfs | |
668 | diff -r 8374dc4052cb -r 9640b57e77b1 nonlfs3.txt |
|
668 | diff -r 8374dc4052cb -r 9640b57e77b1 nonlfs3.txt | |
669 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
669 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
670 | +++ b/nonlfs3.txt Thu Jan 01 00:00:00 1970 +0000 |
|
670 | +++ b/nonlfs3.txt Thu Jan 01 00:00:00 1970 +0000 | |
671 | @@ -0,0 +1,1 @@ |
|
671 | @@ -0,0 +1,1 @@ | |
672 | +non-lfs |
|
672 | +non-lfs | |
673 |
|
673 | |||
674 | Only the files required by diff are prefetched |
|
674 | Only the files required by diff are prefetched | |
675 |
|
675 | |||
676 | $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs |
|
676 | $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs | |
677 | $ hg -R $TESTTMP/bulkfetch -v diff -r 2:tip $TESTTMP/bulkfetch/lfspair2.bin |
|
677 | $ hg -R $TESTTMP/bulkfetch -v diff -r 2:tip $TESTTMP/bulkfetch/lfspair2.bin | |
678 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs |
|
678 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
679 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs |
|
679 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
680 | lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes) |
|
680 | lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes) | |
681 | lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e |
|
681 | lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e | |
682 | lfs: downloaded 1 files (24 bytes) |
|
682 | lfs: downloaded 1 files (24 bytes) | |
683 | lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store |
|
683 | lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store | |
684 | diff -r 8374dc4052cb -r 9640b57e77b1 lfspair2.bin |
|
684 | diff -r 8374dc4052cb -r 9640b57e77b1 lfspair2.bin | |
685 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
685 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
686 | +++ b/lfspair2.bin Thu Jan 01 00:00:00 1970 +0000 |
|
686 | +++ b/lfspair2.bin Thu Jan 01 00:00:00 1970 +0000 | |
687 | @@ -0,0 +1,1 @@ |
|
687 | @@ -0,0 +1,1 @@ | |
688 | +this is an lfs file too |
|
688 | +this is an lfs file too | |
689 |
|
689 | |||
690 | #endif |
|
690 | #endif | |
691 |
|
691 | |||
692 | $ "$PYTHON" $TESTDIR/killdaemons.py $DAEMON_PIDS |
|
692 | $ "$PYTHON" $TESTDIR/killdaemons.py $DAEMON_PIDS | |
693 |
|
693 | |||
694 | $ cat $TESTTMP/errors.log |
|
694 | $ cat $TESTTMP/errors.log |
General Comments 0
You need to be logged in to leave comments.
Login now