##// END OF EJS Templates
test-clonebundles: simplify matching to be less flavor depends...
marmoute -
r52352:077d5a78 default
parent child Browse files
Show More
@@ -1,869 +1,855 b''
1 #require no-reposimplestore no-chg
1 #require no-reposimplestore no-chg
2
2
3 Set up a server
3 Set up a server
4
4
5 $ hg init server
5 $ hg init server
6 $ cd server
6 $ cd server
7 $ cat >> .hg/hgrc << EOF
7 $ cat >> .hg/hgrc << EOF
8 > [extensions]
8 > [extensions]
9 > clonebundles =
9 > clonebundles =
10 > EOF
10 > EOF
11
11
12 $ touch foo
12 $ touch foo
13 $ hg -q commit -A -m 'add foo'
13 $ hg -q commit -A -m 'add foo'
14 $ touch bar
14 $ touch bar
15 $ hg -q commit -A -m 'add bar'
15 $ hg -q commit -A -m 'add bar'
16
16
17 $ hg serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log
17 $ hg serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log
18 $ cat hg.pid >> $DAEMON_PIDS
18 $ cat hg.pid >> $DAEMON_PIDS
19 $ cd ..
19 $ cd ..
20
20
21 Missing manifest should not result in server lookup
21 Missing manifest should not result in server lookup
22
22
23 $ hg --verbose clone -U http://localhost:$HGPORT no-manifest
23 $ hg --verbose clone -U http://localhost:$HGPORT no-manifest
24 requesting all changes
24 requesting all changes
25 adding changesets
25 adding changesets
26 adding manifests
26 adding manifests
27 adding file changes
27 adding file changes
28 added 2 changesets with 2 changes to 2 files
28 added 2 changesets with 2 changes to 2 files
29 new changesets 53245c60e682:aaff8d2ffbbf
29 new changesets 53245c60e682:aaff8d2ffbbf
30 (sent 3 HTTP requests and * bytes; received * bytes in responses) (glob)
30 (sent 3 HTTP requests and * bytes; received * bytes in responses) (glob)
31
31
32 $ cat server/access.log
32 $ cat server/access.log
33 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
33 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
34 $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
34 $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
35 $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=aaff8d2ffbbf07a46dd1f05d8ae7877e3f56e2a2&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
35 $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=aaff8d2ffbbf07a46dd1f05d8ae7877e3f56e2a2&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
36
36
37 Empty manifest file results in retrieval
37 Empty manifest file results in retrieval
38 (the extension only checks if the manifest file exists)
38 (the extension only checks if the manifest file exists)
39
39
40 $ touch server/.hg/clonebundles.manifest
40 $ touch server/.hg/clonebundles.manifest
41 $ hg --verbose clone -U http://localhost:$HGPORT empty-manifest
41 $ hg --verbose clone -U http://localhost:$HGPORT empty-manifest
42 no clone bundles available on remote; falling back to regular clone
42 no clone bundles available on remote; falling back to regular clone
43 requesting all changes
43 requesting all changes
44 adding changesets
44 adding changesets
45 adding manifests
45 adding manifests
46 adding file changes
46 adding file changes
47 added 2 changesets with 2 changes to 2 files
47 added 2 changesets with 2 changes to 2 files
48 new changesets 53245c60e682:aaff8d2ffbbf
48 new changesets 53245c60e682:aaff8d2ffbbf
49 (sent 4 HTTP requests and * bytes; received * bytes in responses) (glob)
49 (sent 4 HTTP requests and * bytes; received * bytes in responses) (glob)
50
50
51 Manifest file with invalid URL aborts
51 Manifest file with invalid URL aborts
52
52
53 $ echo 'http://does.not.exist/bundle.hg' > server/.hg/clonebundles.manifest
53 $ echo 'http://does.not.exist/bundle.hg' > server/.hg/clonebundles.manifest
54 $ hg clone http://localhost:$HGPORT 404-url
54 $ hg clone http://localhost:$HGPORT 404-url
55 applying clone bundle from http://does.not.exist/bundle.hg
55 applying clone bundle from http://does.not.exist/bundle.hg
56 error fetching bundle: (.* not known|(\[Errno -?\d+] )?([Nn]o address associated with (host)?name|Temporary failure in name resolution|Name does not resolve)) (re) (no-windows !)
56 error fetching bundle: (.* not known|(\[Errno -?\d+] )?([Nn]o address associated with (host)?name|Temporary failure in name resolution|Name does not resolve)) (re) (no-windows !)
57 error fetching bundle: [Errno 1100*] getaddrinfo failed (glob) (windows !)
57 error fetching bundle: [Errno 1100*] getaddrinfo failed (glob) (windows !)
58 abort: error applying bundle
58 abort: error applying bundle
59 (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false")
59 (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false")
60 [255]
60 [255]
61
61
62 Manifest file with URL with unknown scheme skips the URL
62 Manifest file with URL with unknown scheme skips the URL
63 $ echo 'weirdscheme://does.not.exist/bundle.hg' > server/.hg/clonebundles.manifest
63 $ echo 'weirdscheme://does.not.exist/bundle.hg' > server/.hg/clonebundles.manifest
64 $ hg clone http://localhost:$HGPORT unknown-scheme
64 $ hg clone http://localhost:$HGPORT unknown-scheme
65 no compatible clone bundles available on server; falling back to regular clone
65 no compatible clone bundles available on server; falling back to regular clone
66 (you may want to report this to the server operator)
66 (you may want to report this to the server operator)
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 2 changesets with 2 changes to 2 files
71 added 2 changesets with 2 changes to 2 files
72 new changesets 53245c60e682:aaff8d2ffbbf
72 new changesets 53245c60e682:aaff8d2ffbbf
73 updating to branch default
73 updating to branch default
74 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
74 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
75
75
76 Server is not running aborts
76 Server is not running aborts
77
77
78 $ echo "http://localhost:$HGPORT1/bundle.hg" > server/.hg/clonebundles.manifest
78 $ echo "http://localhost:$HGPORT1/bundle.hg" > server/.hg/clonebundles.manifest
79 $ hg clone http://localhost:$HGPORT server-not-runner
79 $ hg clone http://localhost:$HGPORT server-not-runner
80 applying clone bundle from http://localhost:$HGPORT1/bundle.hg
80 applying clone bundle from http://localhost:$HGPORT1/bundle.hg
81 error fetching bundle: (.* refused.*|Protocol not supported|(.* )?\$EADDRNOTAVAIL\$|.* No route to host) (re)
81 error fetching bundle: (.* refused.*|Protocol not supported|(.* )?\$EADDRNOTAVAIL\$|.* No route to host) (re)
82 abort: error applying bundle
82 abort: error applying bundle
83 (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false")
83 (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false")
84 [255]
84 [255]
85
85
86 Server returns 404
86 Server returns 404
87
87
88 $ "$PYTHON" $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid
88 $ "$PYTHON" $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid
89 $ cat http.pid >> $DAEMON_PIDS
89 $ cat http.pid >> $DAEMON_PIDS
90 $ hg clone http://localhost:$HGPORT running-404
90 $ hg clone http://localhost:$HGPORT running-404
91 applying clone bundle from http://localhost:$HGPORT1/bundle.hg
91 applying clone bundle from http://localhost:$HGPORT1/bundle.hg
92 HTTP error fetching bundle: HTTP Error 404: File not found
92 HTTP error fetching bundle: HTTP Error 404: File not found
93 abort: error applying bundle
93 abort: error applying bundle
94 (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false")
94 (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false")
95 [255]
95 [255]
96
96
97 We can override failure to fall back to regular clone
97 We can override failure to fall back to regular clone
98
98
99 $ hg --config ui.clonebundlefallback=true clone -U http://localhost:$HGPORT 404-fallback
99 $ hg --config ui.clonebundlefallback=true clone -U http://localhost:$HGPORT 404-fallback
100 applying clone bundle from http://localhost:$HGPORT1/bundle.hg
100 applying clone bundle from http://localhost:$HGPORT1/bundle.hg
101 HTTP error fetching bundle: HTTP Error 404: File not found
101 HTTP error fetching bundle: HTTP Error 404: File not found
102 falling back to normal clone
102 falling back to normal clone
103 requesting all changes
103 requesting all changes
104 adding changesets
104 adding changesets
105 adding manifests
105 adding manifests
106 adding file changes
106 adding file changes
107 added 2 changesets with 2 changes to 2 files
107 added 2 changesets with 2 changes to 2 files
108 new changesets 53245c60e682:aaff8d2ffbbf
108 new changesets 53245c60e682:aaff8d2ffbbf
109
109
110 Bundle with partial content works
110 Bundle with partial content works
111
111
112 $ hg -R server bundle --type gzip-v1 --base null -r 53245c60e682 partial.hg
112 $ hg -R server bundle --type gzip-v1 --base null -r 53245c60e682 partial.hg
113 1 changesets found
113 1 changesets found
114
114
115 We verify exact bundle content as an extra check against accidental future
115 We verify exact bundle content as an extra check against accidental future
116 changes. If this output changes, we could break old clients.
116 changes. If this output changes, we could break old clients.
117
117
118 $ f --size --hexdump partial.hg
118 $ f --size --hexdump partial.hg
119 partial.hg: size=207
119 partial.hg: size=207
120 0000: 48 47 31 30 47 5a 78 9c 63 60 60 98 17 ac 12 93 |HG10GZx.c``.....|
120 0000: 48 47 31 30 47 5a 78 9c 63 60 60 98 17 ac 12 93 |HG10GZx.c``.....|
121 0010: f0 ac a9 23 45 70 cb bf 0d 5f 59 4e 4a 7f 79 21 |...#Ep..._YNJ.y!|
121 0010: f0 ac a9 23 45 70 cb bf 0d 5f 59 4e 4a 7f 79 21 |...#Ep..._YNJ.y!|
122 0020: 9b cc 40 24 20 a0 d7 ce 2c d1 38 25 cd 24 25 d5 |..@$ ...,.8%.$%.|
122 0020: 9b cc 40 24 20 a0 d7 ce 2c d1 38 25 cd 24 25 d5 |..@$ ...,.8%.$%.|
123 0030: d8 c2 22 cd 38 d9 24 cd 22 d5 c8 22 cd 24 cd 32 |..".8.$."..".$.2|
123 0030: d8 c2 22 cd 38 d9 24 cd 22 d5 c8 22 cd 24 cd 32 |..".8.$."..".$.2|
124 0040: d1 c2 d0 c4 c8 d2 32 d1 38 39 29 c9 34 cd d4 80 |......2.89).4...|
124 0040: d1 c2 d0 c4 c8 d2 32 d1 38 39 29 c9 34 cd d4 80 |......2.89).4...|
125 0050: ab 24 b5 b8 84 cb 40 c1 80 2b 2d 3f 9f 8b 2b 31 |.$....@..+-?..+1|
125 0050: ab 24 b5 b8 84 cb 40 c1 80 2b 2d 3f 9f 8b 2b 31 |.$....@..+-?..+1|
126 0060: 25 45 01 c8 80 9a d2 9b 65 fb e5 9e 45 bf 8d 7f |%E......e...E...|
126 0060: 25 45 01 c8 80 9a d2 9b 65 fb e5 9e 45 bf 8d 7f |%E......e...E...|
127 0070: 9f c6 97 9f 2b 44 34 67 d9 ec 8e 0f a0 92 0b 75 |....+D4g.......u|
127 0070: 9f c6 97 9f 2b 44 34 67 d9 ec 8e 0f a0 92 0b 75 |....+D4g.......u|
128 0080: 41 d6 24 59 18 a4 a4 9a a6 18 1a 5b 98 9b 5a 98 |A.$Y.......[..Z.|
128 0080: 41 d6 24 59 18 a4 a4 9a a6 18 1a 5b 98 9b 5a 98 |A.$Y.......[..Z.|
129 0090: 9a 18 26 9b a6 19 98 1a 99 99 26 a6 18 9a 98 24 |..&.......&....$|
129 0090: 9a 18 26 9b a6 19 98 1a 99 99 26 a6 18 9a 98 24 |..&.......&....$|
130 00a0: 26 59 a6 25 5a 98 a5 18 a6 24 71 41 35 b1 43 dc |&Y.%Z....$qA5.C.|
130 00a0: 26 59 a6 25 5a 98 a5 18 a6 24 71 41 35 b1 43 dc |&Y.%Z....$qA5.C.|
131 00b0: 16 b2 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 d7 8a |.....E..V....R..|
131 00b0: 16 b2 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 d7 8a |.....E..V....R..|
132 00c0: 78 ed fc d5 76 f1 36 35 dc 05 00 36 ed 5e c7 |x...v.65...6.^.|
132 00c0: 78 ed fc d5 76 f1 36 35 dc 05 00 36 ed 5e c7 |x...v.65...6.^.|
133
133
134 $ echo "http://localhost:$HGPORT1/partial.hg" > server/.hg/clonebundles.manifest
134 $ echo "http://localhost:$HGPORT1/partial.hg" > server/.hg/clonebundles.manifest
135 $ hg clone -U http://localhost:$HGPORT partial-bundle
135 $ hg clone -U http://localhost:$HGPORT partial-bundle
136 applying clone bundle from http://localhost:$HGPORT1/partial.hg
136 applying clone bundle from http://localhost:$HGPORT1/partial.hg
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 finished applying clone bundle
141 finished applying clone bundle
142 searching for changes
142 searching for changes
143 adding changesets
143 adding changesets
144 adding manifests
144 adding manifests
145 adding file changes
145 adding file changes
146 added 1 changesets with 1 changes to 1 files
146 added 1 changesets with 1 changes to 1 files
147 new changesets aaff8d2ffbbf
147 new changesets aaff8d2ffbbf
148 1 local changesets published
148 1 local changesets published
149
149
150 Incremental pull doesn't fetch bundle
150 Incremental pull doesn't fetch bundle
151
151
152 $ hg clone -r 53245c60e682 -U http://localhost:$HGPORT partial-clone
152 $ hg clone -r 53245c60e682 -U http://localhost:$HGPORT partial-clone
153 adding changesets
153 adding changesets
154 adding manifests
154 adding manifests
155 adding file changes
155 adding file changes
156 added 1 changesets with 1 changes to 1 files
156 added 1 changesets with 1 changes to 1 files
157 new changesets 53245c60e682
157 new changesets 53245c60e682
158
158
159 $ cd partial-clone
159 $ cd partial-clone
160 $ hg pull
160 $ hg pull
161 pulling from http://localhost:$HGPORT/
161 pulling from http://localhost:$HGPORT/
162 searching for changes
162 searching for changes
163 adding changesets
163 adding changesets
164 adding manifests
164 adding manifests
165 adding file changes
165 adding file changes
166 added 1 changesets with 1 changes to 1 files
166 added 1 changesets with 1 changes to 1 files
167 new changesets aaff8d2ffbbf
167 new changesets aaff8d2ffbbf
168 (run 'hg update' to get a working copy)
168 (run 'hg update' to get a working copy)
169 $ cd ..
169 $ cd ..
170
170
171 Bundle with full content works
171 Bundle with full content works
172
172
173 $ hg -R server bundle --type gzip-v2 --base null -r tip full.hg
173 $ hg -R server bundle --type gzip-v2 --base null -r tip full.hg
174 2 changesets found
174 2 changesets found
175
175
176 Again, we perform an extra check against bundle content changes. If this content
176 Again, we perform an extra check against bundle content changes. If this content
177 changes, clone bundles produced by new Mercurial versions may not be readable
177 changes, clone bundles produced by new Mercurial versions may not be readable
178 by old clients.
178 by old clients.
179
179
180 $ f --size --hexdump full.hg
180 $ f --size --hexdump full.hg
181 full.hg: size=442
181 full.hg: size=442
182 0000: 48 47 32 30 00 00 00 0e 43 6f 6d 70 72 65 73 73 |HG20....Compress|
182 0000: 48 47 32 30 00 00 00 0e 43 6f 6d 70 72 65 73 73 |HG20....Compress|
183 0010: 69 6f 6e 3d 47 5a 78 9c 63 60 60 d0 e4 76 f6 70 |ion=GZx.c``..v.p|
183 0010: 69 6f 6e 3d 47 5a 78 9c 63 60 60 d0 e4 76 f6 70 |ion=GZx.c``..v.p|
184 0020: f4 73 77 75 0f f2 0f 0d 60 00 02 46 46 76 26 4e |.swu....`..FFv&N|
184 0020: f4 73 77 75 0f f2 0f 0d 60 00 02 46 46 76 26 4e |.swu....`..FFv&N|
185 0030: c6 b2 d4 a2 e2 cc fc 3c 03 a3 bc a4 e4 8c c4 bc |.......<........|
185 0030: c6 b2 d4 a2 e2 cc fc 3c 03 a3 bc a4 e4 8c c4 bc |.......<........|
186 0040: f4 d4 62 23 06 06 e6 19 40 f9 4d c1 2a 31 09 cf |..b#....@.M.*1..|
186 0040: f4 d4 62 23 06 06 e6 19 40 f9 4d c1 2a 31 09 cf |..b#....@.M.*1..|
187 0050: 9a 3a 52 04 b7 fc db f0 95 e5 a4 f4 97 17 b2 c9 |.:R.............|
187 0050: 9a 3a 52 04 b7 fc db f0 95 e5 a4 f4 97 17 b2 c9 |.:R.............|
188 0060: 0c 14 00 02 e6 d9 99 25 1a a7 a4 99 a4 a4 1a 5b |.......%.......[|
188 0060: 0c 14 00 02 e6 d9 99 25 1a a7 a4 99 a4 a4 1a 5b |.......%.......[|
189 0070: 58 a4 19 27 9b a4 59 a4 1a 59 a4 99 a4 59 26 5a |X..'..Y..Y...Y&Z|
189 0070: 58 a4 19 27 9b a4 59 a4 1a 59 a4 99 a4 59 26 5a |X..'..Y..Y...Y&Z|
190 0080: 18 9a 18 59 5a 26 1a 27 27 25 99 a6 99 1a 70 95 |...YZ&.''%....p.|
190 0080: 18 9a 18 59 5a 26 1a 27 27 25 99 a6 99 1a 70 95 |...YZ&.''%....p.|
191 0090: a4 16 97 70 19 28 18 70 a5 e5 e7 73 71 25 a6 a4 |...p.(.p...sq%..|
191 0090: a4 16 97 70 19 28 18 70 a5 e5 e7 73 71 25 a6 a4 |...p.(.p...sq%..|
192 00a0: 28 00 19 20 17 af fa df ab ff 7b 3f fb 92 dc 8b |(.. ......{?....|
192 00a0: 28 00 19 20 17 af fa df ab ff 7b 3f fb 92 dc 8b |(.. ......{?....|
193 00b0: 1f 62 bb 9e b7 d7 d9 87 3d 5a 44 89 2f b0 99 87 |.b......=ZD./...|
193 00b0: 1f 62 bb 9e b7 d7 d9 87 3d 5a 44 89 2f b0 99 87 |.b......=ZD./...|
194 00c0: ec e2 54 63 43 e3 b4 64 43 73 23 33 43 53 0b 63 |..TcC..dCs#3CS.c|
194 00c0: ec e2 54 63 43 e3 b4 64 43 73 23 33 43 53 0b 63 |..TcC..dCs#3CS.c|
195 00d0: d3 14 23 03 a0 fb 2c 2c 0c d3 80 1e 30 49 49 b1 |..#...,,....0II.|
195 00d0: d3 14 23 03 a0 fb 2c 2c 0c d3 80 1e 30 49 49 b1 |..#...,,....0II.|
196 00e0: 4c 4a 32 48 33 30 b0 34 42 b8 38 29 b1 08 e2 62 |LJ2H30.4B.8)...b|
196 00e0: 4c 4a 32 48 33 30 b0 34 42 b8 38 29 b1 08 e2 62 |LJ2H30.4B.8)...b|
197 00f0: 20 03 6a ca c2 2c db 2f f7 2c fa 6d fc fb 34 be | .j..,./.,.m..4.|
197 00f0: 20 03 6a ca c2 2c db 2f f7 2c fa 6d fc fb 34 be | .j..,./.,.m..4.|
198 0100: fc 5c 21 a2 39 cb 66 77 7c 00 0d c3 59 17 14 58 |.\!.9.fw|...Y..X|
198 0100: fc 5c 21 a2 39 cb 66 77 7c 00 0d c3 59 17 14 58 |.\!.9.fw|...Y..X|
199 0110: 49 16 06 29 a9 a6 29 86 c6 16 e6 a6 16 a6 26 86 |I..)..).......&.|
199 0110: 49 16 06 29 a9 a6 29 86 c6 16 e6 a6 16 a6 26 86 |I..)..).......&.|
200 0120: c9 a6 69 06 a6 46 66 a6 89 29 86 26 26 89 49 96 |..i..Ff..).&&.I.|
200 0120: c9 a6 69 06 a6 46 66 a6 89 29 86 26 26 89 49 96 |..i..Ff..).&&.I.|
201 0130: 69 89 16 66 29 86 29 49 5c 20 07 3e 16 fe 23 ae |i..f).)I\ .>..#.|
201 0130: 69 89 16 66 29 86 29 49 5c 20 07 3e 16 fe 23 ae |i..f).)I\ .>..#.|
202 0140: 26 da 1c ab 10 1f d1 f8 e3 b3 ef cd dd fc 0c 93 |&...............|
202 0140: 26 da 1c ab 10 1f d1 f8 e3 b3 ef cd dd fc 0c 93 |&...............|
203 0150: 88 75 34 36 75 04 82 55 17 14 36 a4 38 10 04 d8 |.u46u..U..6.8...|
203 0150: 88 75 34 36 75 04 82 55 17 14 36 a4 38 10 04 d8 |.u46u..U..6.8...|
204 0160: 21 01 9a b1 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 |!......E..V....R|
204 0160: 21 01 9a b1 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 |!......E..V....R|
205 0170: d7 8a 78 ed fc d5 76 f1 36 25 81 89 c7 ad ec 90 |..x...v.6%......|
205 0170: d7 8a 78 ed fc d5 76 f1 36 25 81 89 c7 ad ec 90 |..x...v.6%......|
206 0180: 54 47 75 2b 89 48 b1 b2 62 c9 89 c9 19 a9 56 45 |TGu+.H..b.....VE|
206 0180: 54 47 75 2b 89 48 b1 b2 62 c9 89 c9 19 a9 56 45 |TGu+.H..b.....VE|
207 0190: a9 65 ba 49 45 89 79 c9 19 ba 60 01 a0 14 23 58 |.e.IE.y...`...#X|
207 0190: a9 65 ba 49 45 89 79 c9 19 ba 60 01 a0 14 23 58 |.e.IE.y...`...#X|
208 01a0: 81 35 c8 7d 40 cc 04 e2 a4 a4 a6 25 96 e6 94 60 |.5.}@......%...`|
208 01a0: 81 35 c8 7d 40 cc 04 e2 a4 a4 a6 25 96 e6 94 60 |.5.}@......%...`|
209 01b0: 33 17 5f 54 00 00 d3 1b 0d 4c |3._T.....L|
209 01b0: 33 17 5f 54 00 00 d3 1b 0d 4c |3._T.....L|
210
210
211 $ echo "http://localhost:$HGPORT1/full.hg" > server/.hg/clonebundles.manifest
211 $ echo "http://localhost:$HGPORT1/full.hg" > server/.hg/clonebundles.manifest
212 $ hg clone -U http://localhost:$HGPORT full-bundle
212 $ hg clone -U http://localhost:$HGPORT full-bundle
213 applying clone bundle from http://localhost:$HGPORT1/full.hg
213 applying clone bundle from http://localhost:$HGPORT1/full.hg
214 adding changesets
214 adding changesets
215 adding manifests
215 adding manifests
216 adding file changes
216 adding file changes
217 added 2 changesets with 2 changes to 2 files
217 added 2 changesets with 2 changes to 2 files
218 finished applying clone bundle
218 finished applying clone bundle
219 searching for changes
219 searching for changes
220 no changes found
220 no changes found
221 2 local changesets published
221 2 local changesets published
222
222
223 Feature works over SSH
223 Feature works over SSH
224
224
225 $ hg clone -U ssh://user@dummy/server ssh-full-clone
225 $ hg clone -U ssh://user@dummy/server ssh-full-clone
226 applying clone bundle from http://localhost:$HGPORT1/full.hg
226 applying clone bundle from http://localhost:$HGPORT1/full.hg
227 adding changesets
227 adding changesets
228 adding manifests
228 adding manifests
229 adding file changes
229 adding file changes
230 added 2 changesets with 2 changes to 2 files
230 added 2 changesets with 2 changes to 2 files
231 finished applying clone bundle
231 finished applying clone bundle
232 searching for changes
232 searching for changes
233 no changes found
233 no changes found
234 2 local changesets published
234 2 local changesets published
235
235
236 Inline bundle
236 Inline bundle
237 =============
237 =============
238
238
239 Checking bundle retrieved over the wireprotocol
239 Checking bundle retrieved over the wireprotocol
240
240
241 Feature works over SSH with inline bundle
241 Feature works over SSH with inline bundle
242 -----------------------------------------
242 -----------------------------------------
243
243
244 $ mkdir server/.hg/bundle-cache/
244 $ mkdir server/.hg/bundle-cache/
245 $ cp full.hg server/.hg/bundle-cache/
245 $ cp full.hg server/.hg/bundle-cache/
246 $ echo "peer-bundle-cache://full.hg" > server/.hg/clonebundles.manifest
246 $ echo "peer-bundle-cache://full.hg" > server/.hg/clonebundles.manifest
247 $ hg clone -U ssh://user@dummy/server ssh-inline-clone
247 $ hg clone -U ssh://user@dummy/server ssh-inline-clone
248 applying clone bundle from peer-bundle-cache://full.hg
248 applying clone bundle from peer-bundle-cache://full.hg
249 adding changesets
249 adding changesets
250 adding manifests
250 adding manifests
251 adding file changes
251 adding file changes
252 added 2 changesets with 2 changes to 2 files
252 added 2 changesets with 2 changes to 2 files
253 finished applying clone bundle
253 finished applying clone bundle
254 searching for changes
254 searching for changes
255 no changes found
255 no changes found
256 2 local changesets published
256 2 local changesets published
257
257
258 HTTP Supports
258 HTTP Supports
259 -------------
259 -------------
260
260
261 $ hg clone -U http://localhost:$HGPORT http-inline-clone
261 $ hg clone -U http://localhost:$HGPORT http-inline-clone
262 applying clone bundle from peer-bundle-cache://full.hg
262 applying clone bundle from peer-bundle-cache://full.hg
263 adding changesets
263 adding changesets
264 adding manifests
264 adding manifests
265 adding file changes
265 adding file changes
266 added 2 changesets with 2 changes to 2 files
266 added 2 changesets with 2 changes to 2 files
267 finished applying clone bundle
267 finished applying clone bundle
268 searching for changes
268 searching for changes
269 no changes found
269 no changes found
270 2 local changesets published
270 2 local changesets published
271
271
272
272
273 Check local behavior
273 Check local behavior
274 --------------------
274 --------------------
275
275
276 We don't use the clone bundle, but we do not crash either.
276 We don't use the clone bundle, but we do not crash either.
277
277
278 $ hg clone -U ./server local-inline-clone-default
278 $ hg clone -U ./server local-inline-clone-default
279 $ hg clone -U ./server local-inline-clone-pull --pull
279 $ hg clone -U ./server local-inline-clone-pull --pull
280 requesting all changes
280 requesting all changes
281 adding changesets
281 adding changesets
282 adding manifests
282 adding manifests
283 adding file changes
283 adding file changes
284 added 2 changesets with 2 changes to 2 files
284 added 2 changesets with 2 changes to 2 files
285 new changesets 53245c60e682:aaff8d2ffbbf
285 new changesets 53245c60e682:aaff8d2ffbbf
286
286
287 Pre-transmit Hook
287 Pre-transmit Hook
288 -----------------
288 -----------------
289
289
290 Hooks work with inline bundle
290 Hooks work with inline bundle
291
291
292 $ cp server/.hg/hgrc server/.hg/hgrc-beforeinlinehooks
292 $ cp server/.hg/hgrc server/.hg/hgrc-beforeinlinehooks
293 $ echo "[hooks]" >> server/.hg/hgrc
293 $ echo "[hooks]" >> server/.hg/hgrc
294 $ echo "pretransmit-inline-clone-bundle=echo foo" >> server/.hg/hgrc
294 $ echo "pretransmit-inline-clone-bundle=echo foo" >> server/.hg/hgrc
295 $ hg clone -U ssh://user@dummy/server ssh-inline-clone-hook
295 $ hg clone -U ssh://user@dummy/server ssh-inline-clone-hook
296 applying clone bundle from peer-bundle-cache://full.hg
296 applying clone bundle from peer-bundle-cache://full.hg
297 remote: foo
297 remote: foo
298 adding changesets
298 adding changesets
299 adding manifests
299 adding manifests
300 adding file changes
300 adding file changes
301 added 2 changesets with 2 changes to 2 files
301 added 2 changesets with 2 changes to 2 files
302 finished applying clone bundle
302 finished applying clone bundle
303 searching for changes
303 searching for changes
304 no changes found
304 no changes found
305 2 local changesets published
305 2 local changesets published
306
306
307 Hooks can make an inline bundle fail
307 Hooks can make an inline bundle fail
308
308
309 $ cp server/.hg/hgrc-beforeinlinehooks server/.hg/hgrc
309 $ cp server/.hg/hgrc-beforeinlinehooks server/.hg/hgrc
310 $ echo "[hooks]" >> server/.hg/hgrc
310 $ echo "[hooks]" >> server/.hg/hgrc
311 $ echo "pretransmit-inline-clone-bundle=echo bar && false" >> server/.hg/hgrc
311 $ echo "pretransmit-inline-clone-bundle=echo bar && false" >> server/.hg/hgrc
312 $ hg clone -U ssh://user@dummy/server ssh-inline-clone-hook-fail
312 $ hg clone -U ssh://user@dummy/server ssh-inline-clone-hook-fail
313 applying clone bundle from peer-bundle-cache://full.hg
313 applying clone bundle from peer-bundle-cache://full.hg
314 remote: bar
314 remote: bar
315 remote: abort: pretransmit-inline-clone-bundle hook exited with status 1
315 remote: abort: pretransmit-inline-clone-bundle hook exited with status 1
316 abort: stream ended unexpectedly (got 0 bytes, expected 1)
316 abort: stream ended unexpectedly (got 0 bytes, expected 1)
317 [255]
317 [255]
318 $ cp server/.hg/hgrc-beforeinlinehooks server/.hg/hgrc
318 $ cp server/.hg/hgrc-beforeinlinehooks server/.hg/hgrc
319
319
320 Other tests
320 Other tests
321 ===========
321 ===========
322
322
323 Entry with unknown BUNDLESPEC is filtered and not used
323 Entry with unknown BUNDLESPEC is filtered and not used
324
324
325 $ cat > server/.hg/clonebundles.manifest << EOF
325 $ cat > server/.hg/clonebundles.manifest << EOF
326 > http://bad.entry1 BUNDLESPEC=UNKNOWN
326 > http://bad.entry1 BUNDLESPEC=UNKNOWN
327 > http://bad.entry2 BUNDLESPEC=xz-v1
327 > http://bad.entry2 BUNDLESPEC=xz-v1
328 > http://bad.entry3 BUNDLESPEC=none-v100
328 > http://bad.entry3 BUNDLESPEC=none-v100
329 > http://localhost:$HGPORT1/full.hg BUNDLESPEC=gzip-v2
329 > http://localhost:$HGPORT1/full.hg BUNDLESPEC=gzip-v2
330 > EOF
330 > EOF
331
331
332 $ hg clone -U http://localhost:$HGPORT filter-unknown-type
332 $ hg clone -U http://localhost:$HGPORT filter-unknown-type
333 applying clone bundle from http://localhost:$HGPORT1/full.hg
333 applying clone bundle from http://localhost:$HGPORT1/full.hg
334 adding changesets
334 adding changesets
335 adding manifests
335 adding manifests
336 adding file changes
336 adding file changes
337 added 2 changesets with 2 changes to 2 files
337 added 2 changesets with 2 changes to 2 files
338 finished applying clone bundle
338 finished applying clone bundle
339 searching for changes
339 searching for changes
340 no changes found
340 no changes found
341 2 local changesets published
341 2 local changesets published
342
342
343 Automatic fallback when all entries are filtered
343 Automatic fallback when all entries are filtered
344
344
345 $ cat > server/.hg/clonebundles.manifest << EOF
345 $ cat > server/.hg/clonebundles.manifest << EOF
346 > http://bad.entry BUNDLESPEC=UNKNOWN
346 > http://bad.entry BUNDLESPEC=UNKNOWN
347 > EOF
347 > EOF
348
348
349 $ hg clone -U http://localhost:$HGPORT filter-all
349 $ hg clone -U http://localhost:$HGPORT filter-all
350 no compatible clone bundles available on server; falling back to regular clone
350 no compatible clone bundles available on server; falling back to regular clone
351 (you may want to report this to the server operator)
351 (you may want to report this to the server operator)
352 requesting all changes
352 requesting all changes
353 adding changesets
353 adding changesets
354 adding manifests
354 adding manifests
355 adding file changes
355 adding file changes
356 added 2 changesets with 2 changes to 2 files
356 added 2 changesets with 2 changes to 2 files
357 new changesets 53245c60e682:aaff8d2ffbbf
357 new changesets 53245c60e682:aaff8d2ffbbf
358
358
359 We require a Python version that supports SNI. Therefore, URLs requiring SNI
359 We require a Python version that supports SNI. Therefore, URLs requiring SNI
360 are not filtered.
360 are not filtered.
361
361
362 $ cp full.hg sni.hg
362 $ cp full.hg sni.hg
363 $ cat > server/.hg/clonebundles.manifest << EOF
363 $ cat > server/.hg/clonebundles.manifest << EOF
364 > http://localhost:$HGPORT1/sni.hg REQUIRESNI=true
364 > http://localhost:$HGPORT1/sni.hg REQUIRESNI=true
365 > http://localhost:$HGPORT1/full.hg
365 > http://localhost:$HGPORT1/full.hg
366 > EOF
366 > EOF
367
367
368 $ hg clone -U http://localhost:$HGPORT sni-supported
368 $ hg clone -U http://localhost:$HGPORT sni-supported
369 applying clone bundle from http://localhost:$HGPORT1/sni.hg
369 applying clone bundle from http://localhost:$HGPORT1/sni.hg
370 adding changesets
370 adding changesets
371 adding manifests
371 adding manifests
372 adding file changes
372 adding file changes
373 added 2 changesets with 2 changes to 2 files
373 added 2 changesets with 2 changes to 2 files
374 finished applying clone bundle
374 finished applying clone bundle
375 searching for changes
375 searching for changes
376 no changes found
376 no changes found
377 2 local changesets published
377 2 local changesets published
378
378
379 Stream clone bundles are supported
379 Stream clone bundles are supported
380
380
381 $ hg -R server debugcreatestreamclonebundle packed.hg
381 $ hg -R server debugcreatestreamclonebundle packed.hg
382 writing 613 bytes for 5 files (no-rust !)
382 writing 613 bytes for 5 files (no-rust !)
383 writing 739 bytes for 7 files (rust !)
383 writing 739 bytes for 7 files (rust !)
384 bundle requirements: generaldelta, revlogv1, sparserevlog (no-rust no-zstd !)
384 bundle requirements: generaldelta, revlogv1, sparserevlog (no-rust no-zstd !)
385 bundle requirements: generaldelta, revlog-compression-zstd, revlogv1, sparserevlog (no-rust zstd !)
385 bundle requirements: generaldelta, revlog-compression-zstd, revlogv1, sparserevlog (no-rust zstd !)
386 bundle requirements: generaldelta, revlog-compression-zstd, revlogv1, sparserevlog (rust !)
386 bundle requirements: generaldelta, revlog-compression-zstd, revlogv1, sparserevlog (rust !)
387
387
388 No bundle spec should work
388 No bundle spec should work
389
389
390 $ cat > server/.hg/clonebundles.manifest << EOF
390 $ cat > server/.hg/clonebundles.manifest << EOF
391 > http://localhost:$HGPORT1/packed.hg
391 > http://localhost:$HGPORT1/packed.hg
392 > EOF
392 > EOF
393
393
394 $ hg clone -U http://localhost:$HGPORT stream-clone-no-spec
394 $ hg clone -U http://localhost:$HGPORT stream-clone-no-spec
395 applying clone bundle from http://localhost:$HGPORT1/packed.hg
395 applying clone bundle from http://localhost:$HGPORT1/packed.hg
396 5 files to transfer, 613 bytes of data (no-rust !)
396 5 files to transfer, 613 bytes of data (no-rust !)
397 transferred 613 bytes in *.* seconds (*) (glob) (no-rust !)
397 transferred 613 bytes in * seconds (* */sec) (glob) (no-rust !)
398 7 files to transfer, 739 bytes of data (rust !)
398 7 files to transfer, 739 bytes of data (rust !)
399 transferred 739 bytes in *.* seconds (*) (glob) (rust !)
399 transferred 739 bytes in * seconds (* */sec) (glob) (rust !)
400 finished applying clone bundle
400 finished applying clone bundle
401 searching for changes
401 searching for changes
402 no changes found
402 no changes found
403
403
404 Bundle spec without parameters should work
404 Bundle spec without parameters should work
405
405
406 $ cat > server/.hg/clonebundles.manifest << EOF
406 $ cat > server/.hg/clonebundles.manifest << EOF
407 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1
407 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1
408 > EOF
408 > EOF
409
409
410 $ hg clone -U http://localhost:$HGPORT stream-clone-vanilla-spec
410 $ hg clone -U http://localhost:$HGPORT stream-clone-vanilla-spec
411 applying clone bundle from http://localhost:$HGPORT1/packed.hg
411 applying clone bundle from http://localhost:$HGPORT1/packed.hg
412 5 files to transfer, 613 bytes of data (no-rust !)
412 * files to transfer, * bytes of data (glob)
413 transferred 613 bytes in *.* seconds (*) (glob) (no-rust !)
413 transferred * bytes in * seconds (* */sec) (glob)
414 7 files to transfer, 739 bytes of data (rust !)
415 transferred 739 bytes in *.* seconds (*) (glob) (rust !)
416 finished applying clone bundle
414 finished applying clone bundle
417 searching for changes
415 searching for changes
418 no changes found
416 no changes found
419
417
420 Bundle spec with format requirements should work
418 Bundle spec with format requirements should work
421
419
422 $ cat > server/.hg/clonebundles.manifest << EOF
420 $ cat > server/.hg/clonebundles.manifest << EOF
423 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1
421 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1
424 > EOF
422 > EOF
425
423
426 $ hg clone -U http://localhost:$HGPORT stream-clone-supported-requirements
424 $ hg clone -U http://localhost:$HGPORT stream-clone-supported-requirements
427 applying clone bundle from http://localhost:$HGPORT1/packed.hg
425 applying clone bundle from http://localhost:$HGPORT1/packed.hg
428 5 files to transfer, 613 bytes of data (no-rust !)
426 * files to transfer, * bytes of data (glob)
429 transferred 613 bytes in *.* seconds (*) (glob) (no-rust !)
427 transferred * bytes in * seconds (* */sec) (glob)
430 7 files to transfer, 739 bytes of data (rust !)
431 transferred 739 bytes in *.* seconds (*) (glob) (rust !)
432 finished applying clone bundle
428 finished applying clone bundle
433 searching for changes
429 searching for changes
434 no changes found
430 no changes found
435
431
436 Stream bundle spec with unknown requirements should be filtered out
432 Stream bundle spec with unknown requirements should be filtered out
437
433
438 $ cat > server/.hg/clonebundles.manifest << EOF
434 $ cat > server/.hg/clonebundles.manifest << EOF
439 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42
435 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42
440 > EOF
436 > EOF
441
437
442 $ hg clone -U http://localhost:$HGPORT stream-clone-unsupported-requirements
438 $ hg clone -U http://localhost:$HGPORT stream-clone-unsupported-requirements
443 no compatible clone bundles available on server; falling back to regular clone
439 no compatible clone bundles available on server; falling back to regular clone
444 (you may want to report this to the server operator)
440 (you may want to report this to the server operator)
445 requesting all changes
441 requesting all changes
446 adding changesets
442 adding changesets
447 adding manifests
443 adding manifests
448 adding file changes
444 adding file changes
449 added 2 changesets with 2 changes to 2 files
445 added 2 changesets with 2 changes to 2 files
450 new changesets 53245c60e682:aaff8d2ffbbf
446 new changesets 53245c60e682:aaff8d2ffbbf
451
447
452 Set up manifest for testing preferences
448 Set up manifest for testing preferences
453 (Remember, the TYPE does not have to match reality - the URL is
449 (Remember, the TYPE does not have to match reality - the URL is
454 important)
450 important)
455
451
456 $ cp full.hg gz-a.hg
452 $ cp full.hg gz-a.hg
457 $ cp full.hg gz-b.hg
453 $ cp full.hg gz-b.hg
458 $ cp full.hg bz2-a.hg
454 $ cp full.hg bz2-a.hg
459 $ cp full.hg bz2-b.hg
455 $ cp full.hg bz2-b.hg
460 $ cat > server/.hg/clonebundles.manifest << EOF
456 $ cat > server/.hg/clonebundles.manifest << EOF
461 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 extra=a
457 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 extra=a
462 > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 extra=a
458 > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 extra=a
463 > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b
459 > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b
464 > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b
460 > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b
465 > EOF
461 > EOF
466
462
467 Preferring an undefined attribute will take first entry
463 Preferring an undefined attribute will take first entry
468
464
469 $ hg --config ui.clonebundleprefers=foo=bar clone -U http://localhost:$HGPORT prefer-foo
465 $ hg --config ui.clonebundleprefers=foo=bar clone -U http://localhost:$HGPORT prefer-foo
470 applying clone bundle from http://localhost:$HGPORT1/gz-a.hg
466 applying clone bundle from http://localhost:$HGPORT1/gz-a.hg
471 adding changesets
467 adding changesets
472 adding manifests
468 adding manifests
473 adding file changes
469 adding file changes
474 added 2 changesets with 2 changes to 2 files
470 added 2 changesets with 2 changes to 2 files
475 finished applying clone bundle
471 finished applying clone bundle
476 searching for changes
472 searching for changes
477 no changes found
473 no changes found
478 2 local changesets published
474 2 local changesets published
479
475
480 Preferring bz2 type will download first entry of that type
476 Preferring bz2 type will download first entry of that type
481
477
482 $ hg --config ui.clonebundleprefers=COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-bz
478 $ hg --config ui.clonebundleprefers=COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-bz
483 applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg
479 applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg
484 adding changesets
480 adding changesets
485 adding manifests
481 adding manifests
486 adding file changes
482 adding file changes
487 added 2 changesets with 2 changes to 2 files
483 added 2 changesets with 2 changes to 2 files
488 finished applying clone bundle
484 finished applying clone bundle
489 searching for changes
485 searching for changes
490 no changes found
486 no changes found
491 2 local changesets published
487 2 local changesets published
492
488
493 Preferring multiple values of an option works
489 Preferring multiple values of an option works
494
490
495 $ hg --config ui.clonebundleprefers=COMPRESSION=unknown,COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-multiple-bz
491 $ hg --config ui.clonebundleprefers=COMPRESSION=unknown,COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-multiple-bz
496 applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg
492 applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg
497 adding changesets
493 adding changesets
498 adding manifests
494 adding manifests
499 adding file changes
495 adding file changes
500 added 2 changesets with 2 changes to 2 files
496 added 2 changesets with 2 changes to 2 files
501 finished applying clone bundle
497 finished applying clone bundle
502 searching for changes
498 searching for changes
503 no changes found
499 no changes found
504 2 local changesets published
500 2 local changesets published
505
501
506 Sorting multiple values should get us back to original first entry
502 Sorting multiple values should get us back to original first entry
507
503
508 $ hg --config ui.clonebundleprefers=BUNDLESPEC=unknown,BUNDLESPEC=gzip-v2,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-multiple-gz
504 $ hg --config ui.clonebundleprefers=BUNDLESPEC=unknown,BUNDLESPEC=gzip-v2,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-multiple-gz
509 applying clone bundle from http://localhost:$HGPORT1/gz-a.hg
505 applying clone bundle from http://localhost:$HGPORT1/gz-a.hg
510 adding changesets
506 adding changesets
511 adding manifests
507 adding manifests
512 adding file changes
508 adding file changes
513 added 2 changesets with 2 changes to 2 files
509 added 2 changesets with 2 changes to 2 files
514 finished applying clone bundle
510 finished applying clone bundle
515 searching for changes
511 searching for changes
516 no changes found
512 no changes found
517 2 local changesets published
513 2 local changesets published
518
514
519 Preferring multiple attributes has correct order
515 Preferring multiple attributes has correct order
520
516
521 $ hg --config ui.clonebundleprefers=extra=b,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-separate-attributes
517 $ hg --config ui.clonebundleprefers=extra=b,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-separate-attributes
522 applying clone bundle from http://localhost:$HGPORT1/bz2-b.hg
518 applying clone bundle from http://localhost:$HGPORT1/bz2-b.hg
523 adding changesets
519 adding changesets
524 adding manifests
520 adding manifests
525 adding file changes
521 adding file changes
526 added 2 changesets with 2 changes to 2 files
522 added 2 changesets with 2 changes to 2 files
527 finished applying clone bundle
523 finished applying clone bundle
528 searching for changes
524 searching for changes
529 no changes found
525 no changes found
530 2 local changesets published
526 2 local changesets published
531
527
532 Test where attribute is missing from some entries
528 Test where attribute is missing from some entries
533
529
534 $ cat > server/.hg/clonebundles.manifest << EOF
530 $ cat > server/.hg/clonebundles.manifest << EOF
535 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2
531 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2
536 > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2
532 > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2
537 > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b
533 > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b
538 > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b
534 > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b
539 > EOF
535 > EOF
540
536
541 $ hg --config ui.clonebundleprefers=extra=b clone -U http://localhost:$HGPORT prefer-partially-defined-attribute
537 $ hg --config ui.clonebundleprefers=extra=b clone -U http://localhost:$HGPORT prefer-partially-defined-attribute
542 applying clone bundle from http://localhost:$HGPORT1/gz-b.hg
538 applying clone bundle from http://localhost:$HGPORT1/gz-b.hg
543 adding changesets
539 adding changesets
544 adding manifests
540 adding manifests
545 adding file changes
541 adding file changes
546 added 2 changesets with 2 changes to 2 files
542 added 2 changesets with 2 changes to 2 files
547 finished applying clone bundle
543 finished applying clone bundle
548 searching for changes
544 searching for changes
549 no changes found
545 no changes found
550 2 local changesets published
546 2 local changesets published
551
547
552 Test a bad attribute list
548 Test a bad attribute list
553
549
554 $ hg --config ui.clonebundleprefers=bad clone -U http://localhost:$HGPORT bad-input
550 $ hg --config ui.clonebundleprefers=bad clone -U http://localhost:$HGPORT bad-input
555 abort: invalid ui.clonebundleprefers item: bad
551 abort: invalid ui.clonebundleprefers item: bad
556 (each comma separated item should be key=value pairs)
552 (each comma separated item should be key=value pairs)
557 [255]
553 [255]
558 $ hg --config ui.clonebundleprefers=key=val,bad,key2=val2 clone \
554 $ hg --config ui.clonebundleprefers=key=val,bad,key2=val2 clone \
559 > -U http://localhost:$HGPORT bad-input
555 > -U http://localhost:$HGPORT bad-input
560 abort: invalid ui.clonebundleprefers item: bad
556 abort: invalid ui.clonebundleprefers item: bad
561 (each comma separated item should be key=value pairs)
557 (each comma separated item should be key=value pairs)
562 [255]
558 [255]
563
559
564
560
565 Test interaction between clone bundles and --stream
561 Test interaction between clone bundles and --stream
566
562
567 A manifest with just a gzip bundle
563 A manifest with just a gzip bundle
568
564
569 $ cat > server/.hg/clonebundles.manifest << EOF
565 $ cat > server/.hg/clonebundles.manifest << EOF
570 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2
566 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2
571 > EOF
567 > EOF
572
568
573 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip
569 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip
574 no compatible clone bundles available on server; falling back to regular clone
570 no compatible clone bundles available on server; falling back to regular clone
575 (you may want to report this to the server operator)
571 (you may want to report this to the server operator)
576 streaming all changes
572 streaming all changes
577 10 files to transfer, 816 bytes of data (no-rust !)
573 * files to transfer, * bytes of data (glob)
578 transferred 816 bytes in * seconds (*) (glob) (no-rust !)
574 transferred * bytes in * seconds (* */sec) (glob)
579 12 files to transfer, 942 bytes of data (rust !)
580 transferred 942 bytes in *.* seconds (*) (glob) (rust !)
581
575
582 A manifest with a stream clone but no BUNDLESPEC
576 A manifest with a stream clone but no BUNDLESPEC
583
577
584 $ cat > server/.hg/clonebundles.manifest << EOF
578 $ cat > server/.hg/clonebundles.manifest << EOF
585 > http://localhost:$HGPORT1/packed.hg
579 > http://localhost:$HGPORT1/packed.hg
586 > EOF
580 > EOF
587
581
588 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-no-bundlespec
582 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-no-bundlespec
589 no compatible clone bundles available on server; falling back to regular clone
583 no compatible clone bundles available on server; falling back to regular clone
590 (you may want to report this to the server operator)
584 (you may want to report this to the server operator)
591 streaming all changes
585 streaming all changes
592 10 files to transfer, 816 bytes of data (no-rust !)
586 * files to transfer, * bytes of data (glob)
593 transferred 816 bytes in * seconds (*) (glob) (no-rust !)
587 transferred * bytes in * seconds (* */sec) (glob)
594 12 files to transfer, 942 bytes of data (rust !)
595 transferred 942 bytes in *.* seconds (*) (glob) (rust !)
596
588
597 A manifest with a gzip bundle and a stream clone
589 A manifest with a gzip bundle and a stream clone
598
590
599 $ cat > server/.hg/clonebundles.manifest << EOF
591 $ cat > server/.hg/clonebundles.manifest << EOF
600 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2
592 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2
601 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1
593 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1
602 > EOF
594 > EOF
603
595
604 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed
596 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed
605 applying clone bundle from http://localhost:$HGPORT1/packed.hg
597 applying clone bundle from http://localhost:$HGPORT1/packed.hg
606 5 files to transfer, 613 bytes of data (no-rust !)
598 * files to transfer, * bytes of data (glob)
607 transferred 613 bytes in *.* seconds (*) (glob) (no-rust !)
599 transferred * bytes in * seconds (* */sec) (glob)
608 7 files to transfer, 739 bytes of data (rust !)
609 transferred 739 bytes in *.* seconds (*) (glob) (rust !)
610 finished applying clone bundle
600 finished applying clone bundle
611 searching for changes
601 searching for changes
612 no changes found
602 no changes found
613
603
614 A manifest with a gzip bundle and stream clone with supported requirements
604 A manifest with a gzip bundle and stream clone with supported requirements
615
605
616 $ cat > server/.hg/clonebundles.manifest << EOF
606 $ cat > server/.hg/clonebundles.manifest << EOF
617 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2
607 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2
618 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1
608 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1
619 > EOF
609 > EOF
620
610
621 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed-requirements
611 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed-requirements
622 applying clone bundle from http://localhost:$HGPORT1/packed.hg
612 applying clone bundle from http://localhost:$HGPORT1/packed.hg
623 5 files to transfer, 613 bytes of data (no-rust !)
613 * files to transfer, * bytes of data (glob)
624 transferred 613 bytes in *.* seconds (*) (glob) (no-rust !)
614 transferred * bytes in * seconds (* */sec) (glob)
625 7 files to transfer, 739 bytes of data (rust !)
626 transferred 739 bytes in *.* seconds (*) (glob) (rust !)
627 finished applying clone bundle
615 finished applying clone bundle
628 searching for changes
616 searching for changes
629 no changes found
617 no changes found
630
618
631 A manifest with a gzip bundle and a stream clone with unsupported requirements
619 A manifest with a gzip bundle and a stream clone with unsupported requirements
632
620
633 $ cat > server/.hg/clonebundles.manifest << EOF
621 $ cat > server/.hg/clonebundles.manifest << EOF
634 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2
622 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2
635 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42
623 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42
636 > EOF
624 > EOF
637
625
638 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed-unsupported-requirements
626 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed-unsupported-requirements
639 no compatible clone bundles available on server; falling back to regular clone
627 no compatible clone bundles available on server; falling back to regular clone
640 (you may want to report this to the server operator)
628 (you may want to report this to the server operator)
641 streaming all changes
629 streaming all changes
642 10 files to transfer, 816 bytes of data (no-rust !)
630 * files to transfer, * bytes of data (glob)
643 transferred 816 bytes in * seconds (*) (glob) (no-rust !)
631 transferred * bytes in * seconds (* */sec) (glob)
644 12 files to transfer, 942 bytes of data (rust !)
645 transferred 942 bytes in *.* seconds (*) (glob) (rust !)
646
632
647 Test clone bundle retrieved through bundle2
633 Test clone bundle retrieved through bundle2
648
634
649 $ cat << EOF >> $HGRCPATH
635 $ cat << EOF >> $HGRCPATH
650 > [extensions]
636 > [extensions]
651 > largefiles=
637 > largefiles=
652 > EOF
638 > EOF
653 $ killdaemons.py
639 $ killdaemons.py
654 $ hg -R server serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log
640 $ hg -R server serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log
655 $ cat hg.pid >> $DAEMON_PIDS
641 $ cat hg.pid >> $DAEMON_PIDS
656
642
657 $ hg -R server debuglfput gz-a.hg
643 $ hg -R server debuglfput gz-a.hg
658 1f74b3d08286b9b3a16fb3fa185dd29219cbc6ae
644 1f74b3d08286b9b3a16fb3fa185dd29219cbc6ae
659
645
660 $ cat > server/.hg/clonebundles.manifest << EOF
646 $ cat > server/.hg/clonebundles.manifest << EOF
661 > largefile://1f74b3d08286b9b3a16fb3fa185dd29219cbc6ae BUNDLESPEC=gzip-v2
647 > largefile://1f74b3d08286b9b3a16fb3fa185dd29219cbc6ae BUNDLESPEC=gzip-v2
662 > EOF
648 > EOF
663
649
664 $ hg clone -U http://localhost:$HGPORT largefile-provided --traceback
650 $ hg clone -U http://localhost:$HGPORT largefile-provided --traceback
665 applying clone bundle from largefile://1f74b3d08286b9b3a16fb3fa185dd29219cbc6ae
651 applying clone bundle from largefile://1f74b3d08286b9b3a16fb3fa185dd29219cbc6ae
666 adding changesets
652 adding changesets
667 adding manifests
653 adding manifests
668 adding file changes
654 adding file changes
669 added 2 changesets with 2 changes to 2 files
655 added 2 changesets with 2 changes to 2 files
670 finished applying clone bundle
656 finished applying clone bundle
671 searching for changes
657 searching for changes
672 no changes found
658 no changes found
673 2 local changesets published
659 2 local changesets published
674 $ killdaemons.py
660 $ killdaemons.py
675
661
676 A manifest with a gzip bundle requiring too much memory for a 16MB system and working
662 A manifest with a gzip bundle requiring too much memory for a 16MB system and working
677 on a 32MB system.
663 on a 32MB system.
678
664
679 $ "$PYTHON" $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid
665 $ "$PYTHON" $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid
680 $ cat http.pid >> $DAEMON_PIDS
666 $ cat http.pid >> $DAEMON_PIDS
681 $ hg -R server serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log
667 $ hg -R server serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log
682 $ cat hg.pid >> $DAEMON_PIDS
668 $ cat hg.pid >> $DAEMON_PIDS
683
669
684 $ cat > server/.hg/clonebundles.manifest << EOF
670 $ cat > server/.hg/clonebundles.manifest << EOF
685 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 REQUIREDRAM=12MB
671 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 REQUIREDRAM=12MB
686 > EOF
672 > EOF
687
673
688 $ hg clone -U --debug --config ui.available-memory=16MB http://localhost:$HGPORT gzip-too-large
674 $ hg clone -U --debug --config ui.available-memory=16MB http://localhost:$HGPORT gzip-too-large
689 using http://localhost:$HGPORT/
675 using http://localhost:$HGPORT/
690 sending capabilities command
676 sending capabilities command
691 sending clonebundles_manifest command
677 sending clonebundles_manifest command
692 filtering http://localhost:$HGPORT1/gz-a.hg as it needs more than 2/3 of system memory
678 filtering http://localhost:$HGPORT1/gz-a.hg as it needs more than 2/3 of system memory
693 no compatible clone bundles available on server; falling back to regular clone
679 no compatible clone bundles available on server; falling back to regular clone
694 (you may want to report this to the server operator)
680 (you may want to report this to the server operator)
695 query 1; heads
681 query 1; heads
696 sending batch command
682 sending batch command
697 requesting all changes
683 requesting all changes
698 sending getbundle command
684 sending getbundle command
699 bundle2-input-bundle: with-transaction
685 bundle2-input-bundle: with-transaction
700 bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported
686 bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported
701 adding changesets
687 adding changesets
702 add changeset 53245c60e682
688 add changeset 53245c60e682
703 add changeset aaff8d2ffbbf
689 add changeset aaff8d2ffbbf
704 adding manifests
690 adding manifests
705 adding file changes
691 adding file changes
706 adding bar revisions
692 adding bar revisions
707 adding foo revisions
693 adding foo revisions
708 bundle2-input-part: total payload size 936
694 bundle2-input-part: total payload size 936
709 bundle2-input-part: "listkeys" (params: 1 mandatory) supported
695 bundle2-input-part: "listkeys" (params: 1 mandatory) supported
710 bundle2-input-part: "phase-heads" supported
696 bundle2-input-part: "phase-heads" supported
711 bundle2-input-part: total payload size 24
697 bundle2-input-part: total payload size 24
712 bundle2-input-bundle: 3 parts total
698 bundle2-input-bundle: 3 parts total
713 checking for updated bookmarks
699 checking for updated bookmarks
714 updating the branch cache
700 updating the branch cache
715 added 2 changesets with 2 changes to 2 files
701 added 2 changesets with 2 changes to 2 files
716 new changesets 53245c60e682:aaff8d2ffbbf
702 new changesets 53245c60e682:aaff8d2ffbbf
717 calling hook changegroup.lfiles: hgext.largefiles.reposetup.checkrequireslfiles
703 calling hook changegroup.lfiles: hgext.largefiles.reposetup.checkrequireslfiles
718 updating the branch cache
704 updating the branch cache
719 (sent 4 HTTP requests and * bytes; received * bytes in responses) (glob)
705 (sent 4 HTTP requests and * bytes; received * bytes in responses) (glob)
720
706
721 $ hg clone -U --debug --config ui.available-memory=32MB http://localhost:$HGPORT gzip-too-large2
707 $ hg clone -U --debug --config ui.available-memory=32MB http://localhost:$HGPORT gzip-too-large2
722 using http://localhost:$HGPORT/
708 using http://localhost:$HGPORT/
723 sending capabilities command
709 sending capabilities command
724 sending clonebundles_manifest command
710 sending clonebundles_manifest command
725 applying clone bundle from http://localhost:$HGPORT1/gz-a.hg
711 applying clone bundle from http://localhost:$HGPORT1/gz-a.hg
726 bundle2-input-bundle: 1 params with-transaction
712 bundle2-input-bundle: 1 params with-transaction
727 bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported
713 bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported
728 adding changesets
714 adding changesets
729 add changeset 53245c60e682
715 add changeset 53245c60e682
730 add changeset aaff8d2ffbbf
716 add changeset aaff8d2ffbbf
731 adding manifests
717 adding manifests
732 adding file changes
718 adding file changes
733 adding bar revisions
719 adding bar revisions
734 adding foo revisions
720 adding foo revisions
735 bundle2-input-part: total payload size 920
721 bundle2-input-part: total payload size 920
736 bundle2-input-part: "cache:rev-branch-cache" (advisory) supported
722 bundle2-input-part: "cache:rev-branch-cache" (advisory) supported
737 bundle2-input-part: total payload size 59
723 bundle2-input-part: total payload size 59
738 bundle2-input-bundle: 2 parts total
724 bundle2-input-bundle: 2 parts total
739 updating the branch cache
725 updating the branch cache
740 added 2 changesets with 2 changes to 2 files
726 added 2 changesets with 2 changes to 2 files
741 finished applying clone bundle
727 finished applying clone bundle
742 query 1; heads
728 query 1; heads
743 sending batch command
729 sending batch command
744 searching for changes
730 searching for changes
745 all remote heads known locally
731 all remote heads known locally
746 no changes found
732 no changes found
747 sending getbundle command
733 sending getbundle command
748 bundle2-input-bundle: with-transaction
734 bundle2-input-bundle: with-transaction
749 bundle2-input-part: "listkeys" (params: 1 mandatory) supported
735 bundle2-input-part: "listkeys" (params: 1 mandatory) supported
750 bundle2-input-part: "phase-heads" supported
736 bundle2-input-part: "phase-heads" supported
751 bundle2-input-part: total payload size 24
737 bundle2-input-part: total payload size 24
752 bundle2-input-bundle: 2 parts total
738 bundle2-input-bundle: 2 parts total
753 checking for updated bookmarks
739 checking for updated bookmarks
754 2 local changesets published
740 2 local changesets published
755 calling hook changegroup.lfiles: hgext.largefiles.reposetup.checkrequireslfiles
741 calling hook changegroup.lfiles: hgext.largefiles.reposetup.checkrequireslfiles
756 updating the branch cache
742 updating the branch cache
757 (sent 4 HTTP requests and * bytes; received * bytes in responses) (glob)
743 (sent 4 HTTP requests and * bytes; received * bytes in responses) (glob)
758 $ killdaemons.py
744 $ killdaemons.py
759
745
760 Testing a clone bundles that involves revlog splitting (issue6811)
746 Testing a clone bundles that involves revlog splitting (issue6811)
761 ==================================================================
747 ==================================================================
762
748
763 $ cat >> $HGRCPATH << EOF
749 $ cat >> $HGRCPATH << EOF
764 > [format]
750 > [format]
765 > revlog-compression=none
751 > revlog-compression=none
766 > use-persistent-nodemap=no
752 > use-persistent-nodemap=no
767 > EOF
753 > EOF
768
754
769 $ hg init server-revlog-split/
755 $ hg init server-revlog-split/
770 $ cd server-revlog-split
756 $ cd server-revlog-split
771 $ cat >> .hg/hgrc << EOF
757 $ cat >> .hg/hgrc << EOF
772 > [extensions]
758 > [extensions]
773 > clonebundles =
759 > clonebundles =
774 > EOF
760 > EOF
775 $ echo foo > A
761 $ echo foo > A
776 $ hg add A
762 $ hg add A
777 $ hg commit -m 'initial commit'
763 $ hg commit -m 'initial commit'
778 IMPORTANT: the revlogs must not be split
764 IMPORTANT: the revlogs must not be split
779 $ ls -1 .hg/store/00manifest.*
765 $ ls -1 .hg/store/00manifest.*
780 .hg/store/00manifest.i
766 .hg/store/00manifest.i
781 $ ls -1 .hg/store/data/_a.*
767 $ ls -1 .hg/store/data/_a.*
782 .hg/store/data/_a.i
768 .hg/store/data/_a.i
783
769
784 do big enough update to split the revlogs
770 do big enough update to split the revlogs
785
771
786 $ $TESTDIR/seq.py 100000 > A
772 $ $TESTDIR/seq.py 100000 > A
787 $ mkdir foo
773 $ mkdir foo
788 $ cd foo
774 $ cd foo
789 $ touch `$TESTDIR/seq.py 10000`
775 $ touch `$TESTDIR/seq.py 10000`
790 $ cd ..
776 $ cd ..
791 $ hg add -q foo
777 $ hg add -q foo
792 $ hg commit -m 'split the manifest and one filelog'
778 $ hg commit -m 'split the manifest and one filelog'
793
779
794 IMPORTANT: now the revlogs must be split
780 IMPORTANT: now the revlogs must be split
795 $ ls -1 .hg/store/00manifest.*
781 $ ls -1 .hg/store/00manifest.*
796 .hg/store/00manifest.d
782 .hg/store/00manifest.d
797 .hg/store/00manifest.i
783 .hg/store/00manifest.i
798 $ ls -1 .hg/store/data/_a.*
784 $ ls -1 .hg/store/data/_a.*
799 .hg/store/data/_a.d
785 .hg/store/data/_a.d
800 .hg/store/data/_a.i
786 .hg/store/data/_a.i
801
787
802 Add an extra commit on top of that
788 Add an extra commit on top of that
803
789
804 $ echo foo >> A
790 $ echo foo >> A
805 $ hg commit -m 'one extra commit'
791 $ hg commit -m 'one extra commit'
806
792
807 $ cd ..
793 $ cd ..
808
794
809 Do a bundle that contains the split, but not the update
795 Do a bundle that contains the split, but not the update
810
796
811 $ hg bundle --exact --rev '::(default~1)' -R server-revlog-split/ --type gzip-v2 split-test.hg
797 $ hg bundle --exact --rev '::(default~1)' -R server-revlog-split/ --type gzip-v2 split-test.hg
812 2 changesets found
798 2 changesets found
813
799
814 $ cat > server-revlog-split/.hg/clonebundles.manifest << EOF
800 $ cat > server-revlog-split/.hg/clonebundles.manifest << EOF
815 > http://localhost:$HGPORT1/split-test.hg BUNDLESPEC=gzip-v2
801 > http://localhost:$HGPORT1/split-test.hg BUNDLESPEC=gzip-v2
816 > EOF
802 > EOF
817
803
818 start the necessary server
804 start the necessary server
819
805
820 $ "$PYTHON" $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid
806 $ "$PYTHON" $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid
821 $ cat http.pid >> $DAEMON_PIDS
807 $ cat http.pid >> $DAEMON_PIDS
822 $ hg -R server-revlog-split serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log
808 $ hg -R server-revlog-split serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log
823 $ cat hg.pid >> $DAEMON_PIDS
809 $ cat hg.pid >> $DAEMON_PIDS
824
810
825 Check that clone works fine
811 Check that clone works fine
826 ===========================
812 ===========================
827
813
828 Here, the initial clone will trigger a revlog split (which is a bit clowny it
814 Here, the initial clone will trigger a revlog split (which is a bit clowny it
829 itself, but whatever). The split revlogs will see additionnal data added to
815 itself, but whatever). The split revlogs will see additionnal data added to
830 them in the subsequent pull. This should not be a problem
816 them in the subsequent pull. This should not be a problem
831
817
832 $ hg clone http://localhost:$HGPORT revlog-split-in-the-bundle
818 $ hg clone http://localhost:$HGPORT revlog-split-in-the-bundle
833 applying clone bundle from http://localhost:$HGPORT1/split-test.hg
819 applying clone bundle from http://localhost:$HGPORT1/split-test.hg
834 adding changesets
820 adding changesets
835 adding manifests
821 adding manifests
836 adding file changes
822 adding file changes
837 added 2 changesets with 10002 changes to 10001 files
823 added 2 changesets with 10002 changes to 10001 files
838 finished applying clone bundle
824 finished applying clone bundle
839 searching for changes
825 searching for changes
840 adding changesets
826 adding changesets
841 adding manifests
827 adding manifests
842 adding file changes
828 adding file changes
843 added 1 changesets with 1 changes to 1 files
829 added 1 changesets with 1 changes to 1 files
844 new changesets e3879eaa1db7
830 new changesets e3879eaa1db7
845 2 local changesets published
831 2 local changesets published
846 updating to branch default
832 updating to branch default
847 10001 files updated, 0 files merged, 0 files removed, 0 files unresolved
833 10001 files updated, 0 files merged, 0 files removed, 0 files unresolved
848
834
849 check the results
835 check the results
850
836
851 $ cd revlog-split-in-the-bundle
837 $ cd revlog-split-in-the-bundle
852 $ f --size .hg/store/00manifest.*
838 $ f --size .hg/store/00manifest.*
853 .hg/store/00manifest.d: size=499037
839 .hg/store/00manifest.d: size=499037
854 .hg/store/00manifest.i: size=192
840 .hg/store/00manifest.i: size=192
855 $ f --size .hg/store/data/_a.*
841 $ f --size .hg/store/data/_a.*
856 .hg/store/data/_a.d: size=588917
842 .hg/store/data/_a.d: size=588917
857 .hg/store/data/_a.i: size=192
843 .hg/store/data/_a.i: size=192
858
844
859 manifest should work
845 manifest should work
860
846
861 $ hg files -r tip | wc -l
847 $ hg files -r tip | wc -l
862 \s*10001 (re)
848 \s*10001 (re)
863
849
864 file content should work
850 file content should work
865
851
866 $ hg cat -r tip A | wc -l
852 $ hg cat -r tip A | wc -l
867 \s*100001 (re)
853 \s*100001 (re)
868
854
869
855
General Comments 0
You need to be logged in to leave comments. Login now