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