Show More
@@ -1,559 +1,560 | |||||
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 |
|
30 | |||
31 | $ cat server/access.log |
|
31 | $ cat server/access.log | |
32 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
32 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
33 | $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) |
|
33 | $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=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) |
|
34 | $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 |
|
35 | |||
36 | Empty manifest file results in retrieval |
|
36 | Empty manifest file results in retrieval | |
37 | (the extension only checks if the manifest file exists) |
|
37 | (the extension only checks if the manifest file exists) | |
38 |
|
38 | |||
39 | $ touch server/.hg/clonebundles.manifest |
|
39 | $ touch server/.hg/clonebundles.manifest | |
40 | $ hg --verbose clone -U http://localhost:$HGPORT empty-manifest |
|
40 | $ hg --verbose clone -U http://localhost:$HGPORT empty-manifest | |
41 | no clone bundles available on remote; falling back to regular clone |
|
41 | no clone bundles available on remote; falling back to regular clone | |
42 | requesting all changes |
|
42 | requesting all changes | |
43 | adding changesets |
|
43 | adding changesets | |
44 | adding manifests |
|
44 | adding manifests | |
45 | adding file changes |
|
45 | adding file changes | |
46 | added 2 changesets with 2 changes to 2 files |
|
46 | added 2 changesets with 2 changes to 2 files | |
47 | new changesets 53245c60e682:aaff8d2ffbbf |
|
47 | new changesets 53245c60e682:aaff8d2ffbbf | |
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|(\[Errno -?\d+])? No address associated with hostname) (re) (no-windows !) |
|
54 | error fetching bundle: (.* not known|(\[Errno -?\d+])? No address associated with hostname) (re) (no-windows !) | |
55 | error fetching bundle: [Errno 11004] getaddrinfo failed (windows !) |
|
55 | error fetching bundle: [Errno 11004] getaddrinfo failed (windows !) | |
56 | abort: error applying bundle |
|
56 | abort: error applying bundle | |
57 | (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false") |
|
57 | (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false") | |
58 | [255] |
|
58 | [255] | |
59 |
|
59 | |||
60 | Server is not running aborts |
|
60 | Server is not running aborts | |
61 |
|
61 | |||
62 | $ echo "http://localhost:$HGPORT1/bundle.hg" > server/.hg/clonebundles.manifest |
|
62 | $ echo "http://localhost:$HGPORT1/bundle.hg" > server/.hg/clonebundles.manifest | |
63 | $ hg clone http://localhost:$HGPORT server-not-runner |
|
63 | $ hg clone http://localhost:$HGPORT server-not-runner | |
64 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg |
|
64 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg | |
65 | error fetching bundle: (.* refused.*|Protocol not supported|(.* )?Cannot assign requested address) (re) |
|
65 | error fetching bundle: (.* refused.*|Protocol not supported|(.* )?Cannot assign requested address) (re) | |
66 | abort: error applying bundle |
|
66 | abort: error applying bundle | |
67 | (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false") |
|
67 | (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false") | |
68 | [255] |
|
68 | [255] | |
69 |
|
69 | |||
70 | Server returns 404 |
|
70 | Server returns 404 | |
71 |
|
71 | |||
72 | $ "$PYTHON" $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid |
|
72 | $ "$PYTHON" $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid | |
73 | $ cat http.pid >> $DAEMON_PIDS |
|
73 | $ cat http.pid >> $DAEMON_PIDS | |
74 | $ hg clone http://localhost:$HGPORT running-404 |
|
74 | $ hg clone http://localhost:$HGPORT running-404 | |
75 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg |
|
75 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg | |
76 | HTTP error fetching bundle: HTTP Error 404: File not found |
|
76 | HTTP error fetching bundle: HTTP Error 404: File not found | |
77 | abort: error applying bundle |
|
77 | abort: error applying bundle | |
78 | (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false") |
|
78 | (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false") | |
79 | [255] |
|
79 | [255] | |
80 |
|
80 | |||
81 | We can override failure to fall back to regular clone |
|
81 | We can override failure to fall back to regular clone | |
82 |
|
82 | |||
83 | $ hg --config ui.clonebundlefallback=true clone -U http://localhost:$HGPORT 404-fallback |
|
83 | $ hg --config ui.clonebundlefallback=true clone -U http://localhost:$HGPORT 404-fallback | |
84 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg |
|
84 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg | |
85 | HTTP error fetching bundle: HTTP Error 404: File not found |
|
85 | HTTP error fetching bundle: HTTP Error 404: File not found | |
86 | falling back to normal clone |
|
86 | falling back to normal clone | |
87 | requesting all changes |
|
87 | requesting all changes | |
88 | adding changesets |
|
88 | adding changesets | |
89 | adding manifests |
|
89 | adding manifests | |
90 | adding file changes |
|
90 | adding file changes | |
91 | added 2 changesets with 2 changes to 2 files |
|
91 | added 2 changesets with 2 changes to 2 files | |
92 | new changesets 53245c60e682:aaff8d2ffbbf |
|
92 | new changesets 53245c60e682:aaff8d2ffbbf | |
93 |
|
93 | |||
94 | Bundle with partial content works |
|
94 | Bundle with partial content works | |
95 |
|
95 | |||
96 | $ hg -R server bundle --type gzip-v1 --base null -r 53245c60e682 partial.hg |
|
96 | $ hg -R server bundle --type gzip-v1 --base null -r 53245c60e682 partial.hg | |
97 | 1 changesets found |
|
97 | 1 changesets found | |
98 |
|
98 | |||
99 | We verify exact bundle content as an extra check against accidental future |
|
99 | We verify exact bundle content as an extra check against accidental future | |
100 | changes. If this output changes, we could break old clients. |
|
100 | changes. If this output changes, we could break old clients. | |
101 |
|
101 | |||
102 | $ f --size --hexdump partial.hg |
|
102 | $ f --size --hexdump partial.hg | |
103 | partial.hg: size=207 |
|
103 | partial.hg: size=207 | |
104 | 0000: 48 47 31 30 47 5a 78 9c 63 60 60 98 17 ac 12 93 |HG10GZx.c``.....| |
|
104 | 0000: 48 47 31 30 47 5a 78 9c 63 60 60 98 17 ac 12 93 |HG10GZx.c``.....| | |
105 | 0010: f0 ac a9 23 45 70 cb bf 0d 5f 59 4e 4a 7f 79 21 |...#Ep..._YNJ.y!| |
|
105 | 0010: f0 ac a9 23 45 70 cb bf 0d 5f 59 4e 4a 7f 79 21 |...#Ep..._YNJ.y!| | |
106 | 0020: 9b cc 40 24 20 a0 d7 ce 2c d1 38 25 cd 24 25 d5 |..@$ ...,.8%.$%.| |
|
106 | 0020: 9b cc 40 24 20 a0 d7 ce 2c d1 38 25 cd 24 25 d5 |..@$ ...,.8%.$%.| | |
107 | 0030: d8 c2 22 cd 38 d9 24 cd 22 d5 c8 22 cd 24 cd 32 |..".8.$."..".$.2| |
|
107 | 0030: d8 c2 22 cd 38 d9 24 cd 22 d5 c8 22 cd 24 cd 32 |..".8.$."..".$.2| | |
108 | 0040: d1 c2 d0 c4 c8 d2 32 d1 38 39 29 c9 34 cd d4 80 |......2.89).4...| |
|
108 | 0040: d1 c2 d0 c4 c8 d2 32 d1 38 39 29 c9 34 cd d4 80 |......2.89).4...| | |
109 | 0050: ab 24 b5 b8 84 cb 40 c1 80 2b 2d 3f 9f 8b 2b 31 |.$....@..+-?..+1| |
|
109 | 0050: ab 24 b5 b8 84 cb 40 c1 80 2b 2d 3f 9f 8b 2b 31 |.$....@..+-?..+1| | |
110 | 0060: 25 45 01 c8 80 9a d2 9b 65 fb e5 9e 45 bf 8d 7f |%E......e...E...| |
|
110 | 0060: 25 45 01 c8 80 9a d2 9b 65 fb e5 9e 45 bf 8d 7f |%E......e...E...| | |
111 | 0070: 9f c6 97 9f 2b 44 34 67 d9 ec 8e 0f a0 92 0b 75 |....+D4g.......u| |
|
111 | 0070: 9f c6 97 9f 2b 44 34 67 d9 ec 8e 0f a0 92 0b 75 |....+D4g.......u| | |
112 | 0080: 41 d6 24 59 18 a4 a4 9a a6 18 1a 5b 98 9b 5a 98 |A.$Y.......[..Z.| |
|
112 | 0080: 41 d6 24 59 18 a4 a4 9a a6 18 1a 5b 98 9b 5a 98 |A.$Y.......[..Z.| | |
113 | 0090: 9a 18 26 9b a6 19 98 1a 99 99 26 a6 18 9a 98 24 |..&.......&....$| |
|
113 | 0090: 9a 18 26 9b a6 19 98 1a 99 99 26 a6 18 9a 98 24 |..&.......&....$| | |
114 | 00a0: 26 59 a6 25 5a 98 a5 18 a6 24 71 41 35 b1 43 dc |&Y.%Z....$qA5.C.| |
|
114 | 00a0: 26 59 a6 25 5a 98 a5 18 a6 24 71 41 35 b1 43 dc |&Y.%Z....$qA5.C.| | |
115 | 00b0: 16 b2 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 d7 8a |.....E..V....R..| |
|
115 | 00b0: 16 b2 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 d7 8a |.....E..V....R..| | |
116 | 00c0: 78 ed fc d5 76 f1 36 35 dc 05 00 36 ed 5e c7 |x...v.65...6.^.| |
|
116 | 00c0: 78 ed fc d5 76 f1 36 35 dc 05 00 36 ed 5e c7 |x...v.65...6.^.| | |
117 |
|
117 | |||
118 | $ echo "http://localhost:$HGPORT1/partial.hg" > server/.hg/clonebundles.manifest |
|
118 | $ echo "http://localhost:$HGPORT1/partial.hg" > server/.hg/clonebundles.manifest | |
119 | $ hg clone -U http://localhost:$HGPORT partial-bundle |
|
119 | $ hg clone -U http://localhost:$HGPORT partial-bundle | |
120 | applying clone bundle from http://localhost:$HGPORT1/partial.hg |
|
120 | applying clone bundle from http://localhost:$HGPORT1/partial.hg | |
121 | adding changesets |
|
121 | adding changesets | |
122 | adding manifests |
|
122 | adding manifests | |
123 | adding file changes |
|
123 | adding file changes | |
124 | added 1 changesets with 1 changes to 1 files |
|
124 | added 1 changesets with 1 changes to 1 files | |
125 | finished applying clone bundle |
|
125 | finished applying clone bundle | |
126 | searching for changes |
|
126 | searching for changes | |
127 | adding changesets |
|
127 | adding changesets | |
128 | adding manifests |
|
128 | adding manifests | |
129 | adding file changes |
|
129 | adding file changes | |
130 | added 1 changesets with 1 changes to 1 files |
|
130 | added 1 changesets with 1 changes to 1 files | |
131 | new changesets aaff8d2ffbbf |
|
131 | new changesets aaff8d2ffbbf | |
132 | 1 local changesets published |
|
132 | 1 local changesets published | |
133 |
|
133 | |||
134 | Incremental pull doesn't fetch bundle |
|
134 | Incremental pull doesn't fetch bundle | |
135 |
|
135 | |||
136 | $ hg clone -r 53245c60e682 -U http://localhost:$HGPORT partial-clone |
|
136 | $ hg clone -r 53245c60e682 -U http://localhost:$HGPORT partial-clone | |
137 | adding changesets |
|
137 | adding changesets | |
138 | adding manifests |
|
138 | adding manifests | |
139 | adding file changes |
|
139 | adding file changes | |
140 | added 1 changesets with 1 changes to 1 files |
|
140 | added 1 changesets with 1 changes to 1 files | |
141 | new changesets 53245c60e682 |
|
141 | new changesets 53245c60e682 | |
142 |
|
142 | |||
143 | $ cd partial-clone |
|
143 | $ cd partial-clone | |
144 | $ hg pull |
|
144 | $ hg pull | |
145 | pulling from http://localhost:$HGPORT/ |
|
145 | pulling from http://localhost:$HGPORT/ | |
146 | searching for changes |
|
146 | searching for changes | |
147 | adding changesets |
|
147 | adding changesets | |
148 | adding manifests |
|
148 | adding manifests | |
149 | adding file changes |
|
149 | adding file changes | |
150 | added 1 changesets with 1 changes to 1 files |
|
150 | added 1 changesets with 1 changes to 1 files | |
151 | new changesets aaff8d2ffbbf |
|
151 | new changesets aaff8d2ffbbf | |
152 | (run 'hg update' to get a working copy) |
|
152 | (run 'hg update' to get a working copy) | |
153 | $ cd .. |
|
153 | $ cd .. | |
154 |
|
154 | |||
155 | Bundle with full content works |
|
155 | Bundle with full content works | |
156 |
|
156 | |||
157 | $ hg -R server bundle --type gzip-v2 --base null -r tip full.hg |
|
157 | $ hg -R server bundle --type gzip-v2 --base null -r tip full.hg | |
158 | 2 changesets found |
|
158 | 2 changesets found | |
159 |
|
159 | |||
160 | Again, we perform an extra check against bundle content changes. If this content |
|
160 | Again, we perform an extra check against bundle content changes. If this content | |
161 | changes, clone bundles produced by new Mercurial versions may not be readable |
|
161 | changes, clone bundles produced by new Mercurial versions may not be readable | |
162 | by old clients. |
|
162 | by old clients. | |
163 |
|
163 | |||
164 | $ f --size --hexdump full.hg |
|
164 | $ f --size --hexdump full.hg | |
165 | full.hg: size=442 |
|
165 | full.hg: size=442 | |
166 | 0000: 48 47 32 30 00 00 00 0e 43 6f 6d 70 72 65 73 73 |HG20....Compress| |
|
166 | 0000: 48 47 32 30 00 00 00 0e 43 6f 6d 70 72 65 73 73 |HG20....Compress| | |
167 | 0010: 69 6f 6e 3d 47 5a 78 9c 63 60 60 d0 e4 76 f6 70 |ion=GZx.c``..v.p| |
|
167 | 0010: 69 6f 6e 3d 47 5a 78 9c 63 60 60 d0 e4 76 f6 70 |ion=GZx.c``..v.p| | |
168 | 0020: f4 73 77 75 0f f2 0f 0d 60 00 02 46 46 76 26 4e |.swu....`..FFv&N| |
|
168 | 0020: f4 73 77 75 0f f2 0f 0d 60 00 02 46 46 76 26 4e |.swu....`..FFv&N| | |
169 | 0030: c6 b2 d4 a2 e2 cc fc 3c 03 a3 bc a4 e4 8c c4 bc |.......<........| |
|
169 | 0030: c6 b2 d4 a2 e2 cc fc 3c 03 a3 bc a4 e4 8c c4 bc |.......<........| | |
170 | 0040: f4 d4 62 23 06 06 e6 19 40 f9 4d c1 2a 31 09 cf |..b#....@.M.*1..| |
|
170 | 0040: f4 d4 62 23 06 06 e6 19 40 f9 4d c1 2a 31 09 cf |..b#....@.M.*1..| | |
171 | 0050: 9a 3a 52 04 b7 fc db f0 95 e5 a4 f4 97 17 b2 c9 |.:R.............| |
|
171 | 0050: 9a 3a 52 04 b7 fc db f0 95 e5 a4 f4 97 17 b2 c9 |.:R.............| | |
172 | 0060: 0c 14 00 02 e6 d9 99 25 1a a7 a4 99 a4 a4 1a 5b |.......%.......[| |
|
172 | 0060: 0c 14 00 02 e6 d9 99 25 1a a7 a4 99 a4 a4 1a 5b |.......%.......[| | |
173 | 0070: 58 a4 19 27 9b a4 59 a4 1a 59 a4 99 a4 59 26 5a |X..'..Y..Y...Y&Z| |
|
173 | 0070: 58 a4 19 27 9b a4 59 a4 1a 59 a4 99 a4 59 26 5a |X..'..Y..Y...Y&Z| | |
174 | 0080: 18 9a 18 59 5a 26 1a 27 27 25 99 a6 99 1a 70 95 |...YZ&.''%....p.| |
|
174 | 0080: 18 9a 18 59 5a 26 1a 27 27 25 99 a6 99 1a 70 95 |...YZ&.''%....p.| | |
175 | 0090: a4 16 97 70 19 28 18 70 a5 e5 e7 73 71 25 a6 a4 |...p.(.p...sq%..| |
|
175 | 0090: a4 16 97 70 19 28 18 70 a5 e5 e7 73 71 25 a6 a4 |...p.(.p...sq%..| | |
176 | 00a0: 28 00 19 20 17 af fa df ab ff 7b 3f fb 92 dc 8b |(.. ......{?....| |
|
176 | 00a0: 28 00 19 20 17 af fa df ab ff 7b 3f fb 92 dc 8b |(.. ......{?....| | |
177 | 00b0: 1f 62 bb 9e b7 d7 d9 87 3d 5a 44 89 2f b0 99 87 |.b......=ZD./...| |
|
177 | 00b0: 1f 62 bb 9e b7 d7 d9 87 3d 5a 44 89 2f b0 99 87 |.b......=ZD./...| | |
178 | 00c0: ec e2 54 63 43 e3 b4 64 43 73 23 33 43 53 0b 63 |..TcC..dCs#3CS.c| |
|
178 | 00c0: ec e2 54 63 43 e3 b4 64 43 73 23 33 43 53 0b 63 |..TcC..dCs#3CS.c| | |
179 | 00d0: d3 14 23 03 a0 fb 2c 2c 0c d3 80 1e 30 49 49 b1 |..#...,,....0II.| |
|
179 | 00d0: d3 14 23 03 a0 fb 2c 2c 0c d3 80 1e 30 49 49 b1 |..#...,,....0II.| | |
180 | 00e0: 4c 4a 32 48 33 30 b0 34 42 b8 38 29 b1 08 e2 62 |LJ2H30.4B.8)...b| |
|
180 | 00e0: 4c 4a 32 48 33 30 b0 34 42 b8 38 29 b1 08 e2 62 |LJ2H30.4B.8)...b| | |
181 | 00f0: 20 03 6a ca c2 2c db 2f f7 2c fa 6d fc fb 34 be | .j..,./.,.m..4.| |
|
181 | 00f0: 20 03 6a ca c2 2c db 2f f7 2c fa 6d fc fb 34 be | .j..,./.,.m..4.| | |
182 | 0100: fc 5c 21 a2 39 cb 66 77 7c 00 0d c3 59 17 14 58 |.\!.9.fw|...Y..X| |
|
182 | 0100: fc 5c 21 a2 39 cb 66 77 7c 00 0d c3 59 17 14 58 |.\!.9.fw|...Y..X| | |
183 | 0110: 49 16 06 29 a9 a6 29 86 c6 16 e6 a6 16 a6 26 86 |I..)..).......&.| |
|
183 | 0110: 49 16 06 29 a9 a6 29 86 c6 16 e6 a6 16 a6 26 86 |I..)..).......&.| | |
184 | 0120: c9 a6 69 06 a6 46 66 a6 89 29 86 26 26 89 49 96 |..i..Ff..).&&.I.| |
|
184 | 0120: c9 a6 69 06 a6 46 66 a6 89 29 86 26 26 89 49 96 |..i..Ff..).&&.I.| | |
185 | 0130: 69 89 16 66 29 86 29 49 5c 20 07 3e 16 fe 23 ae |i..f).)I\ .>..#.| |
|
185 | 0130: 69 89 16 66 29 86 29 49 5c 20 07 3e 16 fe 23 ae |i..f).)I\ .>..#.| | |
186 | 0140: 26 da 1c ab 10 1f d1 f8 e3 b3 ef cd dd fc 0c 93 |&...............| |
|
186 | 0140: 26 da 1c ab 10 1f d1 f8 e3 b3 ef cd dd fc 0c 93 |&...............| | |
187 | 0150: 88 75 34 36 75 04 82 55 17 14 36 a4 38 10 04 d8 |.u46u..U..6.8...| |
|
187 | 0150: 88 75 34 36 75 04 82 55 17 14 36 a4 38 10 04 d8 |.u46u..U..6.8...| | |
188 | 0160: 21 01 9a b1 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 |!......E..V....R| |
|
188 | 0160: 21 01 9a b1 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 |!......E..V....R| | |
189 | 0170: d7 8a 78 ed fc d5 76 f1 36 25 81 89 c7 ad ec 90 |..x...v.6%......| |
|
189 | 0170: d7 8a 78 ed fc d5 76 f1 36 25 81 89 c7 ad ec 90 |..x...v.6%......| | |
190 | 0180: 54 47 75 2b 89 48 b1 b2 62 c9 89 c9 19 a9 56 45 |TGu+.H..b.....VE| |
|
190 | 0180: 54 47 75 2b 89 48 b1 b2 62 c9 89 c9 19 a9 56 45 |TGu+.H..b.....VE| | |
191 | 0190: a9 65 ba 49 45 89 79 c9 19 ba 60 01 a0 14 23 58 |.e.IE.y...`...#X| |
|
191 | 0190: a9 65 ba 49 45 89 79 c9 19 ba 60 01 a0 14 23 58 |.e.IE.y...`...#X| | |
192 | 01a0: 81 35 c8 7d 40 cc 04 e2 a4 a4 a6 25 96 e6 94 60 |.5.}@......%...`| |
|
192 | 01a0: 81 35 c8 7d 40 cc 04 e2 a4 a4 a6 25 96 e6 94 60 |.5.}@......%...`| | |
193 | 01b0: 33 17 5f 54 00 00 d3 1b 0d 4c |3._T.....L| |
|
193 | 01b0: 33 17 5f 54 00 00 d3 1b 0d 4c |3._T.....L| | |
194 |
|
194 | |||
195 | $ echo "http://localhost:$HGPORT1/full.hg" > server/.hg/clonebundles.manifest |
|
195 | $ echo "http://localhost:$HGPORT1/full.hg" > server/.hg/clonebundles.manifest | |
196 | $ hg clone -U http://localhost:$HGPORT full-bundle |
|
196 | $ hg clone -U http://localhost:$HGPORT full-bundle | |
197 | applying clone bundle from http://localhost:$HGPORT1/full.hg |
|
197 | applying clone bundle from http://localhost:$HGPORT1/full.hg | |
198 | adding changesets |
|
198 | adding changesets | |
199 | adding manifests |
|
199 | adding manifests | |
200 | adding file changes |
|
200 | adding file changes | |
201 | added 2 changesets with 2 changes to 2 files |
|
201 | added 2 changesets with 2 changes to 2 files | |
202 | finished applying clone bundle |
|
202 | finished applying clone bundle | |
203 | searching for changes |
|
203 | searching for changes | |
204 | no changes found |
|
204 | no changes found | |
205 | 2 local changesets published |
|
205 | 2 local changesets published | |
206 |
|
206 | |||
207 | Feature works over SSH |
|
207 | Feature works over SSH | |
208 |
|
208 | |||
209 | $ hg clone -U -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/server ssh-full-clone |
|
209 | $ hg clone -U -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/server ssh-full-clone | |
210 | applying clone bundle from http://localhost:$HGPORT1/full.hg |
|
210 | applying clone bundle from http://localhost:$HGPORT1/full.hg | |
211 | adding changesets |
|
211 | adding changesets | |
212 | adding manifests |
|
212 | adding manifests | |
213 | adding file changes |
|
213 | adding file changes | |
214 | added 2 changesets with 2 changes to 2 files |
|
214 | added 2 changesets with 2 changes to 2 files | |
215 | finished applying clone bundle |
|
215 | finished applying clone bundle | |
216 | searching for changes |
|
216 | searching for changes | |
217 | no changes found |
|
217 | no changes found | |
218 | 2 local changesets published |
|
218 | 2 local changesets published | |
219 |
|
219 | |||
220 | Entry with unknown BUNDLESPEC is filtered and not used |
|
220 | Entry with unknown BUNDLESPEC is filtered and not used | |
221 |
|
221 | |||
222 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
222 | $ cat > server/.hg/clonebundles.manifest << EOF | |
223 | > http://bad.entry1 BUNDLESPEC=UNKNOWN |
|
223 | > http://bad.entry1 BUNDLESPEC=UNKNOWN | |
224 | > http://bad.entry2 BUNDLESPEC=xz-v1 |
|
224 | > http://bad.entry2 BUNDLESPEC=xz-v1 | |
225 | > http://bad.entry3 BUNDLESPEC=none-v100 |
|
225 | > http://bad.entry3 BUNDLESPEC=none-v100 | |
226 | > http://localhost:$HGPORT1/full.hg BUNDLESPEC=gzip-v2 |
|
226 | > http://localhost:$HGPORT1/full.hg BUNDLESPEC=gzip-v2 | |
227 | > EOF |
|
227 | > EOF | |
228 |
|
228 | |||
229 | $ hg clone -U http://localhost:$HGPORT filter-unknown-type |
|
229 | $ hg clone -U http://localhost:$HGPORT filter-unknown-type | |
230 | applying clone bundle from http://localhost:$HGPORT1/full.hg |
|
230 | applying clone bundle from http://localhost:$HGPORT1/full.hg | |
231 | adding changesets |
|
231 | adding changesets | |
232 | adding manifests |
|
232 | adding manifests | |
233 | adding file changes |
|
233 | adding file changes | |
234 | added 2 changesets with 2 changes to 2 files |
|
234 | added 2 changesets with 2 changes to 2 files | |
235 | finished applying clone bundle |
|
235 | finished applying clone bundle | |
236 | searching for changes |
|
236 | searching for changes | |
237 | no changes found |
|
237 | no changes found | |
238 | 2 local changesets published |
|
238 | 2 local changesets published | |
239 |
|
239 | |||
240 | Automatic fallback when all entries are filtered |
|
240 | Automatic fallback when all entries are filtered | |
241 |
|
241 | |||
242 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
242 | $ cat > server/.hg/clonebundles.manifest << EOF | |
243 | > http://bad.entry BUNDLESPEC=UNKNOWN |
|
243 | > http://bad.entry BUNDLESPEC=UNKNOWN | |
244 | > EOF |
|
244 | > EOF | |
245 |
|
245 | |||
246 | $ hg clone -U http://localhost:$HGPORT filter-all |
|
246 | $ hg clone -U http://localhost:$HGPORT filter-all | |
247 | no compatible clone bundles available on server; falling back to regular clone |
|
247 | no compatible clone bundles available on server; falling back to regular clone | |
248 | (you may want to report this to the server operator) |
|
248 | (you may want to report this to the server operator) | |
249 | requesting all changes |
|
249 | requesting all changes | |
250 | adding changesets |
|
250 | adding changesets | |
251 | adding manifests |
|
251 | adding manifests | |
252 | adding file changes |
|
252 | adding file changes | |
253 | added 2 changesets with 2 changes to 2 files |
|
253 | added 2 changesets with 2 changes to 2 files | |
254 | new changesets 53245c60e682:aaff8d2ffbbf |
|
254 | new changesets 53245c60e682:aaff8d2ffbbf | |
255 |
|
255 | |||
256 | URLs requiring SNI are filtered in Python <2.7.9 |
|
256 | URLs requiring SNI are filtered in Python <2.7.9 | |
257 |
|
257 | |||
258 | $ cp full.hg sni.hg |
|
258 | $ cp full.hg sni.hg | |
259 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
259 | $ cat > server/.hg/clonebundles.manifest << EOF | |
260 | > http://localhost:$HGPORT1/sni.hg REQUIRESNI=true |
|
260 | > http://localhost:$HGPORT1/sni.hg REQUIRESNI=true | |
261 | > http://localhost:$HGPORT1/full.hg |
|
261 | > http://localhost:$HGPORT1/full.hg | |
262 | > EOF |
|
262 | > EOF | |
263 |
|
263 | |||
264 | #if sslcontext |
|
264 | #if sslcontext | |
265 | Python 2.7.9+ support SNI |
|
265 | Python 2.7.9+ support SNI | |
266 |
|
266 | |||
267 | $ hg clone -U http://localhost:$HGPORT sni-supported |
|
267 | $ hg clone -U http://localhost:$HGPORT sni-supported | |
268 | applying clone bundle from http://localhost:$HGPORT1/sni.hg |
|
268 | applying clone bundle from http://localhost:$HGPORT1/sni.hg | |
269 | adding changesets |
|
269 | adding changesets | |
270 | adding manifests |
|
270 | adding manifests | |
271 | adding file changes |
|
271 | adding file changes | |
272 | added 2 changesets with 2 changes to 2 files |
|
272 | added 2 changesets with 2 changes to 2 files | |
273 | finished applying clone bundle |
|
273 | finished applying clone bundle | |
274 | searching for changes |
|
274 | searching for changes | |
275 | no changes found |
|
275 | no changes found | |
276 | 2 local changesets published |
|
276 | 2 local changesets published | |
277 | #else |
|
277 | #else | |
278 | Python <2.7.9 will filter SNI URLs |
|
278 | Python <2.7.9 will filter SNI URLs | |
279 |
|
279 | |||
280 | $ hg clone -U http://localhost:$HGPORT sni-unsupported |
|
280 | $ hg clone -U http://localhost:$HGPORT sni-unsupported | |
281 | applying clone bundle from http://localhost:$HGPORT1/full.hg |
|
281 | applying clone bundle from http://localhost:$HGPORT1/full.hg | |
282 | adding changesets |
|
282 | adding changesets | |
283 | adding manifests |
|
283 | adding manifests | |
284 | adding file changes |
|
284 | adding file changes | |
285 | added 2 changesets with 2 changes to 2 files |
|
285 | added 2 changesets with 2 changes to 2 files | |
286 | finished applying clone bundle |
|
286 | finished applying clone bundle | |
287 | searching for changes |
|
287 | searching for changes | |
288 | no changes found |
|
288 | no changes found | |
|
289 | 2 local changesets published | |||
289 | #endif |
|
290 | #endif | |
290 |
|
291 | |||
291 | Stream clone bundles are supported |
|
292 | Stream clone bundles are supported | |
292 |
|
293 | |||
293 | $ hg -R server debugcreatestreamclonebundle packed.hg |
|
294 | $ hg -R server debugcreatestreamclonebundle packed.hg | |
294 | writing 613 bytes for 4 files |
|
295 | writing 613 bytes for 4 files | |
295 | bundle requirements: generaldelta, revlogv1 |
|
296 | bundle requirements: generaldelta, revlogv1 | |
296 |
|
297 | |||
297 | No bundle spec should work |
|
298 | No bundle spec should work | |
298 |
|
299 | |||
299 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
300 | $ cat > server/.hg/clonebundles.manifest << EOF | |
300 | > http://localhost:$HGPORT1/packed.hg |
|
301 | > http://localhost:$HGPORT1/packed.hg | |
301 | > EOF |
|
302 | > EOF | |
302 |
|
303 | |||
303 | $ hg clone -U http://localhost:$HGPORT stream-clone-no-spec |
|
304 | $ hg clone -U http://localhost:$HGPORT stream-clone-no-spec | |
304 | applying clone bundle from http://localhost:$HGPORT1/packed.hg |
|
305 | applying clone bundle from http://localhost:$HGPORT1/packed.hg | |
305 | 4 files to transfer, 613 bytes of data |
|
306 | 4 files to transfer, 613 bytes of data | |
306 | transferred 613 bytes in *.* seconds (*) (glob) |
|
307 | transferred 613 bytes in *.* seconds (*) (glob) | |
307 | finished applying clone bundle |
|
308 | finished applying clone bundle | |
308 | searching for changes |
|
309 | searching for changes | |
309 | no changes found |
|
310 | no changes found | |
310 |
|
311 | |||
311 | Bundle spec without parameters should work |
|
312 | Bundle spec without parameters should work | |
312 |
|
313 | |||
313 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
314 | $ cat > server/.hg/clonebundles.manifest << EOF | |
314 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1 |
|
315 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1 | |
315 | > EOF |
|
316 | > EOF | |
316 |
|
317 | |||
317 | $ hg clone -U http://localhost:$HGPORT stream-clone-vanilla-spec |
|
318 | $ hg clone -U http://localhost:$HGPORT stream-clone-vanilla-spec | |
318 | applying clone bundle from http://localhost:$HGPORT1/packed.hg |
|
319 | applying clone bundle from http://localhost:$HGPORT1/packed.hg | |
319 | 4 files to transfer, 613 bytes of data |
|
320 | 4 files to transfer, 613 bytes of data | |
320 | transferred 613 bytes in *.* seconds (*) (glob) |
|
321 | transferred 613 bytes in *.* seconds (*) (glob) | |
321 | finished applying clone bundle |
|
322 | finished applying clone bundle | |
322 | searching for changes |
|
323 | searching for changes | |
323 | no changes found |
|
324 | no changes found | |
324 |
|
325 | |||
325 | Bundle spec with format requirements should work |
|
326 | Bundle spec with format requirements should work | |
326 |
|
327 | |||
327 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
328 | $ cat > server/.hg/clonebundles.manifest << EOF | |
328 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1 |
|
329 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1 | |
329 | > EOF |
|
330 | > EOF | |
330 |
|
331 | |||
331 | $ hg clone -U http://localhost:$HGPORT stream-clone-supported-requirements |
|
332 | $ hg clone -U http://localhost:$HGPORT stream-clone-supported-requirements | |
332 | applying clone bundle from http://localhost:$HGPORT1/packed.hg |
|
333 | applying clone bundle from http://localhost:$HGPORT1/packed.hg | |
333 | 4 files to transfer, 613 bytes of data |
|
334 | 4 files to transfer, 613 bytes of data | |
334 | transferred 613 bytes in *.* seconds (*) (glob) |
|
335 | transferred 613 bytes in *.* seconds (*) (glob) | |
335 | finished applying clone bundle |
|
336 | finished applying clone bundle | |
336 | searching for changes |
|
337 | searching for changes | |
337 | no changes found |
|
338 | no changes found | |
338 |
|
339 | |||
339 | Stream bundle spec with unknown requirements should be filtered out |
|
340 | Stream bundle spec with unknown requirements should be filtered out | |
340 |
|
341 | |||
341 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
342 | $ cat > server/.hg/clonebundles.manifest << EOF | |
342 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42 |
|
343 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42 | |
343 | > EOF |
|
344 | > EOF | |
344 |
|
345 | |||
345 | $ hg clone -U http://localhost:$HGPORT stream-clone-unsupported-requirements |
|
346 | $ hg clone -U http://localhost:$HGPORT stream-clone-unsupported-requirements | |
346 | no compatible clone bundles available on server; falling back to regular clone |
|
347 | no compatible clone bundles available on server; falling back to regular clone | |
347 | (you may want to report this to the server operator) |
|
348 | (you may want to report this to the server operator) | |
348 | requesting all changes |
|
349 | requesting all changes | |
349 | adding changesets |
|
350 | adding changesets | |
350 | adding manifests |
|
351 | adding manifests | |
351 | adding file changes |
|
352 | adding file changes | |
352 | added 2 changesets with 2 changes to 2 files |
|
353 | added 2 changesets with 2 changes to 2 files | |
353 | new changesets 53245c60e682:aaff8d2ffbbf |
|
354 | new changesets 53245c60e682:aaff8d2ffbbf | |
354 |
|
355 | |||
355 | Set up manifest for testing preferences |
|
356 | Set up manifest for testing preferences | |
356 | (Remember, the TYPE does not have to match reality - the URL is |
|
357 | (Remember, the TYPE does not have to match reality - the URL is | |
357 | important) |
|
358 | important) | |
358 |
|
359 | |||
359 | $ cp full.hg gz-a.hg |
|
360 | $ cp full.hg gz-a.hg | |
360 | $ cp full.hg gz-b.hg |
|
361 | $ cp full.hg gz-b.hg | |
361 | $ cp full.hg bz2-a.hg |
|
362 | $ cp full.hg bz2-a.hg | |
362 | $ cp full.hg bz2-b.hg |
|
363 | $ cp full.hg bz2-b.hg | |
363 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
364 | $ cat > server/.hg/clonebundles.manifest << EOF | |
364 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 extra=a |
|
365 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 extra=a | |
365 | > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 extra=a |
|
366 | > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 extra=a | |
366 | > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b |
|
367 | > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b | |
367 | > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b |
|
368 | > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b | |
368 | > EOF |
|
369 | > EOF | |
369 |
|
370 | |||
370 | Preferring an undefined attribute will take first entry |
|
371 | Preferring an undefined attribute will take first entry | |
371 |
|
372 | |||
372 | $ hg --config ui.clonebundleprefers=foo=bar clone -U http://localhost:$HGPORT prefer-foo |
|
373 | $ hg --config ui.clonebundleprefers=foo=bar clone -U http://localhost:$HGPORT prefer-foo | |
373 | applying clone bundle from http://localhost:$HGPORT1/gz-a.hg |
|
374 | applying clone bundle from http://localhost:$HGPORT1/gz-a.hg | |
374 | adding changesets |
|
375 | adding changesets | |
375 | adding manifests |
|
376 | adding manifests | |
376 | adding file changes |
|
377 | adding file changes | |
377 | added 2 changesets with 2 changes to 2 files |
|
378 | added 2 changesets with 2 changes to 2 files | |
378 | finished applying clone bundle |
|
379 | finished applying clone bundle | |
379 | searching for changes |
|
380 | searching for changes | |
380 | no changes found |
|
381 | no changes found | |
381 | 2 local changesets published |
|
382 | 2 local changesets published | |
382 |
|
383 | |||
383 | Preferring bz2 type will download first entry of that type |
|
384 | Preferring bz2 type will download first entry of that type | |
384 |
|
385 | |||
385 | $ hg --config ui.clonebundleprefers=COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-bz |
|
386 | $ hg --config ui.clonebundleprefers=COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-bz | |
386 | applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg |
|
387 | applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg | |
387 | adding changesets |
|
388 | adding changesets | |
388 | adding manifests |
|
389 | adding manifests | |
389 | adding file changes |
|
390 | adding file changes | |
390 | added 2 changesets with 2 changes to 2 files |
|
391 | added 2 changesets with 2 changes to 2 files | |
391 | finished applying clone bundle |
|
392 | finished applying clone bundle | |
392 | searching for changes |
|
393 | searching for changes | |
393 | no changes found |
|
394 | no changes found | |
394 | 2 local changesets published |
|
395 | 2 local changesets published | |
395 |
|
396 | |||
396 | Preferring multiple values of an option works |
|
397 | Preferring multiple values of an option works | |
397 |
|
398 | |||
398 | $ hg --config ui.clonebundleprefers=COMPRESSION=unknown,COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-multiple-bz |
|
399 | $ hg --config ui.clonebundleprefers=COMPRESSION=unknown,COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-multiple-bz | |
399 | applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg |
|
400 | applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg | |
400 | adding changesets |
|
401 | adding changesets | |
401 | adding manifests |
|
402 | adding manifests | |
402 | adding file changes |
|
403 | adding file changes | |
403 | added 2 changesets with 2 changes to 2 files |
|
404 | added 2 changesets with 2 changes to 2 files | |
404 | finished applying clone bundle |
|
405 | finished applying clone bundle | |
405 | searching for changes |
|
406 | searching for changes | |
406 | no changes found |
|
407 | no changes found | |
407 | 2 local changesets published |
|
408 | 2 local changesets published | |
408 |
|
409 | |||
409 | Sorting multiple values should get us back to original first entry |
|
410 | Sorting multiple values should get us back to original first entry | |
410 |
|
411 | |||
411 | $ hg --config ui.clonebundleprefers=BUNDLESPEC=unknown,BUNDLESPEC=gzip-v2,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-multiple-gz |
|
412 | $ hg --config ui.clonebundleprefers=BUNDLESPEC=unknown,BUNDLESPEC=gzip-v2,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-multiple-gz | |
412 | applying clone bundle from http://localhost:$HGPORT1/gz-a.hg |
|
413 | applying clone bundle from http://localhost:$HGPORT1/gz-a.hg | |
413 | adding changesets |
|
414 | adding changesets | |
414 | adding manifests |
|
415 | adding manifests | |
415 | adding file changes |
|
416 | adding file changes | |
416 | added 2 changesets with 2 changes to 2 files |
|
417 | added 2 changesets with 2 changes to 2 files | |
417 | finished applying clone bundle |
|
418 | finished applying clone bundle | |
418 | searching for changes |
|
419 | searching for changes | |
419 | no changes found |
|
420 | no changes found | |
420 | 2 local changesets published |
|
421 | 2 local changesets published | |
421 |
|
422 | |||
422 | Preferring multiple attributes has correct order |
|
423 | Preferring multiple attributes has correct order | |
423 |
|
424 | |||
424 | $ hg --config ui.clonebundleprefers=extra=b,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-separate-attributes |
|
425 | $ hg --config ui.clonebundleprefers=extra=b,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-separate-attributes | |
425 | applying clone bundle from http://localhost:$HGPORT1/bz2-b.hg |
|
426 | applying clone bundle from http://localhost:$HGPORT1/bz2-b.hg | |
426 | adding changesets |
|
427 | adding changesets | |
427 | adding manifests |
|
428 | adding manifests | |
428 | adding file changes |
|
429 | adding file changes | |
429 | added 2 changesets with 2 changes to 2 files |
|
430 | added 2 changesets with 2 changes to 2 files | |
430 | finished applying clone bundle |
|
431 | finished applying clone bundle | |
431 | searching for changes |
|
432 | searching for changes | |
432 | no changes found |
|
433 | no changes found | |
433 | 2 local changesets published |
|
434 | 2 local changesets published | |
434 |
|
435 | |||
435 | Test where attribute is missing from some entries |
|
436 | Test where attribute is missing from some entries | |
436 |
|
437 | |||
437 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
438 | $ cat > server/.hg/clonebundles.manifest << EOF | |
438 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 |
|
439 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 | |
439 | > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 |
|
440 | > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 | |
440 | > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b |
|
441 | > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b | |
441 | > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b |
|
442 | > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b | |
442 | > EOF |
|
443 | > EOF | |
443 |
|
444 | |||
444 | $ hg --config ui.clonebundleprefers=extra=b clone -U http://localhost:$HGPORT prefer-partially-defined-attribute |
|
445 | $ hg --config ui.clonebundleprefers=extra=b clone -U http://localhost:$HGPORT prefer-partially-defined-attribute | |
445 | applying clone bundle from http://localhost:$HGPORT1/gz-b.hg |
|
446 | applying clone bundle from http://localhost:$HGPORT1/gz-b.hg | |
446 | adding changesets |
|
447 | adding changesets | |
447 | adding manifests |
|
448 | adding manifests | |
448 | adding file changes |
|
449 | adding file changes | |
449 | added 2 changesets with 2 changes to 2 files |
|
450 | added 2 changesets with 2 changes to 2 files | |
450 | finished applying clone bundle |
|
451 | finished applying clone bundle | |
451 | searching for changes |
|
452 | searching for changes | |
452 | no changes found |
|
453 | no changes found | |
453 | 2 local changesets published |
|
454 | 2 local changesets published | |
454 |
|
455 | |||
455 | Test interaction between clone bundles and --stream |
|
456 | Test interaction between clone bundles and --stream | |
456 |
|
457 | |||
457 | A manifest with just a gzip bundle |
|
458 | A manifest with just a gzip bundle | |
458 |
|
459 | |||
459 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
460 | $ cat > server/.hg/clonebundles.manifest << EOF | |
460 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 |
|
461 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 | |
461 | > EOF |
|
462 | > EOF | |
462 |
|
463 | |||
463 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip |
|
464 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip | |
464 | no compatible clone bundles available on server; falling back to regular clone |
|
465 | no compatible clone bundles available on server; falling back to regular clone | |
465 | (you may want to report this to the server operator) |
|
466 | (you may want to report this to the server operator) | |
466 | streaming all changes |
|
467 | streaming all changes | |
467 | 4 files to transfer, 613 bytes of data |
|
468 | 4 files to transfer, 613 bytes of data | |
468 | transferred 613 bytes in * seconds (*) (glob) |
|
469 | transferred 613 bytes in * seconds (*) (glob) | |
469 | searching for changes |
|
470 | searching for changes | |
470 | no changes found |
|
471 | no changes found | |
471 |
|
472 | |||
472 | A manifest with a stream clone but no BUNDLESPEC |
|
473 | A manifest with a stream clone but no BUNDLESPEC | |
473 |
|
474 | |||
474 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
475 | $ cat > server/.hg/clonebundles.manifest << EOF | |
475 | > http://localhost:$HGPORT1/packed.hg |
|
476 | > http://localhost:$HGPORT1/packed.hg | |
476 | > EOF |
|
477 | > EOF | |
477 |
|
478 | |||
478 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-no-bundlespec |
|
479 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-no-bundlespec | |
479 | 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 | |
480 | (you may want to report this to the server operator) |
|
481 | (you may want to report this to the server operator) | |
481 | streaming all changes |
|
482 | streaming all changes | |
482 | 4 files to transfer, 613 bytes of data |
|
483 | 4 files to transfer, 613 bytes of data | |
483 | transferred 613 bytes in * seconds (*) (glob) |
|
484 | transferred 613 bytes in * seconds (*) (glob) | |
484 | searching for changes |
|
485 | searching for changes | |
485 | no changes found |
|
486 | no changes found | |
486 |
|
487 | |||
487 | A manifest with a gzip bundle and a stream clone |
|
488 | A manifest with a gzip bundle and a stream clone | |
488 |
|
489 | |||
489 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
490 | $ cat > server/.hg/clonebundles.manifest << EOF | |
490 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 |
|
491 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 | |
491 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1 |
|
492 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1 | |
492 | > EOF |
|
493 | > EOF | |
493 |
|
494 | |||
494 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed |
|
495 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed | |
495 | applying clone bundle from http://localhost:$HGPORT1/packed.hg |
|
496 | applying clone bundle from http://localhost:$HGPORT1/packed.hg | |
496 | 4 files to transfer, 613 bytes of data |
|
497 | 4 files to transfer, 613 bytes of data | |
497 | transferred 613 bytes in * seconds (*) (glob) |
|
498 | transferred 613 bytes in * seconds (*) (glob) | |
498 | finished applying clone bundle |
|
499 | finished applying clone bundle | |
499 | searching for changes |
|
500 | searching for changes | |
500 | no changes found |
|
501 | no changes found | |
501 |
|
502 | |||
502 | A manifest with a gzip bundle and stream clone with supported requirements |
|
503 | A manifest with a gzip bundle and stream clone with supported requirements | |
503 |
|
504 | |||
504 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
505 | $ cat > server/.hg/clonebundles.manifest << EOF | |
505 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 |
|
506 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 | |
506 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1 |
|
507 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1 | |
507 | > EOF |
|
508 | > EOF | |
508 |
|
509 | |||
509 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed-requirements |
|
510 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed-requirements | |
510 | applying clone bundle from http://localhost:$HGPORT1/packed.hg |
|
511 | applying clone bundle from http://localhost:$HGPORT1/packed.hg | |
511 | 4 files to transfer, 613 bytes of data |
|
512 | 4 files to transfer, 613 bytes of data | |
512 | transferred 613 bytes in * seconds (*) (glob) |
|
513 | transferred 613 bytes in * seconds (*) (glob) | |
513 | finished applying clone bundle |
|
514 | finished applying clone bundle | |
514 | searching for changes |
|
515 | searching for changes | |
515 | no changes found |
|
516 | no changes found | |
516 |
|
517 | |||
517 | A manifest with a gzip bundle and a stream clone with unsupported requirements |
|
518 | A manifest with a gzip bundle and a stream clone with unsupported requirements | |
518 |
|
519 | |||
519 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
520 | $ cat > server/.hg/clonebundles.manifest << EOF | |
520 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 |
|
521 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 | |
521 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42 |
|
522 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42 | |
522 | > EOF |
|
523 | > EOF | |
523 |
|
524 | |||
524 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed-unsupported-requirements |
|
525 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed-unsupported-requirements | |
525 | no compatible clone bundles available on server; falling back to regular clone |
|
526 | no compatible clone bundles available on server; falling back to regular clone | |
526 | (you may want to report this to the server operator) |
|
527 | (you may want to report this to the server operator) | |
527 | streaming all changes |
|
528 | streaming all changes | |
528 | 4 files to transfer, 613 bytes of data |
|
529 | 4 files to transfer, 613 bytes of data | |
529 | transferred 613 bytes in * seconds (*) (glob) |
|
530 | transferred 613 bytes in * seconds (*) (glob) | |
530 | searching for changes |
|
531 | searching for changes | |
531 | no changes found |
|
532 | no changes found | |
532 |
|
533 | |||
533 | Test clone bundle retrieved through bundle2 |
|
534 | Test clone bundle retrieved through bundle2 | |
534 |
|
535 | |||
535 | $ cat << EOF >> $HGRCPATH |
|
536 | $ cat << EOF >> $HGRCPATH | |
536 | > [extensions] |
|
537 | > [extensions] | |
537 | > largefiles= |
|
538 | > largefiles= | |
538 | > EOF |
|
539 | > EOF | |
539 | $ killdaemons.py |
|
540 | $ killdaemons.py | |
540 | $ hg -R server serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log |
|
541 | $ hg -R server serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log | |
541 | $ cat hg.pid >> $DAEMON_PIDS |
|
542 | $ cat hg.pid >> $DAEMON_PIDS | |
542 |
|
543 | |||
543 | $ hg -R server debuglfput gz-a.hg |
|
544 | $ hg -R server debuglfput gz-a.hg | |
544 | 1f74b3d08286b9b3a16fb3fa185dd29219cbc6ae |
|
545 | 1f74b3d08286b9b3a16fb3fa185dd29219cbc6ae | |
545 |
|
546 | |||
546 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
547 | $ cat > server/.hg/clonebundles.manifest << EOF | |
547 | > largefile://1f74b3d08286b9b3a16fb3fa185dd29219cbc6ae BUNDLESPEC=gzip-v2 |
|
548 | > largefile://1f74b3d08286b9b3a16fb3fa185dd29219cbc6ae BUNDLESPEC=gzip-v2 | |
548 | > EOF |
|
549 | > EOF | |
549 |
|
550 | |||
550 | $ hg clone -U http://localhost:$HGPORT largefile-provided --traceback |
|
551 | $ hg clone -U http://localhost:$HGPORT largefile-provided --traceback | |
551 | applying clone bundle from largefile://1f74b3d08286b9b3a16fb3fa185dd29219cbc6ae |
|
552 | applying clone bundle from largefile://1f74b3d08286b9b3a16fb3fa185dd29219cbc6ae | |
552 | adding changesets |
|
553 | adding changesets | |
553 | adding manifests |
|
554 | adding manifests | |
554 | adding file changes |
|
555 | adding file changes | |
555 | added 2 changesets with 2 changes to 2 files |
|
556 | added 2 changesets with 2 changes to 2 files | |
556 | finished applying clone bundle |
|
557 | finished applying clone bundle | |
557 | searching for changes |
|
558 | searching for changes | |
558 | no changes found |
|
559 | no changes found | |
559 | 2 local changesets published |
|
560 | 2 local changesets published |
General Comments 0
You need to be logged in to leave comments.
Login now