Show More
@@ -1,556 +1,556 b'' | |||||
1 | #require no-reposimplestore no-chg |
|
1 | #require no-reposimplestore no-chg | |
2 |
|
2 | |||
3 | Set up a server |
|
3 | Set up a server | |
4 |
|
4 | |||
5 | $ hg init server |
|
5 | $ hg init server | |
6 | $ cd server |
|
6 | $ cd server | |
7 | $ cat >> .hg/hgrc << EOF |
|
7 | $ cat >> .hg/hgrc << EOF | |
8 | > [extensions] |
|
8 | > [extensions] | |
9 | > clonebundles = |
|
9 | > clonebundles = | |
10 | > EOF |
|
10 | > EOF | |
11 |
|
11 | |||
12 | $ touch foo |
|
12 | $ touch foo | |
13 | $ hg -q commit -A -m 'add foo' |
|
13 | $ hg -q commit -A -m 'add foo' | |
14 | $ touch bar |
|
14 | $ touch bar | |
15 | $ hg -q commit -A -m 'add bar' |
|
15 | $ hg -q commit -A -m 'add bar' | |
16 |
|
16 | |||
17 | $ hg serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log |
|
17 | $ hg serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log | |
18 | $ cat hg.pid >> $DAEMON_PIDS |
|
18 | $ cat hg.pid >> $DAEMON_PIDS | |
19 | $ cd .. |
|
19 | $ cd .. | |
20 |
|
20 | |||
21 | Missing manifest should not result in server lookup |
|
21 | Missing manifest should not result in server lookup | |
22 |
|
22 | |||
23 | $ hg --verbose clone -U http://localhost:$HGPORT no-manifest |
|
23 | $ hg --verbose clone -U http://localhost:$HGPORT no-manifest | |
24 | requesting all changes |
|
24 | requesting all changes | |
25 | adding changesets |
|
25 | adding changesets | |
26 | adding manifests |
|
26 | adding manifests | |
27 | adding file changes |
|
27 | adding file changes | |
28 | added 2 changesets with 2 changes to 2 files |
|
28 | added 2 changesets with 2 changes to 2 files | |
29 | new changesets 53245c60e682:aaff8d2ffbbf |
|
29 | new changesets 53245c60e682:aaff8d2ffbbf | |
30 | (sent 3 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
30 | (sent 3 HTTP requests and * bytes; received * bytes in responses) (glob) | |
31 |
|
31 | |||
32 | $ cat server/access.log |
|
32 | $ cat server/access.log | |
33 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
33 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
34 | $LOCALIP - - [$LOGDATE$] "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 (glob) |
|
34 | $LOCALIP - - [$LOGDATE$] "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 (glob) | |
35 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=aaff8d2ffbbf07a46dd1f05d8ae7877e3f56e2a2&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
35 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=aaff8d2ffbbf07a46dd1f05d8ae7877e3f56e2a2&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
36 |
|
36 | |||
37 | Empty manifest file results in retrieval |
|
37 | Empty manifest file results in retrieval | |
38 | (the extension only checks if the manifest file exists) |
|
38 | (the extension only checks if the manifest file exists) | |
39 |
|
39 | |||
40 | $ touch server/.hg/clonebundles.manifest |
|
40 | $ touch server/.hg/clonebundles.manifest | |
41 | $ hg --verbose clone -U http://localhost:$HGPORT empty-manifest |
|
41 | $ hg --verbose clone -U http://localhost:$HGPORT empty-manifest | |
42 | no clone bundles available on remote; falling back to regular clone |
|
42 | no clone bundles available on remote; falling back to regular clone | |
43 | requesting all changes |
|
43 | requesting all changes | |
44 | adding changesets |
|
44 | adding changesets | |
45 | adding manifests |
|
45 | adding manifests | |
46 | adding file changes |
|
46 | adding file changes | |
47 | added 2 changesets with 2 changes to 2 files |
|
47 | added 2 changesets with 2 changes to 2 files | |
48 | new changesets 53245c60e682:aaff8d2ffbbf |
|
48 | new changesets 53245c60e682:aaff8d2ffbbf | |
49 | (sent 4 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
49 | (sent 4 HTTP requests and * bytes; received * bytes in responses) (glob) | |
50 |
|
50 | |||
51 | Manifest file with invalid URL aborts |
|
51 | Manifest file with invalid URL aborts | |
52 |
|
52 | |||
53 | $ echo 'http://does.not.exist/bundle.hg' > server/.hg/clonebundles.manifest |
|
53 | $ echo 'http://does.not.exist/bundle.hg' > server/.hg/clonebundles.manifest | |
54 | $ hg clone http://localhost:$HGPORT 404-url |
|
54 | $ hg clone http://localhost:$HGPORT 404-url | |
55 | applying clone bundle from http://does.not.exist/bundle.hg |
|
55 | applying clone bundle from http://does.not.exist/bundle.hg | |
56 | error fetching bundle: (.* not known|(\[Errno -?\d+])? No address associated with hostname) (re) (no-windows !) |
|
56 | error fetching bundle: (.* not known|(\[Errno -?\d+])? No address associated with hostname) (re) (no-windows !) | |
57 | error fetching bundle: [Errno 1100*] getaddrinfo failed (glob) (windows !) |
|
57 | error fetching bundle: [Errno 1100*] getaddrinfo failed (glob) (windows !) | |
58 | abort: error applying bundle |
|
58 | abort: error applying bundle | |
59 | (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false") |
|
59 | (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false") | |
60 | [255] |
|
60 | [255] | |
61 |
|
61 | |||
62 | Server is not running aborts |
|
62 | Server is not running aborts | |
63 |
|
63 | |||
64 | $ echo "http://localhost:$HGPORT1/bundle.hg" > server/.hg/clonebundles.manifest |
|
64 | $ echo "http://localhost:$HGPORT1/bundle.hg" > server/.hg/clonebundles.manifest | |
65 | $ hg clone http://localhost:$HGPORT server-not-runner |
|
65 | $ hg clone http://localhost:$HGPORT server-not-runner | |
66 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg |
|
66 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg | |
67 | error fetching bundle: (.* refused.*|Protocol not supported|(.* )?\$EADDRNOTAVAIL\$) (re) |
|
67 | error fetching bundle: (.* refused.*|Protocol not supported|(.* )?\$EADDRNOTAVAIL\$|.* No route to host) (re) | |
68 | abort: error applying bundle |
|
68 | abort: error applying bundle | |
69 | (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false") |
|
69 | (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false") | |
70 | [255] |
|
70 | [255] | |
71 |
|
71 | |||
72 | Server returns 404 |
|
72 | Server returns 404 | |
73 |
|
73 | |||
74 | $ "$PYTHON" $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid |
|
74 | $ "$PYTHON" $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid | |
75 | $ cat http.pid >> $DAEMON_PIDS |
|
75 | $ cat http.pid >> $DAEMON_PIDS | |
76 | $ hg clone http://localhost:$HGPORT running-404 |
|
76 | $ hg clone http://localhost:$HGPORT running-404 | |
77 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg |
|
77 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg | |
78 | HTTP error fetching bundle: HTTP Error 404: File not found |
|
78 | HTTP error fetching bundle: HTTP Error 404: File not found | |
79 | abort: error applying bundle |
|
79 | abort: error applying bundle | |
80 | (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false") |
|
80 | (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false") | |
81 | [255] |
|
81 | [255] | |
82 |
|
82 | |||
83 | We can override failure to fall back to regular clone |
|
83 | We can override failure to fall back to regular clone | |
84 |
|
84 | |||
85 | $ hg --config ui.clonebundlefallback=true clone -U http://localhost:$HGPORT 404-fallback |
|
85 | $ hg --config ui.clonebundlefallback=true clone -U http://localhost:$HGPORT 404-fallback | |
86 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg |
|
86 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg | |
87 | HTTP error fetching bundle: HTTP Error 404: File not found |
|
87 | HTTP error fetching bundle: HTTP Error 404: File not found | |
88 | falling back to normal clone |
|
88 | falling back to normal clone | |
89 | requesting all changes |
|
89 | requesting all changes | |
90 | adding changesets |
|
90 | adding changesets | |
91 | adding manifests |
|
91 | adding manifests | |
92 | adding file changes |
|
92 | adding file changes | |
93 | added 2 changesets with 2 changes to 2 files |
|
93 | added 2 changesets with 2 changes to 2 files | |
94 | new changesets 53245c60e682:aaff8d2ffbbf |
|
94 | new changesets 53245c60e682:aaff8d2ffbbf | |
95 |
|
95 | |||
96 | Bundle with partial content works |
|
96 | Bundle with partial content works | |
97 |
|
97 | |||
98 | $ hg -R server bundle --type gzip-v1 --base null -r 53245c60e682 partial.hg |
|
98 | $ hg -R server bundle --type gzip-v1 --base null -r 53245c60e682 partial.hg | |
99 | 1 changesets found |
|
99 | 1 changesets found | |
100 |
|
100 | |||
101 | We verify exact bundle content as an extra check against accidental future |
|
101 | We verify exact bundle content as an extra check against accidental future | |
102 | changes. If this output changes, we could break old clients. |
|
102 | changes. If this output changes, we could break old clients. | |
103 |
|
103 | |||
104 | $ f --size --hexdump partial.hg |
|
104 | $ f --size --hexdump partial.hg | |
105 | partial.hg: size=207 |
|
105 | partial.hg: size=207 | |
106 | 0000: 48 47 31 30 47 5a 78 9c 63 60 60 98 17 ac 12 93 |HG10GZx.c``.....| |
|
106 | 0000: 48 47 31 30 47 5a 78 9c 63 60 60 98 17 ac 12 93 |HG10GZx.c``.....| | |
107 | 0010: f0 ac a9 23 45 70 cb bf 0d 5f 59 4e 4a 7f 79 21 |...#Ep..._YNJ.y!| |
|
107 | 0010: f0 ac a9 23 45 70 cb bf 0d 5f 59 4e 4a 7f 79 21 |...#Ep..._YNJ.y!| | |
108 | 0020: 9b cc 40 24 20 a0 d7 ce 2c d1 38 25 cd 24 25 d5 |..@$ ...,.8%.$%.| |
|
108 | 0020: 9b cc 40 24 20 a0 d7 ce 2c d1 38 25 cd 24 25 d5 |..@$ ...,.8%.$%.| | |
109 | 0030: d8 c2 22 cd 38 d9 24 cd 22 d5 c8 22 cd 24 cd 32 |..".8.$."..".$.2| |
|
109 | 0030: d8 c2 22 cd 38 d9 24 cd 22 d5 c8 22 cd 24 cd 32 |..".8.$."..".$.2| | |
110 | 0040: d1 c2 d0 c4 c8 d2 32 d1 38 39 29 c9 34 cd d4 80 |......2.89).4...| |
|
110 | 0040: d1 c2 d0 c4 c8 d2 32 d1 38 39 29 c9 34 cd d4 80 |......2.89).4...| | |
111 | 0050: ab 24 b5 b8 84 cb 40 c1 80 2b 2d 3f 9f 8b 2b 31 |.$....@..+-?..+1| |
|
111 | 0050: ab 24 b5 b8 84 cb 40 c1 80 2b 2d 3f 9f 8b 2b 31 |.$....@..+-?..+1| | |
112 | 0060: 25 45 01 c8 80 9a d2 9b 65 fb e5 9e 45 bf 8d 7f |%E......e...E...| |
|
112 | 0060: 25 45 01 c8 80 9a d2 9b 65 fb e5 9e 45 bf 8d 7f |%E......e...E...| | |
113 | 0070: 9f c6 97 9f 2b 44 34 67 d9 ec 8e 0f a0 92 0b 75 |....+D4g.......u| |
|
113 | 0070: 9f c6 97 9f 2b 44 34 67 d9 ec 8e 0f a0 92 0b 75 |....+D4g.......u| | |
114 | 0080: 41 d6 24 59 18 a4 a4 9a a6 18 1a 5b 98 9b 5a 98 |A.$Y.......[..Z.| |
|
114 | 0080: 41 d6 24 59 18 a4 a4 9a a6 18 1a 5b 98 9b 5a 98 |A.$Y.......[..Z.| | |
115 | 0090: 9a 18 26 9b a6 19 98 1a 99 99 26 a6 18 9a 98 24 |..&.......&....$| |
|
115 | 0090: 9a 18 26 9b a6 19 98 1a 99 99 26 a6 18 9a 98 24 |..&.......&....$| | |
116 | 00a0: 26 59 a6 25 5a 98 a5 18 a6 24 71 41 35 b1 43 dc |&Y.%Z....$qA5.C.| |
|
116 | 00a0: 26 59 a6 25 5a 98 a5 18 a6 24 71 41 35 b1 43 dc |&Y.%Z....$qA5.C.| | |
117 | 00b0: 16 b2 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 d7 8a |.....E..V....R..| |
|
117 | 00b0: 16 b2 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 d7 8a |.....E..V....R..| | |
118 | 00c0: 78 ed fc d5 76 f1 36 35 dc 05 00 36 ed 5e c7 |x...v.65...6.^.| |
|
118 | 00c0: 78 ed fc d5 76 f1 36 35 dc 05 00 36 ed 5e c7 |x...v.65...6.^.| | |
119 |
|
119 | |||
120 | $ echo "http://localhost:$HGPORT1/partial.hg" > server/.hg/clonebundles.manifest |
|
120 | $ echo "http://localhost:$HGPORT1/partial.hg" > server/.hg/clonebundles.manifest | |
121 | $ hg clone -U http://localhost:$HGPORT partial-bundle |
|
121 | $ hg clone -U http://localhost:$HGPORT partial-bundle | |
122 | applying clone bundle from http://localhost:$HGPORT1/partial.hg |
|
122 | applying clone bundle from http://localhost:$HGPORT1/partial.hg | |
123 | adding changesets |
|
123 | adding changesets | |
124 | adding manifests |
|
124 | adding manifests | |
125 | adding file changes |
|
125 | adding file changes | |
126 | added 1 changesets with 1 changes to 1 files |
|
126 | added 1 changesets with 1 changes to 1 files | |
127 | finished applying clone bundle |
|
127 | finished applying clone bundle | |
128 | searching for changes |
|
128 | searching for changes | |
129 | adding changesets |
|
129 | adding changesets | |
130 | adding manifests |
|
130 | adding manifests | |
131 | adding file changes |
|
131 | adding file changes | |
132 | added 1 changesets with 1 changes to 1 files |
|
132 | added 1 changesets with 1 changes to 1 files | |
133 | new changesets aaff8d2ffbbf |
|
133 | new changesets aaff8d2ffbbf | |
134 | 1 local changesets published |
|
134 | 1 local changesets published | |
135 |
|
135 | |||
136 | Incremental pull doesn't fetch bundle |
|
136 | Incremental pull doesn't fetch bundle | |
137 |
|
137 | |||
138 | $ hg clone -r 53245c60e682 -U http://localhost:$HGPORT partial-clone |
|
138 | $ hg clone -r 53245c60e682 -U http://localhost:$HGPORT partial-clone | |
139 | adding changesets |
|
139 | adding changesets | |
140 | adding manifests |
|
140 | adding manifests | |
141 | adding file changes |
|
141 | adding file changes | |
142 | added 1 changesets with 1 changes to 1 files |
|
142 | added 1 changesets with 1 changes to 1 files | |
143 | new changesets 53245c60e682 |
|
143 | new changesets 53245c60e682 | |
144 |
|
144 | |||
145 | $ cd partial-clone |
|
145 | $ cd partial-clone | |
146 | $ hg pull |
|
146 | $ hg pull | |
147 | pulling from http://localhost:$HGPORT/ |
|
147 | pulling from http://localhost:$HGPORT/ | |
148 | searching for changes |
|
148 | searching for changes | |
149 | adding changesets |
|
149 | adding changesets | |
150 | adding manifests |
|
150 | adding manifests | |
151 | adding file changes |
|
151 | adding file changes | |
152 | added 1 changesets with 1 changes to 1 files |
|
152 | added 1 changesets with 1 changes to 1 files | |
153 | new changesets aaff8d2ffbbf |
|
153 | new changesets aaff8d2ffbbf | |
154 | (run 'hg update' to get a working copy) |
|
154 | (run 'hg update' to get a working copy) | |
155 | $ cd .. |
|
155 | $ cd .. | |
156 |
|
156 | |||
157 | Bundle with full content works |
|
157 | Bundle with full content works | |
158 |
|
158 | |||
159 | $ hg -R server bundle --type gzip-v2 --base null -r tip full.hg |
|
159 | $ hg -R server bundle --type gzip-v2 --base null -r tip full.hg | |
160 | 2 changesets found |
|
160 | 2 changesets found | |
161 |
|
161 | |||
162 | Again, we perform an extra check against bundle content changes. If this content |
|
162 | Again, we perform an extra check against bundle content changes. If this content | |
163 | changes, clone bundles produced by new Mercurial versions may not be readable |
|
163 | changes, clone bundles produced by new Mercurial versions may not be readable | |
164 | by old clients. |
|
164 | by old clients. | |
165 |
|
165 | |||
166 | $ f --size --hexdump full.hg |
|
166 | $ f --size --hexdump full.hg | |
167 | full.hg: size=442 |
|
167 | full.hg: size=442 | |
168 | 0000: 48 47 32 30 00 00 00 0e 43 6f 6d 70 72 65 73 73 |HG20....Compress| |
|
168 | 0000: 48 47 32 30 00 00 00 0e 43 6f 6d 70 72 65 73 73 |HG20....Compress| | |
169 | 0010: 69 6f 6e 3d 47 5a 78 9c 63 60 60 d0 e4 76 f6 70 |ion=GZx.c``..v.p| |
|
169 | 0010: 69 6f 6e 3d 47 5a 78 9c 63 60 60 d0 e4 76 f6 70 |ion=GZx.c``..v.p| | |
170 | 0020: f4 73 77 75 0f f2 0f 0d 60 00 02 46 46 76 26 4e |.swu....`..FFv&N| |
|
170 | 0020: f4 73 77 75 0f f2 0f 0d 60 00 02 46 46 76 26 4e |.swu....`..FFv&N| | |
171 | 0030: c6 b2 d4 a2 e2 cc fc 3c 03 a3 bc a4 e4 8c c4 bc |.......<........| |
|
171 | 0030: c6 b2 d4 a2 e2 cc fc 3c 03 a3 bc a4 e4 8c c4 bc |.......<........| | |
172 | 0040: f4 d4 62 23 06 06 e6 19 40 f9 4d c1 2a 31 09 cf |..b#....@.M.*1..| |
|
172 | 0040: f4 d4 62 23 06 06 e6 19 40 f9 4d c1 2a 31 09 cf |..b#....@.M.*1..| | |
173 | 0050: 9a 3a 52 04 b7 fc db f0 95 e5 a4 f4 97 17 b2 c9 |.:R.............| |
|
173 | 0050: 9a 3a 52 04 b7 fc db f0 95 e5 a4 f4 97 17 b2 c9 |.:R.............| | |
174 | 0060: 0c 14 00 02 e6 d9 99 25 1a a7 a4 99 a4 a4 1a 5b |.......%.......[| |
|
174 | 0060: 0c 14 00 02 e6 d9 99 25 1a a7 a4 99 a4 a4 1a 5b |.......%.......[| | |
175 | 0070: 58 a4 19 27 9b a4 59 a4 1a 59 a4 99 a4 59 26 5a |X..'..Y..Y...Y&Z| |
|
175 | 0070: 58 a4 19 27 9b a4 59 a4 1a 59 a4 99 a4 59 26 5a |X..'..Y..Y...Y&Z| | |
176 | 0080: 18 9a 18 59 5a 26 1a 27 27 25 99 a6 99 1a 70 95 |...YZ&.''%....p.| |
|
176 | 0080: 18 9a 18 59 5a 26 1a 27 27 25 99 a6 99 1a 70 95 |...YZ&.''%....p.| | |
177 | 0090: a4 16 97 70 19 28 18 70 a5 e5 e7 73 71 25 a6 a4 |...p.(.p...sq%..| |
|
177 | 0090: a4 16 97 70 19 28 18 70 a5 e5 e7 73 71 25 a6 a4 |...p.(.p...sq%..| | |
178 | 00a0: 28 00 19 20 17 af fa df ab ff 7b 3f fb 92 dc 8b |(.. ......{?....| |
|
178 | 00a0: 28 00 19 20 17 af fa df ab ff 7b 3f fb 92 dc 8b |(.. ......{?....| | |
179 | 00b0: 1f 62 bb 9e b7 d7 d9 87 3d 5a 44 89 2f b0 99 87 |.b......=ZD./...| |
|
179 | 00b0: 1f 62 bb 9e b7 d7 d9 87 3d 5a 44 89 2f b0 99 87 |.b......=ZD./...| | |
180 | 00c0: ec e2 54 63 43 e3 b4 64 43 73 23 33 43 53 0b 63 |..TcC..dCs#3CS.c| |
|
180 | 00c0: ec e2 54 63 43 e3 b4 64 43 73 23 33 43 53 0b 63 |..TcC..dCs#3CS.c| | |
181 | 00d0: d3 14 23 03 a0 fb 2c 2c 0c d3 80 1e 30 49 49 b1 |..#...,,....0II.| |
|
181 | 00d0: d3 14 23 03 a0 fb 2c 2c 0c d3 80 1e 30 49 49 b1 |..#...,,....0II.| | |
182 | 00e0: 4c 4a 32 48 33 30 b0 34 42 b8 38 29 b1 08 e2 62 |LJ2H30.4B.8)...b| |
|
182 | 00e0: 4c 4a 32 48 33 30 b0 34 42 b8 38 29 b1 08 e2 62 |LJ2H30.4B.8)...b| | |
183 | 00f0: 20 03 6a ca c2 2c db 2f f7 2c fa 6d fc fb 34 be | .j..,./.,.m..4.| |
|
183 | 00f0: 20 03 6a ca c2 2c db 2f f7 2c fa 6d fc fb 34 be | .j..,./.,.m..4.| | |
184 | 0100: fc 5c 21 a2 39 cb 66 77 7c 00 0d c3 59 17 14 58 |.\!.9.fw|...Y..X| |
|
184 | 0100: fc 5c 21 a2 39 cb 66 77 7c 00 0d c3 59 17 14 58 |.\!.9.fw|...Y..X| | |
185 | 0110: 49 16 06 29 a9 a6 29 86 c6 16 e6 a6 16 a6 26 86 |I..)..).......&.| |
|
185 | 0110: 49 16 06 29 a9 a6 29 86 c6 16 e6 a6 16 a6 26 86 |I..)..).......&.| | |
186 | 0120: c9 a6 69 06 a6 46 66 a6 89 29 86 26 26 89 49 96 |..i..Ff..).&&.I.| |
|
186 | 0120: c9 a6 69 06 a6 46 66 a6 89 29 86 26 26 89 49 96 |..i..Ff..).&&.I.| | |
187 | 0130: 69 89 16 66 29 86 29 49 5c 20 07 3e 16 fe 23 ae |i..f).)I\ .>..#.| |
|
187 | 0130: 69 89 16 66 29 86 29 49 5c 20 07 3e 16 fe 23 ae |i..f).)I\ .>..#.| | |
188 | 0140: 26 da 1c ab 10 1f d1 f8 e3 b3 ef cd dd fc 0c 93 |&...............| |
|
188 | 0140: 26 da 1c ab 10 1f d1 f8 e3 b3 ef cd dd fc 0c 93 |&...............| | |
189 | 0150: 88 75 34 36 75 04 82 55 17 14 36 a4 38 10 04 d8 |.u46u..U..6.8...| |
|
189 | 0150: 88 75 34 36 75 04 82 55 17 14 36 a4 38 10 04 d8 |.u46u..U..6.8...| | |
190 | 0160: 21 01 9a b1 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 |!......E..V....R| |
|
190 | 0160: 21 01 9a b1 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 |!......E..V....R| | |
191 | 0170: d7 8a 78 ed fc d5 76 f1 36 25 81 89 c7 ad ec 90 |..x...v.6%......| |
|
191 | 0170: d7 8a 78 ed fc d5 76 f1 36 25 81 89 c7 ad ec 90 |..x...v.6%......| | |
192 | 0180: 54 47 75 2b 89 48 b1 b2 62 c9 89 c9 19 a9 56 45 |TGu+.H..b.....VE| |
|
192 | 0180: 54 47 75 2b 89 48 b1 b2 62 c9 89 c9 19 a9 56 45 |TGu+.H..b.....VE| | |
193 | 0190: a9 65 ba 49 45 89 79 c9 19 ba 60 01 a0 14 23 58 |.e.IE.y...`...#X| |
|
193 | 0190: a9 65 ba 49 45 89 79 c9 19 ba 60 01 a0 14 23 58 |.e.IE.y...`...#X| | |
194 | 01a0: 81 35 c8 7d 40 cc 04 e2 a4 a4 a6 25 96 e6 94 60 |.5.}@......%...`| |
|
194 | 01a0: 81 35 c8 7d 40 cc 04 e2 a4 a4 a6 25 96 e6 94 60 |.5.}@......%...`| | |
195 | 01b0: 33 17 5f 54 00 00 d3 1b 0d 4c |3._T.....L| |
|
195 | 01b0: 33 17 5f 54 00 00 d3 1b 0d 4c |3._T.....L| | |
196 |
|
196 | |||
197 | $ echo "http://localhost:$HGPORT1/full.hg" > server/.hg/clonebundles.manifest |
|
197 | $ echo "http://localhost:$HGPORT1/full.hg" > server/.hg/clonebundles.manifest | |
198 | $ hg clone -U http://localhost:$HGPORT full-bundle |
|
198 | $ hg clone -U http://localhost:$HGPORT full-bundle | |
199 | applying clone bundle from http://localhost:$HGPORT1/full.hg |
|
199 | applying clone bundle from http://localhost:$HGPORT1/full.hg | |
200 | adding changesets |
|
200 | adding changesets | |
201 | adding manifests |
|
201 | adding manifests | |
202 | adding file changes |
|
202 | adding file changes | |
203 | added 2 changesets with 2 changes to 2 files |
|
203 | added 2 changesets with 2 changes to 2 files | |
204 | finished applying clone bundle |
|
204 | finished applying clone bundle | |
205 | searching for changes |
|
205 | searching for changes | |
206 | no changes found |
|
206 | no changes found | |
207 | 2 local changesets published |
|
207 | 2 local changesets published | |
208 |
|
208 | |||
209 | Feature works over SSH |
|
209 | Feature works over SSH | |
210 |
|
210 | |||
211 | $ hg clone -U -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/server ssh-full-clone |
|
211 | $ hg clone -U -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/server ssh-full-clone | |
212 | applying clone bundle from http://localhost:$HGPORT1/full.hg |
|
212 | applying clone bundle from http://localhost:$HGPORT1/full.hg | |
213 | adding changesets |
|
213 | adding changesets | |
214 | adding manifests |
|
214 | adding manifests | |
215 | adding file changes |
|
215 | adding file changes | |
216 | added 2 changesets with 2 changes to 2 files |
|
216 | added 2 changesets with 2 changes to 2 files | |
217 | finished applying clone bundle |
|
217 | finished applying clone bundle | |
218 | searching for changes |
|
218 | searching for changes | |
219 | no changes found |
|
219 | no changes found | |
220 | 2 local changesets published |
|
220 | 2 local changesets published | |
221 |
|
221 | |||
222 | Entry with unknown BUNDLESPEC is filtered and not used |
|
222 | Entry with unknown BUNDLESPEC is filtered and not used | |
223 |
|
223 | |||
224 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
224 | $ cat > server/.hg/clonebundles.manifest << EOF | |
225 | > http://bad.entry1 BUNDLESPEC=UNKNOWN |
|
225 | > http://bad.entry1 BUNDLESPEC=UNKNOWN | |
226 | > http://bad.entry2 BUNDLESPEC=xz-v1 |
|
226 | > http://bad.entry2 BUNDLESPEC=xz-v1 | |
227 | > http://bad.entry3 BUNDLESPEC=none-v100 |
|
227 | > http://bad.entry3 BUNDLESPEC=none-v100 | |
228 | > http://localhost:$HGPORT1/full.hg BUNDLESPEC=gzip-v2 |
|
228 | > http://localhost:$HGPORT1/full.hg BUNDLESPEC=gzip-v2 | |
229 | > EOF |
|
229 | > EOF | |
230 |
|
230 | |||
231 | $ hg clone -U http://localhost:$HGPORT filter-unknown-type |
|
231 | $ hg clone -U http://localhost:$HGPORT filter-unknown-type | |
232 | applying clone bundle from http://localhost:$HGPORT1/full.hg |
|
232 | applying clone bundle from http://localhost:$HGPORT1/full.hg | |
233 | adding changesets |
|
233 | adding changesets | |
234 | adding manifests |
|
234 | adding manifests | |
235 | adding file changes |
|
235 | adding file changes | |
236 | added 2 changesets with 2 changes to 2 files |
|
236 | added 2 changesets with 2 changes to 2 files | |
237 | finished applying clone bundle |
|
237 | finished applying clone bundle | |
238 | searching for changes |
|
238 | searching for changes | |
239 | no changes found |
|
239 | no changes found | |
240 | 2 local changesets published |
|
240 | 2 local changesets published | |
241 |
|
241 | |||
242 | Automatic fallback when all entries are filtered |
|
242 | Automatic fallback when all entries are filtered | |
243 |
|
243 | |||
244 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
244 | $ cat > server/.hg/clonebundles.manifest << EOF | |
245 | > http://bad.entry BUNDLESPEC=UNKNOWN |
|
245 | > http://bad.entry BUNDLESPEC=UNKNOWN | |
246 | > EOF |
|
246 | > EOF | |
247 |
|
247 | |||
248 | $ hg clone -U http://localhost:$HGPORT filter-all |
|
248 | $ hg clone -U http://localhost:$HGPORT filter-all | |
249 | no compatible clone bundles available on server; falling back to regular clone |
|
249 | no compatible clone bundles available on server; falling back to regular clone | |
250 | (you may want to report this to the server operator) |
|
250 | (you may want to report this to the server operator) | |
251 | requesting all changes |
|
251 | requesting all changes | |
252 | adding changesets |
|
252 | adding changesets | |
253 | adding manifests |
|
253 | adding manifests | |
254 | adding file changes |
|
254 | adding file changes | |
255 | added 2 changesets with 2 changes to 2 files |
|
255 | added 2 changesets with 2 changes to 2 files | |
256 | new changesets 53245c60e682:aaff8d2ffbbf |
|
256 | new changesets 53245c60e682:aaff8d2ffbbf | |
257 |
|
257 | |||
258 | URLs requiring SNI are filtered in Python <2.7.9 |
|
258 | URLs requiring SNI are filtered in Python <2.7.9 | |
259 |
|
259 | |||
260 | $ cp full.hg sni.hg |
|
260 | $ cp full.hg sni.hg | |
261 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
261 | $ cat > server/.hg/clonebundles.manifest << EOF | |
262 | > http://localhost:$HGPORT1/sni.hg REQUIRESNI=true |
|
262 | > http://localhost:$HGPORT1/sni.hg REQUIRESNI=true | |
263 | > http://localhost:$HGPORT1/full.hg |
|
263 | > http://localhost:$HGPORT1/full.hg | |
264 | > EOF |
|
264 | > EOF | |
265 |
|
265 | |||
266 | #if sslcontext |
|
266 | #if sslcontext | |
267 | Python 2.7.9+ support SNI |
|
267 | Python 2.7.9+ support SNI | |
268 |
|
268 | |||
269 | $ hg clone -U http://localhost:$HGPORT sni-supported |
|
269 | $ hg clone -U http://localhost:$HGPORT sni-supported | |
270 | applying clone bundle from http://localhost:$HGPORT1/sni.hg |
|
270 | applying clone bundle from http://localhost:$HGPORT1/sni.hg | |
271 | adding changesets |
|
271 | adding changesets | |
272 | adding manifests |
|
272 | adding manifests | |
273 | adding file changes |
|
273 | adding file changes | |
274 | added 2 changesets with 2 changes to 2 files |
|
274 | added 2 changesets with 2 changes to 2 files | |
275 | finished applying clone bundle |
|
275 | finished applying clone bundle | |
276 | searching for changes |
|
276 | searching for changes | |
277 | no changes found |
|
277 | no changes found | |
278 | 2 local changesets published |
|
278 | 2 local changesets published | |
279 | #else |
|
279 | #else | |
280 | Python <2.7.9 will filter SNI URLs |
|
280 | Python <2.7.9 will filter SNI URLs | |
281 |
|
281 | |||
282 | $ hg clone -U http://localhost:$HGPORT sni-unsupported |
|
282 | $ hg clone -U http://localhost:$HGPORT sni-unsupported | |
283 | applying clone bundle from http://localhost:$HGPORT1/full.hg |
|
283 | applying clone bundle from http://localhost:$HGPORT1/full.hg | |
284 | adding changesets |
|
284 | adding changesets | |
285 | adding manifests |
|
285 | adding manifests | |
286 | adding file changes |
|
286 | adding file changes | |
287 | added 2 changesets with 2 changes to 2 files |
|
287 | added 2 changesets with 2 changes to 2 files | |
288 | finished applying clone bundle |
|
288 | finished applying clone bundle | |
289 | searching for changes |
|
289 | searching for changes | |
290 | no changes found |
|
290 | no changes found | |
291 | 2 local changesets published |
|
291 | 2 local changesets published | |
292 | #endif |
|
292 | #endif | |
293 |
|
293 | |||
294 | Stream clone bundles are supported |
|
294 | Stream clone bundles are supported | |
295 |
|
295 | |||
296 | $ hg -R server debugcreatestreamclonebundle packed.hg |
|
296 | $ hg -R server debugcreatestreamclonebundle packed.hg | |
297 | writing 613 bytes for 4 files |
|
297 | writing 613 bytes for 4 files | |
298 | bundle requirements: generaldelta, revlogv1, sparserevlog |
|
298 | bundle requirements: generaldelta, revlogv1, sparserevlog | |
299 |
|
299 | |||
300 | No bundle spec should work |
|
300 | No bundle spec should work | |
301 |
|
301 | |||
302 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
302 | $ cat > server/.hg/clonebundles.manifest << EOF | |
303 | > http://localhost:$HGPORT1/packed.hg |
|
303 | > http://localhost:$HGPORT1/packed.hg | |
304 | > EOF |
|
304 | > EOF | |
305 |
|
305 | |||
306 | $ hg clone -U http://localhost:$HGPORT stream-clone-no-spec |
|
306 | $ hg clone -U http://localhost:$HGPORT stream-clone-no-spec | |
307 | applying clone bundle from http://localhost:$HGPORT1/packed.hg |
|
307 | applying clone bundle from http://localhost:$HGPORT1/packed.hg | |
308 | 4 files to transfer, 613 bytes of data |
|
308 | 4 files to transfer, 613 bytes of data | |
309 | transferred 613 bytes in *.* seconds (*) (glob) |
|
309 | transferred 613 bytes in *.* seconds (*) (glob) | |
310 | finished applying clone bundle |
|
310 | finished applying clone bundle | |
311 | searching for changes |
|
311 | searching for changes | |
312 | no changes found |
|
312 | no changes found | |
313 |
|
313 | |||
314 | Bundle spec without parameters should work |
|
314 | Bundle spec without parameters should work | |
315 |
|
315 | |||
316 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
316 | $ cat > server/.hg/clonebundles.manifest << EOF | |
317 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1 |
|
317 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1 | |
318 | > EOF |
|
318 | > EOF | |
319 |
|
319 | |||
320 | $ hg clone -U http://localhost:$HGPORT stream-clone-vanilla-spec |
|
320 | $ hg clone -U http://localhost:$HGPORT stream-clone-vanilla-spec | |
321 | applying clone bundle from http://localhost:$HGPORT1/packed.hg |
|
321 | applying clone bundle from http://localhost:$HGPORT1/packed.hg | |
322 | 4 files to transfer, 613 bytes of data |
|
322 | 4 files to transfer, 613 bytes of data | |
323 | transferred 613 bytes in *.* seconds (*) (glob) |
|
323 | transferred 613 bytes in *.* seconds (*) (glob) | |
324 | finished applying clone bundle |
|
324 | finished applying clone bundle | |
325 | searching for changes |
|
325 | searching for changes | |
326 | no changes found |
|
326 | no changes found | |
327 |
|
327 | |||
328 | Bundle spec with format requirements should work |
|
328 | Bundle spec with format requirements should work | |
329 |
|
329 | |||
330 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
330 | $ cat > server/.hg/clonebundles.manifest << EOF | |
331 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1 |
|
331 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1 | |
332 | > EOF |
|
332 | > EOF | |
333 |
|
333 | |||
334 | $ hg clone -U http://localhost:$HGPORT stream-clone-supported-requirements |
|
334 | $ hg clone -U http://localhost:$HGPORT stream-clone-supported-requirements | |
335 | applying clone bundle from http://localhost:$HGPORT1/packed.hg |
|
335 | applying clone bundle from http://localhost:$HGPORT1/packed.hg | |
336 | 4 files to transfer, 613 bytes of data |
|
336 | 4 files to transfer, 613 bytes of data | |
337 | transferred 613 bytes in *.* seconds (*) (glob) |
|
337 | transferred 613 bytes in *.* seconds (*) (glob) | |
338 | finished applying clone bundle |
|
338 | finished applying clone bundle | |
339 | searching for changes |
|
339 | searching for changes | |
340 | no changes found |
|
340 | no changes found | |
341 |
|
341 | |||
342 | Stream bundle spec with unknown requirements should be filtered out |
|
342 | Stream bundle spec with unknown requirements should be filtered out | |
343 |
|
343 | |||
344 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
344 | $ cat > server/.hg/clonebundles.manifest << EOF | |
345 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42 |
|
345 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42 | |
346 | > EOF |
|
346 | > EOF | |
347 |
|
347 | |||
348 | $ hg clone -U http://localhost:$HGPORT stream-clone-unsupported-requirements |
|
348 | $ hg clone -U http://localhost:$HGPORT stream-clone-unsupported-requirements | |
349 | no compatible clone bundles available on server; falling back to regular clone |
|
349 | no compatible clone bundles available on server; falling back to regular clone | |
350 | (you may want to report this to the server operator) |
|
350 | (you may want to report this to the server operator) | |
351 | requesting all changes |
|
351 | requesting all changes | |
352 | adding changesets |
|
352 | adding changesets | |
353 | adding manifests |
|
353 | adding manifests | |
354 | adding file changes |
|
354 | adding file changes | |
355 | added 2 changesets with 2 changes to 2 files |
|
355 | added 2 changesets with 2 changes to 2 files | |
356 | new changesets 53245c60e682:aaff8d2ffbbf |
|
356 | new changesets 53245c60e682:aaff8d2ffbbf | |
357 |
|
357 | |||
358 | Set up manifest for testing preferences |
|
358 | Set up manifest for testing preferences | |
359 | (Remember, the TYPE does not have to match reality - the URL is |
|
359 | (Remember, the TYPE does not have to match reality - the URL is | |
360 | important) |
|
360 | important) | |
361 |
|
361 | |||
362 | $ cp full.hg gz-a.hg |
|
362 | $ cp full.hg gz-a.hg | |
363 | $ cp full.hg gz-b.hg |
|
363 | $ cp full.hg gz-b.hg | |
364 | $ cp full.hg bz2-a.hg |
|
364 | $ cp full.hg bz2-a.hg | |
365 | $ cp full.hg bz2-b.hg |
|
365 | $ cp full.hg bz2-b.hg | |
366 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
366 | $ cat > server/.hg/clonebundles.manifest << EOF | |
367 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 extra=a |
|
367 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 extra=a | |
368 | > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 extra=a |
|
368 | > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 extra=a | |
369 | > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b |
|
369 | > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b | |
370 | > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b |
|
370 | > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b | |
371 | > EOF |
|
371 | > EOF | |
372 |
|
372 | |||
373 | Preferring an undefined attribute will take first entry |
|
373 | Preferring an undefined attribute will take first entry | |
374 |
|
374 | |||
375 | $ hg --config ui.clonebundleprefers=foo=bar clone -U http://localhost:$HGPORT prefer-foo |
|
375 | $ hg --config ui.clonebundleprefers=foo=bar clone -U http://localhost:$HGPORT prefer-foo | |
376 | applying clone bundle from http://localhost:$HGPORT1/gz-a.hg |
|
376 | applying clone bundle from http://localhost:$HGPORT1/gz-a.hg | |
377 | adding changesets |
|
377 | adding changesets | |
378 | adding manifests |
|
378 | adding manifests | |
379 | adding file changes |
|
379 | adding file changes | |
380 | added 2 changesets with 2 changes to 2 files |
|
380 | added 2 changesets with 2 changes to 2 files | |
381 | finished applying clone bundle |
|
381 | finished applying clone bundle | |
382 | searching for changes |
|
382 | searching for changes | |
383 | no changes found |
|
383 | no changes found | |
384 | 2 local changesets published |
|
384 | 2 local changesets published | |
385 |
|
385 | |||
386 | Preferring bz2 type will download first entry of that type |
|
386 | Preferring bz2 type will download first entry of that type | |
387 |
|
387 | |||
388 | $ hg --config ui.clonebundleprefers=COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-bz |
|
388 | $ hg --config ui.clonebundleprefers=COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-bz | |
389 | applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg |
|
389 | applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg | |
390 | adding changesets |
|
390 | adding changesets | |
391 | adding manifests |
|
391 | adding manifests | |
392 | adding file changes |
|
392 | adding file changes | |
393 | added 2 changesets with 2 changes to 2 files |
|
393 | added 2 changesets with 2 changes to 2 files | |
394 | finished applying clone bundle |
|
394 | finished applying clone bundle | |
395 | searching for changes |
|
395 | searching for changes | |
396 | no changes found |
|
396 | no changes found | |
397 | 2 local changesets published |
|
397 | 2 local changesets published | |
398 |
|
398 | |||
399 | Preferring multiple values of an option works |
|
399 | Preferring multiple values of an option works | |
400 |
|
400 | |||
401 | $ hg --config ui.clonebundleprefers=COMPRESSION=unknown,COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-multiple-bz |
|
401 | $ hg --config ui.clonebundleprefers=COMPRESSION=unknown,COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-multiple-bz | |
402 | applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg |
|
402 | applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg | |
403 | adding changesets |
|
403 | adding changesets | |
404 | adding manifests |
|
404 | adding manifests | |
405 | adding file changes |
|
405 | adding file changes | |
406 | added 2 changesets with 2 changes to 2 files |
|
406 | added 2 changesets with 2 changes to 2 files | |
407 | finished applying clone bundle |
|
407 | finished applying clone bundle | |
408 | searching for changes |
|
408 | searching for changes | |
409 | no changes found |
|
409 | no changes found | |
410 | 2 local changesets published |
|
410 | 2 local changesets published | |
411 |
|
411 | |||
412 | Sorting multiple values should get us back to original first entry |
|
412 | Sorting multiple values should get us back to original first entry | |
413 |
|
413 | |||
414 | $ hg --config ui.clonebundleprefers=BUNDLESPEC=unknown,BUNDLESPEC=gzip-v2,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-multiple-gz |
|
414 | $ hg --config ui.clonebundleprefers=BUNDLESPEC=unknown,BUNDLESPEC=gzip-v2,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-multiple-gz | |
415 | applying clone bundle from http://localhost:$HGPORT1/gz-a.hg |
|
415 | applying clone bundle from http://localhost:$HGPORT1/gz-a.hg | |
416 | adding changesets |
|
416 | adding changesets | |
417 | adding manifests |
|
417 | adding manifests | |
418 | adding file changes |
|
418 | adding file changes | |
419 | added 2 changesets with 2 changes to 2 files |
|
419 | added 2 changesets with 2 changes to 2 files | |
420 | finished applying clone bundle |
|
420 | finished applying clone bundle | |
421 | searching for changes |
|
421 | searching for changes | |
422 | no changes found |
|
422 | no changes found | |
423 | 2 local changesets published |
|
423 | 2 local changesets published | |
424 |
|
424 | |||
425 | Preferring multiple attributes has correct order |
|
425 | Preferring multiple attributes has correct order | |
426 |
|
426 | |||
427 | $ hg --config ui.clonebundleprefers=extra=b,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-separate-attributes |
|
427 | $ hg --config ui.clonebundleprefers=extra=b,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-separate-attributes | |
428 | applying clone bundle from http://localhost:$HGPORT1/bz2-b.hg |
|
428 | applying clone bundle from http://localhost:$HGPORT1/bz2-b.hg | |
429 | adding changesets |
|
429 | adding changesets | |
430 | adding manifests |
|
430 | adding manifests | |
431 | adding file changes |
|
431 | adding file changes | |
432 | added 2 changesets with 2 changes to 2 files |
|
432 | added 2 changesets with 2 changes to 2 files | |
433 | finished applying clone bundle |
|
433 | finished applying clone bundle | |
434 | searching for changes |
|
434 | searching for changes | |
435 | no changes found |
|
435 | no changes found | |
436 | 2 local changesets published |
|
436 | 2 local changesets published | |
437 |
|
437 | |||
438 | Test where attribute is missing from some entries |
|
438 | Test where attribute is missing from some entries | |
439 |
|
439 | |||
440 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
440 | $ cat > server/.hg/clonebundles.manifest << EOF | |
441 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 |
|
441 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 | |
442 | > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 |
|
442 | > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 | |
443 | > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b |
|
443 | > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b | |
444 | > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b |
|
444 | > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b | |
445 | > EOF |
|
445 | > EOF | |
446 |
|
446 | |||
447 | $ hg --config ui.clonebundleprefers=extra=b clone -U http://localhost:$HGPORT prefer-partially-defined-attribute |
|
447 | $ hg --config ui.clonebundleprefers=extra=b clone -U http://localhost:$HGPORT prefer-partially-defined-attribute | |
448 | applying clone bundle from http://localhost:$HGPORT1/gz-b.hg |
|
448 | applying clone bundle from http://localhost:$HGPORT1/gz-b.hg | |
449 | adding changesets |
|
449 | adding changesets | |
450 | adding manifests |
|
450 | adding manifests | |
451 | adding file changes |
|
451 | adding file changes | |
452 | added 2 changesets with 2 changes to 2 files |
|
452 | added 2 changesets with 2 changes to 2 files | |
453 | finished applying clone bundle |
|
453 | finished applying clone bundle | |
454 | searching for changes |
|
454 | searching for changes | |
455 | no changes found |
|
455 | no changes found | |
456 | 2 local changesets published |
|
456 | 2 local changesets published | |
457 |
|
457 | |||
458 | Test interaction between clone bundles and --stream |
|
458 | Test interaction between clone bundles and --stream | |
459 |
|
459 | |||
460 | A manifest with just a gzip bundle |
|
460 | A manifest with just a gzip bundle | |
461 |
|
461 | |||
462 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
462 | $ cat > server/.hg/clonebundles.manifest << EOF | |
463 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 |
|
463 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 | |
464 | > EOF |
|
464 | > EOF | |
465 |
|
465 | |||
466 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip |
|
466 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip | |
467 | no compatible clone bundles available on server; falling back to regular clone |
|
467 | no compatible clone bundles available on server; falling back to regular clone | |
468 | (you may want to report this to the server operator) |
|
468 | (you may want to report this to the server operator) | |
469 | streaming all changes |
|
469 | streaming all changes | |
470 | 9 files to transfer, 816 bytes of data |
|
470 | 9 files to transfer, 816 bytes of data | |
471 | transferred 816 bytes in * seconds (*) (glob) |
|
471 | transferred 816 bytes in * seconds (*) (glob) | |
472 |
|
472 | |||
473 | A manifest with a stream clone but no BUNDLESPEC |
|
473 | A manifest with a stream clone but no BUNDLESPEC | |
474 |
|
474 | |||
475 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
475 | $ cat > server/.hg/clonebundles.manifest << EOF | |
476 | > http://localhost:$HGPORT1/packed.hg |
|
476 | > http://localhost:$HGPORT1/packed.hg | |
477 | > EOF |
|
477 | > EOF | |
478 |
|
478 | |||
479 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-no-bundlespec |
|
479 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-no-bundlespec | |
480 | no compatible clone bundles available on server; falling back to regular clone |
|
480 | no compatible clone bundles available on server; falling back to regular clone | |
481 | (you may want to report this to the server operator) |
|
481 | (you may want to report this to the server operator) | |
482 | streaming all changes |
|
482 | streaming all changes | |
483 | 9 files to transfer, 816 bytes of data |
|
483 | 9 files to transfer, 816 bytes of data | |
484 | transferred 816 bytes in * seconds (*) (glob) |
|
484 | transferred 816 bytes in * seconds (*) (glob) | |
485 |
|
485 | |||
486 | A manifest with a gzip bundle and a stream clone |
|
486 | A manifest with a gzip bundle and a stream clone | |
487 |
|
487 | |||
488 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
488 | $ cat > server/.hg/clonebundles.manifest << EOF | |
489 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 |
|
489 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 | |
490 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1 |
|
490 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1 | |
491 | > EOF |
|
491 | > EOF | |
492 |
|
492 | |||
493 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed |
|
493 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed | |
494 | applying clone bundle from http://localhost:$HGPORT1/packed.hg |
|
494 | applying clone bundle from http://localhost:$HGPORT1/packed.hg | |
495 | 4 files to transfer, 613 bytes of data |
|
495 | 4 files to transfer, 613 bytes of data | |
496 | transferred 613 bytes in * seconds (*) (glob) |
|
496 | transferred 613 bytes in * seconds (*) (glob) | |
497 | finished applying clone bundle |
|
497 | finished applying clone bundle | |
498 | searching for changes |
|
498 | searching for changes | |
499 | no changes found |
|
499 | no changes found | |
500 |
|
500 | |||
501 | A manifest with a gzip bundle and stream clone with supported requirements |
|
501 | A manifest with a gzip bundle and stream clone with supported requirements | |
502 |
|
502 | |||
503 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
503 | $ cat > server/.hg/clonebundles.manifest << EOF | |
504 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 |
|
504 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 | |
505 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1 |
|
505 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1 | |
506 | > EOF |
|
506 | > EOF | |
507 |
|
507 | |||
508 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed-requirements |
|
508 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed-requirements | |
509 | applying clone bundle from http://localhost:$HGPORT1/packed.hg |
|
509 | applying clone bundle from http://localhost:$HGPORT1/packed.hg | |
510 | 4 files to transfer, 613 bytes of data |
|
510 | 4 files to transfer, 613 bytes of data | |
511 | transferred 613 bytes in * seconds (*) (glob) |
|
511 | transferred 613 bytes in * seconds (*) (glob) | |
512 | finished applying clone bundle |
|
512 | finished applying clone bundle | |
513 | searching for changes |
|
513 | searching for changes | |
514 | no changes found |
|
514 | no changes found | |
515 |
|
515 | |||
516 | A manifest with a gzip bundle and a stream clone with unsupported requirements |
|
516 | A manifest with a gzip bundle and a stream clone with unsupported requirements | |
517 |
|
517 | |||
518 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
518 | $ cat > server/.hg/clonebundles.manifest << EOF | |
519 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 |
|
519 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 | |
520 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42 |
|
520 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42 | |
521 | > EOF |
|
521 | > EOF | |
522 |
|
522 | |||
523 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed-unsupported-requirements |
|
523 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed-unsupported-requirements | |
524 | no compatible clone bundles available on server; falling back to regular clone |
|
524 | no compatible clone bundles available on server; falling back to regular clone | |
525 | (you may want to report this to the server operator) |
|
525 | (you may want to report this to the server operator) | |
526 | streaming all changes |
|
526 | streaming all changes | |
527 | 9 files to transfer, 816 bytes of data |
|
527 | 9 files to transfer, 816 bytes of data | |
528 | transferred 816 bytes in * seconds (*) (glob) |
|
528 | transferred 816 bytes in * seconds (*) (glob) | |
529 |
|
529 | |||
530 | Test clone bundle retrieved through bundle2 |
|
530 | Test clone bundle retrieved through bundle2 | |
531 |
|
531 | |||
532 | $ cat << EOF >> $HGRCPATH |
|
532 | $ cat << EOF >> $HGRCPATH | |
533 | > [extensions] |
|
533 | > [extensions] | |
534 | > largefiles= |
|
534 | > largefiles= | |
535 | > EOF |
|
535 | > EOF | |
536 | $ killdaemons.py |
|
536 | $ killdaemons.py | |
537 | $ hg -R server serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log |
|
537 | $ hg -R server serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log | |
538 | $ cat hg.pid >> $DAEMON_PIDS |
|
538 | $ cat hg.pid >> $DAEMON_PIDS | |
539 |
|
539 | |||
540 | $ hg -R server debuglfput gz-a.hg |
|
540 | $ hg -R server debuglfput gz-a.hg | |
541 | 1f74b3d08286b9b3a16fb3fa185dd29219cbc6ae |
|
541 | 1f74b3d08286b9b3a16fb3fa185dd29219cbc6ae | |
542 |
|
542 | |||
543 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
543 | $ cat > server/.hg/clonebundles.manifest << EOF | |
544 | > largefile://1f74b3d08286b9b3a16fb3fa185dd29219cbc6ae BUNDLESPEC=gzip-v2 |
|
544 | > largefile://1f74b3d08286b9b3a16fb3fa185dd29219cbc6ae BUNDLESPEC=gzip-v2 | |
545 | > EOF |
|
545 | > EOF | |
546 |
|
546 | |||
547 | $ hg clone -U http://localhost:$HGPORT largefile-provided --traceback |
|
547 | $ hg clone -U http://localhost:$HGPORT largefile-provided --traceback | |
548 | applying clone bundle from largefile://1f74b3d08286b9b3a16fb3fa185dd29219cbc6ae |
|
548 | applying clone bundle from largefile://1f74b3d08286b9b3a16fb3fa185dd29219cbc6ae | |
549 | adding changesets |
|
549 | adding changesets | |
550 | adding manifests |
|
550 | adding manifests | |
551 | adding file changes |
|
551 | adding file changes | |
552 | added 2 changesets with 2 changes to 2 files |
|
552 | added 2 changesets with 2 changes to 2 files | |
553 | finished applying clone bundle |
|
553 | finished applying clone bundle | |
554 | searching for changes |
|
554 | searching for changes | |
555 | no changes found |
|
555 | no changes found | |
556 | 2 local changesets published |
|
556 | 2 local changesets published |
@@ -1,122 +1,122 b'' | |||||
1 | #require serve |
|
1 | #require serve | |
2 |
|
2 | |||
3 | $ hg init a |
|
3 | $ hg init a | |
4 | $ cd a |
|
4 | $ cd a | |
5 | $ echo a > a |
|
5 | $ echo a > a | |
6 | $ hg ci -Ama -d '1123456789 0' |
|
6 | $ hg ci -Ama -d '1123456789 0' | |
7 | adding a |
|
7 | adding a | |
8 | $ hg serve --config server.uncompressed=True -p $HGPORT -d --pid-file=hg.pid |
|
8 | $ hg serve --config server.uncompressed=True -p $HGPORT -d --pid-file=hg.pid | |
9 | $ cat hg.pid >> $DAEMON_PIDS |
|
9 | $ cat hg.pid >> $DAEMON_PIDS | |
10 | $ cd .. |
|
10 | $ cd .. | |
11 | $ tinyproxy.py $HGPORT1 localhost 2>proxy.log >/dev/null </dev/null & |
|
11 | $ tinyproxy.py $HGPORT1 localhost 2>proxy.log >/dev/null </dev/null & | |
12 | $ while [ ! -f proxy.pid ]; do sleep 0; done |
|
12 | $ while [ ! -f proxy.pid ]; do sleep 0; done | |
13 | $ cat proxy.pid >> $DAEMON_PIDS |
|
13 | $ cat proxy.pid >> $DAEMON_PIDS | |
14 |
|
14 | |||
15 | url for proxy, stream |
|
15 | url for proxy, stream | |
16 |
|
16 | |||
17 | $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone --stream http://localhost:$HGPORT/ b |
|
17 | $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone --stream http://localhost:$HGPORT/ b | |
18 | streaming all changes |
|
18 | streaming all changes | |
19 | 6 files to transfer, 412 bytes of data (reporevlogstore !) |
|
19 | 6 files to transfer, 412 bytes of data (reporevlogstore !) | |
20 | 4 files to transfer, 330 bytes of data (reposimplestore !) |
|
20 | 4 files to transfer, 330 bytes of data (reposimplestore !) | |
21 | transferred * bytes in * seconds (*/sec) (glob) |
|
21 | transferred * bytes in * seconds (*/sec) (glob) | |
22 | updating to branch default |
|
22 | updating to branch default | |
23 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
23 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
24 | $ cd b |
|
24 | $ cd b | |
25 | $ hg verify |
|
25 | $ hg verify | |
26 | checking changesets |
|
26 | checking changesets | |
27 | checking manifests |
|
27 | checking manifests | |
28 | crosschecking files in changesets and manifests |
|
28 | crosschecking files in changesets and manifests | |
29 | checking files |
|
29 | checking files | |
30 | checked 1 changesets with 1 changes to 1 files |
|
30 | checked 1 changesets with 1 changes to 1 files | |
31 | $ cd .. |
|
31 | $ cd .. | |
32 |
|
32 | |||
33 | url for proxy, pull |
|
33 | url for proxy, pull | |
34 |
|
34 | |||
35 | $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone http://localhost:$HGPORT/ b-pull |
|
35 | $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone http://localhost:$HGPORT/ b-pull | |
36 | requesting all changes |
|
36 | requesting all changes | |
37 | adding changesets |
|
37 | adding changesets | |
38 | adding manifests |
|
38 | adding manifests | |
39 | adding file changes |
|
39 | adding file changes | |
40 | added 1 changesets with 1 changes to 1 files |
|
40 | added 1 changesets with 1 changes to 1 files | |
41 | new changesets 83180e7845de |
|
41 | new changesets 83180e7845de | |
42 | updating to branch default |
|
42 | updating to branch default | |
43 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
43 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
44 | $ cd b-pull |
|
44 | $ cd b-pull | |
45 | $ hg verify |
|
45 | $ hg verify | |
46 | checking changesets |
|
46 | checking changesets | |
47 | checking manifests |
|
47 | checking manifests | |
48 | crosschecking files in changesets and manifests |
|
48 | crosschecking files in changesets and manifests | |
49 | checking files |
|
49 | checking files | |
50 | checked 1 changesets with 1 changes to 1 files |
|
50 | checked 1 changesets with 1 changes to 1 files | |
51 | $ cd .. |
|
51 | $ cd .. | |
52 |
|
52 | |||
53 | host:port for proxy |
|
53 | host:port for proxy | |
54 |
|
54 | |||
55 | $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ c |
|
55 | $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ c | |
56 | requesting all changes |
|
56 | requesting all changes | |
57 | adding changesets |
|
57 | adding changesets | |
58 | adding manifests |
|
58 | adding manifests | |
59 | adding file changes |
|
59 | adding file changes | |
60 | added 1 changesets with 1 changes to 1 files |
|
60 | added 1 changesets with 1 changes to 1 files | |
61 | new changesets 83180e7845de |
|
61 | new changesets 83180e7845de | |
62 | updating to branch default |
|
62 | updating to branch default | |
63 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
63 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
64 |
|
64 | |||
65 | proxy url with user name and password |
|
65 | proxy url with user name and password | |
66 |
|
66 | |||
67 | $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ d |
|
67 | $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ d | |
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 1 changes to 1 files |
|
72 | added 1 changesets with 1 changes to 1 files | |
73 | new changesets 83180e7845de |
|
73 | new changesets 83180e7845de | |
74 | updating to branch default |
|
74 | updating to branch default | |
75 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
75 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
76 |
|
76 | |||
77 | url with user name and password |
|
77 | url with user name and password | |
78 |
|
78 | |||
79 | $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://user:passwd@localhost:$HGPORT/ e |
|
79 | $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://user:passwd@localhost:$HGPORT/ e | |
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 1 changes to 1 files |
|
84 | added 1 changesets with 1 changes to 1 files | |
85 | new changesets 83180e7845de |
|
85 | new changesets 83180e7845de | |
86 | updating to branch default |
|
86 | updating to branch default | |
87 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
87 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
88 |
|
88 | |||
89 | bad host:port for proxy ("Protocol not supported" can happen on |
|
89 | bad host:port for proxy ("Protocol not supported" can happen on | |
90 | misconfigured hosts) |
|
90 | misconfigured hosts) | |
91 |
|
91 | |||
92 | $ http_proxy=localhost:$HGPORT2 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ f |
|
92 | $ http_proxy=localhost:$HGPORT2 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ f | |
93 | abort: error: (Connection refused|Protocol not supported|.* actively refused it|\$EADDRNOTAVAIL\$) (re) |
|
93 | abort: error: (Connection refused|Protocol not supported|.* actively refused it|\$EADDRNOTAVAIL\$|No route to host) (re) | |
94 | [255] |
|
94 | [255] | |
95 |
|
95 | |||
96 | do not use the proxy if it is in the no list |
|
96 | do not use the proxy if it is in the no list | |
97 |
|
97 | |||
98 | $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.no=localhost http://localhost:$HGPORT/ g |
|
98 | $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.no=localhost http://localhost:$HGPORT/ g | |
99 | requesting all changes |
|
99 | requesting all changes | |
100 | adding changesets |
|
100 | adding changesets | |
101 | adding manifests |
|
101 | adding manifests | |
102 | adding file changes |
|
102 | adding file changes | |
103 | added 1 changesets with 1 changes to 1 files |
|
103 | added 1 changesets with 1 changes to 1 files | |
104 | new changesets 83180e7845de |
|
104 | new changesets 83180e7845de | |
105 | updating to branch default |
|
105 | updating to branch default | |
106 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
106 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
107 | $ cat proxy.log |
|
107 | $ cat proxy.log | |
108 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) |
|
108 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) | |
109 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
109 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
110 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&stream=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
110 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&stream=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
111 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) |
|
111 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) | |
112 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
112 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
113 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
113 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
114 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) |
|
114 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) | |
115 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
115 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
116 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
116 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
117 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) |
|
117 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) | |
118 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
118 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
119 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
119 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
120 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) |
|
120 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) | |
121 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
121 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
122 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
122 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
@@ -1,481 +1,482 b'' | |||||
1 | #require serve no-reposimplestore no-chg |
|
1 | #require serve no-reposimplestore no-chg | |
2 |
|
2 | |||
3 | $ cat >> $HGRCPATH <<EOF |
|
3 | $ cat >> $HGRCPATH <<EOF | |
4 | > [extensions] |
|
4 | > [extensions] | |
5 | > lfs= |
|
5 | > lfs= | |
6 | > [lfs] |
|
6 | > [lfs] | |
7 | > track=all() |
|
7 | > track=all() | |
8 | > [web] |
|
8 | > [web] | |
9 | > push_ssl = False |
|
9 | > push_ssl = False | |
10 | > allow-push = * |
|
10 | > allow-push = * | |
11 | > EOF |
|
11 | > EOF | |
12 |
|
12 | |||
13 | Serving LFS files can experimentally be turned off. The long term solution is |
|
13 | Serving LFS files can experimentally be turned off. The long term solution is | |
14 | to support the 'verify' action in both client and server, so that the server can |
|
14 | to support the 'verify' action in both client and server, so that the server can | |
15 | tell the client to store files elsewhere. |
|
15 | tell the client to store files elsewhere. | |
16 |
|
16 | |||
17 | $ hg init server |
|
17 | $ hg init server | |
18 | $ hg --config "lfs.usercache=$TESTTMP/servercache" \ |
|
18 | $ hg --config "lfs.usercache=$TESTTMP/servercache" \ | |
19 | > --config experimental.lfs.serve=False -R server serve -d \ |
|
19 | > --config experimental.lfs.serve=False -R server serve -d \ | |
20 | > -p $HGPORT --pid-file=hg.pid -A $TESTTMP/access.log -E $TESTTMP/errors.log |
|
20 | > -p $HGPORT --pid-file=hg.pid -A $TESTTMP/access.log -E $TESTTMP/errors.log | |
21 | $ cat hg.pid >> $DAEMON_PIDS |
|
21 | $ cat hg.pid >> $DAEMON_PIDS | |
22 |
|
22 | |||
23 | Uploads fail... |
|
23 | Uploads fail... | |
24 |
|
24 | |||
25 | $ hg init client |
|
25 | $ hg init client | |
26 | $ echo 'this-is-an-lfs-file' > client/lfs.bin |
|
26 | $ echo 'this-is-an-lfs-file' > client/lfs.bin | |
27 | $ hg -R client ci -Am 'initial commit' |
|
27 | $ hg -R client ci -Am 'initial commit' | |
28 | adding lfs.bin |
|
28 | adding lfs.bin | |
29 | $ hg -R client push http://localhost:$HGPORT |
|
29 | $ hg -R client push http://localhost:$HGPORT | |
30 | pushing to http://localhost:$HGPORT/ |
|
30 | pushing to http://localhost:$HGPORT/ | |
31 | searching for changes |
|
31 | searching for changes | |
32 | abort: LFS HTTP error: HTTP Error 400: no such method: .git! |
|
32 | abort: LFS HTTP error: HTTP Error 400: no such method: .git! | |
33 | (check that lfs serving is enabled on http://localhost:$HGPORT/.git/info/lfs and "upload" is supported) |
|
33 | (check that lfs serving is enabled on http://localhost:$HGPORT/.git/info/lfs and "upload" is supported) | |
34 | [255] |
|
34 | [255] | |
35 |
|
35 | |||
36 | ... so do a local push to make the data available. Remove the blob from the |
|
36 | ... so do a local push to make the data available. Remove the blob from the | |
37 | default cache, so it attempts to download. |
|
37 | default cache, so it attempts to download. | |
38 | $ hg --config "lfs.usercache=$TESTTMP/servercache" \ |
|
38 | $ hg --config "lfs.usercache=$TESTTMP/servercache" \ | |
39 | > --config "lfs.url=null://" \ |
|
39 | > --config "lfs.url=null://" \ | |
40 | > -R client push -q server |
|
40 | > -R client push -q server | |
41 | $ mv `hg config lfs.usercache` $TESTTMP/servercache |
|
41 | $ mv `hg config lfs.usercache` $TESTTMP/servercache | |
42 |
|
42 | |||
43 | Downloads fail... |
|
43 | Downloads fail... | |
44 |
|
44 | |||
45 | $ hg clone http://localhost:$HGPORT httpclone |
|
45 | $ hg clone http://localhost:$HGPORT httpclone | |
46 | (remote is using large file support (lfs); lfs will be enabled for this repository) |
|
46 | (remote is using large file support (lfs); lfs will be enabled for this repository) | |
47 | requesting all changes |
|
47 | requesting all changes | |
48 | adding changesets |
|
48 | adding changesets | |
49 | adding manifests |
|
49 | adding manifests | |
50 | adding file changes |
|
50 | adding file changes | |
51 | added 1 changesets with 1 changes to 1 files |
|
51 | added 1 changesets with 1 changes to 1 files | |
52 | new changesets 525251863cad |
|
52 | new changesets 525251863cad | |
53 | updating to branch default |
|
53 | updating to branch default | |
54 | abort: LFS HTTP error: HTTP Error 400: no such method: .git! |
|
54 | abort: LFS HTTP error: HTTP Error 400: no such method: .git! | |
55 | (check that lfs serving is enabled on http://localhost:$HGPORT/.git/info/lfs and "download" is supported) |
|
55 | (check that lfs serving is enabled on http://localhost:$HGPORT/.git/info/lfs and "download" is supported) | |
56 | [255] |
|
56 | [255] | |
57 |
|
57 | |||
58 | $ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
|
58 | $ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS | |
59 |
|
59 | |||
60 | $ cat $TESTTMP/access.log $TESTTMP/errors.log |
|
60 | $ cat $TESTTMP/access.log $TESTTMP/errors.log | |
61 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
61 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
62 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D525251863cad618e55d483555f3d00a2ca99597e x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
62 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D525251863cad618e55d483555f3d00a2ca99597e x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
63 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
63 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
64 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
64 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
65 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 400 - (glob) |
|
65 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 400 - (glob) | |
66 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
66 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
67 | $LOCALIP - - [$LOGDATE$] "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 (glob) |
|
67 | $LOCALIP - - [$LOGDATE$] "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 (glob) | |
68 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
68 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
69 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 400 - (glob) |
|
69 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 400 - (glob) | |
70 |
|
70 | |||
71 | $ rm -f $TESTTMP/access.log $TESTTMP/errors.log |
|
71 | $ rm -f $TESTTMP/access.log $TESTTMP/errors.log | |
72 | $ hg --config "lfs.usercache=$TESTTMP/servercache" -R server serve -d \ |
|
72 | $ hg --config "lfs.usercache=$TESTTMP/servercache" -R server serve -d \ | |
73 | > -p $HGPORT --pid-file=hg.pid --prefix=subdir/mount/point \ |
|
73 | > -p $HGPORT --pid-file=hg.pid --prefix=subdir/mount/point \ | |
74 | > -A $TESTTMP/access.log -E $TESTTMP/errors.log |
|
74 | > -A $TESTTMP/access.log -E $TESTTMP/errors.log | |
75 | $ cat hg.pid >> $DAEMON_PIDS |
|
75 | $ cat hg.pid >> $DAEMON_PIDS | |
76 |
|
76 | |||
77 | Reasonable hint for a misconfigured blob server |
|
77 | Reasonable hint for a misconfigured blob server | |
78 |
|
78 | |||
79 | $ hg -R httpclone update default --config lfs.url=http://localhost:$HGPORT/missing |
|
79 | $ hg -R httpclone update default --config lfs.url=http://localhost:$HGPORT/missing | |
80 | abort: LFS HTTP error: HTTP Error 404: Not Found! |
|
80 | abort: LFS HTTP error: HTTP Error 404: Not Found! | |
81 | (the "lfs.url" config may be used to override http://localhost:$HGPORT/missing) |
|
81 | (the "lfs.url" config may be used to override http://localhost:$HGPORT/missing) | |
82 | [255] |
|
82 | [255] | |
83 |
|
83 | |||
84 | $ hg -R httpclone update default --config lfs.url=http://localhost:$HGPORT2/missing |
|
84 | $ hg -R httpclone update default --config lfs.url=http://localhost:$HGPORT2/missing | |
85 | abort: LFS error: *onnection *refused*! (glob) (?) |
|
85 | abort: LFS error: *onnection *refused*! (glob) (?) | |
86 | abort: LFS error: $EADDRNOTAVAIL$! (glob) (?) |
|
86 | abort: LFS error: $EADDRNOTAVAIL$! (glob) (?) | |
|
87 | abort: LFS error: No route to host! (?) | |||
87 | (the "lfs.url" config may be used to override http://localhost:$HGPORT2/missing) |
|
88 | (the "lfs.url" config may be used to override http://localhost:$HGPORT2/missing) | |
88 | [255] |
|
89 | [255] | |
89 |
|
90 | |||
90 | Blob URIs are correct when --prefix is used |
|
91 | Blob URIs are correct when --prefix is used | |
91 |
|
92 | |||
92 | $ hg clone --debug http://localhost:$HGPORT/subdir/mount/point cloned2 |
|
93 | $ hg clone --debug http://localhost:$HGPORT/subdir/mount/point cloned2 | |
93 | using http://localhost:$HGPORT/subdir/mount/point |
|
94 | using http://localhost:$HGPORT/subdir/mount/point | |
94 | sending capabilities command |
|
95 | sending capabilities command | |
95 | (remote is using large file support (lfs); lfs will be enabled for this repository) |
|
96 | (remote is using large file support (lfs); lfs will be enabled for this repository) | |
96 | query 1; heads |
|
97 | query 1; heads | |
97 | sending batch command |
|
98 | sending batch command | |
98 | requesting all changes |
|
99 | requesting all changes | |
99 | sending getbundle command |
|
100 | sending getbundle command | |
100 | bundle2-input-bundle: with-transaction |
|
101 | bundle2-input-bundle: with-transaction | |
101 | bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported |
|
102 | bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported | |
102 | adding changesets |
|
103 | adding changesets | |
103 | add changeset 525251863cad |
|
104 | add changeset 525251863cad | |
104 | adding manifests |
|
105 | adding manifests | |
105 | adding file changes |
|
106 | adding file changes | |
106 | adding lfs.bin revisions |
|
107 | adding lfs.bin revisions | |
107 | added 1 changesets with 1 changes to 1 files |
|
108 | added 1 changesets with 1 changes to 1 files | |
108 | bundle2-input-part: total payload size 648 |
|
109 | bundle2-input-part: total payload size 648 | |
109 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported |
|
110 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported | |
110 | bundle2-input-part: "phase-heads" supported |
|
111 | bundle2-input-part: "phase-heads" supported | |
111 | bundle2-input-part: total payload size 24 |
|
112 | bundle2-input-part: total payload size 24 | |
112 | bundle2-input-part: "cache:rev-branch-cache" (advisory) supported |
|
113 | bundle2-input-part: "cache:rev-branch-cache" (advisory) supported | |
113 | bundle2-input-part: total payload size 39 |
|
114 | bundle2-input-part: total payload size 39 | |
114 | bundle2-input-bundle: 3 parts total |
|
115 | bundle2-input-bundle: 3 parts total | |
115 | checking for updated bookmarks |
|
116 | checking for updated bookmarks | |
116 | updating the branch cache |
|
117 | updating the branch cache | |
117 | new changesets 525251863cad |
|
118 | new changesets 525251863cad | |
118 | updating to branch default |
|
119 | updating to branch default | |
119 | resolving manifests |
|
120 | resolving manifests | |
120 | branchmerge: False, force: False, partial: False |
|
121 | branchmerge: False, force: False, partial: False | |
121 | ancestor: 000000000000, local: 000000000000+, remote: 525251863cad |
|
122 | ancestor: 000000000000, local: 000000000000+, remote: 525251863cad | |
122 | lfs: assuming remote store: http://localhost:$HGPORT/subdir/mount/point/.git/info/lfs |
|
123 | lfs: assuming remote store: http://localhost:$HGPORT/subdir/mount/point/.git/info/lfs | |
123 | Status: 200 |
|
124 | Status: 200 | |
124 | Content-Length: 371 |
|
125 | Content-Length: 371 | |
125 | Content-Type: application/vnd.git-lfs+json |
|
126 | Content-Type: application/vnd.git-lfs+json | |
126 | Date: $HTTP_DATE$ |
|
127 | Date: $HTTP_DATE$ | |
127 | Server: testing stub value |
|
128 | Server: testing stub value | |
128 | { |
|
129 | { | |
129 | "objects": [ |
|
130 | "objects": [ | |
130 | { |
|
131 | { | |
131 | "actions": { |
|
132 | "actions": { | |
132 | "download": { |
|
133 | "download": { | |
133 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
134 | "expires_at": "$ISO_8601_DATE_TIME$" | |
134 | "header": { |
|
135 | "header": { | |
135 | "Accept": "application/vnd.git-lfs" |
|
136 | "Accept": "application/vnd.git-lfs" | |
136 | } |
|
137 | } | |
137 | "href": "http://localhost:$HGPORT/subdir/mount/point/.hg/lfs/objects/f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e" |
|
138 | "href": "http://localhost:$HGPORT/subdir/mount/point/.hg/lfs/objects/f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e" | |
138 | } |
|
139 | } | |
139 | } |
|
140 | } | |
140 | "oid": "f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e" |
|
141 | "oid": "f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e" | |
141 | "size": 20 |
|
142 | "size": 20 | |
142 | } |
|
143 | } | |
143 | ] |
|
144 | ] | |
144 | "transfer": "basic" |
|
145 | "transfer": "basic" | |
145 | } |
|
146 | } | |
146 | lfs: downloading f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e (20 bytes) |
|
147 | lfs: downloading f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e (20 bytes) | |
147 | Status: 200 |
|
148 | Status: 200 | |
148 | Content-Length: 20 |
|
149 | Content-Length: 20 | |
149 | Content-Type: application/octet-stream |
|
150 | Content-Type: application/octet-stream | |
150 | Date: $HTTP_DATE$ |
|
151 | Date: $HTTP_DATE$ | |
151 | Server: testing stub value |
|
152 | Server: testing stub value | |
152 | lfs: adding f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e to the usercache |
|
153 | lfs: adding f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e to the usercache | |
153 | lfs: processed: f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e |
|
154 | lfs: processed: f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e | |
154 | lfs: downloaded 1 files (20 bytes) |
|
155 | lfs: downloaded 1 files (20 bytes) | |
155 | lfs.bin: remote created -> g |
|
156 | lfs.bin: remote created -> g | |
156 | getting lfs.bin |
|
157 | getting lfs.bin | |
157 | lfs: found f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e in the local lfs store |
|
158 | lfs: found f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e in the local lfs store | |
158 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
159 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
159 | (sent 3 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
160 | (sent 3 HTTP requests and * bytes; received * bytes in responses) (glob) | |
160 |
|
161 | |||
161 | $ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
|
162 | $ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS | |
162 |
|
163 | |||
163 | $ cat $TESTTMP/access.log $TESTTMP/errors.log |
|
164 | $ cat $TESTTMP/access.log $TESTTMP/errors.log | |
164 | $LOCALIP - - [$LOGDATE$] "POST /missing/objects/batch HTTP/1.1" 404 - (glob) |
|
165 | $LOCALIP - - [$LOGDATE$] "POST /missing/objects/batch HTTP/1.1" 404 - (glob) | |
165 | $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
166 | $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point?cmd=capabilities HTTP/1.1" 200 - (glob) | |
166 | $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point?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 (glob) |
|
167 | $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point?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 (glob) | |
167 | $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
168 | $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
168 | $LOCALIP - - [$LOGDATE$] "POST /subdir/mount/point/.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
169 | $LOCALIP - - [$LOGDATE$] "POST /subdir/mount/point/.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
169 | $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point/.hg/lfs/objects/f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e HTTP/1.1" 200 - (glob) |
|
170 | $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point/.hg/lfs/objects/f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e HTTP/1.1" 200 - (glob) | |
170 |
|
171 | |||
171 | Blobs that already exist in the usercache are linked into the repo store, even |
|
172 | Blobs that already exist in the usercache are linked into the repo store, even | |
172 | though the client doesn't send the blob. |
|
173 | though the client doesn't send the blob. | |
173 |
|
174 | |||
174 | $ hg init server2 |
|
175 | $ hg init server2 | |
175 | $ hg --config "lfs.usercache=$TESTTMP/servercache" -R server2 serve -d \ |
|
176 | $ hg --config "lfs.usercache=$TESTTMP/servercache" -R server2 serve -d \ | |
176 | > -p $HGPORT --pid-file=hg.pid \ |
|
177 | > -p $HGPORT --pid-file=hg.pid \ | |
177 | > -A $TESTTMP/access.log -E $TESTTMP/errors.log |
|
178 | > -A $TESTTMP/access.log -E $TESTTMP/errors.log | |
178 | $ cat hg.pid >> $DAEMON_PIDS |
|
179 | $ cat hg.pid >> $DAEMON_PIDS | |
179 |
|
180 | |||
180 | $ hg --config "lfs.usercache=$TESTTMP/servercache" -R cloned2 --debug \ |
|
181 | $ hg --config "lfs.usercache=$TESTTMP/servercache" -R cloned2 --debug \ | |
181 | > push http://localhost:$HGPORT | grep '^[{} ]' |
|
182 | > push http://localhost:$HGPORT | grep '^[{} ]' | |
182 | { |
|
183 | { | |
183 | "objects": [ |
|
184 | "objects": [ | |
184 | { |
|
185 | { | |
185 | "oid": "f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e" |
|
186 | "oid": "f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e" | |
186 | "size": 20 |
|
187 | "size": 20 | |
187 | } |
|
188 | } | |
188 | ] |
|
189 | ] | |
189 | "transfer": "basic" |
|
190 | "transfer": "basic" | |
190 | } |
|
191 | } | |
191 | $ find server2/.hg/store/lfs/objects | sort |
|
192 | $ find server2/.hg/store/lfs/objects | sort | |
192 | server2/.hg/store/lfs/objects |
|
193 | server2/.hg/store/lfs/objects | |
193 | server2/.hg/store/lfs/objects/f0 |
|
194 | server2/.hg/store/lfs/objects/f0 | |
194 | server2/.hg/store/lfs/objects/f0/3217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e |
|
195 | server2/.hg/store/lfs/objects/f0/3217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e | |
195 | $ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
|
196 | $ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS | |
196 | $ cat $TESTTMP/errors.log |
|
197 | $ cat $TESTTMP/errors.log | |
197 |
|
198 | |||
198 | $ cat >> $TESTTMP/lfsstoreerror.py <<EOF |
|
199 | $ cat >> $TESTTMP/lfsstoreerror.py <<EOF | |
199 | > import errno |
|
200 | > import errno | |
200 | > from hgext.lfs import blobstore |
|
201 | > from hgext.lfs import blobstore | |
201 | > |
|
202 | > | |
202 | > _numverifies = 0 |
|
203 | > _numverifies = 0 | |
203 | > _readerr = True |
|
204 | > _readerr = True | |
204 | > |
|
205 | > | |
205 | > def reposetup(ui, repo): |
|
206 | > def reposetup(ui, repo): | |
206 | > # Nothing to do with a remote repo |
|
207 | > # Nothing to do with a remote repo | |
207 | > if not repo.local(): |
|
208 | > if not repo.local(): | |
208 | > return |
|
209 | > return | |
209 | > |
|
210 | > | |
210 | > store = repo.svfs.lfslocalblobstore |
|
211 | > store = repo.svfs.lfslocalblobstore | |
211 | > class badstore(store.__class__): |
|
212 | > class badstore(store.__class__): | |
212 | > def download(self, oid, src): |
|
213 | > def download(self, oid, src): | |
213 | > '''Called in the server to handle reading from the client in a |
|
214 | > '''Called in the server to handle reading from the client in a | |
214 | > PUT request.''' |
|
215 | > PUT request.''' | |
215 | > origread = src.read |
|
216 | > origread = src.read | |
216 | > def _badread(nbytes): |
|
217 | > def _badread(nbytes): | |
217 | > # Simulate bad data/checksum failure from the client |
|
218 | > # Simulate bad data/checksum failure from the client | |
218 | > return b'0' * len(origread(nbytes)) |
|
219 | > return b'0' * len(origread(nbytes)) | |
219 | > src.read = _badread |
|
220 | > src.read = _badread | |
220 | > super(badstore, self).download(oid, src) |
|
221 | > super(badstore, self).download(oid, src) | |
221 | > |
|
222 | > | |
222 | > def _read(self, vfs, oid, verify): |
|
223 | > def _read(self, vfs, oid, verify): | |
223 | > '''Called in the server to read data for a GET request, and then |
|
224 | > '''Called in the server to read data for a GET request, and then | |
224 | > calls self._verify() on it before returning.''' |
|
225 | > calls self._verify() on it before returning.''' | |
225 | > global _readerr |
|
226 | > global _readerr | |
226 | > # One time simulation of a read error |
|
227 | > # One time simulation of a read error | |
227 | > if _readerr: |
|
228 | > if _readerr: | |
228 | > _readerr = False |
|
229 | > _readerr = False | |
229 | > raise IOError(errno.EIO, '%s: I/O error' % oid) |
|
230 | > raise IOError(errno.EIO, '%s: I/O error' % oid) | |
230 | > # Simulate corrupt content on client download |
|
231 | > # Simulate corrupt content on client download | |
231 | > blobstore._verify(oid, 'dummy content') |
|
232 | > blobstore._verify(oid, 'dummy content') | |
232 | > |
|
233 | > | |
233 | > def verify(self, oid): |
|
234 | > def verify(self, oid): | |
234 | > '''Called in the server to populate the Batch API response, |
|
235 | > '''Called in the server to populate the Batch API response, | |
235 | > letting the client re-upload if the file is corrupt.''' |
|
236 | > letting the client re-upload if the file is corrupt.''' | |
236 | > # Fail verify in Batch API for one clone command and one push |
|
237 | > # Fail verify in Batch API for one clone command and one push | |
237 | > # command with an IOError. Then let it through to access other |
|
238 | > # command with an IOError. Then let it through to access other | |
238 | > # functions. Checksum failure is tested elsewhere. |
|
239 | > # functions. Checksum failure is tested elsewhere. | |
239 | > global _numverifies |
|
240 | > global _numverifies | |
240 | > _numverifies += 1 |
|
241 | > _numverifies += 1 | |
241 | > if _numverifies <= 2: |
|
242 | > if _numverifies <= 2: | |
242 | > raise IOError(errno.EIO, '%s: I/O error' % oid) |
|
243 | > raise IOError(errno.EIO, '%s: I/O error' % oid) | |
243 | > return super(badstore, self).verify(oid) |
|
244 | > return super(badstore, self).verify(oid) | |
244 | > |
|
245 | > | |
245 | > store.__class__ = badstore |
|
246 | > store.__class__ = badstore | |
246 | > EOF |
|
247 | > EOF | |
247 |
|
248 | |||
248 | $ rm -rf `hg config lfs.usercache` |
|
249 | $ rm -rf `hg config lfs.usercache` | |
249 | $ rm -f $TESTTMP/access.log $TESTTMP/errors.log |
|
250 | $ rm -f $TESTTMP/access.log $TESTTMP/errors.log | |
250 | $ hg --config "lfs.usercache=$TESTTMP/servercache" \ |
|
251 | $ hg --config "lfs.usercache=$TESTTMP/servercache" \ | |
251 | > --config extensions.lfsstoreerror=$TESTTMP/lfsstoreerror.py \ |
|
252 | > --config extensions.lfsstoreerror=$TESTTMP/lfsstoreerror.py \ | |
252 | > -R server serve -d \ |
|
253 | > -R server serve -d \ | |
253 | > -p $HGPORT1 --pid-file=hg.pid -A $TESTTMP/access.log -E $TESTTMP/errors.log |
|
254 | > -p $HGPORT1 --pid-file=hg.pid -A $TESTTMP/access.log -E $TESTTMP/errors.log | |
254 | $ cat hg.pid >> $DAEMON_PIDS |
|
255 | $ cat hg.pid >> $DAEMON_PIDS | |
255 |
|
256 | |||
256 | Test an I/O error in localstore.verify() (Batch API) with GET |
|
257 | Test an I/O error in localstore.verify() (Batch API) with GET | |
257 |
|
258 | |||
258 | $ hg clone http://localhost:$HGPORT1 httpclone2 |
|
259 | $ hg clone http://localhost:$HGPORT1 httpclone2 | |
259 | (remote is using large file support (lfs); lfs will be enabled for this repository) |
|
260 | (remote is using large file support (lfs); lfs will be enabled for this repository) | |
260 | requesting all changes |
|
261 | requesting all changes | |
261 | adding changesets |
|
262 | adding changesets | |
262 | adding manifests |
|
263 | adding manifests | |
263 | adding file changes |
|
264 | adding file changes | |
264 | added 1 changesets with 1 changes to 1 files |
|
265 | added 1 changesets with 1 changes to 1 files | |
265 | new changesets 525251863cad |
|
266 | new changesets 525251863cad | |
266 | updating to branch default |
|
267 | updating to branch default | |
267 | abort: LFS server error for "lfs.bin": Internal server error! |
|
268 | abort: LFS server error for "lfs.bin": Internal server error! | |
268 | [255] |
|
269 | [255] | |
269 |
|
270 | |||
270 | Test an I/O error in localstore.verify() (Batch API) with PUT |
|
271 | Test an I/O error in localstore.verify() (Batch API) with PUT | |
271 |
|
272 | |||
272 | $ echo foo > client/lfs.bin |
|
273 | $ echo foo > client/lfs.bin | |
273 | $ hg -R client ci -m 'mod lfs' |
|
274 | $ hg -R client ci -m 'mod lfs' | |
274 | $ hg -R client push http://localhost:$HGPORT1 |
|
275 | $ hg -R client push http://localhost:$HGPORT1 | |
275 | pushing to http://localhost:$HGPORT1/ |
|
276 | pushing to http://localhost:$HGPORT1/ | |
276 | searching for changes |
|
277 | searching for changes | |
277 | abort: LFS server error for "unknown": Internal server error! |
|
278 | abort: LFS server error for "unknown": Internal server error! | |
278 | [255] |
|
279 | [255] | |
279 | TODO: figure out how to associate the file name in the error above |
|
280 | TODO: figure out how to associate the file name in the error above | |
280 |
|
281 | |||
281 | Test a bad checksum sent by the client in the transfer API |
|
282 | Test a bad checksum sent by the client in the transfer API | |
282 |
|
283 | |||
283 | $ hg -R client push http://localhost:$HGPORT1 |
|
284 | $ hg -R client push http://localhost:$HGPORT1 | |
284 | pushing to http://localhost:$HGPORT1/ |
|
285 | pushing to http://localhost:$HGPORT1/ | |
285 | searching for changes |
|
286 | searching for changes | |
286 | abort: LFS HTTP error: HTTP Error 422: corrupt blob (oid=b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c, action=upload)! |
|
287 | abort: LFS HTTP error: HTTP Error 422: corrupt blob (oid=b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c, action=upload)! | |
287 | [255] |
|
288 | [255] | |
288 |
|
289 | |||
289 | $ echo 'test lfs file' > server/lfs3.bin |
|
290 | $ echo 'test lfs file' > server/lfs3.bin | |
290 | $ hg --config experimental.lfs.disableusercache=True \ |
|
291 | $ hg --config experimental.lfs.disableusercache=True \ | |
291 | > -R server ci -Aqm 'another lfs file' |
|
292 | > -R server ci -Aqm 'another lfs file' | |
292 | $ hg -R client pull -q http://localhost:$HGPORT1 |
|
293 | $ hg -R client pull -q http://localhost:$HGPORT1 | |
293 |
|
294 | |||
294 | Test an I/O error during the processing of the GET request |
|
295 | Test an I/O error during the processing of the GET request | |
295 |
|
296 | |||
296 | $ hg --config lfs.url=http://localhost:$HGPORT1/.git/info/lfs \ |
|
297 | $ hg --config lfs.url=http://localhost:$HGPORT1/.git/info/lfs \ | |
297 | > -R client update -r tip |
|
298 | > -R client update -r tip | |
298 | abort: LFS HTTP error: HTTP Error 500: Internal Server Error (oid=276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d, action=download)! |
|
299 | abort: LFS HTTP error: HTTP Error 500: Internal Server Error (oid=276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d, action=download)! | |
299 | [255] |
|
300 | [255] | |
300 |
|
301 | |||
301 | Test a checksum failure during the processing of the GET request |
|
302 | Test a checksum failure during the processing of the GET request | |
302 |
|
303 | |||
303 | $ hg --config lfs.url=http://localhost:$HGPORT1/.git/info/lfs \ |
|
304 | $ hg --config lfs.url=http://localhost:$HGPORT1/.git/info/lfs \ | |
304 | > -R client update -r tip |
|
305 | > -R client update -r tip | |
305 | abort: LFS HTTP error: HTTP Error 422: corrupt blob (oid=276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d, action=download)! |
|
306 | abort: LFS HTTP error: HTTP Error 422: corrupt blob (oid=276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d, action=download)! | |
306 | [255] |
|
307 | [255] | |
307 |
|
308 | |||
308 | $ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
|
309 | $ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS | |
309 |
|
310 | |||
310 | $ cat $TESTTMP/access.log |
|
311 | $ cat $TESTTMP/access.log | |
311 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
312 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
312 | $LOCALIP - - [$LOGDATE$] "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 (glob) |
|
313 | $LOCALIP - - [$LOGDATE$] "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 (glob) | |
313 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
314 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
314 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
315 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
315 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
316 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
316 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D392c05922088bacf8e68a6939b480017afbf245d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
317 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D392c05922088bacf8e68a6939b480017afbf245d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
317 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
318 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
318 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
319 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
319 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
320 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
320 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
321 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
321 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
322 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
322 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
323 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
323 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D392c05922088bacf8e68a6939b480017afbf245d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
324 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D392c05922088bacf8e68a6939b480017afbf245d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
324 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
325 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
325 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
326 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
326 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
327 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
327 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
328 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
328 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
329 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
329 | $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c HTTP/1.1" 422 - (glob) |
|
330 | $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c HTTP/1.1" 422 - (glob) | |
330 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
331 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
331 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D392c05922088bacf8e68a6939b480017afbf245d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
332 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D392c05922088bacf8e68a6939b480017afbf245d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
332 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=525251863cad618e55d483555f3d00a2ca99597e&heads=506bf3d83f78c54b89e81c6411adee19fdf02156+525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
333 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=525251863cad618e55d483555f3d00a2ca99597e&heads=506bf3d83f78c54b89e81c6411adee19fdf02156+525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
333 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
334 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
334 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d HTTP/1.1" 500 - (glob) |
|
335 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d HTTP/1.1" 500 - (glob) | |
335 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
336 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
336 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d HTTP/1.1" 422 - (glob) |
|
337 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d HTTP/1.1" 422 - (glob) | |
337 |
|
338 | |||
338 | $ grep -v ' File "' $TESTTMP/errors.log |
|
339 | $ grep -v ' File "' $TESTTMP/errors.log | |
339 | $LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.git/info/lfs/objects/batch': (glob) |
|
340 | $LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.git/info/lfs/objects/batch': (glob) | |
340 | $LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob) |
|
341 | $LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob) | |
341 | $LOCALIP - - [$ERRDATE$] HG error: verifies = store.verify(oid) (glob) |
|
342 | $LOCALIP - - [$ERRDATE$] HG error: verifies = store.verify(oid) (glob) | |
342 | $LOCALIP - - [$ERRDATE$] HG error: raise IOError(errno.EIO, '%s: I/O error' % oid) (glob) |
|
343 | $LOCALIP - - [$ERRDATE$] HG error: raise IOError(errno.EIO, '%s: I/O error' % oid) (glob) | |
343 | $LOCALIP - - [$ERRDATE$] HG error: IOError: [Errno 5] f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e: I/O error (glob) |
|
344 | $LOCALIP - - [$ERRDATE$] HG error: IOError: [Errno 5] f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e: I/O error (glob) | |
344 | $LOCALIP - - [$ERRDATE$] HG error: (glob) |
|
345 | $LOCALIP - - [$ERRDATE$] HG error: (glob) | |
345 | $LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.git/info/lfs/objects/batch': (glob) |
|
346 | $LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.git/info/lfs/objects/batch': (glob) | |
346 | $LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob) |
|
347 | $LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob) | |
347 | $LOCALIP - - [$ERRDATE$] HG error: verifies = store.verify(oid) (glob) |
|
348 | $LOCALIP - - [$ERRDATE$] HG error: verifies = store.verify(oid) (glob) | |
348 | $LOCALIP - - [$ERRDATE$] HG error: raise IOError(errno.EIO, '%s: I/O error' % oid) (glob) |
|
349 | $LOCALIP - - [$ERRDATE$] HG error: raise IOError(errno.EIO, '%s: I/O error' % oid) (glob) | |
349 | $LOCALIP - - [$ERRDATE$] HG error: IOError: [Errno 5] b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c: I/O error (glob) |
|
350 | $LOCALIP - - [$ERRDATE$] HG error: IOError: [Errno 5] b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c: I/O error (glob) | |
350 | $LOCALIP - - [$ERRDATE$] HG error: (glob) |
|
351 | $LOCALIP - - [$ERRDATE$] HG error: (glob) | |
351 | $LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.hg/lfs/objects/b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c': (glob) |
|
352 | $LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.hg/lfs/objects/b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c': (glob) | |
352 | $LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob) |
|
353 | $LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob) | |
353 | $LOCALIP - - [$ERRDATE$] HG error: localstore.download(oid, req.bodyfh) (glob) |
|
354 | $LOCALIP - - [$ERRDATE$] HG error: localstore.download(oid, req.bodyfh) (glob) | |
354 | $LOCALIP - - [$ERRDATE$] HG error: super(badstore, self).download(oid, src) (glob) |
|
355 | $LOCALIP - - [$ERRDATE$] HG error: super(badstore, self).download(oid, src) (glob) | |
355 | $LOCALIP - - [$ERRDATE$] HG error: % oid) (glob) |
|
356 | $LOCALIP - - [$ERRDATE$] HG error: % oid) (glob) | |
356 | $LOCALIP - - [$ERRDATE$] HG error: LfsCorruptionError: corrupt remote lfs object: b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c (glob) |
|
357 | $LOCALIP - - [$ERRDATE$] HG error: LfsCorruptionError: corrupt remote lfs object: b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c (glob) | |
357 | $LOCALIP - - [$ERRDATE$] HG error: (glob) |
|
358 | $LOCALIP - - [$ERRDATE$] HG error: (glob) | |
358 | $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d': (glob) |
|
359 | $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d': (glob) | |
359 | Traceback (most recent call last): |
|
360 | Traceback (most recent call last): | |
360 | self.do_write() |
|
361 | self.do_write() | |
361 | self.do_hgweb() |
|
362 | self.do_hgweb() | |
362 | for chunk in self.server.application(env, self._start_response): |
|
363 | for chunk in self.server.application(env, self._start_response): | |
363 | for r in self._runwsgi(req, res, repo): |
|
364 | for r in self._runwsgi(req, res, repo): | |
364 | rctx, req, res, self.check_perm) |
|
365 | rctx, req, res, self.check_perm) | |
365 | return func(*(args + a), **kw) |
|
366 | return func(*(args + a), **kw) | |
366 | lambda perm: |
|
367 | lambda perm: | |
367 | res.setbodybytes(localstore.read(oid)) |
|
368 | res.setbodybytes(localstore.read(oid)) | |
368 | blob = self._read(self.vfs, oid, verify) |
|
369 | blob = self._read(self.vfs, oid, verify) | |
369 | raise IOError(errno.EIO, '%s: I/O error' % oid) |
|
370 | raise IOError(errno.EIO, '%s: I/O error' % oid) | |
370 | IOError: [Errno 5] 276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d: I/O error |
|
371 | IOError: [Errno 5] 276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d: I/O error | |
371 |
|
372 | |||
372 | $LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d': (glob) |
|
373 | $LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d': (glob) | |
373 | $LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob) |
|
374 | $LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob) | |
374 | $LOCALIP - - [$ERRDATE$] HG error: res.setbodybytes(localstore.read(oid)) (glob) |
|
375 | $LOCALIP - - [$ERRDATE$] HG error: res.setbodybytes(localstore.read(oid)) (glob) | |
375 | $LOCALIP - - [$ERRDATE$] HG error: blob = self._read(self.vfs, oid, verify) (glob) |
|
376 | $LOCALIP - - [$ERRDATE$] HG error: blob = self._read(self.vfs, oid, verify) (glob) | |
376 | $LOCALIP - - [$ERRDATE$] HG error: blobstore._verify(oid, 'dummy content') (glob) |
|
377 | $LOCALIP - - [$ERRDATE$] HG error: blobstore._verify(oid, 'dummy content') (glob) | |
377 | $LOCALIP - - [$ERRDATE$] HG error: hint=_('run hg verify')) (glob) |
|
378 | $LOCALIP - - [$ERRDATE$] HG error: hint=_('run hg verify')) (glob) | |
378 | $LOCALIP - - [$ERRDATE$] HG error: LfsCorruptionError: detected corrupt lfs object: 276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d (glob) |
|
379 | $LOCALIP - - [$ERRDATE$] HG error: LfsCorruptionError: detected corrupt lfs object: 276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d (glob) | |
379 | $LOCALIP - - [$ERRDATE$] HG error: (glob) |
|
380 | $LOCALIP - - [$ERRDATE$] HG error: (glob) | |
380 |
|
381 | |||
381 | Basic Authorization headers are returned by the Batch API, and sent back with |
|
382 | Basic Authorization headers are returned by the Batch API, and sent back with | |
382 | the GET/PUT request. |
|
383 | the GET/PUT request. | |
383 |
|
384 | |||
384 | $ rm -f $TESTTMP/access.log $TESTTMP/errors.log |
|
385 | $ rm -f $TESTTMP/access.log $TESTTMP/errors.log | |
385 |
|
386 | |||
386 | $ cat >> $HGRCPATH << EOF |
|
387 | $ cat >> $HGRCPATH << EOF | |
387 | > [experimental] |
|
388 | > [experimental] | |
388 | > lfs.disableusercache = True |
|
389 | > lfs.disableusercache = True | |
389 | > [auth] |
|
390 | > [auth] | |
390 | > l.schemes=http |
|
391 | > l.schemes=http | |
391 | > l.prefix=lo |
|
392 | > l.prefix=lo | |
392 | > l.username=user |
|
393 | > l.username=user | |
393 | > l.password=pass |
|
394 | > l.password=pass | |
394 | > EOF |
|
395 | > EOF | |
395 |
|
396 | |||
396 | $ cat << EOF > userpass.py |
|
397 | $ cat << EOF > userpass.py | |
397 | > import base64 |
|
398 | > import base64 | |
398 | > from mercurial.hgweb import common |
|
399 | > from mercurial.hgweb import common | |
399 | > def perform_authentication(hgweb, req, op): |
|
400 | > def perform_authentication(hgweb, req, op): | |
400 | > auth = req.headers.get(b'Authorization') |
|
401 | > auth = req.headers.get(b'Authorization') | |
401 | > if not auth: |
|
402 | > if not auth: | |
402 | > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, b'who', |
|
403 | > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, b'who', | |
403 | > [(b'WWW-Authenticate', b'Basic Realm="mercurial"')]) |
|
404 | > [(b'WWW-Authenticate', b'Basic Realm="mercurial"')]) | |
404 | > if base64.b64decode(auth.split()[1]).split(b':', 1) != [b'user', |
|
405 | > if base64.b64decode(auth.split()[1]).split(b':', 1) != [b'user', | |
405 | > b'pass']: |
|
406 | > b'pass']: | |
406 | > raise common.ErrorResponse(common.HTTP_FORBIDDEN, b'no') |
|
407 | > raise common.ErrorResponse(common.HTTP_FORBIDDEN, b'no') | |
407 | > def extsetup(ui): |
|
408 | > def extsetup(ui): | |
408 | > common.permhooks.insert(0, perform_authentication) |
|
409 | > common.permhooks.insert(0, perform_authentication) | |
409 | > EOF |
|
410 | > EOF | |
410 |
|
411 | |||
411 | $ hg --config extensions.x=$TESTTMP/userpass.py \ |
|
412 | $ hg --config extensions.x=$TESTTMP/userpass.py \ | |
412 | > -R server serve -d -p $HGPORT1 --pid-file=hg.pid \ |
|
413 | > -R server serve -d -p $HGPORT1 --pid-file=hg.pid \ | |
413 | > -A $TESTTMP/access.log -E $TESTTMP/errors.log |
|
414 | > -A $TESTTMP/access.log -E $TESTTMP/errors.log | |
414 | $ mv hg.pid $DAEMON_PIDS |
|
415 | $ mv hg.pid $DAEMON_PIDS | |
415 |
|
416 | |||
416 | $ hg clone --debug http://localhost:$HGPORT1 auth_clone | egrep '^[{}]| ' |
|
417 | $ hg clone --debug http://localhost:$HGPORT1 auth_clone | egrep '^[{}]| ' | |
417 | { |
|
418 | { | |
418 | "objects": [ |
|
419 | "objects": [ | |
419 | { |
|
420 | { | |
420 | "actions": { |
|
421 | "actions": { | |
421 | "download": { |
|
422 | "download": { | |
422 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
423 | "expires_at": "$ISO_8601_DATE_TIME$" | |
423 | "header": { |
|
424 | "header": { | |
424 | "Accept": "application/vnd.git-lfs" |
|
425 | "Accept": "application/vnd.git-lfs" | |
425 | "Authorization": "Basic dXNlcjpwYXNz" |
|
426 | "Authorization": "Basic dXNlcjpwYXNz" | |
426 | } |
|
427 | } | |
427 | "href": "http://localhost:$HGPORT1/.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d" |
|
428 | "href": "http://localhost:$HGPORT1/.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d" | |
428 | } |
|
429 | } | |
429 | } |
|
430 | } | |
430 | "oid": "276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d" |
|
431 | "oid": "276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d" | |
431 | "size": 14 |
|
432 | "size": 14 | |
432 | } |
|
433 | } | |
433 | ] |
|
434 | ] | |
434 | "transfer": "basic" |
|
435 | "transfer": "basic" | |
435 | } |
|
436 | } | |
436 |
|
437 | |||
437 | $ echo 'another blob' > auth_clone/lfs.blob |
|
438 | $ echo 'another blob' > auth_clone/lfs.blob | |
438 | $ hg -R auth_clone ci -Aqm 'add blob' |
|
439 | $ hg -R auth_clone ci -Aqm 'add blob' | |
439 | $ hg -R auth_clone --debug push | egrep '^[{}]| ' |
|
440 | $ hg -R auth_clone --debug push | egrep '^[{}]| ' | |
440 | { |
|
441 | { | |
441 | "objects": [ |
|
442 | "objects": [ | |
442 | { |
|
443 | { | |
443 | "actions": { |
|
444 | "actions": { | |
444 | "upload": { |
|
445 | "upload": { | |
445 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
446 | "expires_at": "$ISO_8601_DATE_TIME$" | |
446 | "header": { |
|
447 | "header": { | |
447 | "Accept": "application/vnd.git-lfs" |
|
448 | "Accept": "application/vnd.git-lfs" | |
448 | "Authorization": "Basic dXNlcjpwYXNz" |
|
449 | "Authorization": "Basic dXNlcjpwYXNz" | |
449 | } |
|
450 | } | |
450 | "href": "http://localhost:$HGPORT1/.hg/lfs/objects/df14287d8d75f076a6459e7a3703ca583ca9fb3f4918caed10c77ac8622d49b3" |
|
451 | "href": "http://localhost:$HGPORT1/.hg/lfs/objects/df14287d8d75f076a6459e7a3703ca583ca9fb3f4918caed10c77ac8622d49b3" | |
451 | } |
|
452 | } | |
452 | } |
|
453 | } | |
453 | "oid": "df14287d8d75f076a6459e7a3703ca583ca9fb3f4918caed10c77ac8622d49b3" |
|
454 | "oid": "df14287d8d75f076a6459e7a3703ca583ca9fb3f4918caed10c77ac8622d49b3" | |
454 | "size": 13 |
|
455 | "size": 13 | |
455 | } |
|
456 | } | |
456 | ] |
|
457 | ] | |
457 | "transfer": "basic" |
|
458 | "transfer": "basic" | |
458 | } |
|
459 | } | |
459 |
|
460 | |||
460 | $ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
|
461 | $ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS | |
461 |
|
462 | |||
462 | $ cat $TESTTMP/access.log $TESTTMP/errors.log |
|
463 | $ cat $TESTTMP/access.log $TESTTMP/errors.log | |
463 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 401 - (glob) |
|
464 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 401 - (glob) | |
464 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
465 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
465 | $LOCALIP - - [$LOGDATE$] "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 (glob) |
|
466 | $LOCALIP - - [$LOGDATE$] "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 (glob) | |
466 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=506bf3d83f78c54b89e81c6411adee19fdf02156+525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
467 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=506bf3d83f78c54b89e81c6411adee19fdf02156+525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
467 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 401 - (glob) |
|
468 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 401 - (glob) | |
468 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
469 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
469 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d HTTP/1.1" 200 - (glob) |
|
470 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d HTTP/1.1" 200 - (glob) | |
470 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 401 - (glob) |
|
471 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 401 - (glob) | |
471 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
472 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
472 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D525251863cad618e55d483555f3d00a2ca99597e+4d9397055dc0c205f3132f331f36353ab1a525a3 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
473 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D525251863cad618e55d483555f3d00a2ca99597e+4d9397055dc0c205f3132f331f36353ab1a525a3 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
473 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
474 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
474 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
475 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
475 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
476 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
476 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
477 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
477 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 401 - (glob) |
|
478 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 401 - (glob) | |
478 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
479 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
479 | $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/df14287d8d75f076a6459e7a3703ca583ca9fb3f4918caed10c77ac8622d49b3 HTTP/1.1" 201 - (glob) |
|
480 | $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/df14287d8d75f076a6459e7a3703ca583ca9fb3f4918caed10c77ac8622d49b3 HTTP/1.1" 201 - (glob) | |
480 | $LOCALIP - - [$LOGDATE$] "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
481 | $LOCALIP - - [$LOGDATE$] "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
481 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
482 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
General Comments 0
You need to be logged in to leave comments.
Login now