##// END OF EJS Templates
streamclone: check the errors log in tests...
marmoute -
r47745:e3871883 default
parent child Browse files
Show More
@@ -1,636 +1,638 b''
1 #require serve no-reposimplestore no-chg
1 #require serve no-reposimplestore no-chg
2
2
3 #testcases stream-legacy stream-bundle2
3 #testcases stream-legacy stream-bundle2
4
4
5 #if stream-legacy
5 #if stream-legacy
6 $ cat << EOF >> $HGRCPATH
6 $ cat << EOF >> $HGRCPATH
7 > [server]
7 > [server]
8 > bundle2.stream = no
8 > bundle2.stream = no
9 > EOF
9 > EOF
10 #endif
10 #endif
11
11
12 Initialize repository
12 Initialize repository
13 the status call is to check for issue5130
13 the status call is to check for issue5130
14
14
15 $ hg init server
15 $ hg init server
16 $ cd server
16 $ cd server
17 $ touch foo
17 $ touch foo
18 $ hg -q commit -A -m initial
18 $ hg -q commit -A -m initial
19 >>> for i in range(1024):
19 >>> for i in range(1024):
20 ... with open(str(i), 'wb') as fh:
20 ... with open(str(i), 'wb') as fh:
21 ... fh.write(b"%d" % i) and None
21 ... fh.write(b"%d" % i) and None
22 $ hg -q commit -A -m 'add a lot of files'
22 $ hg -q commit -A -m 'add a lot of files'
23 $ hg st
23 $ hg st
24 $ hg --config server.uncompressed=false serve -p $HGPORT -d --pid-file=hg.pid
24 $ hg --config server.uncompressed=false serve -p $HGPORT -d --pid-file=hg.pid
25 $ cat hg.pid > $DAEMON_PIDS
25 $ cat hg.pid > $DAEMON_PIDS
26 $ cd ..
26 $ cd ..
27
27
28 Cannot stream clone when server.uncompressed is set
28 Cannot stream clone when server.uncompressed is set
29
29
30 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=stream_out'
30 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=stream_out'
31 200 Script output follows
31 200 Script output follows
32
32
33 1
33 1
34
34
35 #if stream-legacy
35 #if stream-legacy
36 $ hg debugcapabilities http://localhost:$HGPORT
36 $ hg debugcapabilities http://localhost:$HGPORT
37 Main capabilities:
37 Main capabilities:
38 batch
38 batch
39 branchmap
39 branchmap
40 $USUAL_BUNDLE2_CAPS_SERVER$
40 $USUAL_BUNDLE2_CAPS_SERVER$
41 changegroupsubset
41 changegroupsubset
42 compression=$BUNDLE2_COMPRESSIONS$
42 compression=$BUNDLE2_COMPRESSIONS$
43 getbundle
43 getbundle
44 httpheader=1024
44 httpheader=1024
45 httpmediatype=0.1rx,0.1tx,0.2tx
45 httpmediatype=0.1rx,0.1tx,0.2tx
46 known
46 known
47 lookup
47 lookup
48 pushkey
48 pushkey
49 unbundle=HG10GZ,HG10BZ,HG10UN
49 unbundle=HG10GZ,HG10BZ,HG10UN
50 unbundlehash
50 unbundlehash
51 Bundle2 capabilities:
51 Bundle2 capabilities:
52 HG20
52 HG20
53 bookmarks
53 bookmarks
54 changegroup
54 changegroup
55 01
55 01
56 02
56 02
57 checkheads
57 checkheads
58 related
58 related
59 digests
59 digests
60 md5
60 md5
61 sha1
61 sha1
62 sha512
62 sha512
63 error
63 error
64 abort
64 abort
65 unsupportedcontent
65 unsupportedcontent
66 pushraced
66 pushraced
67 pushkey
67 pushkey
68 hgtagsfnodes
68 hgtagsfnodes
69 listkeys
69 listkeys
70 phases
70 phases
71 heads
71 heads
72 pushkey
72 pushkey
73 remote-changegroup
73 remote-changegroup
74 http
74 http
75 https
75 https
76
76
77 $ hg clone --stream -U http://localhost:$HGPORT server-disabled
77 $ hg clone --stream -U http://localhost:$HGPORT server-disabled
78 warning: stream clone requested but server has them disabled
78 warning: stream clone requested but server has them disabled
79 requesting all changes
79 requesting all changes
80 adding changesets
80 adding changesets
81 adding manifests
81 adding manifests
82 adding file changes
82 adding file changes
83 added 2 changesets with 1025 changes to 1025 files
83 added 2 changesets with 1025 changes to 1025 files
84 new changesets 96ee1d7354c4:c17445101a72
84 new changesets 96ee1d7354c4:c17445101a72
85
85
86 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=getbundle' content-type --bodyfile body --hgproto 0.2 --requestheader "x-hgarg-1=bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=0&common=0000000000000000000000000000000000000000&heads=c17445101a72edac06facd130d14808dfbd5c7c2&stream=1"
86 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=getbundle' content-type --bodyfile body --hgproto 0.2 --requestheader "x-hgarg-1=bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=0&common=0000000000000000000000000000000000000000&heads=c17445101a72edac06facd130d14808dfbd5c7c2&stream=1"
87 200 Script output follows
87 200 Script output follows
88 content-type: application/mercurial-0.2
88 content-type: application/mercurial-0.2
89
89
90
90
91 $ f --size body --hexdump --bytes 100
91 $ f --size body --hexdump --bytes 100
92 body: size=232
92 body: size=232
93 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
93 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
94 0010: cf 0b 45 52 52 4f 52 3a 41 42 4f 52 54 00 00 00 |..ERROR:ABORT...|
94 0010: cf 0b 45 52 52 4f 52 3a 41 42 4f 52 54 00 00 00 |..ERROR:ABORT...|
95 0020: 00 01 01 07 3c 04 72 6d 65 73 73 61 67 65 73 74 |....<.rmessagest|
95 0020: 00 01 01 07 3c 04 72 6d 65 73 73 61 67 65 73 74 |....<.rmessagest|
96 0030: 72 65 61 6d 20 64 61 74 61 20 72 65 71 75 65 73 |ream data reques|
96 0030: 72 65 61 6d 20 64 61 74 61 20 72 65 71 75 65 73 |ream data reques|
97 0040: 74 65 64 20 62 75 74 20 73 65 72 76 65 72 20 64 |ted but server d|
97 0040: 74 65 64 20 62 75 74 20 73 65 72 76 65 72 20 64 |ted but server d|
98 0050: 6f 65 73 20 6e 6f 74 20 61 6c 6c 6f 77 20 74 68 |oes not allow th|
98 0050: 6f 65 73 20 6e 6f 74 20 61 6c 6c 6f 77 20 74 68 |oes not allow th|
99 0060: 69 73 20 66 |is f|
99 0060: 69 73 20 66 |is f|
100
100
101 #endif
101 #endif
102 #if stream-bundle2
102 #if stream-bundle2
103 $ hg debugcapabilities http://localhost:$HGPORT
103 $ hg debugcapabilities http://localhost:$HGPORT
104 Main capabilities:
104 Main capabilities:
105 batch
105 batch
106 branchmap
106 branchmap
107 $USUAL_BUNDLE2_CAPS_SERVER$
107 $USUAL_BUNDLE2_CAPS_SERVER$
108 changegroupsubset
108 changegroupsubset
109 compression=$BUNDLE2_COMPRESSIONS$
109 compression=$BUNDLE2_COMPRESSIONS$
110 getbundle
110 getbundle
111 httpheader=1024
111 httpheader=1024
112 httpmediatype=0.1rx,0.1tx,0.2tx
112 httpmediatype=0.1rx,0.1tx,0.2tx
113 known
113 known
114 lookup
114 lookup
115 pushkey
115 pushkey
116 unbundle=HG10GZ,HG10BZ,HG10UN
116 unbundle=HG10GZ,HG10BZ,HG10UN
117 unbundlehash
117 unbundlehash
118 Bundle2 capabilities:
118 Bundle2 capabilities:
119 HG20
119 HG20
120 bookmarks
120 bookmarks
121 changegroup
121 changegroup
122 01
122 01
123 02
123 02
124 checkheads
124 checkheads
125 related
125 related
126 digests
126 digests
127 md5
127 md5
128 sha1
128 sha1
129 sha512
129 sha512
130 error
130 error
131 abort
131 abort
132 unsupportedcontent
132 unsupportedcontent
133 pushraced
133 pushraced
134 pushkey
134 pushkey
135 hgtagsfnodes
135 hgtagsfnodes
136 listkeys
136 listkeys
137 phases
137 phases
138 heads
138 heads
139 pushkey
139 pushkey
140 remote-changegroup
140 remote-changegroup
141 http
141 http
142 https
142 https
143
143
144 $ hg clone --stream -U http://localhost:$HGPORT server-disabled
144 $ hg clone --stream -U http://localhost:$HGPORT server-disabled
145 warning: stream clone requested but server has them disabled
145 warning: stream clone requested but server has them disabled
146 requesting all changes
146 requesting all changes
147 adding changesets
147 adding changesets
148 adding manifests
148 adding manifests
149 adding file changes
149 adding file changes
150 added 2 changesets with 1025 changes to 1025 files
150 added 2 changesets with 1025 changes to 1025 files
151 new changesets 96ee1d7354c4:c17445101a72
151 new changesets 96ee1d7354c4:c17445101a72
152
152
153 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=getbundle' content-type --bodyfile body --hgproto 0.2 --requestheader "x-hgarg-1=bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=0&common=0000000000000000000000000000000000000000&heads=c17445101a72edac06facd130d14808dfbd5c7c2&stream=1"
153 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=getbundle' content-type --bodyfile body --hgproto 0.2 --requestheader "x-hgarg-1=bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=0&common=0000000000000000000000000000000000000000&heads=c17445101a72edac06facd130d14808dfbd5c7c2&stream=1"
154 200 Script output follows
154 200 Script output follows
155 content-type: application/mercurial-0.2
155 content-type: application/mercurial-0.2
156
156
157
157
158 $ f --size body --hexdump --bytes 100
158 $ f --size body --hexdump --bytes 100
159 body: size=232
159 body: size=232
160 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
160 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
161 0010: cf 0b 45 52 52 4f 52 3a 41 42 4f 52 54 00 00 00 |..ERROR:ABORT...|
161 0010: cf 0b 45 52 52 4f 52 3a 41 42 4f 52 54 00 00 00 |..ERROR:ABORT...|
162 0020: 00 01 01 07 3c 04 72 6d 65 73 73 61 67 65 73 74 |....<.rmessagest|
162 0020: 00 01 01 07 3c 04 72 6d 65 73 73 61 67 65 73 74 |....<.rmessagest|
163 0030: 72 65 61 6d 20 64 61 74 61 20 72 65 71 75 65 73 |ream data reques|
163 0030: 72 65 61 6d 20 64 61 74 61 20 72 65 71 75 65 73 |ream data reques|
164 0040: 74 65 64 20 62 75 74 20 73 65 72 76 65 72 20 64 |ted but server d|
164 0040: 74 65 64 20 62 75 74 20 73 65 72 76 65 72 20 64 |ted but server d|
165 0050: 6f 65 73 20 6e 6f 74 20 61 6c 6c 6f 77 20 74 68 |oes not allow th|
165 0050: 6f 65 73 20 6e 6f 74 20 61 6c 6c 6f 77 20 74 68 |oes not allow th|
166 0060: 69 73 20 66 |is f|
166 0060: 69 73 20 66 |is f|
167
167
168 #endif
168 #endif
169
169
170 $ killdaemons.py
170 $ killdaemons.py
171 $ cd server
171 $ cd server
172 $ hg serve -p $HGPORT -d --pid-file=hg.pid
172 $ hg serve -p $HGPORT -d --pid-file=hg.pid --error errors.txt
173 $ cat hg.pid > $DAEMON_PIDS
173 $ cat hg.pid > $DAEMON_PIDS
174 $ cd ..
174 $ cd ..
175
175
176 Basic clone
176 Basic clone
177
177
178 #if stream-legacy
178 #if stream-legacy
179 $ hg clone --stream -U http://localhost:$HGPORT clone1
179 $ hg clone --stream -U http://localhost:$HGPORT clone1
180 streaming all changes
180 streaming all changes
181 1027 files to transfer, 96.3 KB of data (no-zstd !)
181 1027 files to transfer, 96.3 KB of data (no-zstd !)
182 transferred 96.3 KB in * seconds (*/sec) (glob) (no-zstd !)
182 transferred 96.3 KB in * seconds (*/sec) (glob) (no-zstd !)
183 1027 files to transfer, 93.5 KB of data (zstd !)
183 1027 files to transfer, 93.5 KB of data (zstd !)
184 transferred 93.5 KB in * seconds (* */sec) (glob) (zstd !)
184 transferred 93.5 KB in * seconds (* */sec) (glob) (zstd !)
185 searching for changes
185 searching for changes
186 no changes found
186 no changes found
187 $ cat server/errors.txt
187 #endif
188 #endif
188 #if stream-bundle2
189 #if stream-bundle2
189 $ hg clone --stream -U http://localhost:$HGPORT clone1
190 $ hg clone --stream -U http://localhost:$HGPORT clone1
190 streaming all changes
191 streaming all changes
191 1030 files to transfer, 96.5 KB of data (no-zstd !)
192 1030 files to transfer, 96.5 KB of data (no-zstd !)
192 transferred 96.5 KB in * seconds (*/sec) (glob) (no-zstd !)
193 transferred 96.5 KB in * seconds (*/sec) (glob) (no-zstd !)
193 1030 files to transfer, 93.6 KB of data (zstd !)
194 1030 files to transfer, 93.6 KB of data (zstd !)
194 transferred 93.6 KB in * seconds (* */sec) (glob) (zstd !)
195 transferred 93.6 KB in * seconds (* */sec) (glob) (zstd !)
195
196
196 $ ls -1 clone1/.hg/cache
197 $ ls -1 clone1/.hg/cache
197 branch2-base
198 branch2-base
198 branch2-immutable
199 branch2-immutable
199 branch2-served
200 branch2-served
200 branch2-served.hidden
201 branch2-served.hidden
201 branch2-visible
202 branch2-visible
202 branch2-visible-hidden
203 branch2-visible-hidden
203 hgtagsfnodes1
204 hgtagsfnodes1
204 rbc-names-v1
205 rbc-names-v1
205 rbc-revs-v1
206 rbc-revs-v1
206 tags2
207 tags2
207 tags2-served
208 tags2-served
209 $ cat server/errors.txt
208 #endif
210 #endif
209
211
210 getbundle requests with stream=1 are uncompressed
212 getbundle requests with stream=1 are uncompressed
211
213
212 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=getbundle' content-type --bodyfile body --hgproto '0.1 0.2 comp=zlib,none' --requestheader "x-hgarg-1=bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=0&common=0000000000000000000000000000000000000000&heads=c17445101a72edac06facd130d14808dfbd5c7c2&stream=1"
214 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=getbundle' content-type --bodyfile body --hgproto '0.1 0.2 comp=zlib,none' --requestheader "x-hgarg-1=bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=0&common=0000000000000000000000000000000000000000&heads=c17445101a72edac06facd130d14808dfbd5c7c2&stream=1"
213 200 Script output follows
215 200 Script output follows
214 content-type: application/mercurial-0.2
216 content-type: application/mercurial-0.2
215
217
216
218
217 $ f --size --hex --bytes 256 body
219 $ f --size --hex --bytes 256 body
218 body: size=112262 (no-zstd !)
220 body: size=112262 (no-zstd !)
219 body: size=109410 (zstd no-rust !)
221 body: size=109410 (zstd no-rust !)
220 body: size=109431 (rust !)
222 body: size=109431 (rust !)
221 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
223 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
222 0010: 7f 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |..STREAM2.......| (no-zstd !)
224 0010: 7f 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |..STREAM2.......| (no-zstd !)
223 0020: 05 09 04 0c 44 62 79 74 65 63 6f 75 6e 74 39 38 |....Dbytecount98| (no-zstd !)
225 0020: 05 09 04 0c 44 62 79 74 65 63 6f 75 6e 74 39 38 |....Dbytecount98| (no-zstd !)
224 0030: 37 37 35 66 69 6c 65 63 6f 75 6e 74 31 30 33 30 |775filecount1030| (no-zstd !)
226 0030: 37 37 35 66 69 6c 65 63 6f 75 6e 74 31 30 33 30 |775filecount1030| (no-zstd !)
225 0010: 99 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |..STREAM2.......| (zstd no-rust !)
227 0010: 99 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |..STREAM2.......| (zstd no-rust !)
226 0010: ae 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |..STREAM2.......| (rust !)
228 0010: ae 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |..STREAM2.......| (rust !)
227 0020: 05 09 04 0c 5e 62 79 74 65 63 6f 75 6e 74 39 35 |....^bytecount95| (zstd no-rust !)
229 0020: 05 09 04 0c 5e 62 79 74 65 63 6f 75 6e 74 39 35 |....^bytecount95| (zstd no-rust !)
228 0020: 05 09 04 0c 73 62 79 74 65 63 6f 75 6e 74 39 35 |....sbytecount95| (rust !)
230 0020: 05 09 04 0c 73 62 79 74 65 63 6f 75 6e 74 39 35 |....sbytecount95| (rust !)
229 0030: 38 39 37 66 69 6c 65 63 6f 75 6e 74 31 30 33 30 |897filecount1030| (zstd !)
231 0030: 38 39 37 66 69 6c 65 63 6f 75 6e 74 31 30 33 30 |897filecount1030| (zstd !)
230 0040: 72 65 71 75 69 72 65 6d 65 6e 74 73 64 6f 74 65 |requirementsdote|
232 0040: 72 65 71 75 69 72 65 6d 65 6e 74 73 64 6f 74 65 |requirementsdote|
231 0050: 6e 63 6f 64 65 25 32 43 66 6e 63 61 63 68 65 25 |ncode%2Cfncache%|
233 0050: 6e 63 6f 64 65 25 32 43 66 6e 63 61 63 68 65 25 |ncode%2Cfncache%|
232 0060: 32 43 67 65 6e 65 72 61 6c 64 65 6c 74 61 25 32 |2Cgeneraldelta%2|
234 0060: 32 43 67 65 6e 65 72 61 6c 64 65 6c 74 61 25 32 |2Cgeneraldelta%2|
233 0070: 43 72 65 76 6c 6f 67 76 31 25 32 43 73 70 61 72 |Crevlogv1%2Cspar| (no-zstd !)
235 0070: 43 72 65 76 6c 6f 67 76 31 25 32 43 73 70 61 72 |Crevlogv1%2Cspar| (no-zstd !)
234 0080: 73 65 72 65 76 6c 6f 67 25 32 43 73 74 6f 72 65 |serevlog%2Cstore| (no-zstd !)
236 0080: 73 65 72 65 76 6c 6f 67 25 32 43 73 74 6f 72 65 |serevlog%2Cstore| (no-zstd !)
235 0090: 00 00 80 00 73 08 42 64 61 74 61 2f 30 2e 69 00 |....s.Bdata/0.i.| (no-zstd !)
237 0090: 00 00 80 00 73 08 42 64 61 74 61 2f 30 2e 69 00 |....s.Bdata/0.i.| (no-zstd !)
236 00a0: 03 00 01 00 00 00 00 00 00 00 02 00 00 00 01 00 |................| (no-zstd !)
238 00a0: 03 00 01 00 00 00 00 00 00 00 02 00 00 00 01 00 |................| (no-zstd !)
237 00b0: 00 00 00 00 00 00 01 ff ff ff ff ff ff ff ff 80 |................| (no-zstd !)
239 00b0: 00 00 00 00 00 00 01 ff ff ff ff ff ff ff ff 80 |................| (no-zstd !)
238 00c0: 29 63 a0 49 d3 23 87 bf ce fe 56 67 92 67 2c 69 |)c.I.#....Vg.g,i| (no-zstd !)
240 00c0: 29 63 a0 49 d3 23 87 bf ce fe 56 67 92 67 2c 69 |)c.I.#....Vg.g,i| (no-zstd !)
239 00d0: d1 ec 39 00 00 00 00 00 00 00 00 00 00 00 00 75 |..9............u| (no-zstd !)
241 00d0: d1 ec 39 00 00 00 00 00 00 00 00 00 00 00 00 75 |..9............u| (no-zstd !)
240 00e0: 30 73 08 42 64 61 74 61 2f 31 2e 69 00 03 00 01 |0s.Bdata/1.i....| (no-zstd !)
242 00e0: 30 73 08 42 64 61 74 61 2f 31 2e 69 00 03 00 01 |0s.Bdata/1.i....| (no-zstd !)
241 00f0: 00 00 00 00 00 00 00 02 00 00 00 01 00 00 00 00 |................| (no-zstd !)
243 00f0: 00 00 00 00 00 00 00 02 00 00 00 01 00 00 00 00 |................| (no-zstd !)
242 0070: 43 72 65 76 6c 6f 67 2d 63 6f 6d 70 72 65 73 73 |Crevlog-compress| (zstd no-rust !)
244 0070: 43 72 65 76 6c 6f 67 2d 63 6f 6d 70 72 65 73 73 |Crevlog-compress| (zstd no-rust !)
243 0070: 43 70 65 72 73 69 73 74 65 6e 74 2d 6e 6f 64 65 |Cpersistent-node| (rust !)
245 0070: 43 70 65 72 73 69 73 74 65 6e 74 2d 6e 6f 64 65 |Cpersistent-node| (rust !)
244 0080: 69 6f 6e 2d 7a 73 74 64 25 32 43 72 65 76 6c 6f |ion-zstd%2Crevlo| (zstd no-rust !)
246 0080: 69 6f 6e 2d 7a 73 74 64 25 32 43 72 65 76 6c 6f |ion-zstd%2Crevlo| (zstd no-rust !)
245 0080: 6d 61 70 25 32 43 72 65 76 6c 6f 67 2d 63 6f 6d |map%2Crevlog-com| (rust !)
247 0080: 6d 61 70 25 32 43 72 65 76 6c 6f 67 2d 63 6f 6d |map%2Crevlog-com| (rust !)
246 0090: 67 76 31 25 32 43 73 70 61 72 73 65 72 65 76 6c |gv1%2Csparserevl| (zstd no-rust !)
248 0090: 67 76 31 25 32 43 73 70 61 72 73 65 72 65 76 6c |gv1%2Csparserevl| (zstd no-rust !)
247 0090: 70 72 65 73 73 69 6f 6e 2d 7a 73 74 64 25 32 43 |pression-zstd%2C| (rust !)
249 0090: 70 72 65 73 73 69 6f 6e 2d 7a 73 74 64 25 32 43 |pression-zstd%2C| (rust !)
248 00a0: 6f 67 25 32 43 73 74 6f 72 65 00 00 80 00 73 08 |og%2Cstore....s.| (zstd no-rust !)
250 00a0: 6f 67 25 32 43 73 74 6f 72 65 00 00 80 00 73 08 |og%2Cstore....s.| (zstd no-rust !)
249 00a0: 72 65 76 6c 6f 67 76 31 25 32 43 73 70 61 72 73 |revlogv1%2Cspars| (rust !)
251 00a0: 72 65 76 6c 6f 67 76 31 25 32 43 73 70 61 72 73 |revlogv1%2Cspars| (rust !)
250 00b0: 42 64 61 74 61 2f 30 2e 69 00 03 00 01 00 00 00 |Bdata/0.i.......| (zstd no-rust !)
252 00b0: 42 64 61 74 61 2f 30 2e 69 00 03 00 01 00 00 00 |Bdata/0.i.......| (zstd no-rust !)
251 00b0: 65 72 65 76 6c 6f 67 25 32 43 73 74 6f 72 65 00 |erevlog%2Cstore.| (rust !)
253 00b0: 65 72 65 76 6c 6f 67 25 32 43 73 74 6f 72 65 00 |erevlog%2Cstore.| (rust !)
252 00c0: 00 00 00 00 02 00 00 00 01 00 00 00 00 00 00 00 |................| (zstd no-rust !)
254 00c0: 00 00 00 00 02 00 00 00 01 00 00 00 00 00 00 00 |................| (zstd no-rust !)
253 00c0: 00 80 00 73 08 42 64 61 74 61 2f 30 2e 69 00 03 |...s.Bdata/0.i..| (rust !)
255 00c0: 00 80 00 73 08 42 64 61 74 61 2f 30 2e 69 00 03 |...s.Bdata/0.i..| (rust !)
254 00d0: 01 ff ff ff ff ff ff ff ff 80 29 63 a0 49 d3 23 |..........)c.I.#| (zstd no-rust !)
256 00d0: 01 ff ff ff ff ff ff ff ff 80 29 63 a0 49 d3 23 |..........)c.I.#| (zstd no-rust !)
255 00d0: 00 01 00 00 00 00 00 00 00 02 00 00 00 01 00 00 |................| (rust !)
257 00d0: 00 01 00 00 00 00 00 00 00 02 00 00 00 01 00 00 |................| (rust !)
256 00e0: 87 bf ce fe 56 67 92 67 2c 69 d1 ec 39 00 00 00 |....Vg.g,i..9...| (zstd no-rust !)
258 00e0: 87 bf ce fe 56 67 92 67 2c 69 d1 ec 39 00 00 00 |....Vg.g,i..9...| (zstd no-rust !)
257 00e0: 00 00 00 00 00 01 ff ff ff ff ff ff ff ff 80 29 |...............)| (rust !)
259 00e0: 00 00 00 00 00 01 ff ff ff ff ff ff ff ff 80 29 |...............)| (rust !)
258 00f0: 00 00 00 00 00 00 00 00 00 75 30 73 08 42 64 61 |.........u0s.Bda| (zstd no-rust !)
260 00f0: 00 00 00 00 00 00 00 00 00 75 30 73 08 42 64 61 |.........u0s.Bda| (zstd no-rust !)
259 00f0: 63 a0 49 d3 23 87 bf ce fe 56 67 92 67 2c 69 d1 |c.I.#....Vg.g,i.| (rust !)
261 00f0: 63 a0 49 d3 23 87 bf ce fe 56 67 92 67 2c 69 d1 |c.I.#....Vg.g,i.| (rust !)
260
262
261 --uncompressed is an alias to --stream
263 --uncompressed is an alias to --stream
262
264
263 #if stream-legacy
265 #if stream-legacy
264 $ hg clone --uncompressed -U http://localhost:$HGPORT clone1-uncompressed
266 $ hg clone --uncompressed -U http://localhost:$HGPORT clone1-uncompressed
265 streaming all changes
267 streaming all changes
266 1027 files to transfer, 96.3 KB of data (no-zstd !)
268 1027 files to transfer, 96.3 KB of data (no-zstd !)
267 transferred 96.3 KB in * seconds (*/sec) (glob) (no-zstd !)
269 transferred 96.3 KB in * seconds (*/sec) (glob) (no-zstd !)
268 1027 files to transfer, 93.5 KB of data (zstd !)
270 1027 files to transfer, 93.5 KB of data (zstd !)
269 transferred 93.5 KB in * seconds (* */sec) (glob) (zstd !)
271 transferred 93.5 KB in * seconds (* */sec) (glob) (zstd !)
270 searching for changes
272 searching for changes
271 no changes found
273 no changes found
272 #endif
274 #endif
273 #if stream-bundle2
275 #if stream-bundle2
274 $ hg clone --uncompressed -U http://localhost:$HGPORT clone1-uncompressed
276 $ hg clone --uncompressed -U http://localhost:$HGPORT clone1-uncompressed
275 streaming all changes
277 streaming all changes
276 1030 files to transfer, 96.5 KB of data (no-zstd !)
278 1030 files to transfer, 96.5 KB of data (no-zstd !)
277 transferred 96.5 KB in * seconds (* */sec) (glob) (no-zstd !)
279 transferred 96.5 KB in * seconds (* */sec) (glob) (no-zstd !)
278 1030 files to transfer, 93.6 KB of data (zstd !)
280 1030 files to transfer, 93.6 KB of data (zstd !)
279 transferred 93.6 KB in * seconds (* */sec) (glob) (zstd !)
281 transferred 93.6 KB in * seconds (* */sec) (glob) (zstd !)
280 #endif
282 #endif
281
283
282 Clone with background file closing enabled
284 Clone with background file closing enabled
283
285
284 #if stream-legacy
286 #if stream-legacy
285 $ hg --debug --config worker.backgroundclose=true --config worker.backgroundcloseminfilecount=1 clone --stream -U http://localhost:$HGPORT clone-background | grep -v adding
287 $ hg --debug --config worker.backgroundclose=true --config worker.backgroundcloseminfilecount=1 clone --stream -U http://localhost:$HGPORT clone-background | grep -v adding
286 using http://localhost:$HGPORT/
288 using http://localhost:$HGPORT/
287 sending capabilities command
289 sending capabilities command
288 sending branchmap command
290 sending branchmap command
289 streaming all changes
291 streaming all changes
290 sending stream_out command
292 sending stream_out command
291 1027 files to transfer, 96.3 KB of data (no-zstd !)
293 1027 files to transfer, 96.3 KB of data (no-zstd !)
292 1027 files to transfer, 93.5 KB of data (zstd !)
294 1027 files to transfer, 93.5 KB of data (zstd !)
293 starting 4 threads for background file closing
295 starting 4 threads for background file closing
294 updating the branch cache
296 updating the branch cache
295 transferred 96.3 KB in * seconds (*/sec) (glob) (no-zstd !)
297 transferred 96.3 KB in * seconds (*/sec) (glob) (no-zstd !)
296 transferred 93.5 KB in * seconds (* */sec) (glob) (zstd !)
298 transferred 93.5 KB in * seconds (* */sec) (glob) (zstd !)
297 query 1; heads
299 query 1; heads
298 sending batch command
300 sending batch command
299 searching for changes
301 searching for changes
300 all remote heads known locally
302 all remote heads known locally
301 no changes found
303 no changes found
302 sending getbundle command
304 sending getbundle command
303 bundle2-input-bundle: with-transaction
305 bundle2-input-bundle: with-transaction
304 bundle2-input-part: "listkeys" (params: 1 mandatory) supported
306 bundle2-input-part: "listkeys" (params: 1 mandatory) supported
305 bundle2-input-part: "phase-heads" supported
307 bundle2-input-part: "phase-heads" supported
306 bundle2-input-part: total payload size 24
308 bundle2-input-part: total payload size 24
307 bundle2-input-bundle: 2 parts total
309 bundle2-input-bundle: 2 parts total
308 checking for updated bookmarks
310 checking for updated bookmarks
309 updating the branch cache
311 updating the branch cache
310 (sent 5 HTTP requests and * bytes; received * bytes in responses) (glob)
312 (sent 5 HTTP requests and * bytes; received * bytes in responses) (glob)
311 #endif
313 #endif
312 #if stream-bundle2
314 #if stream-bundle2
313 $ hg --debug --config worker.backgroundclose=true --config worker.backgroundcloseminfilecount=1 clone --stream -U http://localhost:$HGPORT clone-background | grep -v adding
315 $ hg --debug --config worker.backgroundclose=true --config worker.backgroundcloseminfilecount=1 clone --stream -U http://localhost:$HGPORT clone-background | grep -v adding
314 using http://localhost:$HGPORT/
316 using http://localhost:$HGPORT/
315 sending capabilities command
317 sending capabilities command
316 query 1; heads
318 query 1; heads
317 sending batch command
319 sending batch command
318 streaming all changes
320 streaming all changes
319 sending getbundle command
321 sending getbundle command
320 bundle2-input-bundle: with-transaction
322 bundle2-input-bundle: with-transaction
321 bundle2-input-part: "stream2" (params: 3 mandatory) supported
323 bundle2-input-part: "stream2" (params: 3 mandatory) supported
322 applying stream bundle
324 applying stream bundle
323 1030 files to transfer, 96.5 KB of data (no-zstd !)
325 1030 files to transfer, 96.5 KB of data (no-zstd !)
324 1030 files to transfer, 93.6 KB of data (zstd !)
326 1030 files to transfer, 93.6 KB of data (zstd !)
325 starting 4 threads for background file closing
327 starting 4 threads for background file closing
326 starting 4 threads for background file closing
328 starting 4 threads for background file closing
327 updating the branch cache
329 updating the branch cache
328 transferred 96.5 KB in * seconds (* */sec) (glob) (no-zstd !)
330 transferred 96.5 KB in * seconds (* */sec) (glob) (no-zstd !)
329 bundle2-input-part: total payload size 112094 (no-zstd !)
331 bundle2-input-part: total payload size 112094 (no-zstd !)
330 transferred 93.6 KB in * seconds (* */sec) (glob) (zstd !)
332 transferred 93.6 KB in * seconds (* */sec) (glob) (zstd !)
331 bundle2-input-part: total payload size 109216 (zstd !)
333 bundle2-input-part: total payload size 109216 (zstd !)
332 bundle2-input-part: "listkeys" (params: 1 mandatory) supported
334 bundle2-input-part: "listkeys" (params: 1 mandatory) supported
333 bundle2-input-bundle: 2 parts total
335 bundle2-input-bundle: 2 parts total
334 checking for updated bookmarks
336 checking for updated bookmarks
335 updating the branch cache
337 updating the branch cache
336 (sent 3 HTTP requests and * bytes; received * bytes in responses) (glob)
338 (sent 3 HTTP requests and * bytes; received * bytes in responses) (glob)
337 #endif
339 #endif
338
340
339 Cannot stream clone when there are secret changesets
341 Cannot stream clone when there are secret changesets
340
342
341 $ hg -R server phase --force --secret -r tip
343 $ hg -R server phase --force --secret -r tip
342 $ hg clone --stream -U http://localhost:$HGPORT secret-denied
344 $ hg clone --stream -U http://localhost:$HGPORT secret-denied
343 warning: stream clone requested but server has them disabled
345 warning: stream clone requested but server has them disabled
344 requesting all changes
346 requesting all changes
345 adding changesets
347 adding changesets
346 adding manifests
348 adding manifests
347 adding file changes
349 adding file changes
348 added 1 changesets with 1 changes to 1 files
350 added 1 changesets with 1 changes to 1 files
349 new changesets 96ee1d7354c4
351 new changesets 96ee1d7354c4
350
352
351 $ killdaemons.py
353 $ killdaemons.py
352
354
353 Streaming of secrets can be overridden by server config
355 Streaming of secrets can be overridden by server config
354
356
355 $ cd server
357 $ cd server
356 $ hg serve --config server.uncompressedallowsecret=true -p $HGPORT -d --pid-file=hg.pid
358 $ hg serve --config server.uncompressedallowsecret=true -p $HGPORT -d --pid-file=hg.pid
357 $ cat hg.pid > $DAEMON_PIDS
359 $ cat hg.pid > $DAEMON_PIDS
358 $ cd ..
360 $ cd ..
359
361
360 #if stream-legacy
362 #if stream-legacy
361 $ hg clone --stream -U http://localhost:$HGPORT secret-allowed
363 $ hg clone --stream -U http://localhost:$HGPORT secret-allowed
362 streaming all changes
364 streaming all changes
363 1027 files to transfer, 96.3 KB of data (no-zstd !)
365 1027 files to transfer, 96.3 KB of data (no-zstd !)
364 transferred 96.3 KB in * seconds (*/sec) (glob) (no-zstd !)
366 transferred 96.3 KB in * seconds (*/sec) (glob) (no-zstd !)
365 1027 files to transfer, 93.5 KB of data (zstd !)
367 1027 files to transfer, 93.5 KB of data (zstd !)
366 transferred 93.5 KB in * seconds (* */sec) (glob) (zstd !)
368 transferred 93.5 KB in * seconds (* */sec) (glob) (zstd !)
367 searching for changes
369 searching for changes
368 no changes found
370 no changes found
369 #endif
371 #endif
370 #if stream-bundle2
372 #if stream-bundle2
371 $ hg clone --stream -U http://localhost:$HGPORT secret-allowed
373 $ hg clone --stream -U http://localhost:$HGPORT secret-allowed
372 streaming all changes
374 streaming all changes
373 1030 files to transfer, 96.5 KB of data (no-zstd !)
375 1030 files to transfer, 96.5 KB of data (no-zstd !)
374 transferred 96.5 KB in * seconds (* */sec) (glob) (no-zstd !)
376 transferred 96.5 KB in * seconds (* */sec) (glob) (no-zstd !)
375 1030 files to transfer, 93.6 KB of data (zstd !)
377 1030 files to transfer, 93.6 KB of data (zstd !)
376 transferred 93.6 KB in * seconds (* */sec) (glob) (zstd !)
378 transferred 93.6 KB in * seconds (* */sec) (glob) (zstd !)
377 #endif
379 #endif
378
380
379 $ killdaemons.py
381 $ killdaemons.py
380
382
381 Verify interaction between preferuncompressed and secret presence
383 Verify interaction between preferuncompressed and secret presence
382
384
383 $ cd server
385 $ cd server
384 $ hg serve --config server.preferuncompressed=true -p $HGPORT -d --pid-file=hg.pid
386 $ hg serve --config server.preferuncompressed=true -p $HGPORT -d --pid-file=hg.pid
385 $ cat hg.pid > $DAEMON_PIDS
387 $ cat hg.pid > $DAEMON_PIDS
386 $ cd ..
388 $ cd ..
387
389
388 $ hg clone -U http://localhost:$HGPORT preferuncompressed-secret
390 $ hg clone -U http://localhost:$HGPORT preferuncompressed-secret
389 requesting all changes
391 requesting all changes
390 adding changesets
392 adding changesets
391 adding manifests
393 adding manifests
392 adding file changes
394 adding file changes
393 added 1 changesets with 1 changes to 1 files
395 added 1 changesets with 1 changes to 1 files
394 new changesets 96ee1d7354c4
396 new changesets 96ee1d7354c4
395
397
396 $ killdaemons.py
398 $ killdaemons.py
397
399
398 Clone not allowed when full bundles disabled and can't serve secrets
400 Clone not allowed when full bundles disabled and can't serve secrets
399
401
400 $ cd server
402 $ cd server
401 $ hg serve --config server.disablefullbundle=true -p $HGPORT -d --pid-file=hg.pid
403 $ hg serve --config server.disablefullbundle=true -p $HGPORT -d --pid-file=hg.pid
402 $ cat hg.pid > $DAEMON_PIDS
404 $ cat hg.pid > $DAEMON_PIDS
403 $ cd ..
405 $ cd ..
404
406
405 $ hg clone --stream http://localhost:$HGPORT secret-full-disabled
407 $ hg clone --stream http://localhost:$HGPORT secret-full-disabled
406 warning: stream clone requested but server has them disabled
408 warning: stream clone requested but server has them disabled
407 requesting all changes
409 requesting all changes
408 remote: abort: server has pull-based clones disabled
410 remote: abort: server has pull-based clones disabled
409 abort: pull failed on remote
411 abort: pull failed on remote
410 (remove --pull if specified or upgrade Mercurial)
412 (remove --pull if specified or upgrade Mercurial)
411 [100]
413 [100]
412
414
413 Local stream clone with secrets involved
415 Local stream clone with secrets involved
414 (This is just a test over behavior: if you have access to the repo's files,
416 (This is just a test over behavior: if you have access to the repo's files,
415 there is no security so it isn't important to prevent a clone here.)
417 there is no security so it isn't important to prevent a clone here.)
416
418
417 $ hg clone -U --stream server local-secret
419 $ hg clone -U --stream server local-secret
418 warning: stream clone requested but server has them disabled
420 warning: stream clone requested but server has them disabled
419 requesting all changes
421 requesting all changes
420 adding changesets
422 adding changesets
421 adding manifests
423 adding manifests
422 adding file changes
424 adding file changes
423 added 1 changesets with 1 changes to 1 files
425 added 1 changesets with 1 changes to 1 files
424 new changesets 96ee1d7354c4
426 new changesets 96ee1d7354c4
425
427
426 Stream clone while repo is changing:
428 Stream clone while repo is changing:
427
429
428 $ mkdir changing
430 $ mkdir changing
429 $ cd changing
431 $ cd changing
430
432
431 extension for delaying the server process so we reliably can modify the repo
433 extension for delaying the server process so we reliably can modify the repo
432 while cloning
434 while cloning
433
435
434 $ cat > delayer.py <<EOF
436 $ cat > delayer.py <<EOF
435 > import time
437 > import time
436 > from mercurial import extensions, vfs
438 > from mercurial import extensions, vfs
437 > def __call__(orig, self, path, *args, **kwargs):
439 > def __call__(orig, self, path, *args, **kwargs):
438 > if path == 'data/f1.i':
440 > if path == 'data/f1.i':
439 > time.sleep(2)
441 > time.sleep(2)
440 > return orig(self, path, *args, **kwargs)
442 > return orig(self, path, *args, **kwargs)
441 > extensions.wrapfunction(vfs.vfs, '__call__', __call__)
443 > extensions.wrapfunction(vfs.vfs, '__call__', __call__)
442 > EOF
444 > EOF
443
445
444 prepare repo with small and big file to cover both code paths in emitrevlogdata
446 prepare repo with small and big file to cover both code paths in emitrevlogdata
445
447
446 $ hg init repo
448 $ hg init repo
447 $ touch repo/f1
449 $ touch repo/f1
448 $ $TESTDIR/seq.py 50000 > repo/f2
450 $ $TESTDIR/seq.py 50000 > repo/f2
449 $ hg -R repo ci -Aqm "0"
451 $ hg -R repo ci -Aqm "0"
450 $ hg serve -R repo -p $HGPORT1 -d --pid-file=hg.pid --config extensions.delayer=delayer.py
452 $ hg serve -R repo -p $HGPORT1 -d --pid-file=hg.pid --config extensions.delayer=delayer.py
451 $ cat hg.pid >> $DAEMON_PIDS
453 $ cat hg.pid >> $DAEMON_PIDS
452
454
453 clone while modifying the repo between stating file with write lock and
455 clone while modifying the repo between stating file with write lock and
454 actually serving file content
456 actually serving file content
455
457
456 $ hg clone -q --stream -U http://localhost:$HGPORT1 clone &
458 $ hg clone -q --stream -U http://localhost:$HGPORT1 clone &
457 $ sleep 1
459 $ sleep 1
458 $ echo >> repo/f1
460 $ echo >> repo/f1
459 $ echo >> repo/f2
461 $ echo >> repo/f2
460 $ hg -R repo ci -m "1" --config ui.timeout.warn=-1
462 $ hg -R repo ci -m "1" --config ui.timeout.warn=-1
461 $ wait
463 $ wait
462 $ hg -R clone id
464 $ hg -R clone id
463 000000000000
465 000000000000
464 $ cd ..
466 $ cd ..
465
467
466 Stream repository with bookmarks
468 Stream repository with bookmarks
467 --------------------------------
469 --------------------------------
468
470
469 (revert introduction of secret changeset)
471 (revert introduction of secret changeset)
470
472
471 $ hg -R server phase --draft 'secret()'
473 $ hg -R server phase --draft 'secret()'
472
474
473 add a bookmark
475 add a bookmark
474
476
475 $ hg -R server bookmark -r tip some-bookmark
477 $ hg -R server bookmark -r tip some-bookmark
476
478
477 clone it
479 clone it
478
480
479 #if stream-legacy
481 #if stream-legacy
480 $ hg clone --stream http://localhost:$HGPORT with-bookmarks
482 $ hg clone --stream http://localhost:$HGPORT with-bookmarks
481 streaming all changes
483 streaming all changes
482 1027 files to transfer, 96.3 KB of data (no-zstd !)
484 1027 files to transfer, 96.3 KB of data (no-zstd !)
483 transferred 96.3 KB in * seconds (*) (glob) (no-zstd !)
485 transferred 96.3 KB in * seconds (*) (glob) (no-zstd !)
484 1027 files to transfer, 93.5 KB of data (zstd !)
486 1027 files to transfer, 93.5 KB of data (zstd !)
485 transferred 93.5 KB in * seconds (* */sec) (glob) (zstd !)
487 transferred 93.5 KB in * seconds (* */sec) (glob) (zstd !)
486 searching for changes
488 searching for changes
487 no changes found
489 no changes found
488 updating to branch default
490 updating to branch default
489 1025 files updated, 0 files merged, 0 files removed, 0 files unresolved
491 1025 files updated, 0 files merged, 0 files removed, 0 files unresolved
490 #endif
492 #endif
491 #if stream-bundle2
493 #if stream-bundle2
492 $ hg clone --stream http://localhost:$HGPORT with-bookmarks
494 $ hg clone --stream http://localhost:$HGPORT with-bookmarks
493 streaming all changes
495 streaming all changes
494 1033 files to transfer, 96.6 KB of data (no-zstd !)
496 1033 files to transfer, 96.6 KB of data (no-zstd !)
495 transferred 96.6 KB in * seconds (* */sec) (glob) (no-zstd !)
497 transferred 96.6 KB in * seconds (* */sec) (glob) (no-zstd !)
496 1033 files to transfer, 93.8 KB of data (zstd !)
498 1033 files to transfer, 93.8 KB of data (zstd !)
497 transferred 93.8 KB in * seconds (* */sec) (glob) (zstd !)
499 transferred 93.8 KB in * seconds (* */sec) (glob) (zstd !)
498 updating to branch default
500 updating to branch default
499 1025 files updated, 0 files merged, 0 files removed, 0 files unresolved
501 1025 files updated, 0 files merged, 0 files removed, 0 files unresolved
500 #endif
502 #endif
501 $ hg -R with-bookmarks bookmarks
503 $ hg -R with-bookmarks bookmarks
502 some-bookmark 1:c17445101a72
504 some-bookmark 1:c17445101a72
503
505
504 Stream repository with phases
506 Stream repository with phases
505 -----------------------------
507 -----------------------------
506
508
507 Clone as publishing
509 Clone as publishing
508
510
509 $ hg -R server phase -r 'all()'
511 $ hg -R server phase -r 'all()'
510 0: draft
512 0: draft
511 1: draft
513 1: draft
512
514
513 #if stream-legacy
515 #if stream-legacy
514 $ hg clone --stream http://localhost:$HGPORT phase-publish
516 $ hg clone --stream http://localhost:$HGPORT phase-publish
515 streaming all changes
517 streaming all changes
516 1027 files to transfer, 96.3 KB of data (no-zstd !)
518 1027 files to transfer, 96.3 KB of data (no-zstd !)
517 transferred 96.3 KB in * seconds (*) (glob) (no-zstd !)
519 transferred 96.3 KB in * seconds (*) (glob) (no-zstd !)
518 1027 files to transfer, 93.5 KB of data (zstd !)
520 1027 files to transfer, 93.5 KB of data (zstd !)
519 transferred 93.5 KB in * seconds (* */sec) (glob) (zstd !)
521 transferred 93.5 KB in * seconds (* */sec) (glob) (zstd !)
520 searching for changes
522 searching for changes
521 no changes found
523 no changes found
522 updating to branch default
524 updating to branch default
523 1025 files updated, 0 files merged, 0 files removed, 0 files unresolved
525 1025 files updated, 0 files merged, 0 files removed, 0 files unresolved
524 #endif
526 #endif
525 #if stream-bundle2
527 #if stream-bundle2
526 $ hg clone --stream http://localhost:$HGPORT phase-publish
528 $ hg clone --stream http://localhost:$HGPORT phase-publish
527 streaming all changes
529 streaming all changes
528 1033 files to transfer, 96.6 KB of data (no-zstd !)
530 1033 files to transfer, 96.6 KB of data (no-zstd !)
529 transferred 96.6 KB in * seconds (* */sec) (glob) (no-zstd !)
531 transferred 96.6 KB in * seconds (* */sec) (glob) (no-zstd !)
530 1033 files to transfer, 93.8 KB of data (zstd !)
532 1033 files to transfer, 93.8 KB of data (zstd !)
531 transferred 93.8 KB in * seconds (* */sec) (glob) (zstd !)
533 transferred 93.8 KB in * seconds (* */sec) (glob) (zstd !)
532 updating to branch default
534 updating to branch default
533 1025 files updated, 0 files merged, 0 files removed, 0 files unresolved
535 1025 files updated, 0 files merged, 0 files removed, 0 files unresolved
534 #endif
536 #endif
535 $ hg -R phase-publish phase -r 'all()'
537 $ hg -R phase-publish phase -r 'all()'
536 0: public
538 0: public
537 1: public
539 1: public
538
540
539 Clone as non publishing
541 Clone as non publishing
540
542
541 $ cat << EOF >> server/.hg/hgrc
543 $ cat << EOF >> server/.hg/hgrc
542 > [phases]
544 > [phases]
543 > publish = False
545 > publish = False
544 > EOF
546 > EOF
545 $ killdaemons.py
547 $ killdaemons.py
546 $ hg -R server serve -p $HGPORT -d --pid-file=hg.pid
548 $ hg -R server serve -p $HGPORT -d --pid-file=hg.pid
547 $ cat hg.pid > $DAEMON_PIDS
549 $ cat hg.pid > $DAEMON_PIDS
548
550
549 #if stream-legacy
551 #if stream-legacy
550
552
551 With v1 of the stream protocol, changeset are always cloned as public. It make
553 With v1 of the stream protocol, changeset are always cloned as public. It make
552 stream v1 unsuitable for non-publishing repository.
554 stream v1 unsuitable for non-publishing repository.
553
555
554 $ hg clone --stream http://localhost:$HGPORT phase-no-publish
556 $ hg clone --stream http://localhost:$HGPORT phase-no-publish
555 streaming all changes
557 streaming all changes
556 1027 files to transfer, 96.3 KB of data (no-zstd !)
558 1027 files to transfer, 96.3 KB of data (no-zstd !)
557 transferred 96.3 KB in * seconds (* */sec) (glob) (no-zstd !)
559 transferred 96.3 KB in * seconds (* */sec) (glob) (no-zstd !)
558 1027 files to transfer, 93.5 KB of data (zstd !)
560 1027 files to transfer, 93.5 KB of data (zstd !)
559 transferred 93.5 KB in * seconds (* */sec) (glob) (zstd !)
561 transferred 93.5 KB in * seconds (* */sec) (glob) (zstd !)
560 searching for changes
562 searching for changes
561 no changes found
563 no changes found
562 updating to branch default
564 updating to branch default
563 1025 files updated, 0 files merged, 0 files removed, 0 files unresolved
565 1025 files updated, 0 files merged, 0 files removed, 0 files unresolved
564 $ hg -R phase-no-publish phase -r 'all()'
566 $ hg -R phase-no-publish phase -r 'all()'
565 0: public
567 0: public
566 1: public
568 1: public
567 #endif
569 #endif
568 #if stream-bundle2
570 #if stream-bundle2
569 $ hg clone --stream http://localhost:$HGPORT phase-no-publish
571 $ hg clone --stream http://localhost:$HGPORT phase-no-publish
570 streaming all changes
572 streaming all changes
571 1034 files to transfer, 96.7 KB of data (no-zstd !)
573 1034 files to transfer, 96.7 KB of data (no-zstd !)
572 transferred 96.7 KB in * seconds (* */sec) (glob) (no-zstd !)
574 transferred 96.7 KB in * seconds (* */sec) (glob) (no-zstd !)
573 1034 files to transfer, 93.9 KB of data (zstd !)
575 1034 files to transfer, 93.9 KB of data (zstd !)
574 transferred 93.9 KB in * seconds (* */sec) (glob) (zstd !)
576 transferred 93.9 KB in * seconds (* */sec) (glob) (zstd !)
575 updating to branch default
577 updating to branch default
576 1025 files updated, 0 files merged, 0 files removed, 0 files unresolved
578 1025 files updated, 0 files merged, 0 files removed, 0 files unresolved
577 $ hg -R phase-no-publish phase -r 'all()'
579 $ hg -R phase-no-publish phase -r 'all()'
578 0: draft
580 0: draft
579 1: draft
581 1: draft
580 #endif
582 #endif
581
583
582 $ killdaemons.py
584 $ killdaemons.py
583
585
584 #if stream-legacy
586 #if stream-legacy
585
587
586 With v1 of the stream protocol, changeset are always cloned as public. There's
588 With v1 of the stream protocol, changeset are always cloned as public. There's
587 no obsolescence markers exchange in stream v1.
589 no obsolescence markers exchange in stream v1.
588
590
589 #endif
591 #endif
590 #if stream-bundle2
592 #if stream-bundle2
591
593
592 Stream repository with obsolescence
594 Stream repository with obsolescence
593 -----------------------------------
595 -----------------------------------
594
596
595 Clone non-publishing with obsolescence
597 Clone non-publishing with obsolescence
596
598
597 $ cat >> $HGRCPATH << EOF
599 $ cat >> $HGRCPATH << EOF
598 > [experimental]
600 > [experimental]
599 > evolution=all
601 > evolution=all
600 > EOF
602 > EOF
601
603
602 $ cd server
604 $ cd server
603 $ echo foo > foo
605 $ echo foo > foo
604 $ hg -q commit -m 'about to be pruned'
606 $ hg -q commit -m 'about to be pruned'
605 $ hg debugobsolete `hg log -r . -T '{node}'` -d '0 0' -u test --record-parents
607 $ hg debugobsolete `hg log -r . -T '{node}'` -d '0 0' -u test --record-parents
606 1 new obsolescence markers
608 1 new obsolescence markers
607 obsoleted 1 changesets
609 obsoleted 1 changesets
608 $ hg up null -q
610 $ hg up null -q
609 $ hg log -T '{rev}: {phase}\n'
611 $ hg log -T '{rev}: {phase}\n'
610 1: draft
612 1: draft
611 0: draft
613 0: draft
612 $ hg serve -p $HGPORT -d --pid-file=hg.pid
614 $ hg serve -p $HGPORT -d --pid-file=hg.pid
613 $ cat hg.pid > $DAEMON_PIDS
615 $ cat hg.pid > $DAEMON_PIDS
614 $ cd ..
616 $ cd ..
615
617
616 $ hg clone -U --stream http://localhost:$HGPORT with-obsolescence
618 $ hg clone -U --stream http://localhost:$HGPORT with-obsolescence
617 streaming all changes
619 streaming all changes
618 1035 files to transfer, 97.1 KB of data (no-zstd !)
620 1035 files to transfer, 97.1 KB of data (no-zstd !)
619 transferred 97.1 KB in * seconds (* */sec) (glob) (no-zstd !)
621 transferred 97.1 KB in * seconds (* */sec) (glob) (no-zstd !)
620 1035 files to transfer, 94.3 KB of data (zstd !)
622 1035 files to transfer, 94.3 KB of data (zstd !)
621 transferred 94.3 KB in * seconds (* */sec) (glob) (zstd !)
623 transferred 94.3 KB in * seconds (* */sec) (glob) (zstd !)
622 $ hg -R with-obsolescence log -T '{rev}: {phase}\n'
624 $ hg -R with-obsolescence log -T '{rev}: {phase}\n'
623 1: draft
625 1: draft
624 0: draft
626 0: draft
625 $ hg debugobsolete -R with-obsolescence
627 $ hg debugobsolete -R with-obsolescence
626 50382b884f66690b7045cac93a540cba4d4c906f 0 {c17445101a72edac06facd130d14808dfbd5c7c2} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
628 50382b884f66690b7045cac93a540cba4d4c906f 0 {c17445101a72edac06facd130d14808dfbd5c7c2} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
627
629
628 $ hg clone -U --stream --config experimental.evolution=0 http://localhost:$HGPORT with-obsolescence-no-evolution
630 $ hg clone -U --stream --config experimental.evolution=0 http://localhost:$HGPORT with-obsolescence-no-evolution
629 streaming all changes
631 streaming all changes
630 remote: abort: server has obsolescence markers, but client cannot receive them via stream clone
632 remote: abort: server has obsolescence markers, but client cannot receive them via stream clone
631 abort: pull failed on remote
633 abort: pull failed on remote
632 [100]
634 [100]
633
635
634 $ killdaemons.py
636 $ killdaemons.py
635
637
636 #endif
638 #endif
General Comments 0
You need to be logged in to leave comments. Login now