Show More
@@ -1,432 +1,432 b'' | |||||
1 | Set up a server |
|
1 | Set up a server | |
2 |
|
2 | |||
3 | $ cat >> $HGRCPATH << EOF |
|
3 | $ cat >> $HGRCPATH << EOF | |
4 | > [format] |
|
4 | > [format] | |
5 | > usegeneraldelta=yes |
|
5 | > usegeneraldelta=yes | |
6 | > EOF |
|
6 | > EOF | |
7 | $ hg init server |
|
7 | $ hg init server | |
8 | $ cd server |
|
8 | $ cd server | |
9 | $ cat >> .hg/hgrc << EOF |
|
9 | $ cat >> .hg/hgrc << EOF | |
10 | > [extensions] |
|
10 | > [extensions] | |
11 | > clonebundles = |
|
11 | > clonebundles = | |
12 | > EOF |
|
12 | > EOF | |
13 |
|
13 | |||
14 | $ touch foo |
|
14 | $ touch foo | |
15 | $ hg -q commit -A -m 'add foo' |
|
15 | $ hg -q commit -A -m 'add foo' | |
16 | $ touch bar |
|
16 | $ touch bar | |
17 | $ hg -q commit -A -m 'add bar' |
|
17 | $ hg -q commit -A -m 'add bar' | |
18 |
|
18 | |||
19 | $ hg serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log |
|
19 | $ hg serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log | |
20 | $ cat hg.pid >> $DAEMON_PIDS |
|
20 | $ cat hg.pid >> $DAEMON_PIDS | |
21 | $ cd .. |
|
21 | $ cd .. | |
22 |
|
22 | |||
23 | Missing manifest should not result in server lookup |
|
23 | Missing manifest should not result in server lookup | |
24 |
|
24 | |||
25 | $ hg --verbose clone -U http://localhost:$HGPORT no-manifest |
|
25 | $ hg --verbose clone -U http://localhost:$HGPORT no-manifest | |
26 | requesting all changes |
|
26 | requesting all changes | |
27 | adding changesets |
|
27 | adding changesets | |
28 | adding manifests |
|
28 | adding manifests | |
29 | adding file changes |
|
29 | adding file changes | |
30 | added 2 changesets with 2 changes to 2 files |
|
30 | added 2 changesets with 2 changes to 2 files | |
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 | * - - [*] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) |
|
34 | * - - [*] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
35 | * - - [*] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=aaff8d2ffbbf07a46dd1f05d8ae7877e3f56e2a2&listkeys=phases%2Cbookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) |
|
35 | * - - [*] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=aaff8d2ffbbf07a46dd1f05d8ae7877e3f56e2a2&listkeys=phases%2Cbookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (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 |
|
48 | |||
49 | Manifest file with invalid URL aborts |
|
49 | Manifest file with invalid URL aborts | |
50 |
|
50 | |||
51 | $ echo 'http://does.not.exist/bundle.hg' > server/.hg/clonebundles.manifest |
|
51 | $ echo 'http://does.not.exist/bundle.hg' > server/.hg/clonebundles.manifest | |
52 | $ hg clone http://localhost:$HGPORT 404-url |
|
52 | $ hg clone http://localhost:$HGPORT 404-url | |
53 | applying clone bundle from http://does.not.exist/bundle.hg |
|
53 | applying clone bundle from http://does.not.exist/bundle.hg | |
54 | error fetching bundle: (.* not known|getaddrinfo failed|No address associated with hostname) (re) |
|
54 | error fetching bundle: (.* not known|getaddrinfo failed|No address associated with hostname) (re) | |
55 | abort: error applying bundle |
|
55 | abort: error applying bundle | |
56 | (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false") |
|
56 | (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false") | |
57 | [255] |
|
57 | [255] | |
58 |
|
58 | |||
59 | Server is not running aborts |
|
59 | Server is not running aborts | |
60 |
|
60 | |||
61 | $ echo "http://localhost:$HGPORT1/bundle.hg" > server/.hg/clonebundles.manifest |
|
61 | $ echo "http://localhost:$HGPORT1/bundle.hg" > server/.hg/clonebundles.manifest | |
62 | $ hg clone http://localhost:$HGPORT server-not-runner |
|
62 | $ hg clone http://localhost:$HGPORT server-not-runner | |
63 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg |
|
63 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg | |
64 | error fetching bundle: (.* refused.*|Protocol not supported) (re) |
|
64 | error fetching bundle: (.* refused.*|Protocol not supported|Cannot assign requested address) (re) | |
65 | abort: error applying bundle |
|
65 | abort: error applying bundle | |
66 | (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false") |
|
66 | (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false") | |
67 | [255] |
|
67 | [255] | |
68 |
|
68 | |||
69 | Server returns 404 |
|
69 | Server returns 404 | |
70 |
|
70 | |||
71 | $ python $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid |
|
71 | $ python $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid | |
72 | $ cat http.pid >> $DAEMON_PIDS |
|
72 | $ cat http.pid >> $DAEMON_PIDS | |
73 | $ hg clone http://localhost:$HGPORT running-404 |
|
73 | $ hg clone http://localhost:$HGPORT running-404 | |
74 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg |
|
74 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg | |
75 | HTTP error fetching bundle: HTTP Error 404: File not found |
|
75 | HTTP error fetching bundle: HTTP Error 404: File not found | |
76 | abort: error applying bundle |
|
76 | abort: error applying bundle | |
77 | (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false") |
|
77 | (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false") | |
78 | [255] |
|
78 | [255] | |
79 |
|
79 | |||
80 | We can override failure to fall back to regular clone |
|
80 | We can override failure to fall back to regular clone | |
81 |
|
81 | |||
82 | $ hg --config ui.clonebundlefallback=true clone -U http://localhost:$HGPORT 404-fallback |
|
82 | $ hg --config ui.clonebundlefallback=true clone -U http://localhost:$HGPORT 404-fallback | |
83 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg |
|
83 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg | |
84 | HTTP error fetching bundle: HTTP Error 404: File not found |
|
84 | HTTP error fetching bundle: HTTP Error 404: File not found | |
85 | falling back to normal clone |
|
85 | falling back to normal clone | |
86 | requesting all changes |
|
86 | requesting all changes | |
87 | adding changesets |
|
87 | adding changesets | |
88 | adding manifests |
|
88 | adding manifests | |
89 | adding file changes |
|
89 | adding file changes | |
90 | added 2 changesets with 2 changes to 2 files |
|
90 | added 2 changesets with 2 changes to 2 files | |
91 |
|
91 | |||
92 | Bundle with partial content works |
|
92 | Bundle with partial content works | |
93 |
|
93 | |||
94 | $ hg -R server bundle --type gzip-v1 --base null -r 53245c60e682 partial.hg |
|
94 | $ hg -R server bundle --type gzip-v1 --base null -r 53245c60e682 partial.hg | |
95 | 1 changesets found |
|
95 | 1 changesets found | |
96 |
|
96 | |||
97 | We verify exact bundle content as an extra check against accidental future |
|
97 | We verify exact bundle content as an extra check against accidental future | |
98 | changes. If this output changes, we could break old clients. |
|
98 | changes. If this output changes, we could break old clients. | |
99 |
|
99 | |||
100 | $ f --size --hexdump partial.hg |
|
100 | $ f --size --hexdump partial.hg | |
101 | partial.hg: size=207 |
|
101 | partial.hg: size=207 | |
102 | 0000: 48 47 31 30 47 5a 78 9c 63 60 60 98 17 ac 12 93 |HG10GZx.c``.....| |
|
102 | 0000: 48 47 31 30 47 5a 78 9c 63 60 60 98 17 ac 12 93 |HG10GZx.c``.....| | |
103 | 0010: f0 ac a9 23 45 70 cb bf 0d 5f 59 4e 4a 7f 79 21 |...#Ep..._YNJ.y!| |
|
103 | 0010: f0 ac a9 23 45 70 cb bf 0d 5f 59 4e 4a 7f 79 21 |...#Ep..._YNJ.y!| | |
104 | 0020: 9b cc 40 24 20 a0 d7 ce 2c d1 38 25 cd 24 25 d5 |..@$ ...,.8%.$%.| |
|
104 | 0020: 9b cc 40 24 20 a0 d7 ce 2c d1 38 25 cd 24 25 d5 |..@$ ...,.8%.$%.| | |
105 | 0030: d8 c2 22 cd 38 d9 24 cd 22 d5 c8 22 cd 24 cd 32 |..".8.$."..".$.2| |
|
105 | 0030: d8 c2 22 cd 38 d9 24 cd 22 d5 c8 22 cd 24 cd 32 |..".8.$."..".$.2| | |
106 | 0040: d1 c2 d0 c4 c8 d2 32 d1 38 39 29 c9 34 cd d4 80 |......2.89).4...| |
|
106 | 0040: d1 c2 d0 c4 c8 d2 32 d1 38 39 29 c9 34 cd d4 80 |......2.89).4...| | |
107 | 0050: ab 24 b5 b8 84 cb 40 c1 80 2b 2d 3f 9f 8b 2b 31 |.$....@..+-?..+1| |
|
107 | 0050: ab 24 b5 b8 84 cb 40 c1 80 2b 2d 3f 9f 8b 2b 31 |.$....@..+-?..+1| | |
108 | 0060: 25 45 01 c8 80 9a d2 9b 65 fb e5 9e 45 bf 8d 7f |%E......e...E...| |
|
108 | 0060: 25 45 01 c8 80 9a d2 9b 65 fb e5 9e 45 bf 8d 7f |%E......e...E...| | |
109 | 0070: 9f c6 97 9f 2b 44 34 67 d9 ec 8e 0f a0 92 0b 75 |....+D4g.......u| |
|
109 | 0070: 9f c6 97 9f 2b 44 34 67 d9 ec 8e 0f a0 92 0b 75 |....+D4g.......u| | |
110 | 0080: 41 d6 24 59 18 a4 a4 9a a6 18 1a 5b 98 9b 5a 98 |A.$Y.......[..Z.| |
|
110 | 0080: 41 d6 24 59 18 a4 a4 9a a6 18 1a 5b 98 9b 5a 98 |A.$Y.......[..Z.| | |
111 | 0090: 9a 18 26 9b a6 19 98 1a 99 99 26 a6 18 9a 98 24 |..&.......&....$| |
|
111 | 0090: 9a 18 26 9b a6 19 98 1a 99 99 26 a6 18 9a 98 24 |..&.......&....$| | |
112 | 00a0: 26 59 a6 25 5a 98 a5 18 a6 24 71 41 35 b1 43 dc |&Y.%Z....$qA5.C.| |
|
112 | 00a0: 26 59 a6 25 5a 98 a5 18 a6 24 71 41 35 b1 43 dc |&Y.%Z....$qA5.C.| | |
113 | 00b0: 16 b2 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 d7 8a |.....E..V....R..| |
|
113 | 00b0: 16 b2 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 d7 8a |.....E..V....R..| | |
114 | 00c0: 78 ed fc d5 76 f1 36 35 dc 05 00 36 ed 5e c7 |x...v.65...6.^.| |
|
114 | 00c0: 78 ed fc d5 76 f1 36 35 dc 05 00 36 ed 5e c7 |x...v.65...6.^.| | |
115 |
|
115 | |||
116 | $ echo "http://localhost:$HGPORT1/partial.hg" > server/.hg/clonebundles.manifest |
|
116 | $ echo "http://localhost:$HGPORT1/partial.hg" > server/.hg/clonebundles.manifest | |
117 | $ hg clone -U http://localhost:$HGPORT partial-bundle |
|
117 | $ hg clone -U http://localhost:$HGPORT partial-bundle | |
118 | applying clone bundle from http://localhost:$HGPORT1/partial.hg |
|
118 | applying clone bundle from http://localhost:$HGPORT1/partial.hg | |
119 | adding changesets |
|
119 | adding changesets | |
120 | adding manifests |
|
120 | adding manifests | |
121 | adding file changes |
|
121 | adding file changes | |
122 | added 1 changesets with 1 changes to 1 files |
|
122 | added 1 changesets with 1 changes to 1 files | |
123 | finished applying clone bundle |
|
123 | finished applying clone bundle | |
124 | searching for changes |
|
124 | searching for changes | |
125 | adding changesets |
|
125 | adding changesets | |
126 | adding manifests |
|
126 | adding manifests | |
127 | adding file changes |
|
127 | adding file changes | |
128 | added 1 changesets with 1 changes to 1 files |
|
128 | added 1 changesets with 1 changes to 1 files | |
129 |
|
129 | |||
130 | Incremental pull doesn't fetch bundle |
|
130 | Incremental pull doesn't fetch bundle | |
131 |
|
131 | |||
132 | $ hg clone -r 53245c60e682 -U http://localhost:$HGPORT partial-clone |
|
132 | $ hg clone -r 53245c60e682 -U http://localhost:$HGPORT partial-clone | |
133 | adding changesets |
|
133 | adding changesets | |
134 | adding manifests |
|
134 | adding manifests | |
135 | adding file changes |
|
135 | adding file changes | |
136 | added 1 changesets with 1 changes to 1 files |
|
136 | added 1 changesets with 1 changes to 1 files | |
137 |
|
137 | |||
138 | $ cd partial-clone |
|
138 | $ cd partial-clone | |
139 | $ hg pull |
|
139 | $ hg pull | |
140 | pulling from http://localhost:$HGPORT/ |
|
140 | pulling from http://localhost:$HGPORT/ | |
141 | searching for changes |
|
141 | searching for changes | |
142 | adding changesets |
|
142 | adding changesets | |
143 | adding manifests |
|
143 | adding manifests | |
144 | adding file changes |
|
144 | adding file changes | |
145 | added 1 changesets with 1 changes to 1 files |
|
145 | added 1 changesets with 1 changes to 1 files | |
146 | (run 'hg update' to get a working copy) |
|
146 | (run 'hg update' to get a working copy) | |
147 | $ cd .. |
|
147 | $ cd .. | |
148 |
|
148 | |||
149 | Bundle with full content works |
|
149 | Bundle with full content works | |
150 |
|
150 | |||
151 | $ hg -R server bundle --type gzip-v2 --base null -r tip full.hg |
|
151 | $ hg -R server bundle --type gzip-v2 --base null -r tip full.hg | |
152 | 2 changesets found |
|
152 | 2 changesets found | |
153 |
|
153 | |||
154 | Again, we perform an extra check against bundle content changes. If this content |
|
154 | Again, we perform an extra check against bundle content changes. If this content | |
155 | changes, clone bundles produced by new Mercurial versions may not be readable |
|
155 | changes, clone bundles produced by new Mercurial versions may not be readable | |
156 | by old clients. |
|
156 | by old clients. | |
157 |
|
157 | |||
158 | $ f --size --hexdump full.hg |
|
158 | $ f --size --hexdump full.hg | |
159 | full.hg: size=396 |
|
159 | full.hg: size=396 | |
160 | 0000: 48 47 32 30 00 00 00 0e 43 6f 6d 70 72 65 73 73 |HG20....Compress| |
|
160 | 0000: 48 47 32 30 00 00 00 0e 43 6f 6d 70 72 65 73 73 |HG20....Compress| | |
161 | 0010: 69 6f 6e 3d 47 5a 78 9c 63 60 60 d0 e4 76 f6 70 |ion=GZx.c``..v.p| |
|
161 | 0010: 69 6f 6e 3d 47 5a 78 9c 63 60 60 d0 e4 76 f6 70 |ion=GZx.c``..v.p| | |
162 | 0020: f4 73 77 75 0f f2 0f 0d 60 00 02 46 46 76 26 4e |.swu....`..FFv&N| |
|
162 | 0020: f4 73 77 75 0f f2 0f 0d 60 00 02 46 46 76 26 4e |.swu....`..FFv&N| | |
163 | 0030: c6 b2 d4 a2 e2 cc fc 3c 03 a3 bc a4 e4 8c c4 bc |.......<........| |
|
163 | 0030: c6 b2 d4 a2 e2 cc fc 3c 03 a3 bc a4 e4 8c c4 bc |.......<........| | |
164 | 0040: f4 d4 62 23 06 06 e6 19 40 f9 4d c1 2a 31 09 cf |..b#....@.M.*1..| |
|
164 | 0040: f4 d4 62 23 06 06 e6 19 40 f9 4d c1 2a 31 09 cf |..b#....@.M.*1..| | |
165 | 0050: 9a 3a 52 04 b7 fc db f0 95 e5 a4 f4 97 17 b2 c9 |.:R.............| |
|
165 | 0050: 9a 3a 52 04 b7 fc db f0 95 e5 a4 f4 97 17 b2 c9 |.:R.............| | |
166 | 0060: 0c 14 00 02 e6 d9 99 25 1a a7 a4 99 a4 a4 1a 5b |.......%.......[| |
|
166 | 0060: 0c 14 00 02 e6 d9 99 25 1a a7 a4 99 a4 a4 1a 5b |.......%.......[| | |
167 | 0070: 58 a4 19 27 9b a4 59 a4 1a 59 a4 99 a4 59 26 5a |X..'..Y..Y...Y&Z| |
|
167 | 0070: 58 a4 19 27 9b a4 59 a4 1a 59 a4 99 a4 59 26 5a |X..'..Y..Y...Y&Z| | |
168 | 0080: 18 9a 18 59 5a 26 1a 27 27 25 99 a6 99 1a 70 95 |...YZ&.''%....p.| |
|
168 | 0080: 18 9a 18 59 5a 26 1a 27 27 25 99 a6 99 1a 70 95 |...YZ&.''%....p.| | |
169 | 0090: a4 16 97 70 19 28 18 70 a5 e5 e7 73 71 25 a6 a4 |...p.(.p...sq%..| |
|
169 | 0090: a4 16 97 70 19 28 18 70 a5 e5 e7 73 71 25 a6 a4 |...p.(.p...sq%..| | |
170 | 00a0: 28 00 19 20 17 af fa df ab ff 7b 3f fb 92 dc 8b |(.. ......{?....| |
|
170 | 00a0: 28 00 19 20 17 af fa df ab ff 7b 3f fb 92 dc 8b |(.. ......{?....| | |
171 | 00b0: 1f 62 bb 9e b7 d7 d9 87 3d 5a 44 89 2f b0 99 87 |.b......=ZD./...| |
|
171 | 00b0: 1f 62 bb 9e b7 d7 d9 87 3d 5a 44 89 2f b0 99 87 |.b......=ZD./...| | |
172 | 00c0: ec e2 54 63 43 e3 b4 64 43 73 23 33 43 53 0b 63 |..TcC..dCs#3CS.c| |
|
172 | 00c0: ec e2 54 63 43 e3 b4 64 43 73 23 33 43 53 0b 63 |..TcC..dCs#3CS.c| | |
173 | 00d0: d3 14 23 03 a0 fb 2c 2c 0c d3 80 1e 30 49 49 b1 |..#...,,....0II.| |
|
173 | 00d0: d3 14 23 03 a0 fb 2c 2c 0c d3 80 1e 30 49 49 b1 |..#...,,....0II.| | |
174 | 00e0: 4c 4a 32 48 33 30 b0 34 42 b8 38 29 b1 08 e2 62 |LJ2H30.4B.8)...b| |
|
174 | 00e0: 4c 4a 32 48 33 30 b0 34 42 b8 38 29 b1 08 e2 62 |LJ2H30.4B.8)...b| | |
175 | 00f0: 20 03 6a ca c2 2c db 2f f7 2c fa 6d fc fb 34 be | .j..,./.,.m..4.| |
|
175 | 00f0: 20 03 6a ca c2 2c db 2f f7 2c fa 6d fc fb 34 be | .j..,./.,.m..4.| | |
176 | 0100: fc 5c 21 a2 39 cb 66 77 7c 00 0d c3 59 17 14 58 |.\!.9.fw|...Y..X| |
|
176 | 0100: fc 5c 21 a2 39 cb 66 77 7c 00 0d c3 59 17 14 58 |.\!.9.fw|...Y..X| | |
177 | 0110: 49 16 06 29 a9 a6 29 86 c6 16 e6 a6 16 a6 26 86 |I..)..).......&.| |
|
177 | 0110: 49 16 06 29 a9 a6 29 86 c6 16 e6 a6 16 a6 26 86 |I..)..).......&.| | |
178 | 0120: c9 a6 69 06 a6 46 66 a6 89 29 86 26 26 89 49 96 |..i..Ff..).&&.I.| |
|
178 | 0120: c9 a6 69 06 a6 46 66 a6 89 29 86 26 26 89 49 96 |..i..Ff..).&&.I.| | |
179 | 0130: 69 89 16 66 29 86 29 49 5c 20 07 3e 16 fe 23 ae |i..f).)I\ .>..#.| |
|
179 | 0130: 69 89 16 66 29 86 29 49 5c 20 07 3e 16 fe 23 ae |i..f).)I\ .>..#.| | |
180 | 0140: 26 da 1c ab 10 1f d1 f8 e3 b3 ef cd dd fc 0c 93 |&...............| |
|
180 | 0140: 26 da 1c ab 10 1f d1 f8 e3 b3 ef cd dd fc 0c 93 |&...............| | |
181 | 0150: 88 75 34 36 75 04 82 55 17 14 36 a4 38 10 04 d8 |.u46u..U..6.8...| |
|
181 | 0150: 88 75 34 36 75 04 82 55 17 14 36 a4 38 10 04 d8 |.u46u..U..6.8...| | |
182 | 0160: 21 01 9a b1 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 |!......E..V....R| |
|
182 | 0160: 21 01 9a b1 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 |!......E..V....R| | |
183 | 0170: d7 8a 78 ed fc d5 76 f1 36 25 81 89 c7 ad ec 90 |..x...v.6%......| |
|
183 | 0170: d7 8a 78 ed fc d5 76 f1 36 25 81 89 c7 ad ec 90 |..x...v.6%......| | |
184 | 0180: 54 47 75 2b 89 49 b1 00 d2 8a eb 92 |TGu+.I......| |
|
184 | 0180: 54 47 75 2b 89 49 b1 00 d2 8a eb 92 |TGu+.I......| | |
185 |
|
185 | |||
186 | $ echo "http://localhost:$HGPORT1/full.hg" > server/.hg/clonebundles.manifest |
|
186 | $ echo "http://localhost:$HGPORT1/full.hg" > server/.hg/clonebundles.manifest | |
187 | $ hg clone -U http://localhost:$HGPORT full-bundle |
|
187 | $ hg clone -U http://localhost:$HGPORT full-bundle | |
188 | applying clone bundle from http://localhost:$HGPORT1/full.hg |
|
188 | applying clone bundle from http://localhost:$HGPORT1/full.hg | |
189 | adding changesets |
|
189 | adding changesets | |
190 | adding manifests |
|
190 | adding manifests | |
191 | adding file changes |
|
191 | adding file changes | |
192 | added 2 changesets with 2 changes to 2 files |
|
192 | added 2 changesets with 2 changes to 2 files | |
193 | finished applying clone bundle |
|
193 | finished applying clone bundle | |
194 | searching for changes |
|
194 | searching for changes | |
195 | no changes found |
|
195 | no changes found | |
196 |
|
196 | |||
197 | Feature works over SSH |
|
197 | Feature works over SSH | |
198 |
|
198 | |||
199 | $ hg clone -U -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/server ssh-full-clone |
|
199 | $ hg clone -U -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/server ssh-full-clone | |
200 | applying clone bundle from http://localhost:$HGPORT1/full.hg |
|
200 | applying clone bundle from http://localhost:$HGPORT1/full.hg | |
201 | adding changesets |
|
201 | adding changesets | |
202 | adding manifests |
|
202 | adding manifests | |
203 | adding file changes |
|
203 | adding file changes | |
204 | added 2 changesets with 2 changes to 2 files |
|
204 | added 2 changesets with 2 changes to 2 files | |
205 | finished applying clone bundle |
|
205 | finished applying clone bundle | |
206 | searching for changes |
|
206 | searching for changes | |
207 | no changes found |
|
207 | no changes found | |
208 |
|
208 | |||
209 | Entry with unknown BUNDLESPEC is filtered and not used |
|
209 | Entry with unknown BUNDLESPEC is filtered and not used | |
210 |
|
210 | |||
211 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
211 | $ cat > server/.hg/clonebundles.manifest << EOF | |
212 | > http://bad.entry1 BUNDLESPEC=UNKNOWN |
|
212 | > http://bad.entry1 BUNDLESPEC=UNKNOWN | |
213 | > http://bad.entry2 BUNDLESPEC=xz-v1 |
|
213 | > http://bad.entry2 BUNDLESPEC=xz-v1 | |
214 | > http://bad.entry3 BUNDLESPEC=none-v100 |
|
214 | > http://bad.entry3 BUNDLESPEC=none-v100 | |
215 | > http://localhost:$HGPORT1/full.hg BUNDLESPEC=gzip-v2 |
|
215 | > http://localhost:$HGPORT1/full.hg BUNDLESPEC=gzip-v2 | |
216 | > EOF |
|
216 | > EOF | |
217 |
|
217 | |||
218 | $ hg clone -U http://localhost:$HGPORT filter-unknown-type |
|
218 | $ hg clone -U http://localhost:$HGPORT filter-unknown-type | |
219 | applying clone bundle from http://localhost:$HGPORT1/full.hg |
|
219 | applying clone bundle from http://localhost:$HGPORT1/full.hg | |
220 | adding changesets |
|
220 | adding changesets | |
221 | adding manifests |
|
221 | adding manifests | |
222 | adding file changes |
|
222 | adding file changes | |
223 | added 2 changesets with 2 changes to 2 files |
|
223 | added 2 changesets with 2 changes to 2 files | |
224 | finished applying clone bundle |
|
224 | finished applying clone bundle | |
225 | searching for changes |
|
225 | searching for changes | |
226 | no changes found |
|
226 | no changes found | |
227 |
|
227 | |||
228 | Automatic fallback when all entries are filtered |
|
228 | Automatic fallback when all entries are filtered | |
229 |
|
229 | |||
230 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
230 | $ cat > server/.hg/clonebundles.manifest << EOF | |
231 | > http://bad.entry BUNDLESPEC=UNKNOWN |
|
231 | > http://bad.entry BUNDLESPEC=UNKNOWN | |
232 | > EOF |
|
232 | > EOF | |
233 |
|
233 | |||
234 | $ hg clone -U http://localhost:$HGPORT filter-all |
|
234 | $ hg clone -U http://localhost:$HGPORT filter-all | |
235 | no compatible clone bundles available on server; falling back to regular clone |
|
235 | no compatible clone bundles available on server; falling back to regular clone | |
236 | (you may want to report this to the server operator) |
|
236 | (you may want to report this to the server operator) | |
237 | requesting all changes |
|
237 | requesting all changes | |
238 | adding changesets |
|
238 | adding changesets | |
239 | adding manifests |
|
239 | adding manifests | |
240 | adding file changes |
|
240 | adding file changes | |
241 | added 2 changesets with 2 changes to 2 files |
|
241 | added 2 changesets with 2 changes to 2 files | |
242 |
|
242 | |||
243 | URLs requiring SNI are filtered in Python <2.7.9 |
|
243 | URLs requiring SNI are filtered in Python <2.7.9 | |
244 |
|
244 | |||
245 | $ cp full.hg sni.hg |
|
245 | $ cp full.hg sni.hg | |
246 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
246 | $ cat > server/.hg/clonebundles.manifest << EOF | |
247 | > http://localhost:$HGPORT1/sni.hg REQUIRESNI=true |
|
247 | > http://localhost:$HGPORT1/sni.hg REQUIRESNI=true | |
248 | > http://localhost:$HGPORT1/full.hg |
|
248 | > http://localhost:$HGPORT1/full.hg | |
249 | > EOF |
|
249 | > EOF | |
250 |
|
250 | |||
251 | #if sslcontext |
|
251 | #if sslcontext | |
252 | Python 2.7.9+ support SNI |
|
252 | Python 2.7.9+ support SNI | |
253 |
|
253 | |||
254 | $ hg clone -U http://localhost:$HGPORT sni-supported |
|
254 | $ hg clone -U http://localhost:$HGPORT sni-supported | |
255 | applying clone bundle from http://localhost:$HGPORT1/sni.hg |
|
255 | applying clone bundle from http://localhost:$HGPORT1/sni.hg | |
256 | adding changesets |
|
256 | adding changesets | |
257 | adding manifests |
|
257 | adding manifests | |
258 | adding file changes |
|
258 | adding file changes | |
259 | added 2 changesets with 2 changes to 2 files |
|
259 | added 2 changesets with 2 changes to 2 files | |
260 | finished applying clone bundle |
|
260 | finished applying clone bundle | |
261 | searching for changes |
|
261 | searching for changes | |
262 | no changes found |
|
262 | no changes found | |
263 | #else |
|
263 | #else | |
264 | Python <2.7.9 will filter SNI URLs |
|
264 | Python <2.7.9 will filter SNI URLs | |
265 |
|
265 | |||
266 | $ hg clone -U http://localhost:$HGPORT sni-unsupported |
|
266 | $ hg clone -U http://localhost:$HGPORT sni-unsupported | |
267 | applying clone bundle from http://localhost:$HGPORT1/full.hg |
|
267 | applying clone bundle from http://localhost:$HGPORT1/full.hg | |
268 | adding changesets |
|
268 | adding changesets | |
269 | adding manifests |
|
269 | adding manifests | |
270 | adding file changes |
|
270 | adding file changes | |
271 | added 2 changesets with 2 changes to 2 files |
|
271 | added 2 changesets with 2 changes to 2 files | |
272 | finished applying clone bundle |
|
272 | finished applying clone bundle | |
273 | searching for changes |
|
273 | searching for changes | |
274 | no changes found |
|
274 | no changes found | |
275 | #endif |
|
275 | #endif | |
276 |
|
276 | |||
277 | Stream clone bundles are supported |
|
277 | Stream clone bundles are supported | |
278 |
|
278 | |||
279 | $ hg -R server debugcreatestreamclonebundle packed.hg |
|
279 | $ hg -R server debugcreatestreamclonebundle packed.hg | |
280 | writing 613 bytes for 4 files |
|
280 | writing 613 bytes for 4 files | |
281 | bundle requirements: generaldelta, revlogv1 |
|
281 | bundle requirements: generaldelta, revlogv1 | |
282 |
|
282 | |||
283 | No bundle spec should work |
|
283 | No bundle spec should work | |
284 |
|
284 | |||
285 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
285 | $ cat > server/.hg/clonebundles.manifest << EOF | |
286 | > http://localhost:$HGPORT1/packed.hg |
|
286 | > http://localhost:$HGPORT1/packed.hg | |
287 | > EOF |
|
287 | > EOF | |
288 |
|
288 | |||
289 | $ hg clone -U http://localhost:$HGPORT stream-clone-no-spec |
|
289 | $ hg clone -U http://localhost:$HGPORT stream-clone-no-spec | |
290 | applying clone bundle from http://localhost:$HGPORT1/packed.hg |
|
290 | applying clone bundle from http://localhost:$HGPORT1/packed.hg | |
291 | 4 files to transfer, 613 bytes of data |
|
291 | 4 files to transfer, 613 bytes of data | |
292 | transferred 613 bytes in *.* seconds (*) (glob) |
|
292 | transferred 613 bytes in *.* seconds (*) (glob) | |
293 | finished applying clone bundle |
|
293 | finished applying clone bundle | |
294 | searching for changes |
|
294 | searching for changes | |
295 | no changes found |
|
295 | no changes found | |
296 |
|
296 | |||
297 | Bundle spec without parameters should work |
|
297 | Bundle spec without parameters should work | |
298 |
|
298 | |||
299 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
299 | $ cat > server/.hg/clonebundles.manifest << EOF | |
300 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1 |
|
300 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1 | |
301 | > EOF |
|
301 | > EOF | |
302 |
|
302 | |||
303 | $ hg clone -U http://localhost:$HGPORT stream-clone-vanilla-spec |
|
303 | $ hg clone -U http://localhost:$HGPORT stream-clone-vanilla-spec | |
304 | applying clone bundle from http://localhost:$HGPORT1/packed.hg |
|
304 | applying clone bundle from http://localhost:$HGPORT1/packed.hg | |
305 | 4 files to transfer, 613 bytes of data |
|
305 | 4 files to transfer, 613 bytes of data | |
306 | transferred 613 bytes in *.* seconds (*) (glob) |
|
306 | transferred 613 bytes in *.* seconds (*) (glob) | |
307 | finished applying clone bundle |
|
307 | finished applying clone bundle | |
308 | searching for changes |
|
308 | searching for changes | |
309 | no changes found |
|
309 | no changes found | |
310 |
|
310 | |||
311 | Bundle spec with format requirements should work |
|
311 | Bundle spec with format requirements should work | |
312 |
|
312 | |||
313 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
313 | $ cat > server/.hg/clonebundles.manifest << EOF | |
314 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1 |
|
314 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1 | |
315 | > EOF |
|
315 | > EOF | |
316 |
|
316 | |||
317 | $ hg clone -U http://localhost:$HGPORT stream-clone-supported-requirements |
|
317 | $ hg clone -U http://localhost:$HGPORT stream-clone-supported-requirements | |
318 | applying clone bundle from http://localhost:$HGPORT1/packed.hg |
|
318 | applying clone bundle from http://localhost:$HGPORT1/packed.hg | |
319 | 4 files to transfer, 613 bytes of data |
|
319 | 4 files to transfer, 613 bytes of data | |
320 | transferred 613 bytes in *.* seconds (*) (glob) |
|
320 | transferred 613 bytes in *.* seconds (*) (glob) | |
321 | finished applying clone bundle |
|
321 | finished applying clone bundle | |
322 | searching for changes |
|
322 | searching for changes | |
323 | no changes found |
|
323 | no changes found | |
324 |
|
324 | |||
325 | Stream bundle spec with unknown requirements should be filtered out |
|
325 | Stream bundle spec with unknown requirements should be filtered out | |
326 |
|
326 | |||
327 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
327 | $ cat > server/.hg/clonebundles.manifest << EOF | |
328 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42 |
|
328 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42 | |
329 | > EOF |
|
329 | > EOF | |
330 |
|
330 | |||
331 | $ hg clone -U http://localhost:$HGPORT stream-clone-unsupported-requirements |
|
331 | $ hg clone -U http://localhost:$HGPORT stream-clone-unsupported-requirements | |
332 | no compatible clone bundles available on server; falling back to regular clone |
|
332 | no compatible clone bundles available on server; falling back to regular clone | |
333 | (you may want to report this to the server operator) |
|
333 | (you may want to report this to the server operator) | |
334 | requesting all changes |
|
334 | requesting all changes | |
335 | adding changesets |
|
335 | adding changesets | |
336 | adding manifests |
|
336 | adding manifests | |
337 | adding file changes |
|
337 | adding file changes | |
338 | added 2 changesets with 2 changes to 2 files |
|
338 | added 2 changesets with 2 changes to 2 files | |
339 |
|
339 | |||
340 | Set up manifest for testing preferences |
|
340 | Set up manifest for testing preferences | |
341 | (Remember, the TYPE does not have to match reality - the URL is |
|
341 | (Remember, the TYPE does not have to match reality - the URL is | |
342 | important) |
|
342 | important) | |
343 |
|
343 | |||
344 | $ cp full.hg gz-a.hg |
|
344 | $ cp full.hg gz-a.hg | |
345 | $ cp full.hg gz-b.hg |
|
345 | $ cp full.hg gz-b.hg | |
346 | $ cp full.hg bz2-a.hg |
|
346 | $ cp full.hg bz2-a.hg | |
347 | $ cp full.hg bz2-b.hg |
|
347 | $ cp full.hg bz2-b.hg | |
348 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
348 | $ cat > server/.hg/clonebundles.manifest << EOF | |
349 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 extra=a |
|
349 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 extra=a | |
350 | > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 extra=a |
|
350 | > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 extra=a | |
351 | > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b |
|
351 | > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b | |
352 | > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b |
|
352 | > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b | |
353 | > EOF |
|
353 | > EOF | |
354 |
|
354 | |||
355 | Preferring an undefined attribute will take first entry |
|
355 | Preferring an undefined attribute will take first entry | |
356 |
|
356 | |||
357 | $ hg --config ui.clonebundleprefers=foo=bar clone -U http://localhost:$HGPORT prefer-foo |
|
357 | $ hg --config ui.clonebundleprefers=foo=bar clone -U http://localhost:$HGPORT prefer-foo | |
358 | applying clone bundle from http://localhost:$HGPORT1/gz-a.hg |
|
358 | applying clone bundle from http://localhost:$HGPORT1/gz-a.hg | |
359 | adding changesets |
|
359 | adding changesets | |
360 | adding manifests |
|
360 | adding manifests | |
361 | adding file changes |
|
361 | adding file changes | |
362 | added 2 changesets with 2 changes to 2 files |
|
362 | added 2 changesets with 2 changes to 2 files | |
363 | finished applying clone bundle |
|
363 | finished applying clone bundle | |
364 | searching for changes |
|
364 | searching for changes | |
365 | no changes found |
|
365 | no changes found | |
366 |
|
366 | |||
367 | Preferring bz2 type will download first entry of that type |
|
367 | Preferring bz2 type will download first entry of that type | |
368 |
|
368 | |||
369 | $ hg --config ui.clonebundleprefers=COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-bz |
|
369 | $ hg --config ui.clonebundleprefers=COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-bz | |
370 | applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg |
|
370 | applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg | |
371 | adding changesets |
|
371 | adding changesets | |
372 | adding manifests |
|
372 | adding manifests | |
373 | adding file changes |
|
373 | adding file changes | |
374 | added 2 changesets with 2 changes to 2 files |
|
374 | added 2 changesets with 2 changes to 2 files | |
375 | finished applying clone bundle |
|
375 | finished applying clone bundle | |
376 | searching for changes |
|
376 | searching for changes | |
377 | no changes found |
|
377 | no changes found | |
378 |
|
378 | |||
379 | Preferring multiple values of an option works |
|
379 | Preferring multiple values of an option works | |
380 |
|
380 | |||
381 | $ hg --config ui.clonebundleprefers=COMPRESSION=unknown,COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-multiple-bz |
|
381 | $ hg --config ui.clonebundleprefers=COMPRESSION=unknown,COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-multiple-bz | |
382 | applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg |
|
382 | applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg | |
383 | adding changesets |
|
383 | adding changesets | |
384 | adding manifests |
|
384 | adding manifests | |
385 | adding file changes |
|
385 | adding file changes | |
386 | added 2 changesets with 2 changes to 2 files |
|
386 | added 2 changesets with 2 changes to 2 files | |
387 | finished applying clone bundle |
|
387 | finished applying clone bundle | |
388 | searching for changes |
|
388 | searching for changes | |
389 | no changes found |
|
389 | no changes found | |
390 |
|
390 | |||
391 | Sorting multiple values should get us back to original first entry |
|
391 | Sorting multiple values should get us back to original first entry | |
392 |
|
392 | |||
393 | $ hg --config ui.clonebundleprefers=BUNDLESPEC=unknown,BUNDLESPEC=gzip-v2,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-multiple-gz |
|
393 | $ hg --config ui.clonebundleprefers=BUNDLESPEC=unknown,BUNDLESPEC=gzip-v2,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-multiple-gz | |
394 | applying clone bundle from http://localhost:$HGPORT1/gz-a.hg |
|
394 | applying clone bundle from http://localhost:$HGPORT1/gz-a.hg | |
395 | adding changesets |
|
395 | adding changesets | |
396 | adding manifests |
|
396 | adding manifests | |
397 | adding file changes |
|
397 | adding file changes | |
398 | added 2 changesets with 2 changes to 2 files |
|
398 | added 2 changesets with 2 changes to 2 files | |
399 | finished applying clone bundle |
|
399 | finished applying clone bundle | |
400 | searching for changes |
|
400 | searching for changes | |
401 | no changes found |
|
401 | no changes found | |
402 |
|
402 | |||
403 | Preferring multiple attributes has correct order |
|
403 | Preferring multiple attributes has correct order | |
404 |
|
404 | |||
405 | $ hg --config ui.clonebundleprefers=extra=b,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-separate-attributes |
|
405 | $ hg --config ui.clonebundleprefers=extra=b,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-separate-attributes | |
406 | applying clone bundle from http://localhost:$HGPORT1/bz2-b.hg |
|
406 | applying clone bundle from http://localhost:$HGPORT1/bz2-b.hg | |
407 | adding changesets |
|
407 | adding changesets | |
408 | adding manifests |
|
408 | adding manifests | |
409 | adding file changes |
|
409 | adding file changes | |
410 | added 2 changesets with 2 changes to 2 files |
|
410 | added 2 changesets with 2 changes to 2 files | |
411 | finished applying clone bundle |
|
411 | finished applying clone bundle | |
412 | searching for changes |
|
412 | searching for changes | |
413 | no changes found |
|
413 | no changes found | |
414 |
|
414 | |||
415 | Test where attribute is missing from some entries |
|
415 | Test where attribute is missing from some entries | |
416 |
|
416 | |||
417 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
417 | $ cat > server/.hg/clonebundles.manifest << EOF | |
418 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 |
|
418 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 | |
419 | > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 |
|
419 | > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 | |
420 | > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b |
|
420 | > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b | |
421 | > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b |
|
421 | > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b | |
422 | > EOF |
|
422 | > EOF | |
423 |
|
423 | |||
424 | $ hg --config ui.clonebundleprefers=extra=b clone -U http://localhost:$HGPORT prefer-partially-defined-attribute |
|
424 | $ hg --config ui.clonebundleprefers=extra=b clone -U http://localhost:$HGPORT prefer-partially-defined-attribute | |
425 | applying clone bundle from http://localhost:$HGPORT1/gz-b.hg |
|
425 | applying clone bundle from http://localhost:$HGPORT1/gz-b.hg | |
426 | adding changesets |
|
426 | adding changesets | |
427 | adding manifests |
|
427 | adding manifests | |
428 | adding file changes |
|
428 | adding file changes | |
429 | added 2 changesets with 2 changes to 2 files |
|
429 | added 2 changesets with 2 changes to 2 files | |
430 | finished applying clone bundle |
|
430 | finished applying clone bundle | |
431 | searching for changes |
|
431 | searching for changes | |
432 | no changes found |
|
432 | no changes found |
@@ -1,120 +1,120 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 >proxy.log 2>&1 </dev/null & |
|
11 | $ tinyproxy.py $HGPORT1 localhost >proxy.log 2>&1 </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 --uncompressed http://localhost:$HGPORT/ b |
|
17 | $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone --uncompressed http://localhost:$HGPORT/ b | |
18 | streaming all changes |
|
18 | streaming all changes | |
19 | 3 files to transfer, 303 bytes of data |
|
19 | 3 files to transfer, 303 bytes of data | |
20 | transferred * bytes in * seconds (*/sec) (glob) |
|
20 | transferred * bytes in * seconds (*/sec) (glob) | |
21 | searching for changes |
|
21 | searching for changes | |
22 | no changes found |
|
22 | no changes found | |
23 | updating to branch default |
|
23 | updating to branch default | |
24 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
24 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
25 | $ cd b |
|
25 | $ cd b | |
26 | $ hg verify |
|
26 | $ hg verify | |
27 | checking changesets |
|
27 | checking changesets | |
28 | checking manifests |
|
28 | checking manifests | |
29 | crosschecking files in changesets and manifests |
|
29 | crosschecking files in changesets and manifests | |
30 | checking files |
|
30 | checking files | |
31 | 1 files, 1 changesets, 1 total revisions |
|
31 | 1 files, 1 changesets, 1 total revisions | |
32 | $ cd .. |
|
32 | $ cd .. | |
33 |
|
33 | |||
34 | url for proxy, pull |
|
34 | url for proxy, pull | |
35 |
|
35 | |||
36 | $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone http://localhost:$HGPORT/ b-pull |
|
36 | $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone http://localhost:$HGPORT/ b-pull | |
37 | requesting all changes |
|
37 | requesting all changes | |
38 | adding changesets |
|
38 | adding changesets | |
39 | adding manifests |
|
39 | adding manifests | |
40 | adding file changes |
|
40 | adding file changes | |
41 | added 1 changesets with 1 changes to 1 files |
|
41 | added 1 changesets with 1 changes to 1 files | |
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 | 1 files, 1 changesets, 1 total revisions |
|
50 | 1 files, 1 changesets, 1 total revisions | |
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 | updating to branch default |
|
61 | updating to branch default | |
62 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
62 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
63 |
|
63 | |||
64 | proxy url with user name and password |
|
64 | proxy url with user name and password | |
65 |
|
65 | |||
66 | $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ d |
|
66 | $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ d | |
67 | requesting all changes |
|
67 | requesting all changes | |
68 | adding changesets |
|
68 | adding changesets | |
69 | adding manifests |
|
69 | adding manifests | |
70 | adding file changes |
|
70 | adding file changes | |
71 | added 1 changesets with 1 changes to 1 files |
|
71 | added 1 changesets with 1 changes to 1 files | |
72 | updating to branch default |
|
72 | updating to branch default | |
73 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
73 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
74 |
|
74 | |||
75 | url with user name and password |
|
75 | url with user name and password | |
76 |
|
76 | |||
77 | $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://user:passwd@localhost:$HGPORT/ e |
|
77 | $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://user:passwd@localhost:$HGPORT/ e | |
78 | requesting all changes |
|
78 | requesting all changes | |
79 | adding changesets |
|
79 | adding changesets | |
80 | adding manifests |
|
80 | adding manifests | |
81 | adding file changes |
|
81 | adding file changes | |
82 | added 1 changesets with 1 changes to 1 files |
|
82 | added 1 changesets with 1 changes to 1 files | |
83 | updating to branch default |
|
83 | updating to branch default | |
84 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
84 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
85 |
|
85 | |||
86 | bad host:port for proxy ("Protocol not supported" can happen on |
|
86 | bad host:port for proxy ("Protocol not supported" can happen on | |
87 | misconfigured hosts) |
|
87 | misconfigured hosts) | |
88 |
|
88 | |||
89 | $ http_proxy=localhost:$HGPORT2 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ f |
|
89 | $ http_proxy=localhost:$HGPORT2 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ f | |
90 | abort: error: (Connection refused|Protocol not supported|.* actively refused it) (re) |
|
90 | abort: error: (Connection refused|Protocol not supported|.* actively refused it|Cannot assign requested address) (re) | |
91 | [255] |
|
91 | [255] | |
92 |
|
92 | |||
93 | do not use the proxy if it is in the no list |
|
93 | do not use the proxy if it is in the no list | |
94 |
|
94 | |||
95 | $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.no=localhost http://localhost:$HGPORT/ g |
|
95 | $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.no=localhost http://localhost:$HGPORT/ g | |
96 | requesting all changes |
|
96 | requesting all changes | |
97 | adding changesets |
|
97 | adding changesets | |
98 | adding manifests |
|
98 | adding manifests | |
99 | adding file changes |
|
99 | adding file changes | |
100 | added 1 changesets with 1 changes to 1 files |
|
100 | added 1 changesets with 1 changes to 1 files | |
101 | updating to branch default |
|
101 | updating to branch default | |
102 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
102 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
103 | $ cat proxy.log |
|
103 | $ cat proxy.log | |
104 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) |
|
104 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) | |
105 | * - - [*] "GET http://localhost:$HGPORT/?cmd=branchmap HTTP/1.1" - - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) |
|
105 | * - - [*] "GET http://localhost:$HGPORT/?cmd=branchmap HTTP/1.1" - - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
106 | * - - [*] "GET http://localhost:$HGPORT/?cmd=stream_out HTTP/1.1" - - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) |
|
106 | * - - [*] "GET http://localhost:$HGPORT/?cmd=stream_out HTTP/1.1" - - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
107 | * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D83180e7845de420a1bb46896fd5fe05294f8d629 x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) |
|
107 | * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D83180e7845de420a1bb46896fd5fe05294f8d629 x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
108 | * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=0&common=83180e7845de420a1bb46896fd5fe05294f8d629&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=phases%2Cbookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) |
|
108 | * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=0&common=83180e7845de420a1bb46896fd5fe05294f8d629&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=phases%2Cbookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
109 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) |
|
109 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) | |
110 | * - - [*] "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=*zlib,none,bzip2 (glob) |
|
110 | * - - [*] "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=*zlib,none,bzip2 (glob) | |
111 | * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=phases%2Cbookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) |
|
111 | * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=phases%2Cbookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
112 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) |
|
112 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) | |
113 | * - - [*] "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=*zlib,none,bzip2 (glob) |
|
113 | * - - [*] "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=*zlib,none,bzip2 (glob) | |
114 | * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=phases%2Cbookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) |
|
114 | * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=phases%2Cbookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
115 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) |
|
115 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) | |
116 | * - - [*] "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=*zlib,none,bzip2 (glob) |
|
116 | * - - [*] "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=*zlib,none,bzip2 (glob) | |
117 | * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=phases%2Cbookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) |
|
117 | * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=phases%2Cbookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) | |
118 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) |
|
118 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) | |
119 | * - - [*] "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=*zlib,none,bzip2 (glob) |
|
119 | * - - [*] "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=*zlib,none,bzip2 (glob) | |
120 | * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=phases%2Cbookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) |
|
120 | * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=phases%2Cbookmarks x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob) |
General Comments 0
You need to be logged in to leave comments.
Login now