Show More
@@ -1,512 +1,512 b'' | |||||
1 | #require serve no-reposimplestore |
|
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-bundle2 |
|
5 | #if stream-bundle2 | |
6 | $ cat << EOF >> $HGRCPATH |
|
6 | $ cat << EOF >> $HGRCPATH | |
7 | > [experimental] |
|
7 | > [experimental] | |
8 | > bundle2.stream = yes |
|
8 | > bundle2.stream = yes | |
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 | digests |
|
57 | digests | |
58 | md5 |
|
58 | md5 | |
59 | sha1 |
|
59 | sha1 | |
60 | sha512 |
|
60 | sha512 | |
61 | error |
|
61 | error | |
62 | abort |
|
62 | abort | |
63 | unsupportedcontent |
|
63 | unsupportedcontent | |
64 | pushraced |
|
64 | pushraced | |
65 | pushkey |
|
65 | pushkey | |
66 | hgtagsfnodes |
|
66 | hgtagsfnodes | |
67 | listkeys |
|
67 | listkeys | |
68 | phases |
|
68 | phases | |
69 | heads |
|
69 | heads | |
70 | pushkey |
|
70 | pushkey | |
71 | remote-changegroup |
|
71 | remote-changegroup | |
72 | http |
|
72 | http | |
73 | https |
|
73 | https | |
74 | rev-branch-cache |
|
74 | rev-branch-cache | |
75 |
|
75 | |||
76 | $ hg clone --stream -U http://localhost:$HGPORT server-disabled |
|
76 | $ hg clone --stream -U http://localhost:$HGPORT server-disabled | |
77 | warning: stream clone requested but server has them disabled |
|
77 | warning: stream clone requested but server has them disabled | |
78 | requesting all changes |
|
78 | requesting all changes | |
79 | adding changesets |
|
79 | adding changesets | |
80 | adding manifests |
|
80 | adding manifests | |
81 | adding file changes |
|
81 | adding file changes | |
82 | added 2 changesets with 1025 changes to 1025 files |
|
82 | added 2 changesets with 1025 changes to 1025 files | |
83 | new changesets 96ee1d7354c4:c17445101a72 |
|
83 | new changesets 96ee1d7354c4:c17445101a72 | |
84 |
|
84 | |||
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" |
|
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" | |
86 | 200 Script output follows |
|
86 | 200 Script output follows | |
87 | content-type: application/mercurial-0.2 |
|
87 | content-type: application/mercurial-0.2 | |
88 |
|
88 | |||
89 |
|
89 | |||
90 | $ f --size body --hexdump --bytes 100 |
|
90 | $ f --size body --hexdump --bytes 100 | |
91 | body: size=232 |
|
91 | body: size=232 | |
92 | 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......| |
|
92 | 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...| |
|
93 | 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| |
|
94 | 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| |
|
95 | 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| |
|
96 | 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| |
|
97 | 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| |
|
98 | 0060: 69 73 20 66 |is f| | |
99 |
|
99 | |||
100 | #endif |
|
100 | #endif | |
101 | #if stream-bundle2 |
|
101 | #if stream-bundle2 | |
102 | $ hg debugcapabilities http://localhost:$HGPORT |
|
102 | $ hg debugcapabilities http://localhost:$HGPORT | |
103 | Main capabilities: |
|
103 | Main capabilities: | |
104 | batch |
|
104 | batch | |
105 | branchmap |
|
105 | branchmap | |
106 | $USUAL_BUNDLE2_CAPS_SERVER$ |
|
106 | $USUAL_BUNDLE2_CAPS_SERVER$ | |
107 | changegroupsubset |
|
107 | changegroupsubset | |
108 | compression=$BUNDLE2_COMPRESSIONS$ |
|
108 | compression=$BUNDLE2_COMPRESSIONS$ | |
109 | getbundle |
|
109 | getbundle | |
110 | httpheader=1024 |
|
110 | httpheader=1024 | |
111 | httpmediatype=0.1rx,0.1tx,0.2tx |
|
111 | httpmediatype=0.1rx,0.1tx,0.2tx | |
112 | known |
|
112 | known | |
113 | lookup |
|
113 | lookup | |
114 | pushkey |
|
114 | pushkey | |
115 | unbundle=HG10GZ,HG10BZ,HG10UN |
|
115 | unbundle=HG10GZ,HG10BZ,HG10UN | |
116 | unbundlehash |
|
116 | unbundlehash | |
117 | Bundle2 capabilities: |
|
117 | Bundle2 capabilities: | |
118 | HG20 |
|
118 | HG20 | |
119 | bookmarks |
|
119 | bookmarks | |
120 | changegroup |
|
120 | changegroup | |
121 | 01 |
|
121 | 01 | |
122 | 02 |
|
122 | 02 | |
123 | digests |
|
123 | digests | |
124 | md5 |
|
124 | md5 | |
125 | sha1 |
|
125 | sha1 | |
126 | sha512 |
|
126 | sha512 | |
127 | error |
|
127 | error | |
128 | abort |
|
128 | abort | |
129 | unsupportedcontent |
|
129 | unsupportedcontent | |
130 | pushraced |
|
130 | pushraced | |
131 | pushkey |
|
131 | pushkey | |
132 | hgtagsfnodes |
|
132 | hgtagsfnodes | |
133 | listkeys |
|
133 | listkeys | |
134 | phases |
|
134 | phases | |
135 | heads |
|
135 | heads | |
136 | pushkey |
|
136 | pushkey | |
137 | remote-changegroup |
|
137 | remote-changegroup | |
138 | http |
|
138 | http | |
139 | https |
|
139 | https | |
140 | rev-branch-cache |
|
140 | rev-branch-cache | |
141 |
|
141 | |||
142 | $ hg clone --stream -U http://localhost:$HGPORT server-disabled |
|
142 | $ hg clone --stream -U http://localhost:$HGPORT server-disabled | |
143 | warning: stream clone requested but server has them disabled |
|
143 | warning: stream clone requested but server has them disabled | |
144 | requesting all changes |
|
144 | requesting all changes | |
145 | adding changesets |
|
145 | adding changesets | |
146 | adding manifests |
|
146 | adding manifests | |
147 | adding file changes |
|
147 | adding file changes | |
148 | added 2 changesets with 1025 changes to 1025 files |
|
148 | added 2 changesets with 1025 changes to 1025 files | |
149 | new changesets 96ee1d7354c4:c17445101a72 |
|
149 | new changesets 96ee1d7354c4:c17445101a72 | |
150 |
|
150 | |||
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" |
|
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" | |
152 | 200 Script output follows |
|
152 | 200 Script output follows | |
153 | content-type: application/mercurial-0.2 |
|
153 | content-type: application/mercurial-0.2 | |
154 |
|
154 | |||
155 |
|
155 | |||
156 | $ f --size body --hexdump --bytes 100 |
|
156 | $ f --size body --hexdump --bytes 100 | |
157 | body: size=232 |
|
157 | body: size=232 | |
158 | 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......| |
|
158 | 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...| |
|
159 | 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| |
|
160 | 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| |
|
161 | 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| |
|
162 | 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| |
|
163 | 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| |
|
164 | 0060: 69 73 20 66 |is f| | |
165 |
|
165 | |||
166 | #endif |
|
166 | #endif | |
167 |
|
167 | |||
168 | $ killdaemons.py |
|
168 | $ killdaemons.py | |
169 | $ cd server |
|
169 | $ cd server | |
170 | $ hg serve -p $HGPORT -d --pid-file=hg.pid |
|
170 | $ hg serve -p $HGPORT -d --pid-file=hg.pid | |
171 | $ cat hg.pid > $DAEMON_PIDS |
|
171 | $ cat hg.pid > $DAEMON_PIDS | |
172 | $ cd .. |
|
172 | $ cd .. | |
173 |
|
173 | |||
174 | Basic clone |
|
174 | Basic clone | |
175 |
|
175 | |||
176 | #if stream-legacy |
|
176 | #if stream-legacy | |
177 | $ hg clone --stream -U http://localhost:$HGPORT clone1 |
|
177 | $ hg clone --stream -U http://localhost:$HGPORT clone1 | |
178 | streaming all changes |
|
178 | streaming all changes | |
179 | 1027 files to transfer, 96.3 KB of data |
|
179 | 1027 files to transfer, 96.3 KB of data | |
180 | transferred 96.3 KB in * seconds (*/sec) (glob) |
|
180 | transferred 96.3 KB in * seconds (*/sec) (glob) | |
181 | searching for changes |
|
181 | searching for changes | |
182 | no changes found |
|
182 | no changes found | |
183 | #endif |
|
183 | #endif | |
184 | #if stream-bundle2 |
|
184 | #if stream-bundle2 | |
185 | $ hg clone --stream -U http://localhost:$HGPORT clone1 |
|
185 | $ hg clone --stream -U http://localhost:$HGPORT clone1 | |
186 | streaming all changes |
|
186 | streaming all changes | |
187 | 1030 files to transfer, 96.4 KB of data |
|
187 | 1030 files to transfer, 96.4 KB of data | |
188 | transferred 96.4 KB in * seconds (* */sec) (glob) |
|
188 | transferred 96.4 KB in * seconds (* */sec) (glob) | |
189 |
|
189 | |||
190 | $ ls -1 clone1/.hg/cache |
|
190 | $ ls -1 clone1/.hg/cache | |
191 | branch2-served |
|
191 | branch2-served | |
192 | rbc-names-v1 |
|
192 | rbc-names-v1 | |
193 | rbc-revs-v1 |
|
193 | rbc-revs-v1 | |
194 | #endif |
|
194 | #endif | |
195 |
|
195 | |||
196 | getbundle requests with stream=1 are uncompressed |
|
196 | getbundle requests with stream=1 are uncompressed | |
197 |
|
197 | |||
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" |
|
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" | |
199 | 200 Script output follows |
|
199 | 200 Script output follows | |
200 | content-type: application/mercurial-0.2 |
|
200 | content-type: application/mercurial-0.2 | |
201 |
|
201 | |||
202 |
|
202 | |||
203 | $ f --size --hex --bytes 256 body |
|
203 | $ f --size --hex --bytes 256 body | |
204 | body: size=112230 |
|
204 | body: size=112230 | |
205 | 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......| |
|
205 | 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......| | |
206 | 0010: 70 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |p.STREAM2.......| |
|
206 | 0010: 70 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |p.STREAM2.......| | |
207 | 0020: 05 09 04 0c 35 62 79 74 65 63 6f 75 6e 74 39 38 |....5bytecount98| |
|
207 | 0020: 05 09 04 0c 35 62 79 74 65 63 6f 75 6e 74 39 38 |....5bytecount98| | |
208 | 0030: 37 35 38 66 69 6c 65 63 6f 75 6e 74 31 30 33 30 |758filecount1030| |
|
208 | 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| |
|
209 | 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%| |
|
210 | 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| |
|
211 | 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 74 6f 72 |Crevlogv1%2Cstor| |
|
212 | 0070: 43 72 65 76 6c 6f 67 76 31 25 32 43 73 74 6f 72 |Crevlogv1%2Cstor| | |
213 | 0080: 65 00 00 80 00 73 08 42 64 61 74 61 2f 30 2e 69 |e....s.Bdata/0.i| |
|
213 | 0080: 65 00 00 80 00 73 08 42 64 61 74 61 2f 30 2e 69 |e....s.Bdata/0.i| | |
214 | 0090: 00 03 00 01 00 00 00 00 00 00 00 02 00 00 00 01 |................| |
|
214 | 0090: 00 03 00 01 00 00 00 00 00 00 00 02 00 00 00 01 |................| | |
215 | 00a0: 00 00 00 00 00 00 00 01 ff ff ff ff ff ff ff ff |................| |
|
215 | 00a0: 00 00 00 00 00 00 00 01 ff ff ff ff ff ff ff ff |................| | |
216 | 00b0: 80 29 63 a0 49 d3 23 87 bf ce fe 56 67 92 67 2c |.)c.I.#....Vg.g,| |
|
216 | 00b0: 80 29 63 a0 49 d3 23 87 bf ce fe 56 67 92 67 2c |.)c.I.#....Vg.g,| | |
217 | 00c0: 69 d1 ec 39 00 00 00 00 00 00 00 00 00 00 00 00 |i..9............| |
|
217 | 00c0: 69 d1 ec 39 00 00 00 00 00 00 00 00 00 00 00 00 |i..9............| | |
218 | 00d0: 75 30 73 08 42 64 61 74 61 2f 31 2e 69 00 03 00 |u0s.Bdata/1.i...| |
|
218 | 00d0: 75 30 73 08 42 64 61 74 61 2f 31 2e 69 00 03 00 |u0s.Bdata/1.i...| | |
219 | 00e0: 01 00 00 00 00 00 00 00 02 00 00 00 01 00 00 00 |................| |
|
219 | 00e0: 01 00 00 00 00 00 00 00 02 00 00 00 01 00 00 00 |................| | |
220 | 00f0: 00 00 00 00 01 ff ff ff ff ff ff ff ff f9 76 da |..............v.| |
|
220 | 00f0: 00 00 00 00 01 ff ff ff ff ff ff ff ff f9 76 da |..............v.| | |
221 |
|
221 | |||
222 | --uncompressed is an alias to --stream |
|
222 | --uncompressed is an alias to --stream | |
223 |
|
223 | |||
224 | #if stream-legacy |
|
224 | #if stream-legacy | |
225 | $ hg clone --uncompressed -U http://localhost:$HGPORT clone1-uncompressed |
|
225 | $ hg clone --uncompressed -U http://localhost:$HGPORT clone1-uncompressed | |
226 | streaming all changes |
|
226 | streaming all changes | |
227 | 1027 files to transfer, 96.3 KB of data |
|
227 | 1027 files to transfer, 96.3 KB of data | |
228 | transferred 96.3 KB in * seconds (*/sec) (glob) |
|
228 | transferred 96.3 KB in * seconds (*/sec) (glob) | |
229 | searching for changes |
|
229 | searching for changes | |
230 | no changes found |
|
230 | no changes found | |
231 | #endif |
|
231 | #endif | |
232 | #if stream-bundle2 |
|
232 | #if stream-bundle2 | |
233 | $ hg clone --uncompressed -U http://localhost:$HGPORT clone1-uncompressed |
|
233 | $ hg clone --uncompressed -U http://localhost:$HGPORT clone1-uncompressed | |
234 | streaming all changes |
|
234 | streaming all changes | |
235 | 1030 files to transfer, 96.4 KB of data |
|
235 | 1030 files to transfer, 96.4 KB of data | |
236 | transferred 96.4 KB in * seconds (* */sec) (glob) |
|
236 | transferred 96.4 KB in * seconds (* */sec) (glob) | |
237 | #endif |
|
237 | #endif | |
238 |
|
238 | |||
239 | Clone with background file closing enabled |
|
239 | Clone with background file closing enabled | |
240 |
|
240 | |||
241 | #if stream-legacy |
|
241 | #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 |
|
242 | $ 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/ |
|
243 | using http://localhost:$HGPORT/ | |
244 | sending capabilities command |
|
244 | sending capabilities command | |
245 | sending branchmap command |
|
245 | sending branchmap command | |
246 | streaming all changes |
|
246 | streaming all changes | |
247 | sending stream_out command |
|
247 | sending stream_out command | |
248 | 1027 files to transfer, 96.3 KB of data |
|
248 | 1027 files to transfer, 96.3 KB of data | |
249 | starting 4 threads for background file closing |
|
249 | starting 4 threads for background file closing | |
250 | transferred 96.3 KB in * seconds (*/sec) (glob) |
|
250 | transferred 96.3 KB in * seconds (*/sec) (glob) | |
251 | query 1; heads |
|
251 | query 1; heads | |
252 | sending batch command |
|
252 | sending batch command | |
253 | searching for changes |
|
253 | searching for changes | |
254 | all remote heads known locally |
|
254 | all remote heads known locally | |
255 | no changes found |
|
255 | no changes found | |
256 | sending getbundle command |
|
256 | sending getbundle command | |
257 | bundle2-input-bundle: with-transaction |
|
257 | bundle2-input-bundle: with-transaction | |
258 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported |
|
258 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported | |
259 | bundle2-input-part: "phase-heads" supported |
|
259 | bundle2-input-part: "phase-heads" supported | |
260 | bundle2-input-part: total payload size 24 |
|
260 | bundle2-input-part: total payload size 24 | |
261 | bundle2-input-bundle: 1 parts total |
|
261 | bundle2-input-bundle: 1 parts total | |
262 | checking for updated bookmarks |
|
262 | checking for updated bookmarks | |
263 | #endif |
|
263 | #endif | |
264 | #if stream-bundle2 |
|
264 | #if stream-bundle2 | |
265 | $ hg --debug --config worker.backgroundclose=true --config worker.backgroundcloseminfilecount=1 clone --stream -U http://localhost:$HGPORT clone-background | grep -v adding |
|
265 | $ hg --debug --config worker.backgroundclose=true --config worker.backgroundcloseminfilecount=1 clone --stream -U http://localhost:$HGPORT clone-background | grep -v adding | |
266 | using http://localhost:$HGPORT/ |
|
266 | using http://localhost:$HGPORT/ | |
267 | sending capabilities command |
|
267 | sending capabilities command | |
268 | query 1; heads |
|
268 | query 1; heads | |
269 | sending batch command |
|
269 | sending batch command | |
270 | streaming all changes |
|
270 | streaming all changes | |
271 | sending getbundle command |
|
271 | sending getbundle command | |
272 | bundle2-input-bundle: with-transaction |
|
272 | bundle2-input-bundle: with-transaction | |
273 | bundle2-input-part: "stream2" (params: 3 mandatory) supported |
|
273 | bundle2-input-part: "stream2" (params: 3 mandatory) supported | |
274 | applying stream bundle |
|
274 | applying stream bundle | |
275 | 1030 files to transfer, 96.4 KB of data |
|
275 | 1030 files to transfer, 96.4 KB of data | |
276 | starting 4 threads for background file closing |
|
276 | starting 4 threads for background file closing | |
277 | starting 4 threads for background file closing |
|
277 | starting 4 threads for background file closing | |
278 | transferred 96.4 KB in * seconds (* */sec) (glob) |
|
278 | transferred 96.4 KB in * seconds (* */sec) (glob) | |
279 | bundle2-input-part: total payload size 112077 |
|
279 | bundle2-input-part: total payload size 112077 | |
280 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported |
|
280 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported | |
281 | bundle2-input-bundle: 1 parts total |
|
281 | bundle2-input-bundle: 1 parts total | |
282 | checking for updated bookmarks |
|
282 | checking for updated bookmarks | |
283 | #endif |
|
283 | #endif | |
284 |
|
284 | |||
285 | Cannot stream clone when there are secret changesets |
|
285 | Cannot stream clone when there are secret changesets | |
286 |
|
286 | |||
287 | $ hg -R server phase --force --secret -r tip |
|
287 | $ hg -R server phase --force --secret -r tip | |
288 | $ hg clone --stream -U http://localhost:$HGPORT secret-denied |
|
288 | $ hg clone --stream -U http://localhost:$HGPORT secret-denied | |
289 | warning: stream clone requested but server has them disabled |
|
289 | warning: stream clone requested but server has them disabled | |
290 | requesting all changes |
|
290 | requesting all changes | |
291 | adding changesets |
|
291 | adding changesets | |
292 | adding manifests |
|
292 | adding manifests | |
293 | adding file changes |
|
293 | adding file changes | |
294 | added 1 changesets with 1 changes to 1 files |
|
294 | added 1 changesets with 1 changes to 1 files | |
295 | new changesets 96ee1d7354c4 |
|
295 | new changesets 96ee1d7354c4 | |
296 |
|
296 | |||
297 | $ killdaemons.py |
|
297 | $ killdaemons.py | |
298 |
|
298 | |||
299 | Streaming of secrets can be overridden by server config |
|
299 | Streaming of secrets can be overridden by server config | |
300 |
|
300 | |||
301 | $ cd server |
|
301 | $ cd server | |
302 | $ hg serve --config server.uncompressedallowsecret=true -p $HGPORT -d --pid-file=hg.pid |
|
302 | $ hg serve --config server.uncompressedallowsecret=true -p $HGPORT -d --pid-file=hg.pid | |
303 | $ cat hg.pid > $DAEMON_PIDS |
|
303 | $ cat hg.pid > $DAEMON_PIDS | |
304 | $ cd .. |
|
304 | $ cd .. | |
305 |
|
305 | |||
306 | #if stream-legacy |
|
306 | #if stream-legacy | |
307 | $ hg clone --stream -U http://localhost:$HGPORT secret-allowed |
|
307 | $ hg clone --stream -U http://localhost:$HGPORT secret-allowed | |
308 | streaming all changes |
|
308 | streaming all changes | |
309 | 1027 files to transfer, 96.3 KB of data |
|
309 | 1027 files to transfer, 96.3 KB of data | |
310 | transferred 96.3 KB in * seconds (*/sec) (glob) |
|
310 | transferred 96.3 KB in * seconds (*/sec) (glob) | |
311 | searching for changes |
|
311 | searching for changes | |
312 | no changes found |
|
312 | no changes found | |
313 | #endif |
|
313 | #endif | |
314 | #if stream-bundle2 |
|
314 | #if stream-bundle2 | |
315 | $ hg clone --stream -U http://localhost:$HGPORT secret-allowed |
|
315 | $ hg clone --stream -U http://localhost:$HGPORT secret-allowed | |
316 | streaming all changes |
|
316 | streaming all changes | |
317 | 1030 files to transfer, 96.4 KB of data |
|
317 | 1030 files to transfer, 96.4 KB of data | |
318 | transferred 96.4 KB in * seconds (* */sec) (glob) |
|
318 | transferred 96.4 KB in * seconds (* */sec) (glob) | |
319 | #endif |
|
319 | #endif | |
320 |
|
320 | |||
321 | $ killdaemons.py |
|
321 | $ killdaemons.py | |
322 |
|
322 | |||
323 | Verify interaction between preferuncompressed and secret presence |
|
323 | Verify interaction between preferuncompressed and secret presence | |
324 |
|
324 | |||
325 | $ cd server |
|
325 | $ cd server | |
326 | $ hg serve --config server.preferuncompressed=true -p $HGPORT -d --pid-file=hg.pid |
|
326 | $ hg serve --config server.preferuncompressed=true -p $HGPORT -d --pid-file=hg.pid | |
327 | $ cat hg.pid > $DAEMON_PIDS |
|
327 | $ cat hg.pid > $DAEMON_PIDS | |
328 | $ cd .. |
|
328 | $ cd .. | |
329 |
|
329 | |||
330 | $ hg clone -U http://localhost:$HGPORT preferuncompressed-secret |
|
330 | $ hg clone -U http://localhost:$HGPORT preferuncompressed-secret | |
331 | requesting all changes |
|
331 | requesting all changes | |
332 | adding changesets |
|
332 | adding changesets | |
333 | adding manifests |
|
333 | adding manifests | |
334 | adding file changes |
|
334 | adding file changes | |
335 | added 1 changesets with 1 changes to 1 files |
|
335 | added 1 changesets with 1 changes to 1 files | |
336 | new changesets 96ee1d7354c4 |
|
336 | new changesets 96ee1d7354c4 | |
337 |
|
337 | |||
338 | $ killdaemons.py |
|
338 | $ killdaemons.py | |
339 |
|
339 | |||
340 | Clone not allowed when full bundles disabled and can't serve secrets |
|
340 | Clone not allowed when full bundles disabled and can't serve secrets | |
341 |
|
341 | |||
342 | $ cd server |
|
342 | $ cd server | |
343 | $ hg serve --config server.disablefullbundle=true -p $HGPORT -d --pid-file=hg.pid |
|
343 | $ hg serve --config server.disablefullbundle=true -p $HGPORT -d --pid-file=hg.pid | |
344 | $ cat hg.pid > $DAEMON_PIDS |
|
344 | $ cat hg.pid > $DAEMON_PIDS | |
345 | $ cd .. |
|
345 | $ cd .. | |
346 |
|
346 | |||
347 | $ hg clone --stream http://localhost:$HGPORT secret-full-disabled |
|
347 | $ hg clone --stream http://localhost:$HGPORT secret-full-disabled | |
348 | warning: stream clone requested but server has them disabled |
|
348 | warning: stream clone requested but server has them disabled | |
349 | requesting all changes |
|
349 | requesting all changes | |
350 | remote: abort: server has pull-based clones disabled |
|
350 | remote: abort: server has pull-based clones disabled | |
351 | abort: pull failed on remote |
|
351 | abort: pull failed on remote | |
352 | (remove --pull if specified or upgrade Mercurial) |
|
352 | (remove --pull if specified or upgrade Mercurial) | |
353 | [255] |
|
353 | [255] | |
354 |
|
354 | |||
355 | Local stream clone with secrets involved |
|
355 | Local stream clone with secrets involved | |
356 | (This is just a test over behavior: if you have access to the repo's files, |
|
356 | (This is just a test over behavior: if you have access to the repo's files, | |
357 | there is no security so it isn't important to prevent a clone here.) |
|
357 | there is no security so it isn't important to prevent a clone here.) | |
358 |
|
358 | |||
359 | $ hg clone -U --stream server local-secret |
|
359 | $ hg clone -U --stream server local-secret | |
360 | warning: stream clone requested but server has them disabled |
|
360 | warning: stream clone requested but server has them disabled | |
361 | requesting all changes |
|
361 | requesting all changes | |
362 | adding changesets |
|
362 | adding changesets | |
363 | adding manifests |
|
363 | adding manifests | |
364 | adding file changes |
|
364 | adding file changes | |
365 | added 1 changesets with 1 changes to 1 files |
|
365 | added 1 changesets with 1 changes to 1 files | |
366 | new changesets 96ee1d7354c4 |
|
366 | new changesets 96ee1d7354c4 | |
367 |
|
367 | |||
368 | Stream clone while repo is changing: |
|
368 | Stream clone while repo is changing: | |
369 |
|
369 | |||
370 | $ mkdir changing |
|
370 | $ mkdir changing | |
371 | $ cd changing |
|
371 | $ cd changing | |
372 |
|
372 | |||
373 | extension for delaying the server process so we reliably can modify the repo |
|
373 | extension for delaying the server process so we reliably can modify the repo | |
374 | while cloning |
|
374 | while cloning | |
375 |
|
375 | |||
376 | $ cat > delayer.py <<EOF |
|
376 | $ cat > delayer.py <<EOF | |
377 | > import time |
|
377 | > import time | |
378 | > from mercurial import extensions, vfs |
|
378 | > from mercurial import extensions, vfs | |
379 | > def __call__(orig, self, path, *args, **kwargs): |
|
379 | > def __call__(orig, self, path, *args, **kwargs): | |
380 | > if path == 'data/f1.i': |
|
380 | > if path == 'data/f1.i': | |
381 | > time.sleep(2) |
|
381 | > time.sleep(2) | |
382 | > return orig(self, path, *args, **kwargs) |
|
382 | > return orig(self, path, *args, **kwargs) | |
383 | > extensions.wrapfunction(vfs.vfs, '__call__', __call__) |
|
383 | > extensions.wrapfunction(vfs.vfs, '__call__', __call__) | |
384 | > EOF |
|
384 | > EOF | |
385 |
|
385 | |||
386 | prepare repo with small and big file to cover both code paths in emitrevlogdata |
|
386 | prepare repo with small and big file to cover both code paths in emitrevlogdata | |
387 |
|
387 | |||
388 | $ hg init repo |
|
388 | $ hg init repo | |
389 | $ touch repo/f1 |
|
389 | $ touch repo/f1 | |
390 | $ $TESTDIR/seq.py 50000 > repo/f2 |
|
390 | $ $TESTDIR/seq.py 50000 > repo/f2 | |
391 | $ hg -R repo ci -Aqm "0" |
|
391 | $ hg -R repo ci -Aqm "0" | |
392 | $ hg serve -R repo -p $HGPORT1 -d --pid-file=hg.pid --config extensions.delayer=delayer.py |
|
392 | $ hg serve -R repo -p $HGPORT1 -d --pid-file=hg.pid --config extensions.delayer=delayer.py | |
393 | $ cat hg.pid >> $DAEMON_PIDS |
|
393 | $ cat hg.pid >> $DAEMON_PIDS | |
394 |
|
394 | |||
395 | clone while modifying the repo between stating file with write lock and |
|
395 | clone while modifying the repo between stating file with write lock and | |
396 | actually serving file content |
|
396 | actually serving file content | |
397 |
|
397 | |||
398 | $ hg clone -q --stream -U http://localhost:$HGPORT1 clone & |
|
398 | $ hg clone -q --stream -U http://localhost:$HGPORT1 clone & | |
399 | $ sleep 1 |
|
399 | $ sleep 1 | |
400 | $ echo >> repo/f1 |
|
400 | $ echo >> repo/f1 | |
401 | $ echo >> repo/f2 |
|
401 | $ echo >> repo/f2 | |
402 | $ hg -R repo ci -m "1" |
|
402 | $ hg -R repo ci -m "1" | |
403 | $ wait |
|
403 | $ wait | |
404 | $ hg -R clone id |
|
404 | $ hg -R clone id | |
405 | 000000000000 |
|
405 | 000000000000 | |
406 | $ cd .. |
|
406 | $ cd .. | |
407 |
|
407 | |||
408 | Stream repository with bookmarks |
|
408 | Stream repository with bookmarks | |
409 | -------------------------------- |
|
409 | -------------------------------- | |
410 |
|
410 | |||
411 | (revert introduction of secret changeset) |
|
411 | (revert introduction of secret changeset) | |
412 |
|
412 | |||
413 | $ hg -R server phase --draft 'secret()' |
|
413 | $ hg -R server phase --draft 'secret()' | |
414 |
|
414 | |||
415 | add a bookmark |
|
415 | add a bookmark | |
416 |
|
416 | |||
417 | $ hg -R server bookmark -r tip some-bookmark |
|
417 | $ hg -R server bookmark -r tip some-bookmark | |
418 |
|
418 | |||
419 | clone it |
|
419 | clone it | |
420 |
|
420 | |||
421 | #if stream-legacy |
|
421 | #if stream-legacy | |
422 | $ hg clone --stream http://localhost:$HGPORT with-bookmarks |
|
422 | $ hg clone --stream http://localhost:$HGPORT with-bookmarks | |
423 | streaming all changes |
|
423 | streaming all changes | |
424 | 1027 files to transfer, 96.3 KB of data |
|
424 | 1027 files to transfer, 96.3 KB of data | |
425 | transferred 96.3 KB in * seconds (*) (glob) |
|
425 | transferred 96.3 KB in * seconds (*) (glob) | |
426 | searching for changes |
|
426 | searching for changes | |
427 | no changes found |
|
427 | no changes found | |
428 | updating to branch default |
|
428 | updating to branch default | |
429 | 1025 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
429 | 1025 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
430 | #endif |
|
430 | #endif | |
431 | #if stream-bundle2 |
|
431 | #if stream-bundle2 | |
432 | $ hg clone --stream http://localhost:$HGPORT with-bookmarks |
|
432 | $ hg clone --stream http://localhost:$HGPORT with-bookmarks | |
433 | streaming all changes |
|
433 | streaming all changes | |
434 | 1033 files to transfer, 96.6 KB of data |
|
434 | 1033 files to transfer, 96.6 KB of data | |
435 | transferred 96.6 KB in * seconds (* */sec) (glob) |
|
435 | transferred 96.6 KB in * seconds (* */sec) (glob) | |
436 | updating to branch default |
|
436 | updating to branch default | |
437 | 1025 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
437 | 1025 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
438 | #endif |
|
438 | #endif | |
439 | $ hg -R with-bookmarks bookmarks |
|
439 | $ hg -R with-bookmarks bookmarks | |
440 | some-bookmark 1:c17445101a72 |
|
440 | some-bookmark 1:c17445101a72 | |
441 |
|
441 | |||
442 | Stream repository with phases |
|
442 | Stream repository with phases | |
443 | ----------------------------- |
|
443 | ----------------------------- | |
444 |
|
444 | |||
445 | Clone as publishing |
|
445 | Clone as publishing | |
446 |
|
446 | |||
447 | $ hg -R server phase -r 'all()' |
|
447 | $ hg -R server phase -r 'all()' | |
448 | 0: draft |
|
448 | 0: draft | |
449 | 1: draft |
|
449 | 1: draft | |
450 |
|
450 | |||
451 | #if stream-legacy |
|
451 | #if stream-legacy | |
452 | $ hg clone --stream http://localhost:$HGPORT phase-publish |
|
452 | $ hg clone --stream http://localhost:$HGPORT phase-publish | |
453 | streaming all changes |
|
453 | streaming all changes | |
454 | 1027 files to transfer, 96.3 KB of data |
|
454 | 1027 files to transfer, 96.3 KB of data | |
455 | transferred 96.3 KB in * seconds (*) (glob) |
|
455 | transferred 96.3 KB in * seconds (*) (glob) | |
456 | searching for changes |
|
456 | searching for changes | |
457 | no changes found |
|
457 | no changes found | |
458 | updating to branch default |
|
458 | updating to branch default | |
459 | 1025 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
459 | 1025 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
460 | #endif |
|
460 | #endif | |
461 | #if stream-bundle2 |
|
461 | #if stream-bundle2 | |
462 | $ hg clone --stream http://localhost:$HGPORT phase-publish |
|
462 | $ hg clone --stream http://localhost:$HGPORT phase-publish | |
463 | streaming all changes |
|
463 | streaming all changes | |
464 | 1033 files to transfer, 96.6 KB of data |
|
464 | 1033 files to transfer, 96.6 KB of data | |
465 | transferred 96.6 KB in * seconds (* */sec) (glob) |
|
465 | transferred 96.6 KB in * seconds (* */sec) (glob) | |
466 | updating to branch default |
|
466 | updating to branch default | |
467 | 1025 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
467 | 1025 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
468 | #endif |
|
468 | #endif | |
469 | $ hg -R phase-publish phase -r 'all()' |
|
469 | $ hg -R phase-publish phase -r 'all()' | |
470 | 0: public |
|
470 | 0: public | |
471 | 1: public |
|
471 | 1: public | |
472 |
|
472 | |||
473 | Clone as non publishing |
|
473 | Clone as non publishing | |
474 |
|
474 | |||
475 | $ cat << EOF >> server/.hg/hgrc |
|
475 | $ cat << EOF >> server/.hg/hgrc | |
476 | > [phases] |
|
476 | > [phases] | |
477 | > publish = False |
|
477 | > publish = False | |
478 | > EOF |
|
478 | > EOF | |
479 | $ killdaemons.py |
|
479 | $ killdaemons.py | |
480 | $ hg -R server serve -p $HGPORT -d --pid-file=hg.pid |
|
480 | $ hg -R server serve -p $HGPORT -d --pid-file=hg.pid | |
481 | $ cat hg.pid > $DAEMON_PIDS |
|
481 | $ cat hg.pid > $DAEMON_PIDS | |
482 |
|
482 | |||
483 | #if stream-legacy |
|
483 | #if stream-legacy | |
484 |
|
484 | |||
485 | With v1 of the stream protocol, changeset are always cloned as public. It make |
|
485 | With v1 of the stream protocol, changeset are always cloned as public. It make | |
486 | stream v1 unsuitable for non-publishing repository. |
|
486 | stream v1 unsuitable for non-publishing repository. | |
487 |
|
487 | |||
488 | $ hg clone --stream http://localhost:$HGPORT phase-no-publish |
|
488 | $ hg clone --stream http://localhost:$HGPORT phase-no-publish | |
489 | streaming all changes |
|
489 | streaming all changes | |
490 | 1027 files to transfer, 96.3 KB of data |
|
490 | 1027 files to transfer, 96.3 KB of data | |
491 | transferred 96.3 KB in * seconds (*) (glob) |
|
491 | transferred 96.3 KB in * seconds (*) (glob) | |
492 | searching for changes |
|
492 | searching for changes | |
493 | no changes found |
|
493 | no changes found | |
494 | updating to branch default |
|
494 | updating to branch default | |
495 | 1025 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
495 | 1025 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
496 | $ hg -R phase-no-publish phase -r 'all()' |
|
496 | $ hg -R phase-no-publish phase -r 'all()' | |
497 | 0: public |
|
497 | 0: public | |
498 | 1: public |
|
498 | 1: public | |
499 | #endif |
|
499 | #endif | |
500 | #if stream-bundle2 |
|
500 | #if stream-bundle2 | |
501 | $ hg clone --stream http://localhost:$HGPORT phase-no-publish |
|
501 | $ hg clone --stream http://localhost:$HGPORT phase-no-publish | |
502 | streaming all changes |
|
502 | streaming all changes | |
503 | 1034 files to transfer, 96.7 KB of data |
|
503 | 1034 files to transfer, 96.7 KB of data | |
504 | transferred 96.7 KB in * seconds (* */sec) (glob) |
|
504 | transferred 96.7 KB in * seconds (* */sec) (glob) | |
505 | updating to branch default |
|
505 | updating to branch default | |
506 | 1025 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
506 | 1025 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
507 | $ hg -R phase-no-publish phase -r 'all()' |
|
507 | $ hg -R phase-no-publish phase -r 'all()' | |
508 | 0: draft |
|
508 | 0: draft | |
509 | 1: draft |
|
509 | 1: draft | |
510 | #endif |
|
510 | #endif | |
511 |
|
511 | |||
512 | $ killdaemons.py |
|
512 | $ killdaemons.py |
@@ -1,547 +1,547 b'' | |||||
1 | #require no-reposimplestore |
|
1 | #require no-reposimplestore no-chg | |
2 |
|
2 | |||
3 | Set up a server |
|
3 | Set up a server | |
4 |
|
4 | |||
5 | $ hg init server |
|
5 | $ hg init server | |
6 | $ cd server |
|
6 | $ cd server | |
7 | $ cat >> .hg/hgrc << EOF |
|
7 | $ cat >> .hg/hgrc << EOF | |
8 | > [extensions] |
|
8 | > [extensions] | |
9 | > clonebundles = |
|
9 | > clonebundles = | |
10 | > EOF |
|
10 | > EOF | |
11 |
|
11 | |||
12 | $ touch foo |
|
12 | $ touch foo | |
13 | $ hg -q commit -A -m 'add foo' |
|
13 | $ hg -q commit -A -m 'add foo' | |
14 | $ touch bar |
|
14 | $ touch bar | |
15 | $ hg -q commit -A -m 'add bar' |
|
15 | $ hg -q commit -A -m 'add bar' | |
16 |
|
16 | |||
17 | $ hg serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log |
|
17 | $ hg serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log | |
18 | $ cat hg.pid >> $DAEMON_PIDS |
|
18 | $ cat hg.pid >> $DAEMON_PIDS | |
19 | $ cd .. |
|
19 | $ cd .. | |
20 |
|
20 | |||
21 | Missing manifest should not result in server lookup |
|
21 | Missing manifest should not result in server lookup | |
22 |
|
22 | |||
23 | $ hg --verbose clone -U http://localhost:$HGPORT no-manifest |
|
23 | $ hg --verbose clone -U http://localhost:$HGPORT no-manifest | |
24 | requesting all changes |
|
24 | requesting all changes | |
25 | adding changesets |
|
25 | adding changesets | |
26 | adding manifests |
|
26 | adding manifests | |
27 | adding file changes |
|
27 | adding file changes | |
28 | added 2 changesets with 2 changes to 2 files |
|
28 | added 2 changesets with 2 changes to 2 files | |
29 | new changesets 53245c60e682:aaff8d2ffbbf |
|
29 | new changesets 53245c60e682:aaff8d2ffbbf | |
30 |
|
30 | |||
31 | $ cat server/access.log |
|
31 | $ cat server/access.log | |
32 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
32 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
33 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
33 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
34 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=aaff8d2ffbbf07a46dd1f05d8ae7877e3f56e2a2&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
34 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=aaff8d2ffbbf07a46dd1f05d8ae7877e3f56e2a2&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
35 |
|
35 | |||
36 | Empty manifest file results in retrieval |
|
36 | Empty manifest file results in retrieval | |
37 | (the extension only checks if the manifest file exists) |
|
37 | (the extension only checks if the manifest file exists) | |
38 |
|
38 | |||
39 | $ touch server/.hg/clonebundles.manifest |
|
39 | $ touch server/.hg/clonebundles.manifest | |
40 | $ hg --verbose clone -U http://localhost:$HGPORT empty-manifest |
|
40 | $ hg --verbose clone -U http://localhost:$HGPORT empty-manifest | |
41 | no clone bundles available on remote; falling back to regular clone |
|
41 | no clone bundles available on remote; falling back to regular clone | |
42 | requesting all changes |
|
42 | requesting all changes | |
43 | adding changesets |
|
43 | adding changesets | |
44 | adding manifests |
|
44 | adding manifests | |
45 | adding file changes |
|
45 | adding file changes | |
46 | added 2 changesets with 2 changes to 2 files |
|
46 | added 2 changesets with 2 changes to 2 files | |
47 | new changesets 53245c60e682:aaff8d2ffbbf |
|
47 | new changesets 53245c60e682:aaff8d2ffbbf | |
48 |
|
48 | |||
49 | Manifest file with invalid URL aborts |
|
49 | Manifest file with invalid URL aborts | |
50 |
|
50 | |||
51 | $ echo 'http://does.not.exist/bundle.hg' > server/.hg/clonebundles.manifest |
|
51 | $ echo 'http://does.not.exist/bundle.hg' > server/.hg/clonebundles.manifest | |
52 | $ hg clone http://localhost:$HGPORT 404-url |
|
52 | $ hg clone http://localhost:$HGPORT 404-url | |
53 | applying clone bundle from http://does.not.exist/bundle.hg |
|
53 | applying clone bundle from http://does.not.exist/bundle.hg | |
54 | error fetching bundle: (.* not known|(\[Errno -?\d+])? No address associated with hostname) (re) (no-windows !) |
|
54 | error fetching bundle: (.* not known|(\[Errno -?\d+])? No address associated with hostname) (re) (no-windows !) | |
55 | error fetching bundle: [Errno 11004] getaddrinfo failed (windows !) |
|
55 | error fetching bundle: [Errno 11004] getaddrinfo failed (windows !) | |
56 | abort: error applying bundle |
|
56 | abort: error applying bundle | |
57 | (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false") |
|
57 | (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false") | |
58 | [255] |
|
58 | [255] | |
59 |
|
59 | |||
60 | Server is not running aborts |
|
60 | Server is not running aborts | |
61 |
|
61 | |||
62 | $ echo "http://localhost:$HGPORT1/bundle.hg" > server/.hg/clonebundles.manifest |
|
62 | $ echo "http://localhost:$HGPORT1/bundle.hg" > server/.hg/clonebundles.manifest | |
63 | $ hg clone http://localhost:$HGPORT server-not-runner |
|
63 | $ hg clone http://localhost:$HGPORT server-not-runner | |
64 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg |
|
64 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg | |
65 | error fetching bundle: (.* refused.*|Protocol not supported|(.* )?Cannot assign requested address) (re) |
|
65 | error fetching bundle: (.* refused.*|Protocol not supported|(.* )?Cannot assign requested address) (re) | |
66 | abort: error applying bundle |
|
66 | abort: error applying bundle | |
67 | (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false") |
|
67 | (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false") | |
68 | [255] |
|
68 | [255] | |
69 |
|
69 | |||
70 | Server returns 404 |
|
70 | Server returns 404 | |
71 |
|
71 | |||
72 | $ "$PYTHON" $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid |
|
72 | $ "$PYTHON" $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid | |
73 | $ cat http.pid >> $DAEMON_PIDS |
|
73 | $ cat http.pid >> $DAEMON_PIDS | |
74 | $ hg clone http://localhost:$HGPORT running-404 |
|
74 | $ hg clone http://localhost:$HGPORT running-404 | |
75 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg |
|
75 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg | |
76 | HTTP error fetching bundle: HTTP Error 404: File not found |
|
76 | HTTP error fetching bundle: HTTP Error 404: File not found | |
77 | abort: error applying bundle |
|
77 | abort: error applying bundle | |
78 | (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false") |
|
78 | (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false") | |
79 | [255] |
|
79 | [255] | |
80 |
|
80 | |||
81 | We can override failure to fall back to regular clone |
|
81 | We can override failure to fall back to regular clone | |
82 |
|
82 | |||
83 | $ hg --config ui.clonebundlefallback=true clone -U http://localhost:$HGPORT 404-fallback |
|
83 | $ hg --config ui.clonebundlefallback=true clone -U http://localhost:$HGPORT 404-fallback | |
84 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg |
|
84 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg | |
85 | HTTP error fetching bundle: HTTP Error 404: File not found |
|
85 | HTTP error fetching bundle: HTTP Error 404: File not found | |
86 | falling back to normal clone |
|
86 | falling back to normal clone | |
87 | requesting all changes |
|
87 | requesting all changes | |
88 | adding changesets |
|
88 | adding changesets | |
89 | adding manifests |
|
89 | adding manifests | |
90 | adding file changes |
|
90 | adding file changes | |
91 | added 2 changesets with 2 changes to 2 files |
|
91 | added 2 changesets with 2 changes to 2 files | |
92 | new changesets 53245c60e682:aaff8d2ffbbf |
|
92 | new changesets 53245c60e682:aaff8d2ffbbf | |
93 |
|
93 | |||
94 | Bundle with partial content works |
|
94 | Bundle with partial content works | |
95 |
|
95 | |||
96 | $ hg -R server bundle --type gzip-v1 --base null -r 53245c60e682 partial.hg |
|
96 | $ hg -R server bundle --type gzip-v1 --base null -r 53245c60e682 partial.hg | |
97 | 1 changesets found |
|
97 | 1 changesets found | |
98 |
|
98 | |||
99 | We verify exact bundle content as an extra check against accidental future |
|
99 | We verify exact bundle content as an extra check against accidental future | |
100 | changes. If this output changes, we could break old clients. |
|
100 | changes. If this output changes, we could break old clients. | |
101 |
|
101 | |||
102 | $ f --size --hexdump partial.hg |
|
102 | $ f --size --hexdump partial.hg | |
103 | partial.hg: size=207 |
|
103 | partial.hg: size=207 | |
104 | 0000: 48 47 31 30 47 5a 78 9c 63 60 60 98 17 ac 12 93 |HG10GZx.c``.....| |
|
104 | 0000: 48 47 31 30 47 5a 78 9c 63 60 60 98 17 ac 12 93 |HG10GZx.c``.....| | |
105 | 0010: f0 ac a9 23 45 70 cb bf 0d 5f 59 4e 4a 7f 79 21 |...#Ep..._YNJ.y!| |
|
105 | 0010: f0 ac a9 23 45 70 cb bf 0d 5f 59 4e 4a 7f 79 21 |...#Ep..._YNJ.y!| | |
106 | 0020: 9b cc 40 24 20 a0 d7 ce 2c d1 38 25 cd 24 25 d5 |..@$ ...,.8%.$%.| |
|
106 | 0020: 9b cc 40 24 20 a0 d7 ce 2c d1 38 25 cd 24 25 d5 |..@$ ...,.8%.$%.| | |
107 | 0030: d8 c2 22 cd 38 d9 24 cd 22 d5 c8 22 cd 24 cd 32 |..".8.$."..".$.2| |
|
107 | 0030: d8 c2 22 cd 38 d9 24 cd 22 d5 c8 22 cd 24 cd 32 |..".8.$."..".$.2| | |
108 | 0040: d1 c2 d0 c4 c8 d2 32 d1 38 39 29 c9 34 cd d4 80 |......2.89).4...| |
|
108 | 0040: d1 c2 d0 c4 c8 d2 32 d1 38 39 29 c9 34 cd d4 80 |......2.89).4...| | |
109 | 0050: ab 24 b5 b8 84 cb 40 c1 80 2b 2d 3f 9f 8b 2b 31 |.$....@..+-?..+1| |
|
109 | 0050: ab 24 b5 b8 84 cb 40 c1 80 2b 2d 3f 9f 8b 2b 31 |.$....@..+-?..+1| | |
110 | 0060: 25 45 01 c8 80 9a d2 9b 65 fb e5 9e 45 bf 8d 7f |%E......e...E...| |
|
110 | 0060: 25 45 01 c8 80 9a d2 9b 65 fb e5 9e 45 bf 8d 7f |%E......e...E...| | |
111 | 0070: 9f c6 97 9f 2b 44 34 67 d9 ec 8e 0f a0 92 0b 75 |....+D4g.......u| |
|
111 | 0070: 9f c6 97 9f 2b 44 34 67 d9 ec 8e 0f a0 92 0b 75 |....+D4g.......u| | |
112 | 0080: 41 d6 24 59 18 a4 a4 9a a6 18 1a 5b 98 9b 5a 98 |A.$Y.......[..Z.| |
|
112 | 0080: 41 d6 24 59 18 a4 a4 9a a6 18 1a 5b 98 9b 5a 98 |A.$Y.......[..Z.| | |
113 | 0090: 9a 18 26 9b a6 19 98 1a 99 99 26 a6 18 9a 98 24 |..&.......&....$| |
|
113 | 0090: 9a 18 26 9b a6 19 98 1a 99 99 26 a6 18 9a 98 24 |..&.......&....$| | |
114 | 00a0: 26 59 a6 25 5a 98 a5 18 a6 24 71 41 35 b1 43 dc |&Y.%Z....$qA5.C.| |
|
114 | 00a0: 26 59 a6 25 5a 98 a5 18 a6 24 71 41 35 b1 43 dc |&Y.%Z....$qA5.C.| | |
115 | 00b0: 16 b2 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 d7 8a |.....E..V....R..| |
|
115 | 00b0: 16 b2 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 d7 8a |.....E..V....R..| | |
116 | 00c0: 78 ed fc d5 76 f1 36 35 dc 05 00 36 ed 5e c7 |x...v.65...6.^.| |
|
116 | 00c0: 78 ed fc d5 76 f1 36 35 dc 05 00 36 ed 5e c7 |x...v.65...6.^.| | |
117 |
|
117 | |||
118 | $ echo "http://localhost:$HGPORT1/partial.hg" > server/.hg/clonebundles.manifest |
|
118 | $ echo "http://localhost:$HGPORT1/partial.hg" > server/.hg/clonebundles.manifest | |
119 | $ hg clone -U http://localhost:$HGPORT partial-bundle |
|
119 | $ hg clone -U http://localhost:$HGPORT partial-bundle | |
120 | applying clone bundle from http://localhost:$HGPORT1/partial.hg |
|
120 | applying clone bundle from http://localhost:$HGPORT1/partial.hg | |
121 | adding changesets |
|
121 | adding changesets | |
122 | adding manifests |
|
122 | adding manifests | |
123 | adding file changes |
|
123 | adding file changes | |
124 | added 1 changesets with 1 changes to 1 files |
|
124 | added 1 changesets with 1 changes to 1 files | |
125 | finished applying clone bundle |
|
125 | finished applying clone bundle | |
126 | searching for changes |
|
126 | searching for changes | |
127 | adding changesets |
|
127 | adding changesets | |
128 | adding manifests |
|
128 | adding manifests | |
129 | adding file changes |
|
129 | adding file changes | |
130 | added 1 changesets with 1 changes to 1 files |
|
130 | added 1 changesets with 1 changes to 1 files | |
131 | new changesets aaff8d2ffbbf |
|
131 | new changesets aaff8d2ffbbf | |
132 |
|
132 | |||
133 | Incremental pull doesn't fetch bundle |
|
133 | Incremental pull doesn't fetch bundle | |
134 |
|
134 | |||
135 | $ hg clone -r 53245c60e682 -U http://localhost:$HGPORT partial-clone |
|
135 | $ hg clone -r 53245c60e682 -U http://localhost:$HGPORT partial-clone | |
136 | adding changesets |
|
136 | adding changesets | |
137 | adding manifests |
|
137 | adding manifests | |
138 | adding file changes |
|
138 | adding file changes | |
139 | added 1 changesets with 1 changes to 1 files |
|
139 | added 1 changesets with 1 changes to 1 files | |
140 | new changesets 53245c60e682 |
|
140 | new changesets 53245c60e682 | |
141 |
|
141 | |||
142 | $ cd partial-clone |
|
142 | $ cd partial-clone | |
143 | $ hg pull |
|
143 | $ hg pull | |
144 | pulling from http://localhost:$HGPORT/ |
|
144 | pulling from http://localhost:$HGPORT/ | |
145 | searching for changes |
|
145 | searching for changes | |
146 | adding changesets |
|
146 | adding changesets | |
147 | adding manifests |
|
147 | adding manifests | |
148 | adding file changes |
|
148 | adding file changes | |
149 | added 1 changesets with 1 changes to 1 files |
|
149 | added 1 changesets with 1 changes to 1 files | |
150 | new changesets aaff8d2ffbbf |
|
150 | new changesets aaff8d2ffbbf | |
151 | (run 'hg update' to get a working copy) |
|
151 | (run 'hg update' to get a working copy) | |
152 | $ cd .. |
|
152 | $ cd .. | |
153 |
|
153 | |||
154 | Bundle with full content works |
|
154 | Bundle with full content works | |
155 |
|
155 | |||
156 | $ hg -R server bundle --type gzip-v2 --base null -r tip full.hg |
|
156 | $ hg -R server bundle --type gzip-v2 --base null -r tip full.hg | |
157 | 2 changesets found |
|
157 | 2 changesets found | |
158 |
|
158 | |||
159 | Again, we perform an extra check against bundle content changes. If this content |
|
159 | Again, we perform an extra check against bundle content changes. If this content | |
160 | changes, clone bundles produced by new Mercurial versions may not be readable |
|
160 | changes, clone bundles produced by new Mercurial versions may not be readable | |
161 | by old clients. |
|
161 | by old clients. | |
162 |
|
162 | |||
163 | $ f --size --hexdump full.hg |
|
163 | $ f --size --hexdump full.hg | |
164 | full.hg: size=442 |
|
164 | full.hg: size=442 | |
165 | 0000: 48 47 32 30 00 00 00 0e 43 6f 6d 70 72 65 73 73 |HG20....Compress| |
|
165 | 0000: 48 47 32 30 00 00 00 0e 43 6f 6d 70 72 65 73 73 |HG20....Compress| | |
166 | 0010: 69 6f 6e 3d 47 5a 78 9c 63 60 60 d0 e4 76 f6 70 |ion=GZx.c``..v.p| |
|
166 | 0010: 69 6f 6e 3d 47 5a 78 9c 63 60 60 d0 e4 76 f6 70 |ion=GZx.c``..v.p| | |
167 | 0020: f4 73 77 75 0f f2 0f 0d 60 00 02 46 46 76 26 4e |.swu....`..FFv&N| |
|
167 | 0020: f4 73 77 75 0f f2 0f 0d 60 00 02 46 46 76 26 4e |.swu....`..FFv&N| | |
168 | 0030: c6 b2 d4 a2 e2 cc fc 3c 03 a3 bc a4 e4 8c c4 bc |.......<........| |
|
168 | 0030: c6 b2 d4 a2 e2 cc fc 3c 03 a3 bc a4 e4 8c c4 bc |.......<........| | |
169 | 0040: f4 d4 62 23 06 06 e6 19 40 f9 4d c1 2a 31 09 cf |..b#....@.M.*1..| |
|
169 | 0040: f4 d4 62 23 06 06 e6 19 40 f9 4d c1 2a 31 09 cf |..b#....@.M.*1..| | |
170 | 0050: 9a 3a 52 04 b7 fc db f0 95 e5 a4 f4 97 17 b2 c9 |.:R.............| |
|
170 | 0050: 9a 3a 52 04 b7 fc db f0 95 e5 a4 f4 97 17 b2 c9 |.:R.............| | |
171 | 0060: 0c 14 00 02 e6 d9 99 25 1a a7 a4 99 a4 a4 1a 5b |.......%.......[| |
|
171 | 0060: 0c 14 00 02 e6 d9 99 25 1a a7 a4 99 a4 a4 1a 5b |.......%.......[| | |
172 | 0070: 58 a4 19 27 9b a4 59 a4 1a 59 a4 99 a4 59 26 5a |X..'..Y..Y...Y&Z| |
|
172 | 0070: 58 a4 19 27 9b a4 59 a4 1a 59 a4 99 a4 59 26 5a |X..'..Y..Y...Y&Z| | |
173 | 0080: 18 9a 18 59 5a 26 1a 27 27 25 99 a6 99 1a 70 95 |...YZ&.''%....p.| |
|
173 | 0080: 18 9a 18 59 5a 26 1a 27 27 25 99 a6 99 1a 70 95 |...YZ&.''%....p.| | |
174 | 0090: a4 16 97 70 19 28 18 70 a5 e5 e7 73 71 25 a6 a4 |...p.(.p...sq%..| |
|
174 | 0090: a4 16 97 70 19 28 18 70 a5 e5 e7 73 71 25 a6 a4 |...p.(.p...sq%..| | |
175 | 00a0: 28 00 19 20 17 af fa df ab ff 7b 3f fb 92 dc 8b |(.. ......{?....| |
|
175 | 00a0: 28 00 19 20 17 af fa df ab ff 7b 3f fb 92 dc 8b |(.. ......{?....| | |
176 | 00b0: 1f 62 bb 9e b7 d7 d9 87 3d 5a 44 89 2f b0 99 87 |.b......=ZD./...| |
|
176 | 00b0: 1f 62 bb 9e b7 d7 d9 87 3d 5a 44 89 2f b0 99 87 |.b......=ZD./...| | |
177 | 00c0: ec e2 54 63 43 e3 b4 64 43 73 23 33 43 53 0b 63 |..TcC..dCs#3CS.c| |
|
177 | 00c0: ec e2 54 63 43 e3 b4 64 43 73 23 33 43 53 0b 63 |..TcC..dCs#3CS.c| | |
178 | 00d0: d3 14 23 03 a0 fb 2c 2c 0c d3 80 1e 30 49 49 b1 |..#...,,....0II.| |
|
178 | 00d0: d3 14 23 03 a0 fb 2c 2c 0c d3 80 1e 30 49 49 b1 |..#...,,....0II.| | |
179 | 00e0: 4c 4a 32 48 33 30 b0 34 42 b8 38 29 b1 08 e2 62 |LJ2H30.4B.8)...b| |
|
179 | 00e0: 4c 4a 32 48 33 30 b0 34 42 b8 38 29 b1 08 e2 62 |LJ2H30.4B.8)...b| | |
180 | 00f0: 20 03 6a ca c2 2c db 2f f7 2c fa 6d fc fb 34 be | .j..,./.,.m..4.| |
|
180 | 00f0: 20 03 6a ca c2 2c db 2f f7 2c fa 6d fc fb 34 be | .j..,./.,.m..4.| | |
181 | 0100: fc 5c 21 a2 39 cb 66 77 7c 00 0d c3 59 17 14 58 |.\!.9.fw|...Y..X| |
|
181 | 0100: fc 5c 21 a2 39 cb 66 77 7c 00 0d c3 59 17 14 58 |.\!.9.fw|...Y..X| | |
182 | 0110: 49 16 06 29 a9 a6 29 86 c6 16 e6 a6 16 a6 26 86 |I..)..).......&.| |
|
182 | 0110: 49 16 06 29 a9 a6 29 86 c6 16 e6 a6 16 a6 26 86 |I..)..).......&.| | |
183 | 0120: c9 a6 69 06 a6 46 66 a6 89 29 86 26 26 89 49 96 |..i..Ff..).&&.I.| |
|
183 | 0120: c9 a6 69 06 a6 46 66 a6 89 29 86 26 26 89 49 96 |..i..Ff..).&&.I.| | |
184 | 0130: 69 89 16 66 29 86 29 49 5c 20 07 3e 16 fe 23 ae |i..f).)I\ .>..#.| |
|
184 | 0130: 69 89 16 66 29 86 29 49 5c 20 07 3e 16 fe 23 ae |i..f).)I\ .>..#.| | |
185 | 0140: 26 da 1c ab 10 1f d1 f8 e3 b3 ef cd dd fc 0c 93 |&...............| |
|
185 | 0140: 26 da 1c ab 10 1f d1 f8 e3 b3 ef cd dd fc 0c 93 |&...............| | |
186 | 0150: 88 75 34 36 75 04 82 55 17 14 36 a4 38 10 04 d8 |.u46u..U..6.8...| |
|
186 | 0150: 88 75 34 36 75 04 82 55 17 14 36 a4 38 10 04 d8 |.u46u..U..6.8...| | |
187 | 0160: 21 01 9a b1 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 |!......E..V....R| |
|
187 | 0160: 21 01 9a b1 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 |!......E..V....R| | |
188 | 0170: d7 8a 78 ed fc d5 76 f1 36 25 81 89 c7 ad ec 90 |..x...v.6%......| |
|
188 | 0170: d7 8a 78 ed fc d5 76 f1 36 25 81 89 c7 ad ec 90 |..x...v.6%......| | |
189 | 0180: 54 47 75 2b 89 48 b1 b2 62 ce 8e ce 1e ae 56 41 |TGu+.H..b.....VA| |
|
189 | 0180: 54 47 75 2b 89 48 b1 b2 62 ce 8e ce 1e ae 56 41 |TGu+.H..b.....VA| | |
190 | 0190: ae 61 ba 4e 41 8e 7e ce 1e ba 60 01 a0 14 23 58 |.a.NA.~...`...#X| |
|
190 | 0190: ae 61 ba 4e 41 8e 7e ce 1e ba 60 01 a0 14 23 58 |.a.NA.~...`...#X| | |
191 | 01a0: 81 35 c8 7d 40 cc 04 e2 a4 a4 a6 25 96 e6 94 60 |.5.}@......%...`| |
|
191 | 01a0: 81 35 c8 7d 40 cc 04 e2 a4 a4 a6 25 96 e6 94 60 |.5.}@......%...`| | |
192 | 01b0: 33 17 5f 54 00 00 01 1b 0a ec |3._T......| |
|
192 | 01b0: 33 17 5f 54 00 00 01 1b 0a ec |3._T......| | |
193 |
|
193 | |||
194 | $ echo "http://localhost:$HGPORT1/full.hg" > server/.hg/clonebundles.manifest |
|
194 | $ echo "http://localhost:$HGPORT1/full.hg" > server/.hg/clonebundles.manifest | |
195 | $ hg clone -U http://localhost:$HGPORT full-bundle |
|
195 | $ hg clone -U http://localhost:$HGPORT full-bundle | |
196 | applying clone bundle from http://localhost:$HGPORT1/full.hg |
|
196 | applying clone bundle from http://localhost:$HGPORT1/full.hg | |
197 | adding changesets |
|
197 | adding changesets | |
198 | adding manifests |
|
198 | adding manifests | |
199 | adding file changes |
|
199 | adding file changes | |
200 | added 2 changesets with 2 changes to 2 files |
|
200 | added 2 changesets with 2 changes to 2 files | |
201 | finished applying clone bundle |
|
201 | finished applying clone bundle | |
202 | searching for changes |
|
202 | searching for changes | |
203 | no changes found |
|
203 | no changes found | |
204 |
|
204 | |||
205 | Feature works over SSH |
|
205 | Feature works over SSH | |
206 |
|
206 | |||
207 | $ hg clone -U -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/server ssh-full-clone |
|
207 | $ hg clone -U -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/server ssh-full-clone | |
208 | applying clone bundle from http://localhost:$HGPORT1/full.hg |
|
208 | applying clone bundle from http://localhost:$HGPORT1/full.hg | |
209 | adding changesets |
|
209 | adding changesets | |
210 | adding manifests |
|
210 | adding manifests | |
211 | adding file changes |
|
211 | adding file changes | |
212 | added 2 changesets with 2 changes to 2 files |
|
212 | added 2 changesets with 2 changes to 2 files | |
213 | finished applying clone bundle |
|
213 | finished applying clone bundle | |
214 | searching for changes |
|
214 | searching for changes | |
215 | no changes found |
|
215 | no changes found | |
216 |
|
216 | |||
217 | Entry with unknown BUNDLESPEC is filtered and not used |
|
217 | Entry with unknown BUNDLESPEC is filtered and not used | |
218 |
|
218 | |||
219 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
219 | $ cat > server/.hg/clonebundles.manifest << EOF | |
220 | > http://bad.entry1 BUNDLESPEC=UNKNOWN |
|
220 | > http://bad.entry1 BUNDLESPEC=UNKNOWN | |
221 | > http://bad.entry2 BUNDLESPEC=xz-v1 |
|
221 | > http://bad.entry2 BUNDLESPEC=xz-v1 | |
222 | > http://bad.entry3 BUNDLESPEC=none-v100 |
|
222 | > http://bad.entry3 BUNDLESPEC=none-v100 | |
223 | > http://localhost:$HGPORT1/full.hg BUNDLESPEC=gzip-v2 |
|
223 | > http://localhost:$HGPORT1/full.hg BUNDLESPEC=gzip-v2 | |
224 | > EOF |
|
224 | > EOF | |
225 |
|
225 | |||
226 | $ hg clone -U http://localhost:$HGPORT filter-unknown-type |
|
226 | $ hg clone -U http://localhost:$HGPORT filter-unknown-type | |
227 | applying clone bundle from http://localhost:$HGPORT1/full.hg |
|
227 | applying clone bundle from http://localhost:$HGPORT1/full.hg | |
228 | adding changesets |
|
228 | adding changesets | |
229 | adding manifests |
|
229 | adding manifests | |
230 | adding file changes |
|
230 | adding file changes | |
231 | added 2 changesets with 2 changes to 2 files |
|
231 | added 2 changesets with 2 changes to 2 files | |
232 | finished applying clone bundle |
|
232 | finished applying clone bundle | |
233 | searching for changes |
|
233 | searching for changes | |
234 | no changes found |
|
234 | no changes found | |
235 |
|
235 | |||
236 | Automatic fallback when all entries are filtered |
|
236 | Automatic fallback when all entries are filtered | |
237 |
|
237 | |||
238 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
238 | $ cat > server/.hg/clonebundles.manifest << EOF | |
239 | > http://bad.entry BUNDLESPEC=UNKNOWN |
|
239 | > http://bad.entry BUNDLESPEC=UNKNOWN | |
240 | > EOF |
|
240 | > EOF | |
241 |
|
241 | |||
242 | $ hg clone -U http://localhost:$HGPORT filter-all |
|
242 | $ hg clone -U http://localhost:$HGPORT filter-all | |
243 | no compatible clone bundles available on server; falling back to regular clone |
|
243 | no compatible clone bundles available on server; falling back to regular clone | |
244 | (you may want to report this to the server operator) |
|
244 | (you may want to report this to the server operator) | |
245 | requesting all changes |
|
245 | requesting all changes | |
246 | adding changesets |
|
246 | adding changesets | |
247 | adding manifests |
|
247 | adding manifests | |
248 | adding file changes |
|
248 | adding file changes | |
249 | added 2 changesets with 2 changes to 2 files |
|
249 | added 2 changesets with 2 changes to 2 files | |
250 | new changesets 53245c60e682:aaff8d2ffbbf |
|
250 | new changesets 53245c60e682:aaff8d2ffbbf | |
251 |
|
251 | |||
252 | URLs requiring SNI are filtered in Python <2.7.9 |
|
252 | URLs requiring SNI are filtered in Python <2.7.9 | |
253 |
|
253 | |||
254 | $ cp full.hg sni.hg |
|
254 | $ cp full.hg sni.hg | |
255 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
255 | $ cat > server/.hg/clonebundles.manifest << EOF | |
256 | > http://localhost:$HGPORT1/sni.hg REQUIRESNI=true |
|
256 | > http://localhost:$HGPORT1/sni.hg REQUIRESNI=true | |
257 | > http://localhost:$HGPORT1/full.hg |
|
257 | > http://localhost:$HGPORT1/full.hg | |
258 | > EOF |
|
258 | > EOF | |
259 |
|
259 | |||
260 | #if sslcontext |
|
260 | #if sslcontext | |
261 | Python 2.7.9+ support SNI |
|
261 | Python 2.7.9+ support SNI | |
262 |
|
262 | |||
263 | $ hg clone -U http://localhost:$HGPORT sni-supported |
|
263 | $ hg clone -U http://localhost:$HGPORT sni-supported | |
264 | applying clone bundle from http://localhost:$HGPORT1/sni.hg |
|
264 | applying clone bundle from http://localhost:$HGPORT1/sni.hg | |
265 | adding changesets |
|
265 | adding changesets | |
266 | adding manifests |
|
266 | adding manifests | |
267 | adding file changes |
|
267 | adding file changes | |
268 | added 2 changesets with 2 changes to 2 files |
|
268 | added 2 changesets with 2 changes to 2 files | |
269 | finished applying clone bundle |
|
269 | finished applying clone bundle | |
270 | searching for changes |
|
270 | searching for changes | |
271 | no changes found |
|
271 | no changes found | |
272 | #else |
|
272 | #else | |
273 | Python <2.7.9 will filter SNI URLs |
|
273 | Python <2.7.9 will filter SNI URLs | |
274 |
|
274 | |||
275 | $ hg clone -U http://localhost:$HGPORT sni-unsupported |
|
275 | $ hg clone -U http://localhost:$HGPORT sni-unsupported | |
276 | applying clone bundle from http://localhost:$HGPORT1/full.hg |
|
276 | applying clone bundle from http://localhost:$HGPORT1/full.hg | |
277 | adding changesets |
|
277 | adding changesets | |
278 | adding manifests |
|
278 | adding manifests | |
279 | adding file changes |
|
279 | adding file changes | |
280 | added 2 changesets with 2 changes to 2 files |
|
280 | added 2 changesets with 2 changes to 2 files | |
281 | finished applying clone bundle |
|
281 | finished applying clone bundle | |
282 | searching for changes |
|
282 | searching for changes | |
283 | no changes found |
|
283 | no changes found | |
284 | #endif |
|
284 | #endif | |
285 |
|
285 | |||
286 | Stream clone bundles are supported |
|
286 | Stream clone bundles are supported | |
287 |
|
287 | |||
288 | $ hg -R server debugcreatestreamclonebundle packed.hg |
|
288 | $ hg -R server debugcreatestreamclonebundle packed.hg | |
289 | writing 613 bytes for 4 files |
|
289 | writing 613 bytes for 4 files | |
290 | bundle requirements: generaldelta, revlogv1 |
|
290 | bundle requirements: generaldelta, revlogv1 | |
291 |
|
291 | |||
292 | No bundle spec should work |
|
292 | No bundle spec should work | |
293 |
|
293 | |||
294 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
294 | $ cat > server/.hg/clonebundles.manifest << EOF | |
295 | > http://localhost:$HGPORT1/packed.hg |
|
295 | > http://localhost:$HGPORT1/packed.hg | |
296 | > EOF |
|
296 | > EOF | |
297 |
|
297 | |||
298 | $ hg clone -U http://localhost:$HGPORT stream-clone-no-spec |
|
298 | $ hg clone -U http://localhost:$HGPORT stream-clone-no-spec | |
299 | applying clone bundle from http://localhost:$HGPORT1/packed.hg |
|
299 | applying clone bundle from http://localhost:$HGPORT1/packed.hg | |
300 | 4 files to transfer, 613 bytes of data |
|
300 | 4 files to transfer, 613 bytes of data | |
301 | transferred 613 bytes in *.* seconds (*) (glob) |
|
301 | transferred 613 bytes in *.* seconds (*) (glob) | |
302 | finished applying clone bundle |
|
302 | finished applying clone bundle | |
303 | searching for changes |
|
303 | searching for changes | |
304 | no changes found |
|
304 | no changes found | |
305 |
|
305 | |||
306 | Bundle spec without parameters should work |
|
306 | Bundle spec without parameters should work | |
307 |
|
307 | |||
308 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
308 | $ cat > server/.hg/clonebundles.manifest << EOF | |
309 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1 |
|
309 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1 | |
310 | > EOF |
|
310 | > EOF | |
311 |
|
311 | |||
312 | $ hg clone -U http://localhost:$HGPORT stream-clone-vanilla-spec |
|
312 | $ hg clone -U http://localhost:$HGPORT stream-clone-vanilla-spec | |
313 | applying clone bundle from http://localhost:$HGPORT1/packed.hg |
|
313 | applying clone bundle from http://localhost:$HGPORT1/packed.hg | |
314 | 4 files to transfer, 613 bytes of data |
|
314 | 4 files to transfer, 613 bytes of data | |
315 | transferred 613 bytes in *.* seconds (*) (glob) |
|
315 | transferred 613 bytes in *.* seconds (*) (glob) | |
316 | finished applying clone bundle |
|
316 | finished applying clone bundle | |
317 | searching for changes |
|
317 | searching for changes | |
318 | no changes found |
|
318 | no changes found | |
319 |
|
319 | |||
320 | Bundle spec with format requirements should work |
|
320 | Bundle spec with format requirements should work | |
321 |
|
321 | |||
322 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
322 | $ cat > server/.hg/clonebundles.manifest << EOF | |
323 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1 |
|
323 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1 | |
324 | > EOF |
|
324 | > EOF | |
325 |
|
325 | |||
326 | $ hg clone -U http://localhost:$HGPORT stream-clone-supported-requirements |
|
326 | $ hg clone -U http://localhost:$HGPORT stream-clone-supported-requirements | |
327 | applying clone bundle from http://localhost:$HGPORT1/packed.hg |
|
327 | applying clone bundle from http://localhost:$HGPORT1/packed.hg | |
328 | 4 files to transfer, 613 bytes of data |
|
328 | 4 files to transfer, 613 bytes of data | |
329 | transferred 613 bytes in *.* seconds (*) (glob) |
|
329 | transferred 613 bytes in *.* seconds (*) (glob) | |
330 | finished applying clone bundle |
|
330 | finished applying clone bundle | |
331 | searching for changes |
|
331 | searching for changes | |
332 | no changes found |
|
332 | no changes found | |
333 |
|
333 | |||
334 | Stream bundle spec with unknown requirements should be filtered out |
|
334 | Stream bundle spec with unknown requirements should be filtered out | |
335 |
|
335 | |||
336 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
336 | $ cat > server/.hg/clonebundles.manifest << EOF | |
337 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42 |
|
337 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42 | |
338 | > EOF |
|
338 | > EOF | |
339 |
|
339 | |||
340 | $ hg clone -U http://localhost:$HGPORT stream-clone-unsupported-requirements |
|
340 | $ hg clone -U http://localhost:$HGPORT stream-clone-unsupported-requirements | |
341 | no compatible clone bundles available on server; falling back to regular clone |
|
341 | no compatible clone bundles available on server; falling back to regular clone | |
342 | (you may want to report this to the server operator) |
|
342 | (you may want to report this to the server operator) | |
343 | requesting all changes |
|
343 | requesting all changes | |
344 | adding changesets |
|
344 | adding changesets | |
345 | adding manifests |
|
345 | adding manifests | |
346 | adding file changes |
|
346 | adding file changes | |
347 | added 2 changesets with 2 changes to 2 files |
|
347 | added 2 changesets with 2 changes to 2 files | |
348 | new changesets 53245c60e682:aaff8d2ffbbf |
|
348 | new changesets 53245c60e682:aaff8d2ffbbf | |
349 |
|
349 | |||
350 | Set up manifest for testing preferences |
|
350 | Set up manifest for testing preferences | |
351 | (Remember, the TYPE does not have to match reality - the URL is |
|
351 | (Remember, the TYPE does not have to match reality - the URL is | |
352 | important) |
|
352 | important) | |
353 |
|
353 | |||
354 | $ cp full.hg gz-a.hg |
|
354 | $ cp full.hg gz-a.hg | |
355 | $ cp full.hg gz-b.hg |
|
355 | $ cp full.hg gz-b.hg | |
356 | $ cp full.hg bz2-a.hg |
|
356 | $ cp full.hg bz2-a.hg | |
357 | $ cp full.hg bz2-b.hg |
|
357 | $ cp full.hg bz2-b.hg | |
358 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
358 | $ cat > server/.hg/clonebundles.manifest << EOF | |
359 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 extra=a |
|
359 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 extra=a | |
360 | > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 extra=a |
|
360 | > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 extra=a | |
361 | > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b |
|
361 | > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b | |
362 | > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b |
|
362 | > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b | |
363 | > EOF |
|
363 | > EOF | |
364 |
|
364 | |||
365 | Preferring an undefined attribute will take first entry |
|
365 | Preferring an undefined attribute will take first entry | |
366 |
|
366 | |||
367 | $ hg --config ui.clonebundleprefers=foo=bar clone -U http://localhost:$HGPORT prefer-foo |
|
367 | $ hg --config ui.clonebundleprefers=foo=bar clone -U http://localhost:$HGPORT prefer-foo | |
368 | applying clone bundle from http://localhost:$HGPORT1/gz-a.hg |
|
368 | applying clone bundle from http://localhost:$HGPORT1/gz-a.hg | |
369 | adding changesets |
|
369 | adding changesets | |
370 | adding manifests |
|
370 | adding manifests | |
371 | adding file changes |
|
371 | adding file changes | |
372 | added 2 changesets with 2 changes to 2 files |
|
372 | added 2 changesets with 2 changes to 2 files | |
373 | finished applying clone bundle |
|
373 | finished applying clone bundle | |
374 | searching for changes |
|
374 | searching for changes | |
375 | no changes found |
|
375 | no changes found | |
376 |
|
376 | |||
377 | Preferring bz2 type will download first entry of that type |
|
377 | Preferring bz2 type will download first entry of that type | |
378 |
|
378 | |||
379 | $ hg --config ui.clonebundleprefers=COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-bz |
|
379 | $ hg --config ui.clonebundleprefers=COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-bz | |
380 | applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg |
|
380 | applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg | |
381 | adding changesets |
|
381 | adding changesets | |
382 | adding manifests |
|
382 | adding manifests | |
383 | adding file changes |
|
383 | adding file changes | |
384 | added 2 changesets with 2 changes to 2 files |
|
384 | added 2 changesets with 2 changes to 2 files | |
385 | finished applying clone bundle |
|
385 | finished applying clone bundle | |
386 | searching for changes |
|
386 | searching for changes | |
387 | no changes found |
|
387 | no changes found | |
388 |
|
388 | |||
389 | Preferring multiple values of an option works |
|
389 | Preferring multiple values of an option works | |
390 |
|
390 | |||
391 | $ hg --config ui.clonebundleprefers=COMPRESSION=unknown,COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-multiple-bz |
|
391 | $ hg --config ui.clonebundleprefers=COMPRESSION=unknown,COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-multiple-bz | |
392 | applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg |
|
392 | applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg | |
393 | adding changesets |
|
393 | adding changesets | |
394 | adding manifests |
|
394 | adding manifests | |
395 | adding file changes |
|
395 | adding file changes | |
396 | added 2 changesets with 2 changes to 2 files |
|
396 | added 2 changesets with 2 changes to 2 files | |
397 | finished applying clone bundle |
|
397 | finished applying clone bundle | |
398 | searching for changes |
|
398 | searching for changes | |
399 | no changes found |
|
399 | no changes found | |
400 |
|
400 | |||
401 | Sorting multiple values should get us back to original first entry |
|
401 | Sorting multiple values should get us back to original first entry | |
402 |
|
402 | |||
403 | $ hg --config ui.clonebundleprefers=BUNDLESPEC=unknown,BUNDLESPEC=gzip-v2,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-multiple-gz |
|
403 | $ hg --config ui.clonebundleprefers=BUNDLESPEC=unknown,BUNDLESPEC=gzip-v2,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-multiple-gz | |
404 | applying clone bundle from http://localhost:$HGPORT1/gz-a.hg |
|
404 | applying clone bundle from http://localhost:$HGPORT1/gz-a.hg | |
405 | adding changesets |
|
405 | adding changesets | |
406 | adding manifests |
|
406 | adding manifests | |
407 | adding file changes |
|
407 | adding file changes | |
408 | added 2 changesets with 2 changes to 2 files |
|
408 | added 2 changesets with 2 changes to 2 files | |
409 | finished applying clone bundle |
|
409 | finished applying clone bundle | |
410 | searching for changes |
|
410 | searching for changes | |
411 | no changes found |
|
411 | no changes found | |
412 |
|
412 | |||
413 | Preferring multiple attributes has correct order |
|
413 | Preferring multiple attributes has correct order | |
414 |
|
414 | |||
415 | $ hg --config ui.clonebundleprefers=extra=b,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-separate-attributes |
|
415 | $ hg --config ui.clonebundleprefers=extra=b,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-separate-attributes | |
416 | applying clone bundle from http://localhost:$HGPORT1/bz2-b.hg |
|
416 | applying clone bundle from http://localhost:$HGPORT1/bz2-b.hg | |
417 | adding changesets |
|
417 | adding changesets | |
418 | adding manifests |
|
418 | adding manifests | |
419 | adding file changes |
|
419 | adding file changes | |
420 | added 2 changesets with 2 changes to 2 files |
|
420 | added 2 changesets with 2 changes to 2 files | |
421 | finished applying clone bundle |
|
421 | finished applying clone bundle | |
422 | searching for changes |
|
422 | searching for changes | |
423 | no changes found |
|
423 | no changes found | |
424 |
|
424 | |||
425 | Test where attribute is missing from some entries |
|
425 | Test where attribute is missing from some entries | |
426 |
|
426 | |||
427 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
427 | $ cat > server/.hg/clonebundles.manifest << EOF | |
428 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 |
|
428 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 | |
429 | > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 |
|
429 | > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 | |
430 | > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b |
|
430 | > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b | |
431 | > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b |
|
431 | > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b | |
432 | > EOF |
|
432 | > EOF | |
433 |
|
433 | |||
434 | $ hg --config ui.clonebundleprefers=extra=b clone -U http://localhost:$HGPORT prefer-partially-defined-attribute |
|
434 | $ hg --config ui.clonebundleprefers=extra=b clone -U http://localhost:$HGPORT prefer-partially-defined-attribute | |
435 | applying clone bundle from http://localhost:$HGPORT1/gz-b.hg |
|
435 | applying clone bundle from http://localhost:$HGPORT1/gz-b.hg | |
436 | adding changesets |
|
436 | adding changesets | |
437 | adding manifests |
|
437 | adding manifests | |
438 | adding file changes |
|
438 | adding file changes | |
439 | added 2 changesets with 2 changes to 2 files |
|
439 | added 2 changesets with 2 changes to 2 files | |
440 | finished applying clone bundle |
|
440 | finished applying clone bundle | |
441 | searching for changes |
|
441 | searching for changes | |
442 | no changes found |
|
442 | no changes found | |
443 |
|
443 | |||
444 | Test interaction between clone bundles and --stream |
|
444 | Test interaction between clone bundles and --stream | |
445 |
|
445 | |||
446 | A manifest with just a gzip bundle |
|
446 | A manifest with just a gzip bundle | |
447 |
|
447 | |||
448 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
448 | $ cat > server/.hg/clonebundles.manifest << EOF | |
449 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 |
|
449 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 | |
450 | > EOF |
|
450 | > EOF | |
451 |
|
451 | |||
452 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip |
|
452 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip | |
453 | no compatible clone bundles available on server; falling back to regular clone |
|
453 | no compatible clone bundles available on server; falling back to regular clone | |
454 | (you may want to report this to the server operator) |
|
454 | (you may want to report this to the server operator) | |
455 | streaming all changes |
|
455 | streaming all changes | |
456 | 4 files to transfer, 613 bytes of data |
|
456 | 4 files to transfer, 613 bytes of data | |
457 | transferred 613 bytes in * seconds (*) (glob) |
|
457 | transferred 613 bytes in * seconds (*) (glob) | |
458 | searching for changes |
|
458 | searching for changes | |
459 | no changes found |
|
459 | no changes found | |
460 |
|
460 | |||
461 | A manifest with a stream clone but no BUNDLESPEC |
|
461 | A manifest with a stream clone but no BUNDLESPEC | |
462 |
|
462 | |||
463 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
463 | $ cat > server/.hg/clonebundles.manifest << EOF | |
464 | > http://localhost:$HGPORT1/packed.hg |
|
464 | > http://localhost:$HGPORT1/packed.hg | |
465 | > EOF |
|
465 | > EOF | |
466 |
|
466 | |||
467 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-no-bundlespec |
|
467 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-no-bundlespec | |
468 | no compatible clone bundles available on server; falling back to regular clone |
|
468 | no compatible clone bundles available on server; falling back to regular clone | |
469 | (you may want to report this to the server operator) |
|
469 | (you may want to report this to the server operator) | |
470 | streaming all changes |
|
470 | streaming all changes | |
471 | 4 files to transfer, 613 bytes of data |
|
471 | 4 files to transfer, 613 bytes of data | |
472 | transferred 613 bytes in * seconds (*) (glob) |
|
472 | transferred 613 bytes in * seconds (*) (glob) | |
473 | searching for changes |
|
473 | searching for changes | |
474 | no changes found |
|
474 | no changes found | |
475 |
|
475 | |||
476 | A manifest with a gzip bundle and a stream clone |
|
476 | A manifest with a gzip bundle and a stream clone | |
477 |
|
477 | |||
478 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
478 | $ cat > server/.hg/clonebundles.manifest << EOF | |
479 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 |
|
479 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 | |
480 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1 |
|
480 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1 | |
481 | > EOF |
|
481 | > EOF | |
482 |
|
482 | |||
483 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed |
|
483 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed | |
484 | applying clone bundle from http://localhost:$HGPORT1/packed.hg |
|
484 | applying clone bundle from http://localhost:$HGPORT1/packed.hg | |
485 | 4 files to transfer, 613 bytes of data |
|
485 | 4 files to transfer, 613 bytes of data | |
486 | transferred 613 bytes in * seconds (*) (glob) |
|
486 | transferred 613 bytes in * seconds (*) (glob) | |
487 | finished applying clone bundle |
|
487 | finished applying clone bundle | |
488 | searching for changes |
|
488 | searching for changes | |
489 | no changes found |
|
489 | no changes found | |
490 |
|
490 | |||
491 | A manifest with a gzip bundle and stream clone with supported requirements |
|
491 | A manifest with a gzip bundle and stream clone with supported requirements | |
492 |
|
492 | |||
493 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
493 | $ cat > server/.hg/clonebundles.manifest << EOF | |
494 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 |
|
494 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 | |
495 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1 |
|
495 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1 | |
496 | > EOF |
|
496 | > EOF | |
497 |
|
497 | |||
498 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed-requirements |
|
498 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed-requirements | |
499 | applying clone bundle from http://localhost:$HGPORT1/packed.hg |
|
499 | applying clone bundle from http://localhost:$HGPORT1/packed.hg | |
500 | 4 files to transfer, 613 bytes of data |
|
500 | 4 files to transfer, 613 bytes of data | |
501 | transferred 613 bytes in * seconds (*) (glob) |
|
501 | transferred 613 bytes in * seconds (*) (glob) | |
502 | finished applying clone bundle |
|
502 | finished applying clone bundle | |
503 | searching for changes |
|
503 | searching for changes | |
504 | no changes found |
|
504 | no changes found | |
505 |
|
505 | |||
506 | A manifest with a gzip bundle and a stream clone with unsupported requirements |
|
506 | A manifest with a gzip bundle and a stream clone with unsupported requirements | |
507 |
|
507 | |||
508 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
508 | $ cat > server/.hg/clonebundles.manifest << EOF | |
509 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 |
|
509 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 | |
510 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42 |
|
510 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42 | |
511 | > EOF |
|
511 | > EOF | |
512 |
|
512 | |||
513 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed-unsupported-requirements |
|
513 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed-unsupported-requirements | |
514 | no compatible clone bundles available on server; falling back to regular clone |
|
514 | no compatible clone bundles available on server; falling back to regular clone | |
515 | (you may want to report this to the server operator) |
|
515 | (you may want to report this to the server operator) | |
516 | streaming all changes |
|
516 | streaming all changes | |
517 | 4 files to transfer, 613 bytes of data |
|
517 | 4 files to transfer, 613 bytes of data | |
518 | transferred 613 bytes in * seconds (*) (glob) |
|
518 | transferred 613 bytes in * seconds (*) (glob) | |
519 | searching for changes |
|
519 | searching for changes | |
520 | no changes found |
|
520 | no changes found | |
521 |
|
521 | |||
522 | Test clone bundle retrieved through bundle2 |
|
522 | Test clone bundle retrieved through bundle2 | |
523 |
|
523 | |||
524 | $ cat << EOF >> $HGRCPATH |
|
524 | $ cat << EOF >> $HGRCPATH | |
525 | > [extensions] |
|
525 | > [extensions] | |
526 | > largefiles= |
|
526 | > largefiles= | |
527 | > EOF |
|
527 | > EOF | |
528 | $ killdaemons.py |
|
528 | $ killdaemons.py | |
529 | $ hg -R server serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log |
|
529 | $ hg -R server serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log | |
530 | $ cat hg.pid >> $DAEMON_PIDS |
|
530 | $ cat hg.pid >> $DAEMON_PIDS | |
531 |
|
531 | |||
532 | $ hg -R server debuglfput gz-a.hg |
|
532 | $ hg -R server debuglfput gz-a.hg | |
533 | 14ee2f0b3f1d14aeeb2fe037e09fc295c3cf59f5 |
|
533 | 14ee2f0b3f1d14aeeb2fe037e09fc295c3cf59f5 | |
534 |
|
534 | |||
535 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
535 | $ cat > server/.hg/clonebundles.manifest << EOF | |
536 | > largefile://14ee2f0b3f1d14aeeb2fe037e09fc295c3cf59f5 BUNDLESPEC=gzip-v2 |
|
536 | > largefile://14ee2f0b3f1d14aeeb2fe037e09fc295c3cf59f5 BUNDLESPEC=gzip-v2 | |
537 | > EOF |
|
537 | > EOF | |
538 |
|
538 | |||
539 | $ hg clone -U http://localhost:$HGPORT largefile-provided --traceback |
|
539 | $ hg clone -U http://localhost:$HGPORT largefile-provided --traceback | |
540 | applying clone bundle from largefile://14ee2f0b3f1d14aeeb2fe037e09fc295c3cf59f5 |
|
540 | applying clone bundle from largefile://14ee2f0b3f1d14aeeb2fe037e09fc295c3cf59f5 | |
541 | adding changesets |
|
541 | adding changesets | |
542 | adding manifests |
|
542 | adding manifests | |
543 | adding file changes |
|
543 | adding file changes | |
544 | added 2 changesets with 2 changes to 2 files |
|
544 | added 2 changesets with 2 changes to 2 files | |
545 | finished applying clone bundle |
|
545 | finished applying clone bundle | |
546 | searching for changes |
|
546 | searching for changes | |
547 | no changes found |
|
547 | no changes found |
@@ -1,564 +1,566 b'' | |||||
|
1 | #require no-chg | |||
|
2 | ||||
1 | $ . $TESTDIR/wireprotohelpers.sh |
|
3 | $ . $TESTDIR/wireprotohelpers.sh | |
2 | $ enabledummycommands |
|
4 | $ enabledummycommands | |
3 |
|
5 | |||
4 | $ hg init server |
|
6 | $ hg init server | |
5 | $ cat > server/.hg/hgrc << EOF |
|
7 | $ cat > server/.hg/hgrc << EOF | |
6 | > [experimental] |
|
8 | > [experimental] | |
7 | > web.apiserver = true |
|
9 | > web.apiserver = true | |
8 | > EOF |
|
10 | > EOF | |
9 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid |
|
11 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid | |
10 | $ cat hg.pid > $DAEMON_PIDS |
|
12 | $ cat hg.pid > $DAEMON_PIDS | |
11 |
|
13 | |||
12 | HTTP v2 protocol not enabled by default |
|
14 | HTTP v2 protocol not enabled by default | |
13 |
|
15 | |||
14 | $ sendhttpraw << EOF |
|
16 | $ sendhttpraw << EOF | |
15 | > httprequest GET api/$HTTPV2 |
|
17 | > httprequest GET api/$HTTPV2 | |
16 | > user-agent: test |
|
18 | > user-agent: test | |
17 | > EOF |
|
19 | > EOF | |
18 | using raw connection to peer |
|
20 | using raw connection to peer | |
19 | s> GET /api/exp-http-v2-0001 HTTP/1.1\r\n |
|
21 | s> GET /api/exp-http-v2-0001 HTTP/1.1\r\n | |
20 | s> Accept-Encoding: identity\r\n |
|
22 | s> Accept-Encoding: identity\r\n | |
21 | s> user-agent: test\r\n |
|
23 | s> user-agent: test\r\n | |
22 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
24 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
23 | s> \r\n |
|
25 | s> \r\n | |
24 | s> makefile('rb', None) |
|
26 | s> makefile('rb', None) | |
25 | s> HTTP/1.1 404 Not Found\r\n |
|
27 | s> HTTP/1.1 404 Not Found\r\n | |
26 | s> Server: testing stub value\r\n |
|
28 | s> Server: testing stub value\r\n | |
27 | s> Date: $HTTP_DATE$\r\n |
|
29 | s> Date: $HTTP_DATE$\r\n | |
28 | s> Content-Type: text/plain\r\n |
|
30 | s> Content-Type: text/plain\r\n | |
29 | s> Content-Length: 33\r\n |
|
31 | s> Content-Length: 33\r\n | |
30 | s> \r\n |
|
32 | s> \r\n | |
31 | s> API exp-http-v2-0001 not enabled\n |
|
33 | s> API exp-http-v2-0001 not enabled\n | |
32 |
|
34 | |||
33 | Restart server with support for HTTP v2 API |
|
35 | Restart server with support for HTTP v2 API | |
34 |
|
36 | |||
35 | $ killdaemons.py |
|
37 | $ killdaemons.py | |
36 | $ enablehttpv2 server |
|
38 | $ enablehttpv2 server | |
37 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid |
|
39 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid | |
38 | $ cat hg.pid > $DAEMON_PIDS |
|
40 | $ cat hg.pid > $DAEMON_PIDS | |
39 |
|
41 | |||
40 | Request to unknown command yields 404 |
|
42 | Request to unknown command yields 404 | |
41 |
|
43 | |||
42 | $ sendhttpraw << EOF |
|
44 | $ sendhttpraw << EOF | |
43 | > httprequest POST api/$HTTPV2/ro/badcommand |
|
45 | > httprequest POST api/$HTTPV2/ro/badcommand | |
44 | > user-agent: test |
|
46 | > user-agent: test | |
45 | > EOF |
|
47 | > EOF | |
46 | using raw connection to peer |
|
48 | using raw connection to peer | |
47 | s> POST /api/exp-http-v2-0001/ro/badcommand HTTP/1.1\r\n |
|
49 | s> POST /api/exp-http-v2-0001/ro/badcommand HTTP/1.1\r\n | |
48 | s> Accept-Encoding: identity\r\n |
|
50 | s> Accept-Encoding: identity\r\n | |
49 | s> user-agent: test\r\n |
|
51 | s> user-agent: test\r\n | |
50 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
52 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
51 | s> \r\n |
|
53 | s> \r\n | |
52 | s> makefile('rb', None) |
|
54 | s> makefile('rb', None) | |
53 | s> HTTP/1.1 404 Not Found\r\n |
|
55 | s> HTTP/1.1 404 Not Found\r\n | |
54 | s> Server: testing stub value\r\n |
|
56 | s> Server: testing stub value\r\n | |
55 | s> Date: $HTTP_DATE$\r\n |
|
57 | s> Date: $HTTP_DATE$\r\n | |
56 | s> Content-Type: text/plain\r\n |
|
58 | s> Content-Type: text/plain\r\n | |
57 | s> Content-Length: 42\r\n |
|
59 | s> Content-Length: 42\r\n | |
58 | s> \r\n |
|
60 | s> \r\n | |
59 | s> unknown wire protocol command: badcommand\n |
|
61 | s> unknown wire protocol command: badcommand\n | |
60 |
|
62 | |||
61 | GET to read-only command yields a 405 |
|
63 | GET to read-only command yields a 405 | |
62 |
|
64 | |||
63 | $ sendhttpraw << EOF |
|
65 | $ sendhttpraw << EOF | |
64 | > httprequest GET api/$HTTPV2/ro/customreadonly |
|
66 | > httprequest GET api/$HTTPV2/ro/customreadonly | |
65 | > user-agent: test |
|
67 | > user-agent: test | |
66 | > EOF |
|
68 | > EOF | |
67 | using raw connection to peer |
|
69 | using raw connection to peer | |
68 | s> GET /api/exp-http-v2-0001/ro/customreadonly HTTP/1.1\r\n |
|
70 | s> GET /api/exp-http-v2-0001/ro/customreadonly HTTP/1.1\r\n | |
69 | s> Accept-Encoding: identity\r\n |
|
71 | s> Accept-Encoding: identity\r\n | |
70 | s> user-agent: test\r\n |
|
72 | s> user-agent: test\r\n | |
71 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
73 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
72 | s> \r\n |
|
74 | s> \r\n | |
73 | s> makefile('rb', None) |
|
75 | s> makefile('rb', None) | |
74 | s> HTTP/1.1 405 Method Not Allowed\r\n |
|
76 | s> HTTP/1.1 405 Method Not Allowed\r\n | |
75 | s> Server: testing stub value\r\n |
|
77 | s> Server: testing stub value\r\n | |
76 | s> Date: $HTTP_DATE$\r\n |
|
78 | s> Date: $HTTP_DATE$\r\n | |
77 | s> Allow: POST\r\n |
|
79 | s> Allow: POST\r\n | |
78 | s> Content-Length: 30\r\n |
|
80 | s> Content-Length: 30\r\n | |
79 | s> \r\n |
|
81 | s> \r\n | |
80 | s> commands require POST requests |
|
82 | s> commands require POST requests | |
81 |
|
83 | |||
82 | Missing Accept header results in 406 |
|
84 | Missing Accept header results in 406 | |
83 |
|
85 | |||
84 | $ sendhttpraw << EOF |
|
86 | $ sendhttpraw << EOF | |
85 | > httprequest POST api/$HTTPV2/ro/customreadonly |
|
87 | > httprequest POST api/$HTTPV2/ro/customreadonly | |
86 | > user-agent: test |
|
88 | > user-agent: test | |
87 | > EOF |
|
89 | > EOF | |
88 | using raw connection to peer |
|
90 | using raw connection to peer | |
89 | s> POST /api/exp-http-v2-0001/ro/customreadonly HTTP/1.1\r\n |
|
91 | s> POST /api/exp-http-v2-0001/ro/customreadonly HTTP/1.1\r\n | |
90 | s> Accept-Encoding: identity\r\n |
|
92 | s> Accept-Encoding: identity\r\n | |
91 | s> user-agent: test\r\n |
|
93 | s> user-agent: test\r\n | |
92 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
94 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
93 | s> \r\n |
|
95 | s> \r\n | |
94 | s> makefile('rb', None) |
|
96 | s> makefile('rb', None) | |
95 | s> HTTP/1.1 406 Not Acceptable\r\n |
|
97 | s> HTTP/1.1 406 Not Acceptable\r\n | |
96 | s> Server: testing stub value\r\n |
|
98 | s> Server: testing stub value\r\n | |
97 | s> Date: $HTTP_DATE$\r\n |
|
99 | s> Date: $HTTP_DATE$\r\n | |
98 | s> Content-Type: text/plain\r\n |
|
100 | s> Content-Type: text/plain\r\n | |
99 | s> Content-Length: 85\r\n |
|
101 | s> Content-Length: 85\r\n | |
100 | s> \r\n |
|
102 | s> \r\n | |
101 | s> client MUST specify Accept header with value: application/mercurial-exp-framing-0005\n |
|
103 | s> client MUST specify Accept header with value: application/mercurial-exp-framing-0005\n | |
102 |
|
104 | |||
103 | Bad Accept header results in 406 |
|
105 | Bad Accept header results in 406 | |
104 |
|
106 | |||
105 | $ sendhttpraw << EOF |
|
107 | $ sendhttpraw << EOF | |
106 | > httprequest POST api/$HTTPV2/ro/customreadonly |
|
108 | > httprequest POST api/$HTTPV2/ro/customreadonly | |
107 | > accept: invalid |
|
109 | > accept: invalid | |
108 | > user-agent: test |
|
110 | > user-agent: test | |
109 | > EOF |
|
111 | > EOF | |
110 | using raw connection to peer |
|
112 | using raw connection to peer | |
111 | s> POST /api/exp-http-v2-0001/ro/customreadonly HTTP/1.1\r\n |
|
113 | s> POST /api/exp-http-v2-0001/ro/customreadonly HTTP/1.1\r\n | |
112 | s> Accept-Encoding: identity\r\n |
|
114 | s> Accept-Encoding: identity\r\n | |
113 | s> accept: invalid\r\n |
|
115 | s> accept: invalid\r\n | |
114 | s> user-agent: test\r\n |
|
116 | s> user-agent: test\r\n | |
115 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
117 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
116 | s> \r\n |
|
118 | s> \r\n | |
117 | s> makefile('rb', None) |
|
119 | s> makefile('rb', None) | |
118 | s> HTTP/1.1 406 Not Acceptable\r\n |
|
120 | s> HTTP/1.1 406 Not Acceptable\r\n | |
119 | s> Server: testing stub value\r\n |
|
121 | s> Server: testing stub value\r\n | |
120 | s> Date: $HTTP_DATE$\r\n |
|
122 | s> Date: $HTTP_DATE$\r\n | |
121 | s> Content-Type: text/plain\r\n |
|
123 | s> Content-Type: text/plain\r\n | |
122 | s> Content-Length: 85\r\n |
|
124 | s> Content-Length: 85\r\n | |
123 | s> \r\n |
|
125 | s> \r\n | |
124 | s> client MUST specify Accept header with value: application/mercurial-exp-framing-0005\n |
|
126 | s> client MUST specify Accept header with value: application/mercurial-exp-framing-0005\n | |
125 |
|
127 | |||
126 | Bad Content-Type header results in 415 |
|
128 | Bad Content-Type header results in 415 | |
127 |
|
129 | |||
128 | $ sendhttpraw << EOF |
|
130 | $ sendhttpraw << EOF | |
129 | > httprequest POST api/$HTTPV2/ro/customreadonly |
|
131 | > httprequest POST api/$HTTPV2/ro/customreadonly | |
130 | > accept: $MEDIATYPE |
|
132 | > accept: $MEDIATYPE | |
131 | > user-agent: test |
|
133 | > user-agent: test | |
132 | > content-type: badmedia |
|
134 | > content-type: badmedia | |
133 | > EOF |
|
135 | > EOF | |
134 | using raw connection to peer |
|
136 | using raw connection to peer | |
135 | s> POST /api/exp-http-v2-0001/ro/customreadonly HTTP/1.1\r\n |
|
137 | s> POST /api/exp-http-v2-0001/ro/customreadonly HTTP/1.1\r\n | |
136 | s> Accept-Encoding: identity\r\n |
|
138 | s> Accept-Encoding: identity\r\n | |
137 | s> accept: application/mercurial-exp-framing-0005\r\n |
|
139 | s> accept: application/mercurial-exp-framing-0005\r\n | |
138 | s> content-type: badmedia\r\n |
|
140 | s> content-type: badmedia\r\n | |
139 | s> user-agent: test\r\n |
|
141 | s> user-agent: test\r\n | |
140 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
142 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
141 | s> \r\n |
|
143 | s> \r\n | |
142 | s> makefile('rb', None) |
|
144 | s> makefile('rb', None) | |
143 | s> HTTP/1.1 415 Unsupported Media Type\r\n |
|
145 | s> HTTP/1.1 415 Unsupported Media Type\r\n | |
144 | s> Server: testing stub value\r\n |
|
146 | s> Server: testing stub value\r\n | |
145 | s> Date: $HTTP_DATE$\r\n |
|
147 | s> Date: $HTTP_DATE$\r\n | |
146 | s> Content-Type: text/plain\r\n |
|
148 | s> Content-Type: text/plain\r\n | |
147 | s> Content-Length: 88\r\n |
|
149 | s> Content-Length: 88\r\n | |
148 | s> \r\n |
|
150 | s> \r\n | |
149 | s> client MUST send Content-Type header with value: application/mercurial-exp-framing-0005\n |
|
151 | s> client MUST send Content-Type header with value: application/mercurial-exp-framing-0005\n | |
150 |
|
152 | |||
151 | Request to read-only command works out of the box |
|
153 | Request to read-only command works out of the box | |
152 |
|
154 | |||
153 | $ sendhttpraw << EOF |
|
155 | $ sendhttpraw << EOF | |
154 | > httprequest POST api/$HTTPV2/ro/customreadonly |
|
156 | > httprequest POST api/$HTTPV2/ro/customreadonly | |
155 | > accept: $MEDIATYPE |
|
157 | > accept: $MEDIATYPE | |
156 | > content-type: $MEDIATYPE |
|
158 | > content-type: $MEDIATYPE | |
157 | > user-agent: test |
|
159 | > user-agent: test | |
158 | > frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} |
|
160 | > frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} | |
159 | > EOF |
|
161 | > EOF | |
160 | using raw connection to peer |
|
162 | using raw connection to peer | |
161 | s> POST /api/exp-http-v2-0001/ro/customreadonly HTTP/1.1\r\n |
|
163 | s> POST /api/exp-http-v2-0001/ro/customreadonly HTTP/1.1\r\n | |
162 | s> Accept-Encoding: identity\r\n |
|
164 | s> Accept-Encoding: identity\r\n | |
163 | s> *\r\n (glob) |
|
165 | s> *\r\n (glob) | |
164 | s> content-type: application/mercurial-exp-framing-0005\r\n |
|
166 | s> content-type: application/mercurial-exp-framing-0005\r\n | |
165 | s> user-agent: test\r\n |
|
167 | s> user-agent: test\r\n | |
166 | s> content-length: 29\r\n |
|
168 | s> content-length: 29\r\n | |
167 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
169 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
168 | s> \r\n |
|
170 | s> \r\n | |
169 | s> \x15\x00\x00\x01\x00\x01\x01\x11\xa1DnameNcustomreadonly |
|
171 | s> \x15\x00\x00\x01\x00\x01\x01\x11\xa1DnameNcustomreadonly | |
170 | s> makefile('rb', None) |
|
172 | s> makefile('rb', None) | |
171 | s> HTTP/1.1 200 OK\r\n |
|
173 | s> HTTP/1.1 200 OK\r\n | |
172 | s> Server: testing stub value\r\n |
|
174 | s> Server: testing stub value\r\n | |
173 | s> Date: $HTTP_DATE$\r\n |
|
175 | s> Date: $HTTP_DATE$\r\n | |
174 | s> Content-Type: application/mercurial-exp-framing-0005\r\n |
|
176 | s> Content-Type: application/mercurial-exp-framing-0005\r\n | |
175 | s> Transfer-Encoding: chunked\r\n |
|
177 | s> Transfer-Encoding: chunked\r\n | |
176 | s> \r\n |
|
178 | s> \r\n | |
177 | s> 32\r\n |
|
179 | s> 32\r\n | |
178 | s> *\x00\x00\x01\x00\x02\x012\xa1FstatusBokX\x1dcustomreadonly bytes response |
|
180 | s> *\x00\x00\x01\x00\x02\x012\xa1FstatusBokX\x1dcustomreadonly bytes response | |
179 | s> \r\n |
|
181 | s> \r\n | |
180 | s> 0\r\n |
|
182 | s> 0\r\n | |
181 | s> \r\n |
|
183 | s> \r\n | |
182 |
|
184 | |||
183 | $ sendhttpv2peer << EOF |
|
185 | $ sendhttpv2peer << EOF | |
184 | > command customreadonly |
|
186 | > command customreadonly | |
185 | > EOF |
|
187 | > EOF | |
186 | creating http peer for wire protocol version 2 |
|
188 | creating http peer for wire protocol version 2 | |
187 | sending customreadonly command |
|
189 | sending customreadonly command | |
188 | s> POST /api/exp-http-v2-0001/ro/customreadonly HTTP/1.1\r\n |
|
190 | s> POST /api/exp-http-v2-0001/ro/customreadonly HTTP/1.1\r\n | |
189 | s> Accept-Encoding: identity\r\n |
|
191 | s> Accept-Encoding: identity\r\n | |
190 | s> accept: application/mercurial-exp-framing-0005\r\n |
|
192 | s> accept: application/mercurial-exp-framing-0005\r\n | |
191 | s> content-type: application/mercurial-exp-framing-0005\r\n |
|
193 | s> content-type: application/mercurial-exp-framing-0005\r\n | |
192 | s> content-length: 29\r\n |
|
194 | s> content-length: 29\r\n | |
193 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
195 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
194 | s> user-agent: Mercurial debugwireproto\r\n |
|
196 | s> user-agent: Mercurial debugwireproto\r\n | |
195 | s> \r\n |
|
197 | s> \r\n | |
196 | s> \x15\x00\x00\x01\x00\x01\x01\x11\xa1DnameNcustomreadonly |
|
198 | s> \x15\x00\x00\x01\x00\x01\x01\x11\xa1DnameNcustomreadonly | |
197 | s> makefile('rb', None) |
|
199 | s> makefile('rb', None) | |
198 | s> HTTP/1.1 200 OK\r\n |
|
200 | s> HTTP/1.1 200 OK\r\n | |
199 | s> Server: testing stub value\r\n |
|
201 | s> Server: testing stub value\r\n | |
200 | s> Date: $HTTP_DATE$\r\n |
|
202 | s> Date: $HTTP_DATE$\r\n | |
201 | s> Content-Type: application/mercurial-exp-framing-0005\r\n |
|
203 | s> Content-Type: application/mercurial-exp-framing-0005\r\n | |
202 | s> Transfer-Encoding: chunked\r\n |
|
204 | s> Transfer-Encoding: chunked\r\n | |
203 | s> \r\n |
|
205 | s> \r\n | |
204 | s> 32\r\n |
|
206 | s> 32\r\n | |
205 | s> *\x00\x00\x01\x00\x02\x012 |
|
207 | s> *\x00\x00\x01\x00\x02\x012 | |
206 | s> \xa1FstatusBokX\x1dcustomreadonly bytes response |
|
208 | s> \xa1FstatusBokX\x1dcustomreadonly bytes response | |
207 | s> \r\n |
|
209 | s> \r\n | |
208 | received frame(size=42; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=eos) |
|
210 | received frame(size=42; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=eos) | |
209 | s> 0\r\n |
|
211 | s> 0\r\n | |
210 | s> \r\n |
|
212 | s> \r\n | |
211 | response: [{b'status': b'ok'}, b'customreadonly bytes response'] |
|
213 | response: [{b'status': b'ok'}, b'customreadonly bytes response'] | |
212 |
|
214 | |||
213 | Request to read-write command fails because server is read-only by default |
|
215 | Request to read-write command fails because server is read-only by default | |
214 |
|
216 | |||
215 | GET to read-write request yields 405 |
|
217 | GET to read-write request yields 405 | |
216 |
|
218 | |||
217 | $ sendhttpraw << EOF |
|
219 | $ sendhttpraw << EOF | |
218 | > httprequest GET api/$HTTPV2/rw/customreadonly |
|
220 | > httprequest GET api/$HTTPV2/rw/customreadonly | |
219 | > user-agent: test |
|
221 | > user-agent: test | |
220 | > EOF |
|
222 | > EOF | |
221 | using raw connection to peer |
|
223 | using raw connection to peer | |
222 | s> GET /api/exp-http-v2-0001/rw/customreadonly HTTP/1.1\r\n |
|
224 | s> GET /api/exp-http-v2-0001/rw/customreadonly HTTP/1.1\r\n | |
223 | s> Accept-Encoding: identity\r\n |
|
225 | s> Accept-Encoding: identity\r\n | |
224 | s> user-agent: test\r\n |
|
226 | s> user-agent: test\r\n | |
225 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
227 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
226 | s> \r\n |
|
228 | s> \r\n | |
227 | s> makefile('rb', None) |
|
229 | s> makefile('rb', None) | |
228 | s> HTTP/1.1 405 Method Not Allowed\r\n |
|
230 | s> HTTP/1.1 405 Method Not Allowed\r\n | |
229 | s> Server: testing stub value\r\n |
|
231 | s> Server: testing stub value\r\n | |
230 | s> Date: $HTTP_DATE$\r\n |
|
232 | s> Date: $HTTP_DATE$\r\n | |
231 | s> Allow: POST\r\n |
|
233 | s> Allow: POST\r\n | |
232 | s> Content-Length: 30\r\n |
|
234 | s> Content-Length: 30\r\n | |
233 | s> \r\n |
|
235 | s> \r\n | |
234 | s> commands require POST requests |
|
236 | s> commands require POST requests | |
235 |
|
237 | |||
236 | Even for unknown commands |
|
238 | Even for unknown commands | |
237 |
|
239 | |||
238 | $ sendhttpraw << EOF |
|
240 | $ sendhttpraw << EOF | |
239 | > httprequest GET api/$HTTPV2/rw/badcommand |
|
241 | > httprequest GET api/$HTTPV2/rw/badcommand | |
240 | > user-agent: test |
|
242 | > user-agent: test | |
241 | > EOF |
|
243 | > EOF | |
242 | using raw connection to peer |
|
244 | using raw connection to peer | |
243 | s> GET /api/exp-http-v2-0001/rw/badcommand HTTP/1.1\r\n |
|
245 | s> GET /api/exp-http-v2-0001/rw/badcommand HTTP/1.1\r\n | |
244 | s> Accept-Encoding: identity\r\n |
|
246 | s> Accept-Encoding: identity\r\n | |
245 | s> user-agent: test\r\n |
|
247 | s> user-agent: test\r\n | |
246 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
248 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
247 | s> \r\n |
|
249 | s> \r\n | |
248 | s> makefile('rb', None) |
|
250 | s> makefile('rb', None) | |
249 | s> HTTP/1.1 405 Method Not Allowed\r\n |
|
251 | s> HTTP/1.1 405 Method Not Allowed\r\n | |
250 | s> Server: testing stub value\r\n |
|
252 | s> Server: testing stub value\r\n | |
251 | s> Date: $HTTP_DATE$\r\n |
|
253 | s> Date: $HTTP_DATE$\r\n | |
252 | s> Allow: POST\r\n |
|
254 | s> Allow: POST\r\n | |
253 | s> Content-Length: 30\r\n |
|
255 | s> Content-Length: 30\r\n | |
254 | s> \r\n |
|
256 | s> \r\n | |
255 | s> commands require POST requests |
|
257 | s> commands require POST requests | |
256 |
|
258 | |||
257 | SSL required by default |
|
259 | SSL required by default | |
258 |
|
260 | |||
259 | $ sendhttpraw << EOF |
|
261 | $ sendhttpraw << EOF | |
260 | > httprequest POST api/$HTTPV2/rw/customreadonly |
|
262 | > httprequest POST api/$HTTPV2/rw/customreadonly | |
261 | > user-agent: test |
|
263 | > user-agent: test | |
262 | > EOF |
|
264 | > EOF | |
263 | using raw connection to peer |
|
265 | using raw connection to peer | |
264 | s> POST /api/exp-http-v2-0001/rw/customreadonly HTTP/1.1\r\n |
|
266 | s> POST /api/exp-http-v2-0001/rw/customreadonly HTTP/1.1\r\n | |
265 | s> Accept-Encoding: identity\r\n |
|
267 | s> Accept-Encoding: identity\r\n | |
266 | s> user-agent: test\r\n |
|
268 | s> user-agent: test\r\n | |
267 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
269 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
268 | s> \r\n |
|
270 | s> \r\n | |
269 | s> makefile('rb', None) |
|
271 | s> makefile('rb', None) | |
270 | s> HTTP/1.1 403 ssl required\r\n |
|
272 | s> HTTP/1.1 403 ssl required\r\n | |
271 | s> Server: testing stub value\r\n |
|
273 | s> Server: testing stub value\r\n | |
272 | s> Date: $HTTP_DATE$\r\n |
|
274 | s> Date: $HTTP_DATE$\r\n | |
273 | s> Content-Length: 17\r\n |
|
275 | s> Content-Length: 17\r\n | |
274 | s> \r\n |
|
276 | s> \r\n | |
275 | s> permission denied |
|
277 | s> permission denied | |
276 |
|
278 | |||
277 | Restart server to allow non-ssl read-write operations |
|
279 | Restart server to allow non-ssl read-write operations | |
278 |
|
280 | |||
279 | $ killdaemons.py |
|
281 | $ killdaemons.py | |
280 | $ cat > server/.hg/hgrc << EOF |
|
282 | $ cat > server/.hg/hgrc << EOF | |
281 | > [experimental] |
|
283 | > [experimental] | |
282 | > web.apiserver = true |
|
284 | > web.apiserver = true | |
283 | > web.api.http-v2 = true |
|
285 | > web.api.http-v2 = true | |
284 | > [web] |
|
286 | > [web] | |
285 | > push_ssl = false |
|
287 | > push_ssl = false | |
286 | > allow-push = * |
|
288 | > allow-push = * | |
287 | > EOF |
|
289 | > EOF | |
288 |
|
290 | |||
289 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid -E error.log |
|
291 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid -E error.log | |
290 | $ cat hg.pid > $DAEMON_PIDS |
|
292 | $ cat hg.pid > $DAEMON_PIDS | |
291 |
|
293 | |||
292 | Authorized request for valid read-write command works |
|
294 | Authorized request for valid read-write command works | |
293 |
|
295 | |||
294 | $ sendhttpraw << EOF |
|
296 | $ sendhttpraw << EOF | |
295 | > httprequest POST api/$HTTPV2/rw/customreadonly |
|
297 | > httprequest POST api/$HTTPV2/rw/customreadonly | |
296 | > user-agent: test |
|
298 | > user-agent: test | |
297 | > accept: $MEDIATYPE |
|
299 | > accept: $MEDIATYPE | |
298 | > content-type: $MEDIATYPE |
|
300 | > content-type: $MEDIATYPE | |
299 | > frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} |
|
301 | > frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} | |
300 | > EOF |
|
302 | > EOF | |
301 | using raw connection to peer |
|
303 | using raw connection to peer | |
302 | s> POST /api/exp-http-v2-0001/rw/customreadonly HTTP/1.1\r\n |
|
304 | s> POST /api/exp-http-v2-0001/rw/customreadonly HTTP/1.1\r\n | |
303 | s> Accept-Encoding: identity\r\n |
|
305 | s> Accept-Encoding: identity\r\n | |
304 | s> accept: application/mercurial-exp-framing-0005\r\n |
|
306 | s> accept: application/mercurial-exp-framing-0005\r\n | |
305 | s> content-type: application/mercurial-exp-framing-0005\r\n |
|
307 | s> content-type: application/mercurial-exp-framing-0005\r\n | |
306 | s> user-agent: test\r\n |
|
308 | s> user-agent: test\r\n | |
307 | s> content-length: 29\r\n |
|
309 | s> content-length: 29\r\n | |
308 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
310 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
309 | s> \r\n |
|
311 | s> \r\n | |
310 | s> \x15\x00\x00\x01\x00\x01\x01\x11\xa1DnameNcustomreadonly |
|
312 | s> \x15\x00\x00\x01\x00\x01\x01\x11\xa1DnameNcustomreadonly | |
311 | s> makefile('rb', None) |
|
313 | s> makefile('rb', None) | |
312 | s> HTTP/1.1 200 OK\r\n |
|
314 | s> HTTP/1.1 200 OK\r\n | |
313 | s> Server: testing stub value\r\n |
|
315 | s> Server: testing stub value\r\n | |
314 | s> Date: $HTTP_DATE$\r\n |
|
316 | s> Date: $HTTP_DATE$\r\n | |
315 | s> Content-Type: application/mercurial-exp-framing-0005\r\n |
|
317 | s> Content-Type: application/mercurial-exp-framing-0005\r\n | |
316 | s> Transfer-Encoding: chunked\r\n |
|
318 | s> Transfer-Encoding: chunked\r\n | |
317 | s> \r\n |
|
319 | s> \r\n | |
318 | s> 32\r\n |
|
320 | s> 32\r\n | |
319 | s> *\x00\x00\x01\x00\x02\x012\xa1FstatusBokX\x1dcustomreadonly bytes response |
|
321 | s> *\x00\x00\x01\x00\x02\x012\xa1FstatusBokX\x1dcustomreadonly bytes response | |
320 | s> \r\n |
|
322 | s> \r\n | |
321 | s> 0\r\n |
|
323 | s> 0\r\n | |
322 | s> \r\n |
|
324 | s> \r\n | |
323 |
|
325 | |||
324 | Authorized request for unknown command is rejected |
|
326 | Authorized request for unknown command is rejected | |
325 |
|
327 | |||
326 | $ sendhttpraw << EOF |
|
328 | $ sendhttpraw << EOF | |
327 | > httprequest POST api/$HTTPV2/rw/badcommand |
|
329 | > httprequest POST api/$HTTPV2/rw/badcommand | |
328 | > user-agent: test |
|
330 | > user-agent: test | |
329 | > accept: $MEDIATYPE |
|
331 | > accept: $MEDIATYPE | |
330 | > EOF |
|
332 | > EOF | |
331 | using raw connection to peer |
|
333 | using raw connection to peer | |
332 | s> POST /api/exp-http-v2-0001/rw/badcommand HTTP/1.1\r\n |
|
334 | s> POST /api/exp-http-v2-0001/rw/badcommand HTTP/1.1\r\n | |
333 | s> Accept-Encoding: identity\r\n |
|
335 | s> Accept-Encoding: identity\r\n | |
334 | s> accept: application/mercurial-exp-framing-0005\r\n |
|
336 | s> accept: application/mercurial-exp-framing-0005\r\n | |
335 | s> user-agent: test\r\n |
|
337 | s> user-agent: test\r\n | |
336 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
338 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
337 | s> \r\n |
|
339 | s> \r\n | |
338 | s> makefile('rb', None) |
|
340 | s> makefile('rb', None) | |
339 | s> HTTP/1.1 404 Not Found\r\n |
|
341 | s> HTTP/1.1 404 Not Found\r\n | |
340 | s> Server: testing stub value\r\n |
|
342 | s> Server: testing stub value\r\n | |
341 | s> Date: $HTTP_DATE$\r\n |
|
343 | s> Date: $HTTP_DATE$\r\n | |
342 | s> Content-Type: text/plain\r\n |
|
344 | s> Content-Type: text/plain\r\n | |
343 | s> Content-Length: 42\r\n |
|
345 | s> Content-Length: 42\r\n | |
344 | s> \r\n |
|
346 | s> \r\n | |
345 | s> unknown wire protocol command: badcommand\n |
|
347 | s> unknown wire protocol command: badcommand\n | |
346 |
|
348 | |||
347 | debugreflect isn't enabled by default |
|
349 | debugreflect isn't enabled by default | |
348 |
|
350 | |||
349 | $ sendhttpraw << EOF |
|
351 | $ sendhttpraw << EOF | |
350 | > httprequest POST api/$HTTPV2/ro/debugreflect |
|
352 | > httprequest POST api/$HTTPV2/ro/debugreflect | |
351 | > user-agent: test |
|
353 | > user-agent: test | |
352 | > EOF |
|
354 | > EOF | |
353 | using raw connection to peer |
|
355 | using raw connection to peer | |
354 | s> POST /api/exp-http-v2-0001/ro/debugreflect HTTP/1.1\r\n |
|
356 | s> POST /api/exp-http-v2-0001/ro/debugreflect HTTP/1.1\r\n | |
355 | s> Accept-Encoding: identity\r\n |
|
357 | s> Accept-Encoding: identity\r\n | |
356 | s> user-agent: test\r\n |
|
358 | s> user-agent: test\r\n | |
357 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
359 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
358 | s> \r\n |
|
360 | s> \r\n | |
359 | s> makefile('rb', None) |
|
361 | s> makefile('rb', None) | |
360 | s> HTTP/1.1 404 Not Found\r\n |
|
362 | s> HTTP/1.1 404 Not Found\r\n | |
361 | s> Server: testing stub value\r\n |
|
363 | s> Server: testing stub value\r\n | |
362 | s> Date: $HTTP_DATE$\r\n |
|
364 | s> Date: $HTTP_DATE$\r\n | |
363 | s> Content-Type: text/plain\r\n |
|
365 | s> Content-Type: text/plain\r\n | |
364 | s> Content-Length: 34\r\n |
|
366 | s> Content-Length: 34\r\n | |
365 | s> \r\n |
|
367 | s> \r\n | |
366 | s> debugreflect service not available |
|
368 | s> debugreflect service not available | |
367 |
|
369 | |||
368 | Restart server to get debugreflect endpoint |
|
370 | Restart server to get debugreflect endpoint | |
369 |
|
371 | |||
370 | $ killdaemons.py |
|
372 | $ killdaemons.py | |
371 | $ cat > server/.hg/hgrc << EOF |
|
373 | $ cat > server/.hg/hgrc << EOF | |
372 | > [experimental] |
|
374 | > [experimental] | |
373 | > web.apiserver = true |
|
375 | > web.apiserver = true | |
374 | > web.api.debugreflect = true |
|
376 | > web.api.debugreflect = true | |
375 | > web.api.http-v2 = true |
|
377 | > web.api.http-v2 = true | |
376 | > [web] |
|
378 | > [web] | |
377 | > push_ssl = false |
|
379 | > push_ssl = false | |
378 | > allow-push = * |
|
380 | > allow-push = * | |
379 | > EOF |
|
381 | > EOF | |
380 |
|
382 | |||
381 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid -E error.log |
|
383 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid -E error.log | |
382 | $ cat hg.pid > $DAEMON_PIDS |
|
384 | $ cat hg.pid > $DAEMON_PIDS | |
383 |
|
385 | |||
384 | Command frames can be reflected via debugreflect |
|
386 | Command frames can be reflected via debugreflect | |
385 |
|
387 | |||
386 | $ sendhttpraw << EOF |
|
388 | $ sendhttpraw << EOF | |
387 | > httprequest POST api/$HTTPV2/ro/debugreflect |
|
389 | > httprequest POST api/$HTTPV2/ro/debugreflect | |
388 | > accept: $MEDIATYPE |
|
390 | > accept: $MEDIATYPE | |
389 | > content-type: $MEDIATYPE |
|
391 | > content-type: $MEDIATYPE | |
390 | > user-agent: test |
|
392 | > user-agent: test | |
391 | > frame 1 1 stream-begin command-request new cbor:{b'name': b'command1', b'args': {b'foo': b'val1', b'bar1': b'val'}} |
|
393 | > frame 1 1 stream-begin command-request new cbor:{b'name': b'command1', b'args': {b'foo': b'val1', b'bar1': b'val'}} | |
392 | > EOF |
|
394 | > EOF | |
393 | using raw connection to peer |
|
395 | using raw connection to peer | |
394 | s> POST /api/exp-http-v2-0001/ro/debugreflect HTTP/1.1\r\n |
|
396 | s> POST /api/exp-http-v2-0001/ro/debugreflect HTTP/1.1\r\n | |
395 | s> Accept-Encoding: identity\r\n |
|
397 | s> Accept-Encoding: identity\r\n | |
396 | s> accept: application/mercurial-exp-framing-0005\r\n |
|
398 | s> accept: application/mercurial-exp-framing-0005\r\n | |
397 | s> content-type: application/mercurial-exp-framing-0005\r\n |
|
399 | s> content-type: application/mercurial-exp-framing-0005\r\n | |
398 | s> user-agent: test\r\n |
|
400 | s> user-agent: test\r\n | |
399 | s> content-length: 47\r\n |
|
401 | s> content-length: 47\r\n | |
400 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
402 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
401 | s> \r\n |
|
403 | s> \r\n | |
402 | s> \'\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa2CfooDval1Dbar1CvalDnameHcommand1 |
|
404 | s> \'\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa2CfooDval1Dbar1CvalDnameHcommand1 | |
403 | s> makefile('rb', None) |
|
405 | s> makefile('rb', None) | |
404 | s> HTTP/1.1 200 OK\r\n |
|
406 | s> HTTP/1.1 200 OK\r\n | |
405 | s> Server: testing stub value\r\n |
|
407 | s> Server: testing stub value\r\n | |
406 | s> Date: $HTTP_DATE$\r\n |
|
408 | s> Date: $HTTP_DATE$\r\n | |
407 | s> Content-Type: text/plain\r\n |
|
409 | s> Content-Type: text/plain\r\n | |
408 | s> Content-Length: 205\r\n |
|
410 | s> Content-Length: 205\r\n | |
409 | s> \r\n |
|
411 | s> \r\n | |
410 | s> received: 1 1 1 \xa2Dargs\xa2CfooDval1Dbar1CvalDnameHcommand1\n |
|
412 | s> received: 1 1 1 \xa2Dargs\xa2CfooDval1Dbar1CvalDnameHcommand1\n | |
411 | s> ["runcommand", {"args": {"bar1": "val", "foo": "val1"}, "command": "command1", "data": null, "requestid": 1}]\n |
|
413 | s> ["runcommand", {"args": {"bar1": "val", "foo": "val1"}, "command": "command1", "data": null, "requestid": 1}]\n | |
412 | s> received: <no frame>\n |
|
414 | s> received: <no frame>\n | |
413 | s> {"action": "noop"} |
|
415 | s> {"action": "noop"} | |
414 |
|
416 | |||
415 | Multiple requests to regular command URL are not allowed |
|
417 | Multiple requests to regular command URL are not allowed | |
416 |
|
418 | |||
417 | $ sendhttpraw << EOF |
|
419 | $ sendhttpraw << EOF | |
418 | > httprequest POST api/$HTTPV2/ro/customreadonly |
|
420 | > httprequest POST api/$HTTPV2/ro/customreadonly | |
419 | > accept: $MEDIATYPE |
|
421 | > accept: $MEDIATYPE | |
420 | > content-type: $MEDIATYPE |
|
422 | > content-type: $MEDIATYPE | |
421 | > user-agent: test |
|
423 | > user-agent: test | |
422 | > frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} |
|
424 | > frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} | |
423 | > EOF |
|
425 | > EOF | |
424 | using raw connection to peer |
|
426 | using raw connection to peer | |
425 | s> POST /api/exp-http-v2-0001/ro/customreadonly HTTP/1.1\r\n |
|
427 | s> POST /api/exp-http-v2-0001/ro/customreadonly HTTP/1.1\r\n | |
426 | s> Accept-Encoding: identity\r\n |
|
428 | s> Accept-Encoding: identity\r\n | |
427 | s> accept: application/mercurial-exp-framing-0005\r\n |
|
429 | s> accept: application/mercurial-exp-framing-0005\r\n | |
428 | s> content-type: application/mercurial-exp-framing-0005\r\n |
|
430 | s> content-type: application/mercurial-exp-framing-0005\r\n | |
429 | s> user-agent: test\r\n |
|
431 | s> user-agent: test\r\n | |
430 | s> content-length: 29\r\n |
|
432 | s> content-length: 29\r\n | |
431 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
433 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
432 | s> \r\n |
|
434 | s> \r\n | |
433 | s> \x15\x00\x00\x01\x00\x01\x01\x11\xa1DnameNcustomreadonly |
|
435 | s> \x15\x00\x00\x01\x00\x01\x01\x11\xa1DnameNcustomreadonly | |
434 | s> makefile('rb', None) |
|
436 | s> makefile('rb', None) | |
435 | s> HTTP/1.1 200 OK\r\n |
|
437 | s> HTTP/1.1 200 OK\r\n | |
436 | s> Server: testing stub value\r\n |
|
438 | s> Server: testing stub value\r\n | |
437 | s> Date: $HTTP_DATE$\r\n |
|
439 | s> Date: $HTTP_DATE$\r\n | |
438 | s> Content-Type: application/mercurial-exp-framing-0005\r\n |
|
440 | s> Content-Type: application/mercurial-exp-framing-0005\r\n | |
439 | s> Transfer-Encoding: chunked\r\n |
|
441 | s> Transfer-Encoding: chunked\r\n | |
440 | s> \r\n |
|
442 | s> \r\n | |
441 | s> 32\r\n |
|
443 | s> 32\r\n | |
442 | s> *\x00\x00\x01\x00\x02\x012\xa1FstatusBokX\x1dcustomreadonly bytes response |
|
444 | s> *\x00\x00\x01\x00\x02\x012\xa1FstatusBokX\x1dcustomreadonly bytes response | |
443 | s> \r\n |
|
445 | s> \r\n | |
444 | s> 0\r\n |
|
446 | s> 0\r\n | |
445 | s> \r\n |
|
447 | s> \r\n | |
446 |
|
448 | |||
447 | Multiple requests to "multirequest" URL are allowed |
|
449 | Multiple requests to "multirequest" URL are allowed | |
448 |
|
450 | |||
449 | $ sendhttpraw << EOF |
|
451 | $ sendhttpraw << EOF | |
450 | > httprequest POST api/$HTTPV2/ro/multirequest |
|
452 | > httprequest POST api/$HTTPV2/ro/multirequest | |
451 | > accept: $MEDIATYPE |
|
453 | > accept: $MEDIATYPE | |
452 | > content-type: $MEDIATYPE |
|
454 | > content-type: $MEDIATYPE | |
453 | > user-agent: test |
|
455 | > user-agent: test | |
454 | > frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} |
|
456 | > frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} | |
455 | > frame 3 1 0 command-request new cbor:{b'name': b'customreadonly'} |
|
457 | > frame 3 1 0 command-request new cbor:{b'name': b'customreadonly'} | |
456 | > EOF |
|
458 | > EOF | |
457 | using raw connection to peer |
|
459 | using raw connection to peer | |
458 | s> POST /api/exp-http-v2-0001/ro/multirequest HTTP/1.1\r\n |
|
460 | s> POST /api/exp-http-v2-0001/ro/multirequest HTTP/1.1\r\n | |
459 | s> Accept-Encoding: identity\r\n |
|
461 | s> Accept-Encoding: identity\r\n | |
460 | s> *\r\n (glob) |
|
462 | s> *\r\n (glob) | |
461 | s> *\r\n (glob) |
|
463 | s> *\r\n (glob) | |
462 | s> user-agent: test\r\n |
|
464 | s> user-agent: test\r\n | |
463 | s> content-length: 58\r\n |
|
465 | s> content-length: 58\r\n | |
464 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
466 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
465 | s> \r\n |
|
467 | s> \r\n | |
466 | s> \x15\x00\x00\x01\x00\x01\x01\x11\xa1DnameNcustomreadonly\x15\x00\x00\x03\x00\x01\x00\x11\xa1DnameNcustomreadonly |
|
468 | s> \x15\x00\x00\x01\x00\x01\x01\x11\xa1DnameNcustomreadonly\x15\x00\x00\x03\x00\x01\x00\x11\xa1DnameNcustomreadonly | |
467 | s> makefile('rb', None) |
|
469 | s> makefile('rb', None) | |
468 | s> HTTP/1.1 200 OK\r\n |
|
470 | s> HTTP/1.1 200 OK\r\n | |
469 | s> Server: testing stub value\r\n |
|
471 | s> Server: testing stub value\r\n | |
470 | s> Date: $HTTP_DATE$\r\n |
|
472 | s> Date: $HTTP_DATE$\r\n | |
471 | s> Content-Type: application/mercurial-exp-framing-0005\r\n |
|
473 | s> Content-Type: application/mercurial-exp-framing-0005\r\n | |
472 | s> Transfer-Encoding: chunked\r\n |
|
474 | s> Transfer-Encoding: chunked\r\n | |
473 | s> \r\n |
|
475 | s> \r\n | |
474 | s> 32\r\n |
|
476 | s> 32\r\n | |
475 | s> *\x00\x00\x01\x00\x02\x012\xa1FstatusBokX\x1dcustomreadonly bytes response |
|
477 | s> *\x00\x00\x01\x00\x02\x012\xa1FstatusBokX\x1dcustomreadonly bytes response | |
476 | s> \r\n |
|
478 | s> \r\n | |
477 | s> 32\r\n |
|
479 | s> 32\r\n | |
478 | s> *\x00\x00\x03\x00\x02\x002\xa1FstatusBokX\x1dcustomreadonly bytes response |
|
480 | s> *\x00\x00\x03\x00\x02\x002\xa1FstatusBokX\x1dcustomreadonly bytes response | |
479 | s> \r\n |
|
481 | s> \r\n | |
480 | s> 0\r\n |
|
482 | s> 0\r\n | |
481 | s> \r\n |
|
483 | s> \r\n | |
482 |
|
484 | |||
483 | Interleaved requests to "multirequest" are processed |
|
485 | Interleaved requests to "multirequest" are processed | |
484 |
|
486 | |||
485 | $ sendhttpraw << EOF |
|
487 | $ sendhttpraw << EOF | |
486 | > httprequest POST api/$HTTPV2/ro/multirequest |
|
488 | > httprequest POST api/$HTTPV2/ro/multirequest | |
487 | > accept: $MEDIATYPE |
|
489 | > accept: $MEDIATYPE | |
488 | > content-type: $MEDIATYPE |
|
490 | > content-type: $MEDIATYPE | |
489 | > user-agent: test |
|
491 | > user-agent: test | |
490 | > frame 1 1 stream-begin command-request new|more \xa2Dargs\xa1Inamespace |
|
492 | > frame 1 1 stream-begin command-request new|more \xa2Dargs\xa1Inamespace | |
491 | > frame 3 1 0 command-request new|more \xa2Dargs\xa1Inamespace |
|
493 | > frame 3 1 0 command-request new|more \xa2Dargs\xa1Inamespace | |
492 | > frame 3 1 0 command-request continuation JnamespacesDnameHlistkeys |
|
494 | > frame 3 1 0 command-request continuation JnamespacesDnameHlistkeys | |
493 | > frame 1 1 0 command-request continuation IbookmarksDnameHlistkeys |
|
495 | > frame 1 1 0 command-request continuation IbookmarksDnameHlistkeys | |
494 | > EOF |
|
496 | > EOF | |
495 | using raw connection to peer |
|
497 | using raw connection to peer | |
496 | s> POST /api/exp-http-v2-0001/ro/multirequest HTTP/1.1\r\n |
|
498 | s> POST /api/exp-http-v2-0001/ro/multirequest HTTP/1.1\r\n | |
497 | s> Accept-Encoding: identity\r\n |
|
499 | s> Accept-Encoding: identity\r\n | |
498 | s> accept: application/mercurial-exp-framing-0005\r\n |
|
500 | s> accept: application/mercurial-exp-framing-0005\r\n | |
499 | s> content-type: application/mercurial-exp-framing-0005\r\n |
|
501 | s> content-type: application/mercurial-exp-framing-0005\r\n | |
500 | s> user-agent: test\r\n |
|
502 | s> user-agent: test\r\n | |
501 | s> content-length: 115\r\n |
|
503 | s> content-length: 115\r\n | |
502 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
504 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
503 | s> \r\n |
|
505 | s> \r\n | |
504 | s> \x11\x00\x00\x01\x00\x01\x01\x15\xa2Dargs\xa1Inamespace\x11\x00\x00\x03\x00\x01\x00\x15\xa2Dargs\xa1Inamespace\x19\x00\x00\x03\x00\x01\x00\x12JnamespacesDnameHlistkeys\x18\x00\x00\x01\x00\x01\x00\x12IbookmarksDnameHlistkeys |
|
506 | s> \x11\x00\x00\x01\x00\x01\x01\x15\xa2Dargs\xa1Inamespace\x11\x00\x00\x03\x00\x01\x00\x15\xa2Dargs\xa1Inamespace\x19\x00\x00\x03\x00\x01\x00\x12JnamespacesDnameHlistkeys\x18\x00\x00\x01\x00\x01\x00\x12IbookmarksDnameHlistkeys | |
505 | s> makefile('rb', None) |
|
507 | s> makefile('rb', None) | |
506 | s> HTTP/1.1 200 OK\r\n |
|
508 | s> HTTP/1.1 200 OK\r\n | |
507 | s> Server: testing stub value\r\n |
|
509 | s> Server: testing stub value\r\n | |
508 | s> Date: $HTTP_DATE$\r\n |
|
510 | s> Date: $HTTP_DATE$\r\n | |
509 | s> Content-Type: application/mercurial-exp-framing-0005\r\n |
|
511 | s> Content-Type: application/mercurial-exp-framing-0005\r\n | |
510 | s> Transfer-Encoding: chunked\r\n |
|
512 | s> Transfer-Encoding: chunked\r\n | |
511 | s> \r\n |
|
513 | s> \r\n | |
512 | s> 33\r\n |
|
514 | s> 33\r\n | |
513 | s> +\x00\x00\x03\x00\x02\x012\xa1FstatusBok\xa3Fphases@Ibookmarks@Jnamespaces@ |
|
515 | s> +\x00\x00\x03\x00\x02\x012\xa1FstatusBok\xa3Fphases@Ibookmarks@Jnamespaces@ | |
514 | s> \r\n |
|
516 | s> \r\n | |
515 | s> 14\r\n |
|
517 | s> 14\r\n | |
516 | s> \x0c\x00\x00\x01\x00\x02\x002\xa1FstatusBok\xa0 |
|
518 | s> \x0c\x00\x00\x01\x00\x02\x002\xa1FstatusBok\xa0 | |
517 | s> \r\n |
|
519 | s> \r\n | |
518 | s> 0\r\n |
|
520 | s> 0\r\n | |
519 | s> \r\n |
|
521 | s> \r\n | |
520 |
|
522 | |||
521 | Restart server to disable read-write access |
|
523 | Restart server to disable read-write access | |
522 |
|
524 | |||
523 | $ killdaemons.py |
|
525 | $ killdaemons.py | |
524 | $ cat > server/.hg/hgrc << EOF |
|
526 | $ cat > server/.hg/hgrc << EOF | |
525 | > [experimental] |
|
527 | > [experimental] | |
526 | > web.apiserver = true |
|
528 | > web.apiserver = true | |
527 | > web.api.debugreflect = true |
|
529 | > web.api.debugreflect = true | |
528 | > web.api.http-v2 = true |
|
530 | > web.api.http-v2 = true | |
529 | > [web] |
|
531 | > [web] | |
530 | > push_ssl = false |
|
532 | > push_ssl = false | |
531 | > EOF |
|
533 | > EOF | |
532 |
|
534 | |||
533 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid -E error.log |
|
535 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid -E error.log | |
534 | $ cat hg.pid > $DAEMON_PIDS |
|
536 | $ cat hg.pid > $DAEMON_PIDS | |
535 |
|
537 | |||
536 | Attempting to run a read-write command via multirequest on read-only URL is not allowed |
|
538 | Attempting to run a read-write command via multirequest on read-only URL is not allowed | |
537 |
|
539 | |||
538 | $ sendhttpraw << EOF |
|
540 | $ sendhttpraw << EOF | |
539 | > httprequest POST api/$HTTPV2/ro/multirequest |
|
541 | > httprequest POST api/$HTTPV2/ro/multirequest | |
540 | > accept: $MEDIATYPE |
|
542 | > accept: $MEDIATYPE | |
541 | > content-type: $MEDIATYPE |
|
543 | > content-type: $MEDIATYPE | |
542 | > user-agent: test |
|
544 | > user-agent: test | |
543 | > frame 1 1 stream-begin command-request new cbor:{b'name': b'pushkey'} |
|
545 | > frame 1 1 stream-begin command-request new cbor:{b'name': b'pushkey'} | |
544 | > EOF |
|
546 | > EOF | |
545 | using raw connection to peer |
|
547 | using raw connection to peer | |
546 | s> POST /api/exp-http-v2-0001/ro/multirequest HTTP/1.1\r\n |
|
548 | s> POST /api/exp-http-v2-0001/ro/multirequest HTTP/1.1\r\n | |
547 | s> Accept-Encoding: identity\r\n |
|
549 | s> Accept-Encoding: identity\r\n | |
548 | s> accept: application/mercurial-exp-framing-0005\r\n |
|
550 | s> accept: application/mercurial-exp-framing-0005\r\n | |
549 | s> content-type: application/mercurial-exp-framing-0005\r\n |
|
551 | s> content-type: application/mercurial-exp-framing-0005\r\n | |
550 | s> user-agent: test\r\n |
|
552 | s> user-agent: test\r\n | |
551 | s> content-length: 22\r\n |
|
553 | s> content-length: 22\r\n | |
552 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
554 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
553 | s> \r\n |
|
555 | s> \r\n | |
554 | s> \x0e\x00\x00\x01\x00\x01\x01\x11\xa1DnameGpushkey |
|
556 | s> \x0e\x00\x00\x01\x00\x01\x01\x11\xa1DnameGpushkey | |
555 | s> makefile('rb', None) |
|
557 | s> makefile('rb', None) | |
556 | s> HTTP/1.1 403 Forbidden\r\n |
|
558 | s> HTTP/1.1 403 Forbidden\r\n | |
557 | s> Server: testing stub value\r\n |
|
559 | s> Server: testing stub value\r\n | |
558 | s> Date: $HTTP_DATE$\r\n |
|
560 | s> Date: $HTTP_DATE$\r\n | |
559 | s> Content-Type: text/plain\r\n |
|
561 | s> Content-Type: text/plain\r\n | |
560 | s> Content-Length: 52\r\n |
|
562 | s> Content-Length: 52\r\n | |
561 | s> \r\n |
|
563 | s> \r\n | |
562 | s> insufficient permissions to execute command: pushkey |
|
564 | s> insufficient permissions to execute command: pushkey | |
563 |
|
565 | |||
564 | $ cat error.log |
|
566 | $ cat error.log |
@@ -1,291 +1,293 b'' | |||||
|
1 | #require no-chg | |||
|
2 | ||||
1 | $ send() { |
|
3 | $ send() { | |
2 | > hg --verbose debugwireproto --peer raw http://$LOCALIP:$HGPORT/ |
|
4 | > hg --verbose debugwireproto --peer raw http://$LOCALIP:$HGPORT/ | |
3 | > } |
|
5 | > } | |
4 |
|
6 | |||
5 | $ hg init server |
|
7 | $ hg init server | |
6 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid |
|
8 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid | |
7 | $ cat hg.pid > $DAEMON_PIDS |
|
9 | $ cat hg.pid > $DAEMON_PIDS | |
8 |
|
10 | |||
9 | Request to /api fails unless web.apiserver is enabled |
|
11 | Request to /api fails unless web.apiserver is enabled | |
10 |
|
12 | |||
11 | $ get-with-headers.py $LOCALIP:$HGPORT api |
|
13 | $ get-with-headers.py $LOCALIP:$HGPORT api | |
12 | 400 no such method: api |
|
14 | 400 no such method: api | |
13 |
|
15 | |||
14 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
16 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
15 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
17 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
16 | <head> |
|
18 | <head> | |
17 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
19 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
18 | <meta name="robots" content="index, nofollow" /> |
|
20 | <meta name="robots" content="index, nofollow" /> | |
19 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
21 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
20 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
22 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
21 |
|
23 | |||
22 | <title>$TESTTMP/server: error</title> |
|
24 | <title>$TESTTMP/server: error</title> | |
23 | </head> |
|
25 | </head> | |
24 | <body> |
|
26 | <body> | |
25 |
|
27 | |||
26 | <div class="container"> |
|
28 | <div class="container"> | |
27 | <div class="menu"> |
|
29 | <div class="menu"> | |
28 | <div class="logo"> |
|
30 | <div class="logo"> | |
29 | <a href="https://mercurial-scm.org/"> |
|
31 | <a href="https://mercurial-scm.org/"> | |
30 | <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> |
|
32 | <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> | |
31 | </div> |
|
33 | </div> | |
32 | <ul> |
|
34 | <ul> | |
33 | <li><a href="/shortlog">log</a></li> |
|
35 | <li><a href="/shortlog">log</a></li> | |
34 | <li><a href="/graph">graph</a></li> |
|
36 | <li><a href="/graph">graph</a></li> | |
35 | <li><a href="/tags">tags</a></li> |
|
37 | <li><a href="/tags">tags</a></li> | |
36 | <li><a href="/bookmarks">bookmarks</a></li> |
|
38 | <li><a href="/bookmarks">bookmarks</a></li> | |
37 | <li><a href="/branches">branches</a></li> |
|
39 | <li><a href="/branches">branches</a></li> | |
38 | </ul> |
|
40 | </ul> | |
39 | <ul> |
|
41 | <ul> | |
40 | <li><a href="/help">help</a></li> |
|
42 | <li><a href="/help">help</a></li> | |
41 | </ul> |
|
43 | </ul> | |
42 | </div> |
|
44 | </div> | |
43 |
|
45 | |||
44 | <div class="main"> |
|
46 | <div class="main"> | |
45 |
|
47 | |||
46 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
48 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
47 | <h3>error</h3> |
|
49 | <h3>error</h3> | |
48 |
|
50 | |||
49 |
|
51 | |||
50 | <form class="search" action="/log"> |
|
52 | <form class="search" action="/log"> | |
51 |
|
53 | |||
52 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
54 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
53 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
55 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
54 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
56 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
55 | </form> |
|
57 | </form> | |
56 |
|
58 | |||
57 | <div class="description"> |
|
59 | <div class="description"> | |
58 | <p> |
|
60 | <p> | |
59 | An error occurred while processing your request: |
|
61 | An error occurred while processing your request: | |
60 | </p> |
|
62 | </p> | |
61 | <p> |
|
63 | <p> | |
62 | no such method: api |
|
64 | no such method: api | |
63 | </p> |
|
65 | </p> | |
64 | </div> |
|
66 | </div> | |
65 | </div> |
|
67 | </div> | |
66 | </div> |
|
68 | </div> | |
67 |
|
69 | |||
68 |
|
70 | |||
69 |
|
71 | |||
70 | </body> |
|
72 | </body> | |
71 | </html> |
|
73 | </html> | |
72 |
|
74 | |||
73 | [1] |
|
75 | [1] | |
74 |
|
76 | |||
75 | $ get-with-headers.py $LOCALIP:$HGPORT api/ |
|
77 | $ get-with-headers.py $LOCALIP:$HGPORT api/ | |
76 | 400 no such method: api |
|
78 | 400 no such method: api | |
77 |
|
79 | |||
78 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
80 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
79 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
81 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
80 | <head> |
|
82 | <head> | |
81 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
83 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
82 | <meta name="robots" content="index, nofollow" /> |
|
84 | <meta name="robots" content="index, nofollow" /> | |
83 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
85 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
84 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
86 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
85 |
|
87 | |||
86 | <title>$TESTTMP/server: error</title> |
|
88 | <title>$TESTTMP/server: error</title> | |
87 | </head> |
|
89 | </head> | |
88 | <body> |
|
90 | <body> | |
89 |
|
91 | |||
90 | <div class="container"> |
|
92 | <div class="container"> | |
91 | <div class="menu"> |
|
93 | <div class="menu"> | |
92 | <div class="logo"> |
|
94 | <div class="logo"> | |
93 | <a href="https://mercurial-scm.org/"> |
|
95 | <a href="https://mercurial-scm.org/"> | |
94 | <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> |
|
96 | <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> | |
95 | </div> |
|
97 | </div> | |
96 | <ul> |
|
98 | <ul> | |
97 | <li><a href="/shortlog">log</a></li> |
|
99 | <li><a href="/shortlog">log</a></li> | |
98 | <li><a href="/graph">graph</a></li> |
|
100 | <li><a href="/graph">graph</a></li> | |
99 | <li><a href="/tags">tags</a></li> |
|
101 | <li><a href="/tags">tags</a></li> | |
100 | <li><a href="/bookmarks">bookmarks</a></li> |
|
102 | <li><a href="/bookmarks">bookmarks</a></li> | |
101 | <li><a href="/branches">branches</a></li> |
|
103 | <li><a href="/branches">branches</a></li> | |
102 | </ul> |
|
104 | </ul> | |
103 | <ul> |
|
105 | <ul> | |
104 | <li><a href="/help">help</a></li> |
|
106 | <li><a href="/help">help</a></li> | |
105 | </ul> |
|
107 | </ul> | |
106 | </div> |
|
108 | </div> | |
107 |
|
109 | |||
108 | <div class="main"> |
|
110 | <div class="main"> | |
109 |
|
111 | |||
110 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
112 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
111 | <h3>error</h3> |
|
113 | <h3>error</h3> | |
112 |
|
114 | |||
113 |
|
115 | |||
114 | <form class="search" action="/log"> |
|
116 | <form class="search" action="/log"> | |
115 |
|
117 | |||
116 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
118 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
117 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
119 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
118 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
120 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
119 | </form> |
|
121 | </form> | |
120 |
|
122 | |||
121 | <div class="description"> |
|
123 | <div class="description"> | |
122 | <p> |
|
124 | <p> | |
123 | An error occurred while processing your request: |
|
125 | An error occurred while processing your request: | |
124 | </p> |
|
126 | </p> | |
125 | <p> |
|
127 | <p> | |
126 | no such method: api |
|
128 | no such method: api | |
127 | </p> |
|
129 | </p> | |
128 | </div> |
|
130 | </div> | |
129 | </div> |
|
131 | </div> | |
130 | </div> |
|
132 | </div> | |
131 |
|
133 | |||
132 |
|
134 | |||
133 |
|
135 | |||
134 | </body> |
|
136 | </body> | |
135 | </html> |
|
137 | </html> | |
136 |
|
138 | |||
137 | [1] |
|
139 | [1] | |
138 |
|
140 | |||
139 | Restart server with support for API server |
|
141 | Restart server with support for API server | |
140 |
|
142 | |||
141 | $ killdaemons.py |
|
143 | $ killdaemons.py | |
142 | $ cat > server/.hg/hgrc << EOF |
|
144 | $ cat > server/.hg/hgrc << EOF | |
143 | > [experimental] |
|
145 | > [experimental] | |
144 | > web.apiserver = true |
|
146 | > web.apiserver = true | |
145 | > EOF |
|
147 | > EOF | |
146 |
|
148 | |||
147 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid |
|
149 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid | |
148 | $ cat hg.pid > $DAEMON_PIDS |
|
150 | $ cat hg.pid > $DAEMON_PIDS | |
149 |
|
151 | |||
150 | /api lists available APIs (empty since none are available by default) |
|
152 | /api lists available APIs (empty since none are available by default) | |
151 |
|
153 | |||
152 | $ send << EOF |
|
154 | $ send << EOF | |
153 | > httprequest GET api |
|
155 | > httprequest GET api | |
154 | > user-agent: test |
|
156 | > user-agent: test | |
155 | > EOF |
|
157 | > EOF | |
156 | using raw connection to peer |
|
158 | using raw connection to peer | |
157 | s> GET /api HTTP/1.1\r\n |
|
159 | s> GET /api HTTP/1.1\r\n | |
158 | s> Accept-Encoding: identity\r\n |
|
160 | s> Accept-Encoding: identity\r\n | |
159 | s> user-agent: test\r\n |
|
161 | s> user-agent: test\r\n | |
160 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
162 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
161 | s> \r\n |
|
163 | s> \r\n | |
162 | s> makefile('rb', None) |
|
164 | s> makefile('rb', None) | |
163 | s> HTTP/1.1 200 OK\r\n |
|
165 | s> HTTP/1.1 200 OK\r\n | |
164 | s> Server: testing stub value\r\n |
|
166 | s> Server: testing stub value\r\n | |
165 | s> Date: $HTTP_DATE$\r\n |
|
167 | s> Date: $HTTP_DATE$\r\n | |
166 | s> Content-Type: text/plain\r\n |
|
168 | s> Content-Type: text/plain\r\n | |
167 | s> Content-Length: 100\r\n |
|
169 | s> Content-Length: 100\r\n | |
168 | s> \r\n |
|
170 | s> \r\n | |
169 | s> APIs can be accessed at /api/<name>, where <name> can be one of the following:\n |
|
171 | s> APIs can be accessed at /api/<name>, where <name> can be one of the following:\n | |
170 | s> \n |
|
172 | s> \n | |
171 | s> (no available APIs)\n |
|
173 | s> (no available APIs)\n | |
172 |
|
174 | |||
173 | $ send << EOF |
|
175 | $ send << EOF | |
174 | > httprequest GET api/ |
|
176 | > httprequest GET api/ | |
175 | > user-agent: test |
|
177 | > user-agent: test | |
176 | > EOF |
|
178 | > EOF | |
177 | using raw connection to peer |
|
179 | using raw connection to peer | |
178 | s> GET /api/ HTTP/1.1\r\n |
|
180 | s> GET /api/ HTTP/1.1\r\n | |
179 | s> Accept-Encoding: identity\r\n |
|
181 | s> Accept-Encoding: identity\r\n | |
180 | s> user-agent: test\r\n |
|
182 | s> user-agent: test\r\n | |
181 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
183 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
182 | s> \r\n |
|
184 | s> \r\n | |
183 | s> makefile('rb', None) |
|
185 | s> makefile('rb', None) | |
184 | s> HTTP/1.1 200 OK\r\n |
|
186 | s> HTTP/1.1 200 OK\r\n | |
185 | s> Server: testing stub value\r\n |
|
187 | s> Server: testing stub value\r\n | |
186 | s> Date: $HTTP_DATE$\r\n |
|
188 | s> Date: $HTTP_DATE$\r\n | |
187 | s> Content-Type: text/plain\r\n |
|
189 | s> Content-Type: text/plain\r\n | |
188 | s> Content-Length: 100\r\n |
|
190 | s> Content-Length: 100\r\n | |
189 | s> \r\n |
|
191 | s> \r\n | |
190 | s> APIs can be accessed at /api/<name>, where <name> can be one of the following:\n |
|
192 | s> APIs can be accessed at /api/<name>, where <name> can be one of the following:\n | |
191 | s> \n |
|
193 | s> \n | |
192 | s> (no available APIs)\n |
|
194 | s> (no available APIs)\n | |
193 |
|
195 | |||
194 | Accessing an unknown API yields a 404 |
|
196 | Accessing an unknown API yields a 404 | |
195 |
|
197 | |||
196 | $ send << EOF |
|
198 | $ send << EOF | |
197 | > httprequest GET api/unknown |
|
199 | > httprequest GET api/unknown | |
198 | > user-agent: test |
|
200 | > user-agent: test | |
199 | > EOF |
|
201 | > EOF | |
200 | using raw connection to peer |
|
202 | using raw connection to peer | |
201 | s> GET /api/unknown HTTP/1.1\r\n |
|
203 | s> GET /api/unknown HTTP/1.1\r\n | |
202 | s> Accept-Encoding: identity\r\n |
|
204 | s> Accept-Encoding: identity\r\n | |
203 | s> user-agent: test\r\n |
|
205 | s> user-agent: test\r\n | |
204 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
206 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
205 | s> \r\n |
|
207 | s> \r\n | |
206 | s> makefile('rb', None) |
|
208 | s> makefile('rb', None) | |
207 | s> HTTP/1.1 404 Not Found\r\n |
|
209 | s> HTTP/1.1 404 Not Found\r\n | |
208 | s> Server: testing stub value\r\n |
|
210 | s> Server: testing stub value\r\n | |
209 | s> Date: $HTTP_DATE$\r\n |
|
211 | s> Date: $HTTP_DATE$\r\n | |
210 | s> Content-Type: text/plain\r\n |
|
212 | s> Content-Type: text/plain\r\n | |
211 | s> Content-Length: 33\r\n |
|
213 | s> Content-Length: 33\r\n | |
212 | s> \r\n |
|
214 | s> \r\n | |
213 | s> Unknown API: unknown\n |
|
215 | s> Unknown API: unknown\n | |
214 | s> Known APIs: |
|
216 | s> Known APIs: | |
215 |
|
217 | |||
216 | Accessing a known but not enabled API yields a different error |
|
218 | Accessing a known but not enabled API yields a different error | |
217 |
|
219 | |||
218 | $ send << EOF |
|
220 | $ send << EOF | |
219 | > httprequest GET api/exp-http-v2-0001 |
|
221 | > httprequest GET api/exp-http-v2-0001 | |
220 | > user-agent: test |
|
222 | > user-agent: test | |
221 | > EOF |
|
223 | > EOF | |
222 | using raw connection to peer |
|
224 | using raw connection to peer | |
223 | s> GET /api/exp-http-v2-0001 HTTP/1.1\r\n |
|
225 | s> GET /api/exp-http-v2-0001 HTTP/1.1\r\n | |
224 | s> Accept-Encoding: identity\r\n |
|
226 | s> Accept-Encoding: identity\r\n | |
225 | s> user-agent: test\r\n |
|
227 | s> user-agent: test\r\n | |
226 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
228 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
227 | s> \r\n |
|
229 | s> \r\n | |
228 | s> makefile('rb', None) |
|
230 | s> makefile('rb', None) | |
229 | s> HTTP/1.1 404 Not Found\r\n |
|
231 | s> HTTP/1.1 404 Not Found\r\n | |
230 | s> Server: testing stub value\r\n |
|
232 | s> Server: testing stub value\r\n | |
231 | s> Date: $HTTP_DATE$\r\n |
|
233 | s> Date: $HTTP_DATE$\r\n | |
232 | s> Content-Type: text/plain\r\n |
|
234 | s> Content-Type: text/plain\r\n | |
233 | s> Content-Length: 33\r\n |
|
235 | s> Content-Length: 33\r\n | |
234 | s> \r\n |
|
236 | s> \r\n | |
235 | s> API exp-http-v2-0001 not enabled\n |
|
237 | s> API exp-http-v2-0001 not enabled\n | |
236 |
|
238 | |||
237 | Restart server with support for HTTP v2 API |
|
239 | Restart server with support for HTTP v2 API | |
238 |
|
240 | |||
239 | $ killdaemons.py |
|
241 | $ killdaemons.py | |
240 | $ cat > server/.hg/hgrc << EOF |
|
242 | $ cat > server/.hg/hgrc << EOF | |
241 | > [experimental] |
|
243 | > [experimental] | |
242 | > web.apiserver = true |
|
244 | > web.apiserver = true | |
243 | > web.api.http-v2 = true |
|
245 | > web.api.http-v2 = true | |
244 | > EOF |
|
246 | > EOF | |
245 |
|
247 | |||
246 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid |
|
248 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid | |
247 | $ cat hg.pid > $DAEMON_PIDS |
|
249 | $ cat hg.pid > $DAEMON_PIDS | |
248 |
|
250 | |||
249 | /api lists the HTTP v2 protocol as available |
|
251 | /api lists the HTTP v2 protocol as available | |
250 |
|
252 | |||
251 | $ send << EOF |
|
253 | $ send << EOF | |
252 | > httprequest GET api |
|
254 | > httprequest GET api | |
253 | > user-agent: test |
|
255 | > user-agent: test | |
254 | > EOF |
|
256 | > EOF | |
255 | using raw connection to peer |
|
257 | using raw connection to peer | |
256 | s> GET /api HTTP/1.1\r\n |
|
258 | s> GET /api HTTP/1.1\r\n | |
257 | s> Accept-Encoding: identity\r\n |
|
259 | s> Accept-Encoding: identity\r\n | |
258 | s> user-agent: test\r\n |
|
260 | s> user-agent: test\r\n | |
259 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
261 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
260 | s> \r\n |
|
262 | s> \r\n | |
261 | s> makefile('rb', None) |
|
263 | s> makefile('rb', None) | |
262 | s> HTTP/1.1 200 OK\r\n |
|
264 | s> HTTP/1.1 200 OK\r\n | |
263 | s> Server: testing stub value\r\n |
|
265 | s> Server: testing stub value\r\n | |
264 | s> Date: $HTTP_DATE$\r\n |
|
266 | s> Date: $HTTP_DATE$\r\n | |
265 | s> Content-Type: text/plain\r\n |
|
267 | s> Content-Type: text/plain\r\n | |
266 | s> Content-Length: 96\r\n |
|
268 | s> Content-Length: 96\r\n | |
267 | s> \r\n |
|
269 | s> \r\n | |
268 | s> APIs can be accessed at /api/<name>, where <name> can be one of the following:\n |
|
270 | s> APIs can be accessed at /api/<name>, where <name> can be one of the following:\n | |
269 | s> \n |
|
271 | s> \n | |
270 | s> exp-http-v2-0001 |
|
272 | s> exp-http-v2-0001 | |
271 |
|
273 | |||
272 | $ send << EOF |
|
274 | $ send << EOF | |
273 | > httprequest GET api/ |
|
275 | > httprequest GET api/ | |
274 | > user-agent: test |
|
276 | > user-agent: test | |
275 | > EOF |
|
277 | > EOF | |
276 | using raw connection to peer |
|
278 | using raw connection to peer | |
277 | s> GET /api/ HTTP/1.1\r\n |
|
279 | s> GET /api/ HTTP/1.1\r\n | |
278 | s> Accept-Encoding: identity\r\n |
|
280 | s> Accept-Encoding: identity\r\n | |
279 | s> user-agent: test\r\n |
|
281 | s> user-agent: test\r\n | |
280 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
282 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
281 | s> \r\n |
|
283 | s> \r\n | |
282 | s> makefile('rb', None) |
|
284 | s> makefile('rb', None) | |
283 | s> HTTP/1.1 200 OK\r\n |
|
285 | s> HTTP/1.1 200 OK\r\n | |
284 | s> Server: testing stub value\r\n |
|
286 | s> Server: testing stub value\r\n | |
285 | s> Date: $HTTP_DATE$\r\n |
|
287 | s> Date: $HTTP_DATE$\r\n | |
286 | s> Content-Type: text/plain\r\n |
|
288 | s> Content-Type: text/plain\r\n | |
287 | s> Content-Length: 96\r\n |
|
289 | s> Content-Length: 96\r\n | |
288 | s> \r\n |
|
290 | s> \r\n | |
289 | s> APIs can be accessed at /api/<name>, where <name> can be one of the following:\n |
|
291 | s> APIs can be accessed at /api/<name>, where <name> can be one of the following:\n | |
290 | s> \n |
|
292 | s> \n | |
291 | s> exp-http-v2-0001 |
|
293 | s> exp-http-v2-0001 |
@@ -1,726 +1,728 b'' | |||||
|
1 | #require no-chg | |||
|
2 | ||||
1 | $ . $TESTDIR/wireprotohelpers.sh |
|
3 | $ . $TESTDIR/wireprotohelpers.sh | |
2 |
|
4 | |||
3 | $ cat >> $HGRCPATH << EOF |
|
5 | $ cat >> $HGRCPATH << EOF | |
4 | > [web] |
|
6 | > [web] | |
5 | > push_ssl = false |
|
7 | > push_ssl = false | |
6 | > allow_push = * |
|
8 | > allow_push = * | |
7 | > EOF |
|
9 | > EOF | |
8 |
|
10 | |||
9 | $ hg init server |
|
11 | $ hg init server | |
10 | $ cd server |
|
12 | $ cd server | |
11 | $ touch a |
|
13 | $ touch a | |
12 | $ hg -q commit -A -m initial |
|
14 | $ hg -q commit -A -m initial | |
13 | $ cd .. |
|
15 | $ cd .. | |
14 |
|
16 | |||
15 | $ hg serve -R server -p $HGPORT -d --pid-file hg.pid |
|
17 | $ hg serve -R server -p $HGPORT -d --pid-file hg.pid | |
16 | $ cat hg.pid >> $DAEMON_PIDS |
|
18 | $ cat hg.pid >> $DAEMON_PIDS | |
17 |
|
19 | |||
18 | compression formats are advertised in compression capability |
|
20 | compression formats are advertised in compression capability | |
19 |
|
21 | |||
20 | #if zstd |
|
22 | #if zstd | |
21 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=zstd,zlib$' > /dev/null |
|
23 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=zstd,zlib$' > /dev/null | |
22 | #else |
|
24 | #else | |
23 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=zlib$' > /dev/null |
|
25 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=zlib$' > /dev/null | |
24 | #endif |
|
26 | #endif | |
25 |
|
27 | |||
26 | $ killdaemons.py |
|
28 | $ killdaemons.py | |
27 |
|
29 | |||
28 | server.compressionengines can replace engines list wholesale |
|
30 | server.compressionengines can replace engines list wholesale | |
29 |
|
31 | |||
30 | $ hg serve --config server.compressionengines=none -R server -p $HGPORT -d --pid-file hg.pid |
|
32 | $ hg serve --config server.compressionengines=none -R server -p $HGPORT -d --pid-file hg.pid | |
31 | $ cat hg.pid > $DAEMON_PIDS |
|
33 | $ cat hg.pid > $DAEMON_PIDS | |
32 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=none$' > /dev/null |
|
34 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=none$' > /dev/null | |
33 |
|
35 | |||
34 | $ killdaemons.py |
|
36 | $ killdaemons.py | |
35 |
|
37 | |||
36 | Order of engines can also change |
|
38 | Order of engines can also change | |
37 |
|
39 | |||
38 | $ hg serve --config server.compressionengines=none,zlib -R server -p $HGPORT -d --pid-file hg.pid |
|
40 | $ hg serve --config server.compressionengines=none,zlib -R server -p $HGPORT -d --pid-file hg.pid | |
39 | $ cat hg.pid > $DAEMON_PIDS |
|
41 | $ cat hg.pid > $DAEMON_PIDS | |
40 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=none,zlib$' > /dev/null |
|
42 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=none,zlib$' > /dev/null | |
41 |
|
43 | |||
42 | $ killdaemons.py |
|
44 | $ killdaemons.py | |
43 |
|
45 | |||
44 | Start a default server again |
|
46 | Start a default server again | |
45 |
|
47 | |||
46 | $ hg serve -R server -p $HGPORT -d --pid-file hg.pid |
|
48 | $ hg serve -R server -p $HGPORT -d --pid-file hg.pid | |
47 | $ cat hg.pid > $DAEMON_PIDS |
|
49 | $ cat hg.pid > $DAEMON_PIDS | |
48 |
|
50 | |||
49 | Server should send application/mercurial-0.1 to clients if no Accept is used |
|
51 | Server should send application/mercurial-0.1 to clients if no Accept is used | |
50 |
|
52 | |||
51 | $ get-with-headers.py --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - |
|
53 | $ get-with-headers.py --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - | |
52 | 200 Script output follows |
|
54 | 200 Script output follows | |
53 | content-type: application/mercurial-0.1 |
|
55 | content-type: application/mercurial-0.1 | |
54 | date: $HTTP_DATE$ |
|
56 | date: $HTTP_DATE$ | |
55 | server: testing stub value |
|
57 | server: testing stub value | |
56 | transfer-encoding: chunked |
|
58 | transfer-encoding: chunked | |
57 |
|
59 | |||
58 | Server should send application/mercurial-0.1 when client says it wants it |
|
60 | Server should send application/mercurial-0.1 when client says it wants it | |
59 |
|
61 | |||
60 | $ get-with-headers.py --hgproto '0.1' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - |
|
62 | $ get-with-headers.py --hgproto '0.1' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - | |
61 | 200 Script output follows |
|
63 | 200 Script output follows | |
62 | content-type: application/mercurial-0.1 |
|
64 | content-type: application/mercurial-0.1 | |
63 | date: $HTTP_DATE$ |
|
65 | date: $HTTP_DATE$ | |
64 | server: testing stub value |
|
66 | server: testing stub value | |
65 | transfer-encoding: chunked |
|
67 | transfer-encoding: chunked | |
66 |
|
68 | |||
67 | Server should send application/mercurial-0.2 when client says it wants it |
|
69 | Server should send application/mercurial-0.2 when client says it wants it | |
68 |
|
70 | |||
69 | $ get-with-headers.py --hgproto '0.2' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - |
|
71 | $ get-with-headers.py --hgproto '0.2' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - | |
70 | 200 Script output follows |
|
72 | 200 Script output follows | |
71 | content-type: application/mercurial-0.2 |
|
73 | content-type: application/mercurial-0.2 | |
72 | date: $HTTP_DATE$ |
|
74 | date: $HTTP_DATE$ | |
73 | server: testing stub value |
|
75 | server: testing stub value | |
74 | transfer-encoding: chunked |
|
76 | transfer-encoding: chunked | |
75 |
|
77 | |||
76 | $ get-with-headers.py --hgproto '0.1 0.2' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - |
|
78 | $ get-with-headers.py --hgproto '0.1 0.2' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - | |
77 | 200 Script output follows |
|
79 | 200 Script output follows | |
78 | content-type: application/mercurial-0.2 |
|
80 | content-type: application/mercurial-0.2 | |
79 | date: $HTTP_DATE$ |
|
81 | date: $HTTP_DATE$ | |
80 | server: testing stub value |
|
82 | server: testing stub value | |
81 | transfer-encoding: chunked |
|
83 | transfer-encoding: chunked | |
82 |
|
84 | |||
83 | Requesting a compression format that server doesn't support results will fall back to 0.1 |
|
85 | Requesting a compression format that server doesn't support results will fall back to 0.1 | |
84 |
|
86 | |||
85 | $ get-with-headers.py --hgproto '0.2 comp=aa' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - |
|
87 | $ get-with-headers.py --hgproto '0.2 comp=aa' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - | |
86 | 200 Script output follows |
|
88 | 200 Script output follows | |
87 | content-type: application/mercurial-0.1 |
|
89 | content-type: application/mercurial-0.1 | |
88 | date: $HTTP_DATE$ |
|
90 | date: $HTTP_DATE$ | |
89 | server: testing stub value |
|
91 | server: testing stub value | |
90 | transfer-encoding: chunked |
|
92 | transfer-encoding: chunked | |
91 |
|
93 | |||
92 | #if zstd |
|
94 | #if zstd | |
93 | zstd is used if available |
|
95 | zstd is used if available | |
94 |
|
96 | |||
95 | $ get-with-headers.py --hgproto '0.2 comp=zstd' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp |
|
97 | $ get-with-headers.py --hgproto '0.2 comp=zstd' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp | |
96 | $ f --size --hexdump --bytes 36 --sha1 resp |
|
98 | $ f --size --hexdump --bytes 36 --sha1 resp | |
97 | resp: size=248, sha1=4d8d8f87fb82bd542ce52881fdc94f850748 |
|
99 | resp: size=248, sha1=4d8d8f87fb82bd542ce52881fdc94f850748 | |
98 | 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| |
|
100 | 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| | |
99 | 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 7a 73 74 64 |t follows...zstd| |
|
101 | 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 7a 73 74 64 |t follows...zstd| | |
100 | 0020: 28 b5 2f fd |(./.| |
|
102 | 0020: 28 b5 2f fd |(./.| | |
101 |
|
103 | |||
102 | #endif |
|
104 | #endif | |
103 |
|
105 | |||
104 | application/mercurial-0.2 is not yet used on non-streaming responses |
|
106 | application/mercurial-0.2 is not yet used on non-streaming responses | |
105 |
|
107 | |||
106 | $ get-with-headers.py --hgproto '0.2' $LOCALIP:$HGPORT '?cmd=heads' - |
|
108 | $ get-with-headers.py --hgproto '0.2' $LOCALIP:$HGPORT '?cmd=heads' - | |
107 | 200 Script output follows |
|
109 | 200 Script output follows | |
108 | content-length: 41 |
|
110 | content-length: 41 | |
109 | content-type: application/mercurial-0.1 |
|
111 | content-type: application/mercurial-0.1 | |
110 | date: $HTTP_DATE$ |
|
112 | date: $HTTP_DATE$ | |
111 | server: testing stub value |
|
113 | server: testing stub value | |
112 |
|
114 | |||
113 | e93700bd72895c5addab234c56d4024b487a362f |
|
115 | e93700bd72895c5addab234c56d4024b487a362f | |
114 |
|
116 | |||
115 | Now test protocol preference usage |
|
117 | Now test protocol preference usage | |
116 |
|
118 | |||
117 | $ killdaemons.py |
|
119 | $ killdaemons.py | |
118 | $ hg serve --config server.compressionengines=none,zlib -R server -p $HGPORT -d --pid-file hg.pid |
|
120 | $ hg serve --config server.compressionengines=none,zlib -R server -p $HGPORT -d --pid-file hg.pid | |
119 | $ cat hg.pid > $DAEMON_PIDS |
|
121 | $ cat hg.pid > $DAEMON_PIDS | |
120 |
|
122 | |||
121 | No Accept will send 0.1+zlib, even though "none" is preferred b/c "none" isn't supported on 0.1 |
|
123 | No Accept will send 0.1+zlib, even though "none" is preferred b/c "none" isn't supported on 0.1 | |
122 |
|
124 | |||
123 | $ get-with-headers.py --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' Content-Type |
|
125 | $ get-with-headers.py --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' Content-Type | |
124 | 200 Script output follows |
|
126 | 200 Script output follows | |
125 | content-type: application/mercurial-0.1 |
|
127 | content-type: application/mercurial-0.1 | |
126 |
|
128 | |||
127 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp |
|
129 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp | |
128 | $ f --size --hexdump --bytes 28 --sha1 resp |
|
130 | $ f --size --hexdump --bytes 28 --sha1 resp | |
129 | resp: size=227, sha1=35a4c074da74f32f5440da3cbf04 |
|
131 | resp: size=227, sha1=35a4c074da74f32f5440da3cbf04 | |
130 | 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| |
|
132 | 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| | |
131 | 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 78 |t follows..x| |
|
133 | 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 78 |t follows..x| | |
132 |
|
134 | |||
133 | Explicit 0.1 will send zlib because "none" isn't supported on 0.1 |
|
135 | Explicit 0.1 will send zlib because "none" isn't supported on 0.1 | |
134 |
|
136 | |||
135 | $ get-with-headers.py --hgproto '0.1' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp |
|
137 | $ get-with-headers.py --hgproto '0.1' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp | |
136 | $ f --size --hexdump --bytes 28 --sha1 resp |
|
138 | $ f --size --hexdump --bytes 28 --sha1 resp | |
137 | resp: size=227, sha1=35a4c074da74f32f5440da3cbf04 |
|
139 | resp: size=227, sha1=35a4c074da74f32f5440da3cbf04 | |
138 | 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| |
|
140 | 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| | |
139 | 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 78 |t follows..x| |
|
141 | 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 78 |t follows..x| | |
140 |
|
142 | |||
141 | 0.2 with no compression will get "none" because that is server's preference |
|
143 | 0.2 with no compression will get "none" because that is server's preference | |
142 | (spec says ZL and UN are implicitly supported) |
|
144 | (spec says ZL and UN are implicitly supported) | |
143 |
|
145 | |||
144 | $ get-with-headers.py --hgproto '0.2' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp |
|
146 | $ get-with-headers.py --hgproto '0.2' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp | |
145 | $ f --size --hexdump --bytes 32 --sha1 resp |
|
147 | $ f --size --hexdump --bytes 32 --sha1 resp | |
146 | resp: size=432, sha1=ac931b412ec185a02e0e5bcff98dac83 |
|
148 | resp: size=432, sha1=ac931b412ec185a02e0e5bcff98dac83 | |
147 | 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| |
|
149 | 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| | |
148 | 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 6e 6f 6e 65 |t follows...none| |
|
150 | 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 6e 6f 6e 65 |t follows...none| | |
149 |
|
151 | |||
150 | Client receives server preference even if local order doesn't match |
|
152 | Client receives server preference even if local order doesn't match | |
151 |
|
153 | |||
152 | $ get-with-headers.py --hgproto '0.2 comp=zlib,none' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp |
|
154 | $ get-with-headers.py --hgproto '0.2 comp=zlib,none' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp | |
153 | $ f --size --hexdump --bytes 32 --sha1 resp |
|
155 | $ f --size --hexdump --bytes 32 --sha1 resp | |
154 | resp: size=432, sha1=ac931b412ec185a02e0e5bcff98dac83 |
|
156 | resp: size=432, sha1=ac931b412ec185a02e0e5bcff98dac83 | |
155 | 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| |
|
157 | 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| | |
156 | 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 6e 6f 6e 65 |t follows...none| |
|
158 | 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 6e 6f 6e 65 |t follows...none| | |
157 |
|
159 | |||
158 | Client receives only supported format even if not server preferred format |
|
160 | Client receives only supported format even if not server preferred format | |
159 |
|
161 | |||
160 | $ get-with-headers.py --hgproto '0.2 comp=zlib' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp |
|
162 | $ get-with-headers.py --hgproto '0.2 comp=zlib' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp | |
161 | $ f --size --hexdump --bytes 33 --sha1 resp |
|
163 | $ f --size --hexdump --bytes 33 --sha1 resp | |
162 | resp: size=232, sha1=a1c727f0c9693ca15742a75c30419bc36 |
|
164 | resp: size=232, sha1=a1c727f0c9693ca15742a75c30419bc36 | |
163 | 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| |
|
165 | 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| | |
164 | 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 7a 6c 69 62 |t follows...zlib| |
|
166 | 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 7a 6c 69 62 |t follows...zlib| | |
165 | 0020: 78 |x| |
|
167 | 0020: 78 |x| | |
166 |
|
168 | |||
167 | $ killdaemons.py |
|
169 | $ killdaemons.py | |
168 | $ cd .. |
|
170 | $ cd .. | |
169 |
|
171 | |||
170 | Test listkeys for listing namespaces |
|
172 | Test listkeys for listing namespaces | |
171 |
|
173 | |||
172 | $ hg init empty |
|
174 | $ hg init empty | |
173 | $ hg -R empty serve -p $HGPORT -d --pid-file hg.pid |
|
175 | $ hg -R empty serve -p $HGPORT -d --pid-file hg.pid | |
174 | $ cat hg.pid > $DAEMON_PIDS |
|
176 | $ cat hg.pid > $DAEMON_PIDS | |
175 |
|
177 | |||
176 | $ hg --verbose debugwireproto http://$LOCALIP:$HGPORT << EOF |
|
178 | $ hg --verbose debugwireproto http://$LOCALIP:$HGPORT << EOF | |
177 | > command listkeys |
|
179 | > command listkeys | |
178 | > namespace namespaces |
|
180 | > namespace namespaces | |
179 | > EOF |
|
181 | > EOF | |
180 | s> GET /?cmd=capabilities HTTP/1.1\r\n |
|
182 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
181 | s> Accept-Encoding: identity\r\n |
|
183 | s> Accept-Encoding: identity\r\n | |
182 | s> accept: application/mercurial-0.1\r\n |
|
184 | s> accept: application/mercurial-0.1\r\n | |
183 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
185 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
184 | s> user-agent: Mercurial debugwireproto\r\n |
|
186 | s> user-agent: Mercurial debugwireproto\r\n | |
185 | s> \r\n |
|
187 | s> \r\n | |
186 | s> makefile('rb', None) |
|
188 | s> makefile('rb', None) | |
187 | s> HTTP/1.1 200 Script output follows\r\n |
|
189 | s> HTTP/1.1 200 Script output follows\r\n | |
188 | s> Server: testing stub value\r\n |
|
190 | s> Server: testing stub value\r\n | |
189 | s> Date: $HTTP_DATE$\r\n |
|
191 | s> Date: $HTTP_DATE$\r\n | |
190 | s> Content-Type: application/mercurial-0.1\r\n |
|
192 | s> Content-Type: application/mercurial-0.1\r\n | |
191 | s> Content-Length: *\r\n (glob) |
|
193 | s> Content-Length: *\r\n (glob) | |
192 | s> \r\n |
|
194 | s> \r\n | |
193 | s> batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
195 | s> batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
194 | sending listkeys command |
|
196 | sending listkeys command | |
195 | s> GET /?cmd=listkeys HTTP/1.1\r\n |
|
197 | s> GET /?cmd=listkeys HTTP/1.1\r\n | |
196 | s> Accept-Encoding: identity\r\n |
|
198 | s> Accept-Encoding: identity\r\n | |
197 | s> vary: X-HgArg-1,X-HgProto-1\r\n |
|
199 | s> vary: X-HgArg-1,X-HgProto-1\r\n | |
198 | s> x-hgarg-1: namespace=namespaces\r\n |
|
200 | s> x-hgarg-1: namespace=namespaces\r\n | |
199 | s> x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n |
|
201 | s> x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n | |
200 | s> accept: application/mercurial-0.1\r\n |
|
202 | s> accept: application/mercurial-0.1\r\n | |
201 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
203 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
202 | s> user-agent: Mercurial debugwireproto\r\n |
|
204 | s> user-agent: Mercurial debugwireproto\r\n | |
203 | s> \r\n |
|
205 | s> \r\n | |
204 | s> makefile('rb', None) |
|
206 | s> makefile('rb', None) | |
205 | s> HTTP/1.1 200 Script output follows\r\n |
|
207 | s> HTTP/1.1 200 Script output follows\r\n | |
206 | s> Server: testing stub value\r\n |
|
208 | s> Server: testing stub value\r\n | |
207 | s> Date: $HTTP_DATE$\r\n |
|
209 | s> Date: $HTTP_DATE$\r\n | |
208 | s> Content-Type: application/mercurial-0.1\r\n |
|
210 | s> Content-Type: application/mercurial-0.1\r\n | |
209 | s> Content-Length: 30\r\n |
|
211 | s> Content-Length: 30\r\n | |
210 | s> \r\n |
|
212 | s> \r\n | |
211 | s> bookmarks\t\n |
|
213 | s> bookmarks\t\n | |
212 | s> namespaces\t\n |
|
214 | s> namespaces\t\n | |
213 | s> phases\t |
|
215 | s> phases\t | |
214 | response: {b'bookmarks': b'', b'namespaces': b'', b'phases': b''} |
|
216 | response: {b'bookmarks': b'', b'namespaces': b'', b'phases': b''} | |
215 |
|
217 | |||
216 | Same thing, but with "httprequest" command |
|
218 | Same thing, but with "httprequest" command | |
217 |
|
219 | |||
218 | $ hg --verbose debugwireproto --peer raw http://$LOCALIP:$HGPORT << EOF |
|
220 | $ hg --verbose debugwireproto --peer raw http://$LOCALIP:$HGPORT << EOF | |
219 | > httprequest GET ?cmd=listkeys |
|
221 | > httprequest GET ?cmd=listkeys | |
220 | > user-agent: test |
|
222 | > user-agent: test | |
221 | > x-hgarg-1: namespace=namespaces |
|
223 | > x-hgarg-1: namespace=namespaces | |
222 | > EOF |
|
224 | > EOF | |
223 | using raw connection to peer |
|
225 | using raw connection to peer | |
224 | s> GET /?cmd=listkeys HTTP/1.1\r\n |
|
226 | s> GET /?cmd=listkeys HTTP/1.1\r\n | |
225 | s> Accept-Encoding: identity\r\n |
|
227 | s> Accept-Encoding: identity\r\n | |
226 | s> user-agent: test\r\n |
|
228 | s> user-agent: test\r\n | |
227 | s> x-hgarg-1: namespace=namespaces\r\n |
|
229 | s> x-hgarg-1: namespace=namespaces\r\n | |
228 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
230 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
229 | s> \r\n |
|
231 | s> \r\n | |
230 | s> makefile('rb', None) |
|
232 | s> makefile('rb', None) | |
231 | s> HTTP/1.1 200 Script output follows\r\n |
|
233 | s> HTTP/1.1 200 Script output follows\r\n | |
232 | s> Server: testing stub value\r\n |
|
234 | s> Server: testing stub value\r\n | |
233 | s> Date: $HTTP_DATE$\r\n |
|
235 | s> Date: $HTTP_DATE$\r\n | |
234 | s> Content-Type: application/mercurial-0.1\r\n |
|
236 | s> Content-Type: application/mercurial-0.1\r\n | |
235 | s> Content-Length: 30\r\n |
|
237 | s> Content-Length: 30\r\n | |
236 | s> \r\n |
|
238 | s> \r\n | |
237 | s> bookmarks\t\n |
|
239 | s> bookmarks\t\n | |
238 | s> namespaces\t\n |
|
240 | s> namespaces\t\n | |
239 | s> phases\t |
|
241 | s> phases\t | |
240 |
|
242 | |||
241 | Client with HTTPv2 enabled advertises that and gets old capabilities response from old server |
|
243 | Client with HTTPv2 enabled advertises that and gets old capabilities response from old server | |
242 |
|
244 | |||
243 | $ hg --config experimental.httppeer.advertise-v2=true --verbose debugwireproto http://$LOCALIP:$HGPORT << EOF |
|
245 | $ hg --config experimental.httppeer.advertise-v2=true --verbose debugwireproto http://$LOCALIP:$HGPORT << EOF | |
244 | > command heads |
|
246 | > command heads | |
245 | > EOF |
|
247 | > EOF | |
246 | s> GET /?cmd=capabilities HTTP/1.1\r\n |
|
248 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
247 | s> Accept-Encoding: identity\r\n |
|
249 | s> Accept-Encoding: identity\r\n | |
248 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n |
|
250 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n | |
249 | s> x-hgproto-1: cbor\r\n |
|
251 | s> x-hgproto-1: cbor\r\n | |
250 | s> x-hgupgrade-1: exp-http-v2-0001\r\n |
|
252 | s> x-hgupgrade-1: exp-http-v2-0001\r\n | |
251 | s> accept: application/mercurial-0.1\r\n |
|
253 | s> accept: application/mercurial-0.1\r\n | |
252 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
254 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
253 | s> user-agent: Mercurial debugwireproto\r\n |
|
255 | s> user-agent: Mercurial debugwireproto\r\n | |
254 | s> \r\n |
|
256 | s> \r\n | |
255 | s> makefile('rb', None) |
|
257 | s> makefile('rb', None) | |
256 | s> HTTP/1.1 200 Script output follows\r\n |
|
258 | s> HTTP/1.1 200 Script output follows\r\n | |
257 | s> Server: testing stub value\r\n |
|
259 | s> Server: testing stub value\r\n | |
258 | s> Date: $HTTP_DATE$\r\n |
|
260 | s> Date: $HTTP_DATE$\r\n | |
259 | s> Content-Type: application/mercurial-0.1\r\n |
|
261 | s> Content-Type: application/mercurial-0.1\r\n | |
260 | s> Content-Length: *\r\n (glob) |
|
262 | s> Content-Length: *\r\n (glob) | |
261 | s> \r\n |
|
263 | s> \r\n | |
262 | s> batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
264 | s> batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
263 | sending heads command |
|
265 | sending heads command | |
264 | s> GET /?cmd=heads HTTP/1.1\r\n |
|
266 | s> GET /?cmd=heads HTTP/1.1\r\n | |
265 | s> Accept-Encoding: identity\r\n |
|
267 | s> Accept-Encoding: identity\r\n | |
266 | s> vary: X-HgProto-1\r\n |
|
268 | s> vary: X-HgProto-1\r\n | |
267 | s> x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n |
|
269 | s> x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n | |
268 | s> accept: application/mercurial-0.1\r\n |
|
270 | s> accept: application/mercurial-0.1\r\n | |
269 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
271 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
270 | s> user-agent: Mercurial debugwireproto\r\n |
|
272 | s> user-agent: Mercurial debugwireproto\r\n | |
271 | s> \r\n |
|
273 | s> \r\n | |
272 | s> makefile('rb', None) |
|
274 | s> makefile('rb', None) | |
273 | s> HTTP/1.1 200 Script output follows\r\n |
|
275 | s> HTTP/1.1 200 Script output follows\r\n | |
274 | s> Server: testing stub value\r\n |
|
276 | s> Server: testing stub value\r\n | |
275 | s> Date: $HTTP_DATE$\r\n |
|
277 | s> Date: $HTTP_DATE$\r\n | |
276 | s> Content-Type: application/mercurial-0.1\r\n |
|
278 | s> Content-Type: application/mercurial-0.1\r\n | |
277 | s> Content-Length: 41\r\n |
|
279 | s> Content-Length: 41\r\n | |
278 | s> \r\n |
|
280 | s> \r\n | |
279 | s> 0000000000000000000000000000000000000000\n |
|
281 | s> 0000000000000000000000000000000000000000\n | |
280 | response: [b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'] |
|
282 | response: [b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'] | |
281 |
|
283 | |||
282 | $ killdaemons.py |
|
284 | $ killdaemons.py | |
283 | $ enablehttpv2 empty |
|
285 | $ enablehttpv2 empty | |
284 | $ hg --config server.compressionengines=zlib -R empty serve -p $HGPORT -d --pid-file hg.pid |
|
286 | $ hg --config server.compressionengines=zlib -R empty serve -p $HGPORT -d --pid-file hg.pid | |
285 | $ cat hg.pid > $DAEMON_PIDS |
|
287 | $ cat hg.pid > $DAEMON_PIDS | |
286 |
|
288 | |||
287 | Client with HTTPv2 enabled automatically upgrades if the server supports it |
|
289 | Client with HTTPv2 enabled automatically upgrades if the server supports it | |
288 |
|
290 | |||
289 | $ hg --config experimental.httppeer.advertise-v2=true --verbose debugwireproto http://$LOCALIP:$HGPORT << EOF |
|
291 | $ hg --config experimental.httppeer.advertise-v2=true --verbose debugwireproto http://$LOCALIP:$HGPORT << EOF | |
290 | > command heads |
|
292 | > command heads | |
291 | > EOF |
|
293 | > EOF | |
292 | s> GET /?cmd=capabilities HTTP/1.1\r\n |
|
294 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
293 | s> Accept-Encoding: identity\r\n |
|
295 | s> Accept-Encoding: identity\r\n | |
294 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n |
|
296 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n | |
295 | s> x-hgproto-1: cbor\r\n |
|
297 | s> x-hgproto-1: cbor\r\n | |
296 | s> x-hgupgrade-1: exp-http-v2-0001\r\n |
|
298 | s> x-hgupgrade-1: exp-http-v2-0001\r\n | |
297 | s> accept: application/mercurial-0.1\r\n |
|
299 | s> accept: application/mercurial-0.1\r\n | |
298 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
300 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
299 | s> user-agent: Mercurial debugwireproto\r\n |
|
301 | s> user-agent: Mercurial debugwireproto\r\n | |
300 | s> \r\n |
|
302 | s> \r\n | |
301 | s> makefile('rb', None) |
|
303 | s> makefile('rb', None) | |
302 | s> HTTP/1.1 200 OK\r\n |
|
304 | s> HTTP/1.1 200 OK\r\n | |
303 | s> Server: testing stub value\r\n |
|
305 | s> Server: testing stub value\r\n | |
304 | s> Date: $HTTP_DATE$\r\n |
|
306 | s> Date: $HTTP_DATE$\r\n | |
305 | s> Content-Type: application/mercurial-cbor\r\n |
|
307 | s> Content-Type: application/mercurial-cbor\r\n | |
306 | s> Content-Length: *\r\n (glob) |
|
308 | s> Content-Length: *\r\n (glob) | |
307 | s> \r\n |
|
309 | s> \r\n | |
308 | s> \xa3Dapis\xa1Pexp-http-v2-0001\xa4Hcommands\xa7Eheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyCnewCnewColdColdInamespaceBnsKpermissions\x81DpushHlistkeys\xa2Dargs\xa1InamespaceBnsKpermissions\x81DpullIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullKcompression\x81\xa1DnameDzlibNrawrepoformats\x82LgeneraldeltaHrevlogv1Qframingmediatypes\x81X&application/mercurial-exp-framing-0005GapibaseDapi/Nv1capabilitiesY\x01\xc5batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
310 | s> \xa3Dapis\xa1Pexp-http-v2-0001\xa4Hcommands\xa7Eheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyCnewCnewColdColdInamespaceBnsKpermissions\x81DpushHlistkeys\xa2Dargs\xa1InamespaceBnsKpermissions\x81DpullIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullKcompression\x81\xa1DnameDzlibNrawrepoformats\x82LgeneraldeltaHrevlogv1Qframingmediatypes\x81X&application/mercurial-exp-framing-0005GapibaseDapi/Nv1capabilitiesY\x01\xc5batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
309 | sending heads command |
|
311 | sending heads command | |
310 | s> POST /api/exp-http-v2-0001/ro/heads HTTP/1.1\r\n |
|
312 | s> POST /api/exp-http-v2-0001/ro/heads HTTP/1.1\r\n | |
311 | s> Accept-Encoding: identity\r\n |
|
313 | s> Accept-Encoding: identity\r\n | |
312 | s> accept: application/mercurial-exp-framing-0005\r\n |
|
314 | s> accept: application/mercurial-exp-framing-0005\r\n | |
313 | s> content-type: application/mercurial-exp-framing-0005\r\n |
|
315 | s> content-type: application/mercurial-exp-framing-0005\r\n | |
314 | s> content-length: 20\r\n |
|
316 | s> content-length: 20\r\n | |
315 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
317 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
316 | s> user-agent: Mercurial debugwireproto\r\n |
|
318 | s> user-agent: Mercurial debugwireproto\r\n | |
317 | s> \r\n |
|
319 | s> \r\n | |
318 | s> \x0c\x00\x00\x01\x00\x01\x01\x11\xa1DnameEheads |
|
320 | s> \x0c\x00\x00\x01\x00\x01\x01\x11\xa1DnameEheads | |
319 | s> makefile('rb', None) |
|
321 | s> makefile('rb', None) | |
320 | s> HTTP/1.1 200 OK\r\n |
|
322 | s> HTTP/1.1 200 OK\r\n | |
321 | s> Server: testing stub value\r\n |
|
323 | s> Server: testing stub value\r\n | |
322 | s> Date: $HTTP_DATE$\r\n |
|
324 | s> Date: $HTTP_DATE$\r\n | |
323 | s> Content-Type: application/mercurial-exp-framing-0005\r\n |
|
325 | s> Content-Type: application/mercurial-exp-framing-0005\r\n | |
324 | s> Transfer-Encoding: chunked\r\n |
|
326 | s> Transfer-Encoding: chunked\r\n | |
325 | s> \r\n |
|
327 | s> \r\n | |
326 | s> 29\r\n |
|
328 | s> 29\r\n | |
327 | s> !\x00\x00\x01\x00\x02\x012 |
|
329 | s> !\x00\x00\x01\x00\x02\x012 | |
328 | s> \xa1FstatusBok\x81T\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 |
|
330 | s> \xa1FstatusBok\x81T\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 | |
329 | s> \r\n |
|
331 | s> \r\n | |
330 | received frame(size=33; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=eos) |
|
332 | received frame(size=33; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=eos) | |
331 | s> 0\r\n |
|
333 | s> 0\r\n | |
332 | s> \r\n |
|
334 | s> \r\n | |
333 | response: [b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'] |
|
335 | response: [b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'] | |
334 |
|
336 | |||
335 | $ killdaemons.py |
|
337 | $ killdaemons.py | |
336 |
|
338 | |||
337 | HTTP client follows HTTP redirect on handshake to new repo |
|
339 | HTTP client follows HTTP redirect on handshake to new repo | |
338 |
|
340 | |||
339 | $ cd $TESTTMP |
|
341 | $ cd $TESTTMP | |
340 |
|
342 | |||
341 | $ hg init redirector |
|
343 | $ hg init redirector | |
342 | $ hg init redirected |
|
344 | $ hg init redirected | |
343 | $ cd redirected |
|
345 | $ cd redirected | |
344 | $ touch foo |
|
346 | $ touch foo | |
345 | $ hg -q commit -A -m initial |
|
347 | $ hg -q commit -A -m initial | |
346 | $ cd .. |
|
348 | $ cd .. | |
347 |
|
349 | |||
348 | $ cat > paths.conf << EOF |
|
350 | $ cat > paths.conf << EOF | |
349 | > [paths] |
|
351 | > [paths] | |
350 | > / = $TESTTMP/* |
|
352 | > / = $TESTTMP/* | |
351 | > EOF |
|
353 | > EOF | |
352 |
|
354 | |||
353 | $ cat > redirectext.py << EOF |
|
355 | $ cat > redirectext.py << EOF | |
354 | > from mercurial import extensions, wireprotoserver |
|
356 | > from mercurial import extensions, wireprotoserver | |
355 | > def wrappedcallhttp(orig, repo, req, res, proto, cmd): |
|
357 | > def wrappedcallhttp(orig, repo, req, res, proto, cmd): | |
356 | > path = req.advertisedurl[len(req.advertisedbaseurl):] |
|
358 | > path = req.advertisedurl[len(req.advertisedbaseurl):] | |
357 | > if not path.startswith(b'/redirector'): |
|
359 | > if not path.startswith(b'/redirector'): | |
358 | > return orig(repo, req, res, proto, cmd) |
|
360 | > return orig(repo, req, res, proto, cmd) | |
359 | > relpath = path[len(b'/redirector'):] |
|
361 | > relpath = path[len(b'/redirector'):] | |
360 | > res.status = b'301 Redirect' |
|
362 | > res.status = b'301 Redirect' | |
361 | > newurl = b'%s/redirected%s' % (req.baseurl, relpath) |
|
363 | > newurl = b'%s/redirected%s' % (req.baseurl, relpath) | |
362 | > if not repo.ui.configbool('testing', 'redirectqs', True) and b'?' in newurl: |
|
364 | > if not repo.ui.configbool('testing', 'redirectqs', True) and b'?' in newurl: | |
363 | > newurl = newurl[0:newurl.index(b'?')] |
|
365 | > newurl = newurl[0:newurl.index(b'?')] | |
364 | > res.headers[b'Location'] = newurl |
|
366 | > res.headers[b'Location'] = newurl | |
365 | > res.headers[b'Content-Type'] = b'text/plain' |
|
367 | > res.headers[b'Content-Type'] = b'text/plain' | |
366 | > res.setbodybytes(b'redirected') |
|
368 | > res.setbodybytes(b'redirected') | |
367 | > return True |
|
369 | > return True | |
368 | > |
|
370 | > | |
369 | > extensions.wrapfunction(wireprotoserver, '_callhttp', wrappedcallhttp) |
|
371 | > extensions.wrapfunction(wireprotoserver, '_callhttp', wrappedcallhttp) | |
370 | > EOF |
|
372 | > EOF | |
371 |
|
373 | |||
372 | $ hg --config extensions.redirect=$TESTTMP/redirectext.py \ |
|
374 | $ hg --config extensions.redirect=$TESTTMP/redirectext.py \ | |
373 | > --config server.compressionengines=zlib \ |
|
375 | > --config server.compressionengines=zlib \ | |
374 | > serve --web-conf paths.conf --pid-file hg.pid -p $HGPORT -d |
|
376 | > serve --web-conf paths.conf --pid-file hg.pid -p $HGPORT -d | |
375 | $ cat hg.pid > $DAEMON_PIDS |
|
377 | $ cat hg.pid > $DAEMON_PIDS | |
376 |
|
378 | |||
377 | Verify our HTTP 301 is served properly |
|
379 | Verify our HTTP 301 is served properly | |
378 |
|
380 | |||
379 | $ hg --verbose debugwireproto --peer raw http://$LOCALIP:$HGPORT << EOF |
|
381 | $ hg --verbose debugwireproto --peer raw http://$LOCALIP:$HGPORT << EOF | |
380 | > httprequest GET /redirector?cmd=capabilities |
|
382 | > httprequest GET /redirector?cmd=capabilities | |
381 | > user-agent: test |
|
383 | > user-agent: test | |
382 | > EOF |
|
384 | > EOF | |
383 | using raw connection to peer |
|
385 | using raw connection to peer | |
384 | s> GET /redirector?cmd=capabilities HTTP/1.1\r\n |
|
386 | s> GET /redirector?cmd=capabilities HTTP/1.1\r\n | |
385 | s> Accept-Encoding: identity\r\n |
|
387 | s> Accept-Encoding: identity\r\n | |
386 | s> user-agent: test\r\n |
|
388 | s> user-agent: test\r\n | |
387 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
389 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
388 | s> \r\n |
|
390 | s> \r\n | |
389 | s> makefile('rb', None) |
|
391 | s> makefile('rb', None) | |
390 | s> HTTP/1.1 301 Redirect\r\n |
|
392 | s> HTTP/1.1 301 Redirect\r\n | |
391 | s> Server: testing stub value\r\n |
|
393 | s> Server: testing stub value\r\n | |
392 | s> Date: $HTTP_DATE$\r\n |
|
394 | s> Date: $HTTP_DATE$\r\n | |
393 | s> Location: http://$LOCALIP:$HGPORT/redirected?cmd=capabilities\r\n (glob) |
|
395 | s> Location: http://$LOCALIP:$HGPORT/redirected?cmd=capabilities\r\n (glob) | |
394 | s> Content-Type: text/plain\r\n |
|
396 | s> Content-Type: text/plain\r\n | |
395 | s> Content-Length: 10\r\n |
|
397 | s> Content-Length: 10\r\n | |
396 | s> \r\n |
|
398 | s> \r\n | |
397 | s> redirected |
|
399 | s> redirected | |
398 | s> GET /redirected?cmd=capabilities HTTP/1.1\r\n |
|
400 | s> GET /redirected?cmd=capabilities HTTP/1.1\r\n | |
399 | s> Accept-Encoding: identity\r\n |
|
401 | s> Accept-Encoding: identity\r\n | |
400 | s> user-agent: test\r\n |
|
402 | s> user-agent: test\r\n | |
401 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
403 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
402 | s> \r\n |
|
404 | s> \r\n | |
403 | s> makefile('rb', None) |
|
405 | s> makefile('rb', None) | |
404 | s> HTTP/1.1 200 Script output follows\r\n |
|
406 | s> HTTP/1.1 200 Script output follows\r\n | |
405 | s> Server: testing stub value\r\n |
|
407 | s> Server: testing stub value\r\n | |
406 | s> Date: $HTTP_DATE$\r\n |
|
408 | s> Date: $HTTP_DATE$\r\n | |
407 | s> Content-Type: application/mercurial-0.1\r\n |
|
409 | s> Content-Type: application/mercurial-0.1\r\n | |
408 | s> Content-Length: 453\r\n |
|
410 | s> Content-Length: 453\r\n | |
409 | s> \r\n |
|
411 | s> \r\n | |
410 | s> batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
412 | s> batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
411 |
|
413 | |||
412 | Test with the HTTP peer |
|
414 | Test with the HTTP peer | |
413 |
|
415 | |||
414 | $ hg --verbose debugwireproto http://$LOCALIP:$HGPORT/redirector << EOF |
|
416 | $ hg --verbose debugwireproto http://$LOCALIP:$HGPORT/redirector << EOF | |
415 | > command heads |
|
417 | > command heads | |
416 | > EOF |
|
418 | > EOF | |
417 | s> GET /redirector?cmd=capabilities HTTP/1.1\r\n |
|
419 | s> GET /redirector?cmd=capabilities HTTP/1.1\r\n | |
418 | s> Accept-Encoding: identity\r\n |
|
420 | s> Accept-Encoding: identity\r\n | |
419 | s> accept: application/mercurial-0.1\r\n |
|
421 | s> accept: application/mercurial-0.1\r\n | |
420 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
422 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
421 | s> user-agent: Mercurial debugwireproto\r\n |
|
423 | s> user-agent: Mercurial debugwireproto\r\n | |
422 | s> \r\n |
|
424 | s> \r\n | |
423 | s> makefile('rb', None) |
|
425 | s> makefile('rb', None) | |
424 | s> HTTP/1.1 301 Redirect\r\n |
|
426 | s> HTTP/1.1 301 Redirect\r\n | |
425 | s> Server: testing stub value\r\n |
|
427 | s> Server: testing stub value\r\n | |
426 | s> Date: $HTTP_DATE$\r\n |
|
428 | s> Date: $HTTP_DATE$\r\n | |
427 | s> Location: http://$LOCALIP:$HGPORT/redirected?cmd=capabilities\r\n (glob) |
|
429 | s> Location: http://$LOCALIP:$HGPORT/redirected?cmd=capabilities\r\n (glob) | |
428 | s> Content-Type: text/plain\r\n |
|
430 | s> Content-Type: text/plain\r\n | |
429 | s> Content-Length: 10\r\n |
|
431 | s> Content-Length: 10\r\n | |
430 | s> \r\n |
|
432 | s> \r\n | |
431 | s> redirected |
|
433 | s> redirected | |
432 | s> GET /redirected?cmd=capabilities HTTP/1.1\r\n |
|
434 | s> GET /redirected?cmd=capabilities HTTP/1.1\r\n | |
433 | s> Accept-Encoding: identity\r\n |
|
435 | s> Accept-Encoding: identity\r\n | |
434 | s> accept: application/mercurial-0.1\r\n |
|
436 | s> accept: application/mercurial-0.1\r\n | |
435 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
437 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
436 | s> user-agent: Mercurial debugwireproto\r\n |
|
438 | s> user-agent: Mercurial debugwireproto\r\n | |
437 | s> \r\n |
|
439 | s> \r\n | |
438 | s> makefile('rb', None) |
|
440 | s> makefile('rb', None) | |
439 | s> HTTP/1.1 200 Script output follows\r\n |
|
441 | s> HTTP/1.1 200 Script output follows\r\n | |
440 | s> Server: testing stub value\r\n |
|
442 | s> Server: testing stub value\r\n | |
441 | s> Date: $HTTP_DATE$\r\n |
|
443 | s> Date: $HTTP_DATE$\r\n | |
442 | s> Content-Type: application/mercurial-0.1\r\n |
|
444 | s> Content-Type: application/mercurial-0.1\r\n | |
443 | s> Content-Length: 453\r\n |
|
445 | s> Content-Length: 453\r\n | |
444 | s> \r\n |
|
446 | s> \r\n | |
445 | real URL is http://$LOCALIP:$HGPORT/redirected (glob) |
|
447 | real URL is http://$LOCALIP:$HGPORT/redirected (glob) | |
446 | s> batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
448 | s> batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
447 | sending heads command |
|
449 | sending heads command | |
448 | s> GET /redirected?cmd=heads HTTP/1.1\r\n |
|
450 | s> GET /redirected?cmd=heads HTTP/1.1\r\n | |
449 | s> Accept-Encoding: identity\r\n |
|
451 | s> Accept-Encoding: identity\r\n | |
450 | s> vary: X-HgProto-1\r\n |
|
452 | s> vary: X-HgProto-1\r\n | |
451 | s> x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n |
|
453 | s> x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n | |
452 | s> accept: application/mercurial-0.1\r\n |
|
454 | s> accept: application/mercurial-0.1\r\n | |
453 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
455 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
454 | s> user-agent: Mercurial debugwireproto\r\n |
|
456 | s> user-agent: Mercurial debugwireproto\r\n | |
455 | s> \r\n |
|
457 | s> \r\n | |
456 | s> makefile('rb', None) |
|
458 | s> makefile('rb', None) | |
457 | s> HTTP/1.1 200 Script output follows\r\n |
|
459 | s> HTTP/1.1 200 Script output follows\r\n | |
458 | s> Server: testing stub value\r\n |
|
460 | s> Server: testing stub value\r\n | |
459 | s> Date: $HTTP_DATE$\r\n |
|
461 | s> Date: $HTTP_DATE$\r\n | |
460 | s> Content-Type: application/mercurial-0.1\r\n |
|
462 | s> Content-Type: application/mercurial-0.1\r\n | |
461 | s> Content-Length: 41\r\n |
|
463 | s> Content-Length: 41\r\n | |
462 | s> \r\n |
|
464 | s> \r\n | |
463 | s> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n |
|
465 | s> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n | |
464 | response: [b'\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL'] |
|
466 | response: [b'\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL'] | |
465 |
|
467 | |||
466 | $ killdaemons.py |
|
468 | $ killdaemons.py | |
467 |
|
469 | |||
468 | Now test a variation where we strip the query string from the redirect URL. |
|
470 | Now test a variation where we strip the query string from the redirect URL. | |
469 | (SCM Manager apparently did this and clients would recover from it) |
|
471 | (SCM Manager apparently did this and clients would recover from it) | |
470 |
|
472 | |||
471 | $ hg --config extensions.redirect=$TESTTMP/redirectext.py \ |
|
473 | $ hg --config extensions.redirect=$TESTTMP/redirectext.py \ | |
472 | > --config server.compressionengines=zlib \ |
|
474 | > --config server.compressionengines=zlib \ | |
473 | > --config testing.redirectqs=false \ |
|
475 | > --config testing.redirectqs=false \ | |
474 | > serve --web-conf paths.conf --pid-file hg.pid -p $HGPORT -d |
|
476 | > serve --web-conf paths.conf --pid-file hg.pid -p $HGPORT -d | |
475 | $ cat hg.pid > $DAEMON_PIDS |
|
477 | $ cat hg.pid > $DAEMON_PIDS | |
476 |
|
478 | |||
477 | $ hg --verbose debugwireproto --peer raw http://$LOCALIP:$HGPORT << EOF |
|
479 | $ hg --verbose debugwireproto --peer raw http://$LOCALIP:$HGPORT << EOF | |
478 | > httprequest GET /redirector?cmd=capabilities |
|
480 | > httprequest GET /redirector?cmd=capabilities | |
479 | > user-agent: test |
|
481 | > user-agent: test | |
480 | > EOF |
|
482 | > EOF | |
481 | using raw connection to peer |
|
483 | using raw connection to peer | |
482 | s> GET /redirector?cmd=capabilities HTTP/1.1\r\n |
|
484 | s> GET /redirector?cmd=capabilities HTTP/1.1\r\n | |
483 | s> Accept-Encoding: identity\r\n |
|
485 | s> Accept-Encoding: identity\r\n | |
484 | s> user-agent: test\r\n |
|
486 | s> user-agent: test\r\n | |
485 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
487 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
486 | s> \r\n |
|
488 | s> \r\n | |
487 | s> makefile('rb', None) |
|
489 | s> makefile('rb', None) | |
488 | s> HTTP/1.1 301 Redirect\r\n |
|
490 | s> HTTP/1.1 301 Redirect\r\n | |
489 | s> Server: testing stub value\r\n |
|
491 | s> Server: testing stub value\r\n | |
490 | s> Date: $HTTP_DATE$\r\n |
|
492 | s> Date: $HTTP_DATE$\r\n | |
491 | s> Location: http://$LOCALIP:$HGPORT/redirected\r\n (glob) |
|
493 | s> Location: http://$LOCALIP:$HGPORT/redirected\r\n (glob) | |
492 | s> Content-Type: text/plain\r\n |
|
494 | s> Content-Type: text/plain\r\n | |
493 | s> Content-Length: 10\r\n |
|
495 | s> Content-Length: 10\r\n | |
494 | s> \r\n |
|
496 | s> \r\n | |
495 | s> redirected |
|
497 | s> redirected | |
496 | s> GET /redirected HTTP/1.1\r\n |
|
498 | s> GET /redirected HTTP/1.1\r\n | |
497 | s> Accept-Encoding: identity\r\n |
|
499 | s> Accept-Encoding: identity\r\n | |
498 | s> user-agent: test\r\n |
|
500 | s> user-agent: test\r\n | |
499 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
501 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
500 | s> \r\n |
|
502 | s> \r\n | |
501 | s> makefile('rb', None) |
|
503 | s> makefile('rb', None) | |
502 | s> HTTP/1.1 200 Script output follows\r\n |
|
504 | s> HTTP/1.1 200 Script output follows\r\n | |
503 | s> Server: testing stub value\r\n |
|
505 | s> Server: testing stub value\r\n | |
504 | s> Date: $HTTP_DATE$\r\n |
|
506 | s> Date: $HTTP_DATE$\r\n | |
505 | s> ETag: W/"*"\r\n (glob) |
|
507 | s> ETag: W/"*"\r\n (glob) | |
506 | s> Content-Type: text/html; charset=ascii\r\n |
|
508 | s> Content-Type: text/html; charset=ascii\r\n | |
507 | s> Transfer-Encoding: chunked\r\n |
|
509 | s> Transfer-Encoding: chunked\r\n | |
508 | s> \r\n |
|
510 | s> \r\n | |
509 | s> 414\r\n |
|
511 | s> 414\r\n | |
510 | s> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n |
|
512 | s> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n | |
511 | s> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">\n |
|
513 | s> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">\n | |
512 | s> <head>\n |
|
514 | s> <head>\n | |
513 | s> <link rel="icon" href="/redirected/static/hgicon.png" type="image/png" />\n |
|
515 | s> <link rel="icon" href="/redirected/static/hgicon.png" type="image/png" />\n | |
514 | s> <meta name="robots" content="index, nofollow" />\n |
|
516 | s> <meta name="robots" content="index, nofollow" />\n | |
515 | s> <link rel="stylesheet" href="/redirected/static/style-paper.css" type="text/css" />\n |
|
517 | s> <link rel="stylesheet" href="/redirected/static/style-paper.css" type="text/css" />\n | |
516 | s> <script type="text/javascript" src="/redirected/static/mercurial.js"></script>\n |
|
518 | s> <script type="text/javascript" src="/redirected/static/mercurial.js"></script>\n | |
517 | s> \n |
|
519 | s> \n | |
518 | s> <title>redirected: log</title>\n |
|
520 | s> <title>redirected: log</title>\n | |
519 | s> <link rel="alternate" type="application/atom+xml"\n |
|
521 | s> <link rel="alternate" type="application/atom+xml"\n | |
520 | s> href="/redirected/atom-log" title="Atom feed for redirected" />\n |
|
522 | s> href="/redirected/atom-log" title="Atom feed for redirected" />\n | |
521 | s> <link rel="alternate" type="application/rss+xml"\n |
|
523 | s> <link rel="alternate" type="application/rss+xml"\n | |
522 | s> href="/redirected/rss-log" title="RSS feed for redirected" />\n |
|
524 | s> href="/redirected/rss-log" title="RSS feed for redirected" />\n | |
523 | s> </head>\n |
|
525 | s> </head>\n | |
524 | s> <body>\n |
|
526 | s> <body>\n | |
525 | s> \n |
|
527 | s> \n | |
526 | s> <div class="container">\n |
|
528 | s> <div class="container">\n | |
527 | s> <div class="menu">\n |
|
529 | s> <div class="menu">\n | |
528 | s> <div class="logo">\n |
|
530 | s> <div class="logo">\n | |
529 | s> <a href="https://mercurial-scm.org/">\n |
|
531 | s> <a href="https://mercurial-scm.org/">\n | |
530 | s> <img src="/redirected/static/hglogo.png" alt="mercurial" /></a>\n |
|
532 | s> <img src="/redirected/static/hglogo.png" alt="mercurial" /></a>\n | |
531 | s> </div>\n |
|
533 | s> </div>\n | |
532 | s> <ul>\n |
|
534 | s> <ul>\n | |
533 | s> <li class="active">log</li>\n |
|
535 | s> <li class="active">log</li>\n | |
534 | s> <li><a href="/redirected/graph/tip">graph</a></li>\n |
|
536 | s> <li><a href="/redirected/graph/tip">graph</a></li>\n | |
535 | s> <li><a href="/redirected/tags">tags</a></li>\n |
|
537 | s> <li><a href="/redirected/tags">tags</a></li>\n | |
536 | s> <li><a href=" |
|
538 | s> <li><a href=" | |
537 | s> \r\n |
|
539 | s> \r\n | |
538 | s> 810\r\n |
|
540 | s> 810\r\n | |
539 | s> /redirected/bookmarks">bookmarks</a></li>\n |
|
541 | s> /redirected/bookmarks">bookmarks</a></li>\n | |
540 | s> <li><a href="/redirected/branches">branches</a></li>\n |
|
542 | s> <li><a href="/redirected/branches">branches</a></li>\n | |
541 | s> </ul>\n |
|
543 | s> </ul>\n | |
542 | s> <ul>\n |
|
544 | s> <ul>\n | |
543 | s> <li><a href="/redirected/rev/tip">changeset</a></li>\n |
|
545 | s> <li><a href="/redirected/rev/tip">changeset</a></li>\n | |
544 | s> <li><a href="/redirected/file/tip">browse</a></li>\n |
|
546 | s> <li><a href="/redirected/file/tip">browse</a></li>\n | |
545 | s> </ul>\n |
|
547 | s> </ul>\n | |
546 | s> <ul>\n |
|
548 | s> <ul>\n | |
547 | s> \n |
|
549 | s> \n | |
548 | s> </ul>\n |
|
550 | s> </ul>\n | |
549 | s> <ul>\n |
|
551 | s> <ul>\n | |
550 | s> <li><a href="/redirected/help">help</a></li>\n |
|
552 | s> <li><a href="/redirected/help">help</a></li>\n | |
551 | s> </ul>\n |
|
553 | s> </ul>\n | |
552 | s> <div class="atom-logo">\n |
|
554 | s> <div class="atom-logo">\n | |
553 | s> <a href="/redirected/atom-log" title="subscribe to atom feed">\n |
|
555 | s> <a href="/redirected/atom-log" title="subscribe to atom feed">\n | |
554 | s> <img class="atom-logo" src="/redirected/static/feed-icon-14x14.png" alt="atom feed" />\n |
|
556 | s> <img class="atom-logo" src="/redirected/static/feed-icon-14x14.png" alt="atom feed" />\n | |
555 | s> </a>\n |
|
557 | s> </a>\n | |
556 | s> </div>\n |
|
558 | s> </div>\n | |
557 | s> </div>\n |
|
559 | s> </div>\n | |
558 | s> \n |
|
560 | s> \n | |
559 | s> <div class="main">\n |
|
561 | s> <div class="main">\n | |
560 | s> <h2 class="breadcrumb"><a href="/">Mercurial</a> > <a href="/redirected">redirected</a> </h2>\n |
|
562 | s> <h2 class="breadcrumb"><a href="/">Mercurial</a> > <a href="/redirected">redirected</a> </h2>\n | |
561 | s> <h3>log</h3>\n |
|
563 | s> <h3>log</h3>\n | |
562 | s> \n |
|
564 | s> \n | |
563 | s> \n |
|
565 | s> \n | |
564 | s> <form class="search" action="/redirected/log">\n |
|
566 | s> <form class="search" action="/redirected/log">\n | |
565 | s> \n |
|
567 | s> \n | |
566 | s> <p><input name="rev" id="search1" type="text" size="30" value="" /></p>\n |
|
568 | s> <p><input name="rev" id="search1" type="text" size="30" value="" /></p>\n | |
567 | s> <div id="hint">Find changesets by keywords (author, files, the commit message), revision\n |
|
569 | s> <div id="hint">Find changesets by keywords (author, files, the commit message), revision\n | |
568 | s> number or hash, or <a href="/redirected/help/revsets">revset expression</a>.</div>\n |
|
570 | s> number or hash, or <a href="/redirected/help/revsets">revset expression</a>.</div>\n | |
569 | s> </form>\n |
|
571 | s> </form>\n | |
570 | s> \n |
|
572 | s> \n | |
571 | s> <div class="navigate">\n |
|
573 | s> <div class="navigate">\n | |
572 | s> <a href="/redirected/shortlog/tip?revcount=30">less</a>\n |
|
574 | s> <a href="/redirected/shortlog/tip?revcount=30">less</a>\n | |
573 | s> <a href="/redirected/shortlog/tip?revcount=120">more</a>\n |
|
575 | s> <a href="/redirected/shortlog/tip?revcount=120">more</a>\n | |
574 | s> | rev 0: <a href="/redirected/shortlog/96ee1d7354c4">(0)</a> <a href="/redirected/shortlog/tip">tip</a> \n |
|
576 | s> | rev 0: <a href="/redirected/shortlog/96ee1d7354c4">(0)</a> <a href="/redirected/shortlog/tip">tip</a> \n | |
575 | s> </div>\n |
|
577 | s> </div>\n | |
576 | s> \n |
|
578 | s> \n | |
577 | s> <table class="bigtable">\n |
|
579 | s> <table class="bigtable">\n | |
578 | s> <thead>\n |
|
580 | s> <thead>\n | |
579 | s> <tr>\n |
|
581 | s> <tr>\n | |
580 | s> <th class="age">age</th>\n |
|
582 | s> <th class="age">age</th>\n | |
581 | s> <th class="author">author</th>\n |
|
583 | s> <th class="author">author</th>\n | |
582 | s> <th class="description">description</th>\n |
|
584 | s> <th class="description">description</th>\n | |
583 | s> </tr>\n |
|
585 | s> </tr>\n | |
584 | s> </thead>\n |
|
586 | s> </thead>\n | |
585 | s> <tbody class="stripes2">\n |
|
587 | s> <tbody class="stripes2">\n | |
586 | s> <tr>\n |
|
588 | s> <tr>\n | |
587 | s> <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>\n |
|
589 | s> <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>\n | |
588 | s> <td class="author">test</td>\n |
|
590 | s> <td class="author">test</td>\n | |
589 | s> <td class="description">\n |
|
591 | s> <td class="description">\n | |
590 | s> <a href="/redirected/rev/96ee1d7354c4">initial</a>\n |
|
592 | s> <a href="/redirected/rev/96ee1d7354c4">initial</a>\n | |
591 | s> <span class="phase">draft</span> <span class="branchhead">default</span> <span class="tag">tip</span> \n |
|
593 | s> <span class="phase">draft</span> <span class="branchhead">default</span> <span class="tag">tip</span> \n | |
592 | s> </td>\n |
|
594 | s> </td>\n | |
593 | s> </tr>\n |
|
595 | s> </tr>\n | |
594 | s> \n |
|
596 | s> \n | |
595 | s> </tbody>\n |
|
597 | s> </tbody>\n | |
596 | s> </table>\n |
|
598 | s> </table>\n | |
597 | s> \n |
|
599 | s> \n | |
598 | s> <div class="navigate">\n |
|
600 | s> <div class="navigate">\n | |
599 | s> <a href="/redirected/shortlog/tip?revcount=30">less</a>\n |
|
601 | s> <a href="/redirected/shortlog/tip?revcount=30">less</a>\n | |
600 | s> <a href="/redirected/shortlog/tip?revcount=120">more</a>\n |
|
602 | s> <a href="/redirected/shortlog/tip?revcount=120">more</a>\n | |
601 | s> | rev 0: <a href="/redirected/shortlog/96ee1d7354c4">(0)</a> <a href="/redirected/shortlog/tip">tip</a> \n |
|
603 | s> | rev 0: <a href="/redirected/shortlog/96ee1d7354c4">(0)</a> <a href="/redirected/shortlog/tip">tip</a> \n | |
602 | s> </div>\n |
|
604 | s> </div>\n | |
603 | s> \n |
|
605 | s> \n | |
604 | s> <script type="text/javascript">\n |
|
606 | s> <script type="text/javascript">\n | |
605 | s> ajaxScrollInit(\n |
|
607 | s> ajaxScrollInit(\n | |
606 | s> \'/redirected/shortlog/%next%\',\n |
|
608 | s> \'/redirected/shortlog/%next%\',\n | |
607 | s> \'\', <!-- NEXTHASH\n |
|
609 | s> \'\', <!-- NEXTHASH\n | |
608 | s> function (htmlText) { |
|
610 | s> function (htmlText) { | |
609 | s> \r\n |
|
611 | s> \r\n | |
610 | s> 14a\r\n |
|
612 | s> 14a\r\n | |
611 | s> \n |
|
613 | s> \n | |
612 | s> var m = htmlText.match(/\'(\\w+)\', <!-- NEXTHASH/);\n |
|
614 | s> var m = htmlText.match(/\'(\\w+)\', <!-- NEXTHASH/);\n | |
613 | s> return m ? m[1] : null;\n |
|
615 | s> return m ? m[1] : null;\n | |
614 | s> },\n |
|
616 | s> },\n | |
615 | s> \'.bigtable > tbody\',\n |
|
617 | s> \'.bigtable > tbody\',\n | |
616 | s> \'<tr class="%class%">\\\n |
|
618 | s> \'<tr class="%class%">\\\n | |
617 | s> <td colspan="3" style="text-align: center;">%text%</td>\\\n |
|
619 | s> <td colspan="3" style="text-align: center;">%text%</td>\\\n | |
618 | s> </tr>\'\n |
|
620 | s> </tr>\'\n | |
619 | s> );\n |
|
621 | s> );\n | |
620 | s> </script>\n |
|
622 | s> </script>\n | |
621 | s> \n |
|
623 | s> \n | |
622 | s> </div>\n |
|
624 | s> </div>\n | |
623 | s> </div>\n |
|
625 | s> </div>\n | |
624 | s> \n |
|
626 | s> \n | |
625 | s> \n |
|
627 | s> \n | |
626 | s> \n |
|
628 | s> \n | |
627 | s> </body>\n |
|
629 | s> </body>\n | |
628 | s> </html>\n |
|
630 | s> </html>\n | |
629 | s> \n |
|
631 | s> \n | |
630 | s> \r\n |
|
632 | s> \r\n | |
631 | s> 0\r\n |
|
633 | s> 0\r\n | |
632 | s> \r\n |
|
634 | s> \r\n | |
633 |
|
635 | |||
634 | $ hg --verbose debugwireproto http://$LOCALIP:$HGPORT/redirector << EOF |
|
636 | $ hg --verbose debugwireproto http://$LOCALIP:$HGPORT/redirector << EOF | |
635 | > command heads |
|
637 | > command heads | |
636 | > EOF |
|
638 | > EOF | |
637 | s> GET /redirector?cmd=capabilities HTTP/1.1\r\n |
|
639 | s> GET /redirector?cmd=capabilities HTTP/1.1\r\n | |
638 | s> Accept-Encoding: identity\r\n |
|
640 | s> Accept-Encoding: identity\r\n | |
639 | s> accept: application/mercurial-0.1\r\n |
|
641 | s> accept: application/mercurial-0.1\r\n | |
640 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
642 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
641 | s> user-agent: Mercurial debugwireproto\r\n |
|
643 | s> user-agent: Mercurial debugwireproto\r\n | |
642 | s> \r\n |
|
644 | s> \r\n | |
643 | s> makefile('rb', None) |
|
645 | s> makefile('rb', None) | |
644 | s> HTTP/1.1 301 Redirect\r\n |
|
646 | s> HTTP/1.1 301 Redirect\r\n | |
645 | s> Server: testing stub value\r\n |
|
647 | s> Server: testing stub value\r\n | |
646 | s> Date: $HTTP_DATE$\r\n |
|
648 | s> Date: $HTTP_DATE$\r\n | |
647 | s> Location: http://$LOCALIP:$HGPORT/redirected\r\n (glob) |
|
649 | s> Location: http://$LOCALIP:$HGPORT/redirected\r\n (glob) | |
648 | s> Content-Type: text/plain\r\n |
|
650 | s> Content-Type: text/plain\r\n | |
649 | s> Content-Length: 10\r\n |
|
651 | s> Content-Length: 10\r\n | |
650 | s> \r\n |
|
652 | s> \r\n | |
651 | s> redirected |
|
653 | s> redirected | |
652 | s> GET /redirected HTTP/1.1\r\n |
|
654 | s> GET /redirected HTTP/1.1\r\n | |
653 | s> Accept-Encoding: identity\r\n |
|
655 | s> Accept-Encoding: identity\r\n | |
654 | s> accept: application/mercurial-0.1\r\n |
|
656 | s> accept: application/mercurial-0.1\r\n | |
655 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
657 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
656 | s> user-agent: Mercurial debugwireproto\r\n |
|
658 | s> user-agent: Mercurial debugwireproto\r\n | |
657 | s> \r\n |
|
659 | s> \r\n | |
658 | s> makefile('rb', None) |
|
660 | s> makefile('rb', None) | |
659 | s> HTTP/1.1 200 Script output follows\r\n |
|
661 | s> HTTP/1.1 200 Script output follows\r\n | |
660 | s> Server: testing stub value\r\n |
|
662 | s> Server: testing stub value\r\n | |
661 | s> Date: $HTTP_DATE$\r\n |
|
663 | s> Date: $HTTP_DATE$\r\n | |
662 | s> ETag: W/"*"\r\n (glob) |
|
664 | s> ETag: W/"*"\r\n (glob) | |
663 | s> Content-Type: text/html; charset=ascii\r\n |
|
665 | s> Content-Type: text/html; charset=ascii\r\n | |
664 | s> Transfer-Encoding: chunked\r\n |
|
666 | s> Transfer-Encoding: chunked\r\n | |
665 | s> \r\n |
|
667 | s> \r\n | |
666 | real URL is http://$LOCALIP:$HGPORT/redirected (glob) |
|
668 | real URL is http://$LOCALIP:$HGPORT/redirected (glob) | |
667 | s> 414\r\n |
|
669 | s> 414\r\n | |
668 | s> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n |
|
670 | s> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n | |
669 | s> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">\n |
|
671 | s> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">\n | |
670 | s> <head>\n |
|
672 | s> <head>\n | |
671 | s> <link rel="icon" href="/redirected/static/hgicon.png" type="image/png" />\n |
|
673 | s> <link rel="icon" href="/redirected/static/hgicon.png" type="image/png" />\n | |
672 | s> <meta name="robots" content="index, nofollow" />\n |
|
674 | s> <meta name="robots" content="index, nofollow" />\n | |
673 | s> <link rel="stylesheet" href="/redirected/static/style-paper.css" type="text/css" />\n |
|
675 | s> <link rel="stylesheet" href="/redirected/static/style-paper.css" type="text/css" />\n | |
674 | s> <script type="text/javascript" src="/redirected/static/mercurial.js"></script>\n |
|
676 | s> <script type="text/javascript" src="/redirected/static/mercurial.js"></script>\n | |
675 | s> \n |
|
677 | s> \n | |
676 | s> <title>redirected: log</title>\n |
|
678 | s> <title>redirected: log</title>\n | |
677 | s> <link rel="alternate" type="application/atom+xml"\n |
|
679 | s> <link rel="alternate" type="application/atom+xml"\n | |
678 | s> href="/redirected/atom-log" title="Atom feed for redirected" />\n |
|
680 | s> href="/redirected/atom-log" title="Atom feed for redirected" />\n | |
679 | s> <link rel="alternate" type="application/rss+xml"\n |
|
681 | s> <link rel="alternate" type="application/rss+xml"\n | |
680 | s> href="/redirected/rss-log" title="RSS feed for redirected" />\n |
|
682 | s> href="/redirected/rss-log" title="RSS feed for redirected" />\n | |
681 | s> </head>\n |
|
683 | s> </head>\n | |
682 | s> <body>\n |
|
684 | s> <body>\n | |
683 | s> \n |
|
685 | s> \n | |
684 | s> <div class="container">\n |
|
686 | s> <div class="container">\n | |
685 | s> <div class="menu">\n |
|
687 | s> <div class="menu">\n | |
686 | s> <div class="logo">\n |
|
688 | s> <div class="logo">\n | |
687 | s> <a href="https://mercurial-scm.org/">\n |
|
689 | s> <a href="https://mercurial-scm.org/">\n | |
688 | s> <img src="/redirected/static/hglogo.png" alt="mercurial" /></a>\n |
|
690 | s> <img src="/redirected/static/hglogo.png" alt="mercurial" /></a>\n | |
689 | s> </div>\n |
|
691 | s> </div>\n | |
690 | s> <ul>\n |
|
692 | s> <ul>\n | |
691 | s> <li class="active">log</li>\n |
|
693 | s> <li class="active">log</li>\n | |
692 | s> <li><a href="/redirected/graph/tip">graph</a></li>\n |
|
694 | s> <li><a href="/redirected/graph/tip">graph</a></li>\n | |
693 | s> <li><a href="/redirected/tags">tags</a |
|
695 | s> <li><a href="/redirected/tags">tags</a | |
694 | s> GET /redirected?cmd=capabilities HTTP/1.1\r\n |
|
696 | s> GET /redirected?cmd=capabilities HTTP/1.1\r\n | |
695 | s> Accept-Encoding: identity\r\n |
|
697 | s> Accept-Encoding: identity\r\n | |
696 | s> accept: application/mercurial-0.1\r\n |
|
698 | s> accept: application/mercurial-0.1\r\n | |
697 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
699 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
698 | s> user-agent: Mercurial debugwireproto\r\n |
|
700 | s> user-agent: Mercurial debugwireproto\r\n | |
699 | s> \r\n |
|
701 | s> \r\n | |
700 | s> makefile('rb', None) |
|
702 | s> makefile('rb', None) | |
701 | s> HTTP/1.1 200 Script output follows\r\n |
|
703 | s> HTTP/1.1 200 Script output follows\r\n | |
702 | s> Server: testing stub value\r\n |
|
704 | s> Server: testing stub value\r\n | |
703 | s> Date: $HTTP_DATE$\r\n |
|
705 | s> Date: $HTTP_DATE$\r\n | |
704 | s> Content-Type: application/mercurial-0.1\r\n |
|
706 | s> Content-Type: application/mercurial-0.1\r\n | |
705 | s> Content-Length: 453\r\n |
|
707 | s> Content-Length: 453\r\n | |
706 | s> \r\n |
|
708 | s> \r\n | |
707 | real URL is http://$LOCALIP:$HGPORT/redirected (glob) |
|
709 | real URL is http://$LOCALIP:$HGPORT/redirected (glob) | |
708 | s> batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
710 | s> batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
709 | sending heads command |
|
711 | sending heads command | |
710 | s> GET /redirected?cmd=heads HTTP/1.1\r\n |
|
712 | s> GET /redirected?cmd=heads HTTP/1.1\r\n | |
711 | s> Accept-Encoding: identity\r\n |
|
713 | s> Accept-Encoding: identity\r\n | |
712 | s> vary: X-HgProto-1\r\n |
|
714 | s> vary: X-HgProto-1\r\n | |
713 | s> x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n |
|
715 | s> x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n | |
714 | s> accept: application/mercurial-0.1\r\n |
|
716 | s> accept: application/mercurial-0.1\r\n | |
715 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
717 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
716 | s> user-agent: Mercurial debugwireproto\r\n |
|
718 | s> user-agent: Mercurial debugwireproto\r\n | |
717 | s> \r\n |
|
719 | s> \r\n | |
718 | s> makefile('rb', None) |
|
720 | s> makefile('rb', None) | |
719 | s> HTTP/1.1 200 Script output follows\r\n |
|
721 | s> HTTP/1.1 200 Script output follows\r\n | |
720 | s> Server: testing stub value\r\n |
|
722 | s> Server: testing stub value\r\n | |
721 | s> Date: $HTTP_DATE$\r\n |
|
723 | s> Date: $HTTP_DATE$\r\n | |
722 | s> Content-Type: application/mercurial-0.1\r\n |
|
724 | s> Content-Type: application/mercurial-0.1\r\n | |
723 | s> Content-Length: 41\r\n |
|
725 | s> Content-Length: 41\r\n | |
724 | s> \r\n |
|
726 | s> \r\n | |
725 | s> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n |
|
727 | s> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n | |
726 | response: [b'\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL'] |
|
728 | response: [b'\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL'] |
@@ -1,359 +1,359 b'' | |||||
1 | #require no-reposimplestore |
|
1 | #require no-reposimplestore no-chg | |
2 |
|
2 | |||
3 | This tests the interaction between the largefiles and lfs extensions, and |
|
3 | This tests the interaction between the largefiles and lfs extensions, and | |
4 | conversion from largefiles -> lfs. |
|
4 | conversion from largefiles -> lfs. | |
5 |
|
5 | |||
6 | $ cat >> $HGRCPATH << EOF |
|
6 | $ cat >> $HGRCPATH << EOF | |
7 | > [extensions] |
|
7 | > [extensions] | |
8 | > largefiles = |
|
8 | > largefiles = | |
9 | > |
|
9 | > | |
10 | > [lfs] |
|
10 | > [lfs] | |
11 | > # standin files are 41 bytes. Stay bigger for clarity. |
|
11 | > # standin files are 41 bytes. Stay bigger for clarity. | |
12 | > threshold = 42 |
|
12 | > threshold = 42 | |
13 | > EOF |
|
13 | > EOF | |
14 |
|
14 | |||
15 | Setup a repo with a normal file and a largefile, above and below the lfs |
|
15 | Setup a repo with a normal file and a largefile, above and below the lfs | |
16 | threshold to test lfconvert. *.txt start life as a normal file; *.bin start as |
|
16 | threshold to test lfconvert. *.txt start life as a normal file; *.bin start as | |
17 | an lfs/largefile. |
|
17 | an lfs/largefile. | |
18 |
|
18 | |||
19 | $ hg init largefiles |
|
19 | $ hg init largefiles | |
20 | $ cd largefiles |
|
20 | $ cd largefiles | |
21 | $ echo 'normal' > normal.txt |
|
21 | $ echo 'normal' > normal.txt | |
22 | $ echo 'normal above lfs threshold 0000000000000000000000000' > lfs.txt |
|
22 | $ echo 'normal above lfs threshold 0000000000000000000000000' > lfs.txt | |
23 | $ hg ci -Am 'normal.txt' |
|
23 | $ hg ci -Am 'normal.txt' | |
24 | adding lfs.txt |
|
24 | adding lfs.txt | |
25 | adding normal.txt |
|
25 | adding normal.txt | |
26 | $ echo 'largefile' > large.bin |
|
26 | $ echo 'largefile' > large.bin | |
27 | $ echo 'largefile above lfs threshold 0000000000000000000000' > lfs.bin |
|
27 | $ echo 'largefile above lfs threshold 0000000000000000000000' > lfs.bin | |
28 | $ hg add --large large.bin lfs.bin |
|
28 | $ hg add --large large.bin lfs.bin | |
29 | $ hg ci -m 'add largefiles' |
|
29 | $ hg ci -m 'add largefiles' | |
30 |
|
30 | |||
31 | $ cat >> $HGRCPATH << EOF |
|
31 | $ cat >> $HGRCPATH << EOF | |
32 | > [extensions] |
|
32 | > [extensions] | |
33 | > lfs = |
|
33 | > lfs = | |
34 | > EOF |
|
34 | > EOF | |
35 |
|
35 | |||
36 | Add an lfs file and normal file that collide with files on the other branch. |
|
36 | Add an lfs file and normal file that collide with files on the other branch. | |
37 | large.bin is added as a normal file, and is named as such only to clash with the |
|
37 | large.bin is added as a normal file, and is named as such only to clash with the | |
38 | largefile on the other branch. |
|
38 | largefile on the other branch. | |
39 |
|
39 | |||
40 | $ hg up -q '.^' |
|
40 | $ hg up -q '.^' | |
41 | $ echo 'below lfs threshold' > large.bin |
|
41 | $ echo 'below lfs threshold' > large.bin | |
42 | $ echo 'lfs above the lfs threshold for length 0000000000000' > lfs.bin |
|
42 | $ echo 'lfs above the lfs threshold for length 0000000000000' > lfs.bin | |
43 | $ hg ci -Am 'add with lfs extension' |
|
43 | $ hg ci -Am 'add with lfs extension' | |
44 | adding large.bin |
|
44 | adding large.bin | |
45 | adding lfs.bin |
|
45 | adding lfs.bin | |
46 | created new head |
|
46 | created new head | |
47 |
|
47 | |||
48 | $ hg log -G |
|
48 | $ hg log -G | |
49 | @ changeset: 2:e989d0fa3764 |
|
49 | @ changeset: 2:e989d0fa3764 | |
50 | | tag: tip |
|
50 | | tag: tip | |
51 | | parent: 0:29361292f54d |
|
51 | | parent: 0:29361292f54d | |
52 | | user: test |
|
52 | | user: test | |
53 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
53 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
54 | | summary: add with lfs extension |
|
54 | | summary: add with lfs extension | |
55 | | |
|
55 | | | |
56 | | o changeset: 1:6513aaab9ca0 |
|
56 | | o changeset: 1:6513aaab9ca0 | |
57 | |/ user: test |
|
57 | |/ user: test | |
58 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
58 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
59 | | summary: add largefiles |
|
59 | | summary: add largefiles | |
60 | | |
|
60 | | | |
61 | o changeset: 0:29361292f54d |
|
61 | o changeset: 0:29361292f54d | |
62 | user: test |
|
62 | user: test | |
63 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
63 | date: Thu Jan 01 00:00:00 1970 +0000 | |
64 | summary: normal.txt |
|
64 | summary: normal.txt | |
65 |
|
65 | |||
66 | -------------------------------------------------------------------------------- |
|
66 | -------------------------------------------------------------------------------- | |
67 | Merge largefiles into lfs branch |
|
67 | Merge largefiles into lfs branch | |
68 |
|
68 | |||
69 | The largefiles extension will prompt to use the normal or largefile when merged |
|
69 | The largefiles extension will prompt to use the normal or largefile when merged | |
70 | into the lfs files. `hg manifest` will show standins if present. They aren't, |
|
70 | into the lfs files. `hg manifest` will show standins if present. They aren't, | |
71 | because largefiles merge doesn't merge content. If it did, selecting (n)ormal |
|
71 | because largefiles merge doesn't merge content. If it did, selecting (n)ormal | |
72 | would convert to lfs on commit, if appropriate. |
|
72 | would convert to lfs on commit, if appropriate. | |
73 |
|
73 | |||
74 | BUG: Largefiles isn't running the merge tool, like when two lfs files are |
|
74 | BUG: Largefiles isn't running the merge tool, like when two lfs files are | |
75 | merged. This is probably by design, but it should probably at least prompt if |
|
75 | merged. This is probably by design, but it should probably at least prompt if | |
76 | content should be taken from (l)ocal or (o)ther as well. |
|
76 | content should be taken from (l)ocal or (o)ther as well. | |
77 |
|
77 | |||
78 | $ hg --config ui.interactive=True merge 6513aaab9ca0 <<EOF |
|
78 | $ hg --config ui.interactive=True merge 6513aaab9ca0 <<EOF | |
79 | > n |
|
79 | > n | |
80 | > n |
|
80 | > n | |
81 | > EOF |
|
81 | > EOF | |
82 | remote turned local normal file large.bin into a largefile |
|
82 | remote turned local normal file large.bin into a largefile | |
83 | use (l)argefile or keep (n)ormal file? n |
|
83 | use (l)argefile or keep (n)ormal file? n | |
84 | remote turned local normal file lfs.bin into a largefile |
|
84 | remote turned local normal file lfs.bin into a largefile | |
85 | use (l)argefile or keep (n)ormal file? n |
|
85 | use (l)argefile or keep (n)ormal file? n | |
86 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
86 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
87 | (branch merge, don't forget to commit) |
|
87 | (branch merge, don't forget to commit) | |
88 | $ hg ci -m 'merge lfs with largefiles -> normal' |
|
88 | $ hg ci -m 'merge lfs with largefiles -> normal' | |
89 | $ hg manifest |
|
89 | $ hg manifest | |
90 | large.bin |
|
90 | large.bin | |
91 | lfs.bin |
|
91 | lfs.bin | |
92 | lfs.txt |
|
92 | lfs.txt | |
93 | normal.txt |
|
93 | normal.txt | |
94 |
|
94 | |||
95 | The merged lfs.bin resolved to lfs because the (n)ormal option was picked. The |
|
95 | The merged lfs.bin resolved to lfs because the (n)ormal option was picked. The | |
96 | lfs.txt file is unchanged by the merge, because it was added before lfs was |
|
96 | lfs.txt file is unchanged by the merge, because it was added before lfs was | |
97 | enabled, and the content didn't change. |
|
97 | enabled, and the content didn't change. | |
98 | $ hg debugdata lfs.bin 0 |
|
98 | $ hg debugdata lfs.bin 0 | |
99 | version https://git-lfs.github.com/spec/v1 |
|
99 | version https://git-lfs.github.com/spec/v1 | |
100 | oid sha256:81c7492b2c05e130431f65a87651b54a30c5da72c99ce35a1e9b9872a807312b |
|
100 | oid sha256:81c7492b2c05e130431f65a87651b54a30c5da72c99ce35a1e9b9872a807312b | |
101 | size 53 |
|
101 | size 53 | |
102 | x-is-binary 0 |
|
102 | x-is-binary 0 | |
103 | $ hg debugdata lfs.txt 0 |
|
103 | $ hg debugdata lfs.txt 0 | |
104 | normal above lfs threshold 0000000000000000000000000 |
|
104 | normal above lfs threshold 0000000000000000000000000 | |
105 |
|
105 | |||
106 | Another filelog entry is NOT made by the merge, so nothing is committed as lfs. |
|
106 | Another filelog entry is NOT made by the merge, so nothing is committed as lfs. | |
107 | $ hg log -r . -T '{join(lfs_files, ", ")}\n' |
|
107 | $ hg log -r . -T '{join(lfs_files, ", ")}\n' | |
108 |
|
108 | |||
109 |
|
109 | |||
110 | Replay the last merge, but pick (l)arge this time. The manifest will show any |
|
110 | Replay the last merge, but pick (l)arge this time. The manifest will show any | |
111 | standins. |
|
111 | standins. | |
112 |
|
112 | |||
113 | $ hg up -Cq e989d0fa3764 |
|
113 | $ hg up -Cq e989d0fa3764 | |
114 |
|
114 | |||
115 | $ hg --config ui.interactive=True merge 6513aaab9ca0 <<EOF |
|
115 | $ hg --config ui.interactive=True merge 6513aaab9ca0 <<EOF | |
116 | > l |
|
116 | > l | |
117 | > l |
|
117 | > l | |
118 | > EOF |
|
118 | > EOF | |
119 | remote turned local normal file large.bin into a largefile |
|
119 | remote turned local normal file large.bin into a largefile | |
120 | use (l)argefile or keep (n)ormal file? l |
|
120 | use (l)argefile or keep (n)ormal file? l | |
121 | remote turned local normal file lfs.bin into a largefile |
|
121 | remote turned local normal file lfs.bin into a largefile | |
122 | use (l)argefile or keep (n)ormal file? l |
|
122 | use (l)argefile or keep (n)ormal file? l | |
123 | getting changed largefiles |
|
123 | getting changed largefiles | |
124 | 2 largefiles updated, 0 removed |
|
124 | 2 largefiles updated, 0 removed | |
125 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
125 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
126 | (branch merge, don't forget to commit) |
|
126 | (branch merge, don't forget to commit) | |
127 | $ hg ci -m 'merge lfs with largefiles -> large' |
|
127 | $ hg ci -m 'merge lfs with largefiles -> large' | |
128 | created new head |
|
128 | created new head | |
129 | $ hg manifest |
|
129 | $ hg manifest | |
130 | .hglf/large.bin |
|
130 | .hglf/large.bin | |
131 | .hglf/lfs.bin |
|
131 | .hglf/lfs.bin | |
132 | lfs.txt |
|
132 | lfs.txt | |
133 | normal.txt |
|
133 | normal.txt | |
134 |
|
134 | |||
135 | -------------------------------------------------------------------------------- |
|
135 | -------------------------------------------------------------------------------- | |
136 | Merge lfs into largefiles branch |
|
136 | Merge lfs into largefiles branch | |
137 |
|
137 | |||
138 | $ hg up -Cq 6513aaab9ca0 |
|
138 | $ hg up -Cq 6513aaab9ca0 | |
139 | $ hg --config ui.interactive=True merge e989d0fa3764 <<EOF |
|
139 | $ hg --config ui.interactive=True merge e989d0fa3764 <<EOF | |
140 | > n |
|
140 | > n | |
141 | > n |
|
141 | > n | |
142 | > EOF |
|
142 | > EOF | |
143 | remote turned local largefile large.bin into a normal file |
|
143 | remote turned local largefile large.bin into a normal file | |
144 | keep (l)argefile or use (n)ormal file? n |
|
144 | keep (l)argefile or use (n)ormal file? n | |
145 | remote turned local largefile lfs.bin into a normal file |
|
145 | remote turned local largefile lfs.bin into a normal file | |
146 | keep (l)argefile or use (n)ormal file? n |
|
146 | keep (l)argefile or use (n)ormal file? n | |
147 | getting changed largefiles |
|
147 | getting changed largefiles | |
148 | 0 largefiles updated, 0 removed |
|
148 | 0 largefiles updated, 0 removed | |
149 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
149 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
150 | (branch merge, don't forget to commit) |
|
150 | (branch merge, don't forget to commit) | |
151 | $ hg ci -m 'merge largefiles with lfs -> normal' |
|
151 | $ hg ci -m 'merge largefiles with lfs -> normal' | |
152 | created new head |
|
152 | created new head | |
153 | $ hg manifest |
|
153 | $ hg manifest | |
154 | large.bin |
|
154 | large.bin | |
155 | lfs.bin |
|
155 | lfs.bin | |
156 | lfs.txt |
|
156 | lfs.txt | |
157 | normal.txt |
|
157 | normal.txt | |
158 |
|
158 | |||
159 | The merged lfs.bin got converted to lfs because the (n)ormal option was picked. |
|
159 | The merged lfs.bin got converted to lfs because the (n)ormal option was picked. | |
160 | The lfs.txt file is unchanged by the merge, because it was added before lfs was |
|
160 | The lfs.txt file is unchanged by the merge, because it was added before lfs was | |
161 | enabled. |
|
161 | enabled. | |
162 | $ hg debugdata lfs.bin 0 |
|
162 | $ hg debugdata lfs.bin 0 | |
163 | version https://git-lfs.github.com/spec/v1 |
|
163 | version https://git-lfs.github.com/spec/v1 | |
164 | oid sha256:81c7492b2c05e130431f65a87651b54a30c5da72c99ce35a1e9b9872a807312b |
|
164 | oid sha256:81c7492b2c05e130431f65a87651b54a30c5da72c99ce35a1e9b9872a807312b | |
165 | size 53 |
|
165 | size 53 | |
166 | x-is-binary 0 |
|
166 | x-is-binary 0 | |
167 | $ hg debugdata lfs.txt 0 |
|
167 | $ hg debugdata lfs.txt 0 | |
168 | normal above lfs threshold 0000000000000000000000000 |
|
168 | normal above lfs threshold 0000000000000000000000000 | |
169 |
|
169 | |||
170 | Another filelog entry is NOT made by the merge, so nothing is committed as lfs. |
|
170 | Another filelog entry is NOT made by the merge, so nothing is committed as lfs. | |
171 | $ hg log -r . -T '{join(lfs_files, ", ")}\n' |
|
171 | $ hg log -r . -T '{join(lfs_files, ", ")}\n' | |
172 |
|
172 | |||
173 |
|
173 | |||
174 | Replay the last merge, but pick (l)arge this time. The manifest will show the |
|
174 | Replay the last merge, but pick (l)arge this time. The manifest will show the | |
175 | standins. |
|
175 | standins. | |
176 |
|
176 | |||
177 | $ hg up -Cq 6513aaab9ca0 |
|
177 | $ hg up -Cq 6513aaab9ca0 | |
178 |
|
178 | |||
179 | $ hg --config ui.interactive=True merge e989d0fa3764 <<EOF |
|
179 | $ hg --config ui.interactive=True merge e989d0fa3764 <<EOF | |
180 | > l |
|
180 | > l | |
181 | > l |
|
181 | > l | |
182 | > EOF |
|
182 | > EOF | |
183 | remote turned local largefile large.bin into a normal file |
|
183 | remote turned local largefile large.bin into a normal file | |
184 | keep (l)argefile or use (n)ormal file? l |
|
184 | keep (l)argefile or use (n)ormal file? l | |
185 | remote turned local largefile lfs.bin into a normal file |
|
185 | remote turned local largefile lfs.bin into a normal file | |
186 | keep (l)argefile or use (n)ormal file? l |
|
186 | keep (l)argefile or use (n)ormal file? l | |
187 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
187 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
188 | (branch merge, don't forget to commit) |
|
188 | (branch merge, don't forget to commit) | |
189 | $ hg ci -m 'merge largefiles with lfs -> large' |
|
189 | $ hg ci -m 'merge largefiles with lfs -> large' | |
190 | created new head |
|
190 | created new head | |
191 | $ hg manifest |
|
191 | $ hg manifest | |
192 | .hglf/large.bin |
|
192 | .hglf/large.bin | |
193 | .hglf/lfs.bin |
|
193 | .hglf/lfs.bin | |
194 | lfs.txt |
|
194 | lfs.txt | |
195 | normal.txt |
|
195 | normal.txt | |
196 |
|
196 | |||
197 | -------------------------------------------------------------------------------- |
|
197 | -------------------------------------------------------------------------------- | |
198 |
|
198 | |||
199 | When both largefiles and lfs are configured to add by size, the tie goes to |
|
199 | When both largefiles and lfs are configured to add by size, the tie goes to | |
200 | largefiles since it hooks cmdutil.add() and lfs hooks the filelog write in the |
|
200 | largefiles since it hooks cmdutil.add() and lfs hooks the filelog write in the | |
201 | commit. By the time the commit occurs, the tracked file is smaller than the |
|
201 | commit. By the time the commit occurs, the tracked file is smaller than the | |
202 | threshold (assuming it is > 41, so the standins don't become lfs objects). |
|
202 | threshold (assuming it is > 41, so the standins don't become lfs objects). | |
203 |
|
203 | |||
204 | $ $PYTHON -c 'import sys ; sys.stdout.write("y\n" * 1048576)' > large_by_size.bin |
|
204 | $ $PYTHON -c 'import sys ; sys.stdout.write("y\n" * 1048576)' > large_by_size.bin | |
205 | $ hg --config largefiles.minsize=1 ci -Am 'large by size' |
|
205 | $ hg --config largefiles.minsize=1 ci -Am 'large by size' | |
206 | adding large_by_size.bin as a largefile |
|
206 | adding large_by_size.bin as a largefile | |
207 | $ hg manifest |
|
207 | $ hg manifest | |
208 | .hglf/large.bin |
|
208 | .hglf/large.bin | |
209 | .hglf/large_by_size.bin |
|
209 | .hglf/large_by_size.bin | |
210 | .hglf/lfs.bin |
|
210 | .hglf/lfs.bin | |
211 | lfs.txt |
|
211 | lfs.txt | |
212 | normal.txt |
|
212 | normal.txt | |
213 |
|
213 | |||
214 | $ hg rm large_by_size.bin |
|
214 | $ hg rm large_by_size.bin | |
215 | $ hg ci -m 'remove large_by_size.bin' |
|
215 | $ hg ci -m 'remove large_by_size.bin' | |
216 |
|
216 | |||
217 | Largefiles doesn't do anything special with diff, so it falls back to diffing |
|
217 | Largefiles doesn't do anything special with diff, so it falls back to diffing | |
218 | the standins. Extdiff also is standin based comparison. Diff and extdiff both |
|
218 | the standins. Extdiff also is standin based comparison. Diff and extdiff both | |
219 | work on the original file for lfs objects. |
|
219 | work on the original file for lfs objects. | |
220 |
|
220 | |||
221 | Largefile -> lfs transition |
|
221 | Largefile -> lfs transition | |
222 | $ hg diff -r 1 -r 3 |
|
222 | $ hg diff -r 1 -r 3 | |
223 | diff -r 6513aaab9ca0 -r dcc5ce63e252 .hglf/large.bin |
|
223 | diff -r 6513aaab9ca0 -r dcc5ce63e252 .hglf/large.bin | |
224 | --- a/.hglf/large.bin Thu Jan 01 00:00:00 1970 +0000 |
|
224 | --- a/.hglf/large.bin Thu Jan 01 00:00:00 1970 +0000 | |
225 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
225 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
226 | @@ -1,1 +0,0 @@ |
|
226 | @@ -1,1 +0,0 @@ | |
227 | -cef9a458373df9b0743a0d3c14d0c66fb19b8629 |
|
227 | -cef9a458373df9b0743a0d3c14d0c66fb19b8629 | |
228 | diff -r 6513aaab9ca0 -r dcc5ce63e252 .hglf/lfs.bin |
|
228 | diff -r 6513aaab9ca0 -r dcc5ce63e252 .hglf/lfs.bin | |
229 | --- a/.hglf/lfs.bin Thu Jan 01 00:00:00 1970 +0000 |
|
229 | --- a/.hglf/lfs.bin Thu Jan 01 00:00:00 1970 +0000 | |
230 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
230 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
231 | @@ -1,1 +0,0 @@ |
|
231 | @@ -1,1 +0,0 @@ | |
232 | -557fb6309cef935e1ac2c8296508379e4b15a6e6 |
|
232 | -557fb6309cef935e1ac2c8296508379e4b15a6e6 | |
233 | diff -r 6513aaab9ca0 -r dcc5ce63e252 large.bin |
|
233 | diff -r 6513aaab9ca0 -r dcc5ce63e252 large.bin | |
234 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
234 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
235 | +++ b/large.bin Thu Jan 01 00:00:00 1970 +0000 |
|
235 | +++ b/large.bin Thu Jan 01 00:00:00 1970 +0000 | |
236 | @@ -0,0 +1,1 @@ |
|
236 | @@ -0,0 +1,1 @@ | |
237 | +below lfs threshold |
|
237 | +below lfs threshold | |
238 | diff -r 6513aaab9ca0 -r dcc5ce63e252 lfs.bin |
|
238 | diff -r 6513aaab9ca0 -r dcc5ce63e252 lfs.bin | |
239 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
239 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
240 | +++ b/lfs.bin Thu Jan 01 00:00:00 1970 +0000 |
|
240 | +++ b/lfs.bin Thu Jan 01 00:00:00 1970 +0000 | |
241 | @@ -0,0 +1,1 @@ |
|
241 | @@ -0,0 +1,1 @@ | |
242 | +lfs above the lfs threshold for length 0000000000000 |
|
242 | +lfs above the lfs threshold for length 0000000000000 | |
243 |
|
243 | |||
244 | lfs -> largefiles transition |
|
244 | lfs -> largefiles transition | |
245 | $ hg diff -r 2 -r 6 |
|
245 | $ hg diff -r 2 -r 6 | |
246 | diff -r e989d0fa3764 -r 95e1e80325c8 .hglf/large.bin |
|
246 | diff -r e989d0fa3764 -r 95e1e80325c8 .hglf/large.bin | |
247 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
247 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
248 | +++ b/.hglf/large.bin Thu Jan 01 00:00:00 1970 +0000 |
|
248 | +++ b/.hglf/large.bin Thu Jan 01 00:00:00 1970 +0000 | |
249 | @@ -0,0 +1,1 @@ |
|
249 | @@ -0,0 +1,1 @@ | |
250 | +cef9a458373df9b0743a0d3c14d0c66fb19b8629 |
|
250 | +cef9a458373df9b0743a0d3c14d0c66fb19b8629 | |
251 | diff -r e989d0fa3764 -r 95e1e80325c8 .hglf/lfs.bin |
|
251 | diff -r e989d0fa3764 -r 95e1e80325c8 .hglf/lfs.bin | |
252 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
252 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
253 | +++ b/.hglf/lfs.bin Thu Jan 01 00:00:00 1970 +0000 |
|
253 | +++ b/.hglf/lfs.bin Thu Jan 01 00:00:00 1970 +0000 | |
254 | @@ -0,0 +1,1 @@ |
|
254 | @@ -0,0 +1,1 @@ | |
255 | +557fb6309cef935e1ac2c8296508379e4b15a6e6 |
|
255 | +557fb6309cef935e1ac2c8296508379e4b15a6e6 | |
256 | diff -r e989d0fa3764 -r 95e1e80325c8 large.bin |
|
256 | diff -r e989d0fa3764 -r 95e1e80325c8 large.bin | |
257 | --- a/large.bin Thu Jan 01 00:00:00 1970 +0000 |
|
257 | --- a/large.bin Thu Jan 01 00:00:00 1970 +0000 | |
258 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
258 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
259 | @@ -1,1 +0,0 @@ |
|
259 | @@ -1,1 +0,0 @@ | |
260 | -below lfs threshold |
|
260 | -below lfs threshold | |
261 | diff -r e989d0fa3764 -r 95e1e80325c8 lfs.bin |
|
261 | diff -r e989d0fa3764 -r 95e1e80325c8 lfs.bin | |
262 | --- a/lfs.bin Thu Jan 01 00:00:00 1970 +0000 |
|
262 | --- a/lfs.bin Thu Jan 01 00:00:00 1970 +0000 | |
263 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
263 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
264 | @@ -1,1 +0,0 @@ |
|
264 | @@ -1,1 +0,0 @@ | |
265 | -lfs above the lfs threshold for length 0000000000000 |
|
265 | -lfs above the lfs threshold for length 0000000000000 | |
266 |
|
266 | |||
267 | A largefiles repo can be converted to lfs. The lfconvert command uses the |
|
267 | A largefiles repo can be converted to lfs. The lfconvert command uses the | |
268 | convert extension under the hood with --to-normal. So the --config based |
|
268 | convert extension under the hood with --to-normal. So the --config based | |
269 | parameters are available, but not --authormap, --branchmap, etc. |
|
269 | parameters are available, but not --authormap, --branchmap, etc. | |
270 |
|
270 | |||
271 | $ cd .. |
|
271 | $ cd .. | |
272 | $ hg lfconvert --to-normal largefiles nolargefiles 2>&1 |
|
272 | $ hg lfconvert --to-normal largefiles nolargefiles 2>&1 | |
273 | initializing destination nolargefiles |
|
273 | initializing destination nolargefiles | |
274 | 0 additional largefiles cached |
|
274 | 0 additional largefiles cached | |
275 | scanning source... |
|
275 | scanning source... | |
276 | sorting... |
|
276 | sorting... | |
277 | converting... |
|
277 | converting... | |
278 | 8 normal.txt |
|
278 | 8 normal.txt | |
279 | 7 add largefiles |
|
279 | 7 add largefiles | |
280 | 6 add with lfs extension |
|
280 | 6 add with lfs extension | |
281 | 5 merge lfs with largefiles -> normal |
|
281 | 5 merge lfs with largefiles -> normal | |
282 | 4 merge lfs with largefiles -> large |
|
282 | 4 merge lfs with largefiles -> large | |
283 | 3 merge largefiles with lfs -> normal |
|
283 | 3 merge largefiles with lfs -> normal | |
284 | 2 merge largefiles with lfs -> large |
|
284 | 2 merge largefiles with lfs -> large | |
285 | 1 large by size |
|
285 | 1 large by size | |
286 | 0 remove large_by_size.bin |
|
286 | 0 remove large_by_size.bin | |
287 | $ cd nolargefiles |
|
287 | $ cd nolargefiles | |
288 |
|
288 | |||
289 | The requirement is added to the destination repo, and the extension is enabled |
|
289 | The requirement is added to the destination repo, and the extension is enabled | |
290 | locally. |
|
290 | locally. | |
291 |
|
291 | |||
292 | $ cat .hg/requires |
|
292 | $ cat .hg/requires | |
293 | dotencode |
|
293 | dotencode | |
294 | fncache |
|
294 | fncache | |
295 | generaldelta |
|
295 | generaldelta | |
296 | lfs |
|
296 | lfs | |
297 | revlogv1 |
|
297 | revlogv1 | |
298 | store |
|
298 | store | |
299 | $ hg config --debug extensions | grep lfs |
|
299 | $ hg config --debug extensions | grep lfs | |
300 | $TESTTMP/nolargefiles/.hg/hgrc:*: extensions.lfs= (glob) |
|
300 | $TESTTMP/nolargefiles/.hg/hgrc:*: extensions.lfs= (glob) | |
301 |
|
301 | |||
302 | $ hg log -r 'all()' -G -T '{rev} {join(lfs_files, ", ")} ({desc})\n' |
|
302 | $ hg log -r 'all()' -G -T '{rev} {join(lfs_files, ", ")} ({desc})\n' | |
303 | o 8 large_by_size.bin (remove large_by_size.bin) |
|
303 | o 8 large_by_size.bin (remove large_by_size.bin) | |
304 | | |
|
304 | | | |
305 | o 7 large_by_size.bin (large by size) |
|
305 | o 7 large_by_size.bin (large by size) | |
306 | | |
|
306 | | | |
307 | o 6 (merge largefiles with lfs -> large) |
|
307 | o 6 (merge largefiles with lfs -> large) | |
308 | |\ |
|
308 | |\ | |
309 | +---o 5 (merge largefiles with lfs -> normal) |
|
309 | +---o 5 (merge largefiles with lfs -> normal) | |
310 | | |/ |
|
310 | | |/ | |
311 | +---o 4 lfs.bin (merge lfs with largefiles -> large) |
|
311 | +---o 4 lfs.bin (merge lfs with largefiles -> large) | |
312 | | |/ |
|
312 | | |/ | |
313 | +---o 3 (merge lfs with largefiles -> normal) |
|
313 | +---o 3 (merge lfs with largefiles -> normal) | |
314 | | |/ |
|
314 | | |/ | |
315 | | o 2 lfs.bin (add with lfs extension) |
|
315 | | o 2 lfs.bin (add with lfs extension) | |
316 | | | |
|
316 | | | | |
317 | o | 1 lfs.bin (add largefiles) |
|
317 | o | 1 lfs.bin (add largefiles) | |
318 | |/ |
|
318 | |/ | |
319 | o 0 lfs.txt (normal.txt) |
|
319 | o 0 lfs.txt (normal.txt) | |
320 |
|
320 | |||
321 | $ hg debugdata lfs.bin 0 |
|
321 | $ hg debugdata lfs.bin 0 | |
322 | version https://git-lfs.github.com/spec/v1 |
|
322 | version https://git-lfs.github.com/spec/v1 | |
323 | oid sha256:2172a5bd492dd41ec533b9bb695f7691b6351719407ac797f0ccad5348c81e62 |
|
323 | oid sha256:2172a5bd492dd41ec533b9bb695f7691b6351719407ac797f0ccad5348c81e62 | |
324 | size 53 |
|
324 | size 53 | |
325 | x-is-binary 0 |
|
325 | x-is-binary 0 | |
326 | $ hg debugdata lfs.bin 1 |
|
326 | $ hg debugdata lfs.bin 1 | |
327 | version https://git-lfs.github.com/spec/v1 |
|
327 | version https://git-lfs.github.com/spec/v1 | |
328 | oid sha256:81c7492b2c05e130431f65a87651b54a30c5da72c99ce35a1e9b9872a807312b |
|
328 | oid sha256:81c7492b2c05e130431f65a87651b54a30c5da72c99ce35a1e9b9872a807312b | |
329 | size 53 |
|
329 | size 53 | |
330 | x-is-binary 0 |
|
330 | x-is-binary 0 | |
331 | $ hg debugdata lfs.bin 2 |
|
331 | $ hg debugdata lfs.bin 2 | |
332 | version https://git-lfs.github.com/spec/v1 |
|
332 | version https://git-lfs.github.com/spec/v1 | |
333 | oid sha256:2172a5bd492dd41ec533b9bb695f7691b6351719407ac797f0ccad5348c81e62 |
|
333 | oid sha256:2172a5bd492dd41ec533b9bb695f7691b6351719407ac797f0ccad5348c81e62 | |
334 | size 53 |
|
334 | size 53 | |
335 | x-is-binary 0 |
|
335 | x-is-binary 0 | |
336 | $ hg debugdata lfs.bin 3 |
|
336 | $ hg debugdata lfs.bin 3 | |
337 | abort: invalid revision identifier 3 |
|
337 | abort: invalid revision identifier 3 | |
338 | [255] |
|
338 | [255] | |
339 |
|
339 | |||
340 | No diffs when comparing merge and p1 that kept p1's changes. Diff of lfs to |
|
340 | No diffs when comparing merge and p1 that kept p1's changes. Diff of lfs to | |
341 | largefiles no longer operates in standin files. |
|
341 | largefiles no longer operates in standin files. | |
342 |
|
342 | |||
343 | This `head -n 20` looks dumb (since we expect no output), but if something |
|
343 | This `head -n 20` looks dumb (since we expect no output), but if something | |
344 | breaks you can get 1048576 lines of +y in the output, which takes a looooooong |
|
344 | breaks you can get 1048576 lines of +y in the output, which takes a looooooong | |
345 | time to print. |
|
345 | time to print. | |
346 | $ hg diff -r 2:3 | head -n 20 |
|
346 | $ hg diff -r 2:3 | head -n 20 | |
347 | $ hg diff -r 2:6 |
|
347 | $ hg diff -r 2:6 | |
348 | diff -r e989d0fa3764 -r 752e3a0d8488 large.bin |
|
348 | diff -r e989d0fa3764 -r 752e3a0d8488 large.bin | |
349 | --- a/large.bin Thu Jan 01 00:00:00 1970 +0000 |
|
349 | --- a/large.bin Thu Jan 01 00:00:00 1970 +0000 | |
350 | +++ b/large.bin Thu Jan 01 00:00:00 1970 +0000 |
|
350 | +++ b/large.bin Thu Jan 01 00:00:00 1970 +0000 | |
351 | @@ -1,1 +1,1 @@ |
|
351 | @@ -1,1 +1,1 @@ | |
352 | -below lfs threshold |
|
352 | -below lfs threshold | |
353 | +largefile |
|
353 | +largefile | |
354 | diff -r e989d0fa3764 -r 752e3a0d8488 lfs.bin |
|
354 | diff -r e989d0fa3764 -r 752e3a0d8488 lfs.bin | |
355 | --- a/lfs.bin Thu Jan 01 00:00:00 1970 +0000 |
|
355 | --- a/lfs.bin Thu Jan 01 00:00:00 1970 +0000 | |
356 | +++ b/lfs.bin Thu Jan 01 00:00:00 1970 +0000 |
|
356 | +++ b/lfs.bin Thu Jan 01 00:00:00 1970 +0000 | |
357 | @@ -1,1 +1,1 @@ |
|
357 | @@ -1,1 +1,1 @@ | |
358 | -lfs above the lfs threshold for length 0000000000000 |
|
358 | -lfs above the lfs threshold for length 0000000000000 | |
359 | +largefile above lfs threshold 0000000000000000000000 |
|
359 | +largefile above lfs threshold 0000000000000000000000 |
@@ -1,435 +1,435 b'' | |||||
1 | #require serve no-reposimplestore |
|
1 | #require serve no-reposimplestore no-chg | |
2 |
|
2 | |||
3 | $ cat >> $HGRCPATH <<EOF |
|
3 | $ cat >> $HGRCPATH <<EOF | |
4 | > [extensions] |
|
4 | > [extensions] | |
5 | > lfs= |
|
5 | > lfs= | |
6 | > [lfs] |
|
6 | > [lfs] | |
7 | > track=all() |
|
7 | > track=all() | |
8 | > [web] |
|
8 | > [web] | |
9 | > push_ssl = False |
|
9 | > push_ssl = False | |
10 | > allow-push = * |
|
10 | > allow-push = * | |
11 | > EOF |
|
11 | > EOF | |
12 |
|
12 | |||
13 | Serving LFS files can experimentally be turned off. The long term solution is |
|
13 | Serving LFS files can experimentally be turned off. The long term solution is | |
14 | to support the 'verify' action in both client and server, so that the server can |
|
14 | to support the 'verify' action in both client and server, so that the server can | |
15 | tell the client to store files elsewhere. |
|
15 | tell the client to store files elsewhere. | |
16 |
|
16 | |||
17 | $ hg init server |
|
17 | $ hg init server | |
18 | $ hg --config "lfs.usercache=$TESTTMP/servercache" \ |
|
18 | $ hg --config "lfs.usercache=$TESTTMP/servercache" \ | |
19 | > --config experimental.lfs.serve=False -R server serve -d \ |
|
19 | > --config experimental.lfs.serve=False -R server serve -d \ | |
20 | > -p $HGPORT --pid-file=hg.pid -A $TESTTMP/access.log -E $TESTTMP/errors.log |
|
20 | > -p $HGPORT --pid-file=hg.pid -A $TESTTMP/access.log -E $TESTTMP/errors.log | |
21 | $ cat hg.pid >> $DAEMON_PIDS |
|
21 | $ cat hg.pid >> $DAEMON_PIDS | |
22 |
|
22 | |||
23 | Uploads fail... |
|
23 | Uploads fail... | |
24 |
|
24 | |||
25 | $ hg init client |
|
25 | $ hg init client | |
26 | $ echo 'this-is-an-lfs-file' > client/lfs.bin |
|
26 | $ echo 'this-is-an-lfs-file' > client/lfs.bin | |
27 | $ hg -R client ci -Am 'initial commit' |
|
27 | $ hg -R client ci -Am 'initial commit' | |
28 | adding lfs.bin |
|
28 | adding lfs.bin | |
29 | $ hg -R client push http://localhost:$HGPORT |
|
29 | $ hg -R client push http://localhost:$HGPORT | |
30 | pushing to http://localhost:$HGPORT/ |
|
30 | pushing to http://localhost:$HGPORT/ | |
31 | searching for changes |
|
31 | searching for changes | |
32 | abort: LFS HTTP error: HTTP Error 400: no such method: .git (action=upload)! |
|
32 | abort: LFS HTTP error: HTTP Error 400: no such method: .git (action=upload)! | |
33 | [255] |
|
33 | [255] | |
34 |
|
34 | |||
35 | ... so do a local push to make the data available. Remove the blob from the |
|
35 | ... so do a local push to make the data available. Remove the blob from the | |
36 | default cache, so it attempts to download. |
|
36 | default cache, so it attempts to download. | |
37 | $ hg --config "lfs.usercache=$TESTTMP/servercache" \ |
|
37 | $ hg --config "lfs.usercache=$TESTTMP/servercache" \ | |
38 | > --config "lfs.url=null://" \ |
|
38 | > --config "lfs.url=null://" \ | |
39 | > -R client push -q server |
|
39 | > -R client push -q server | |
40 | $ mv `hg config lfs.usercache` $TESTTMP/servercache |
|
40 | $ mv `hg config lfs.usercache` $TESTTMP/servercache | |
41 |
|
41 | |||
42 | Downloads fail... |
|
42 | Downloads fail... | |
43 |
|
43 | |||
44 | $ hg clone http://localhost:$HGPORT httpclone |
|
44 | $ hg clone http://localhost:$HGPORT httpclone | |
45 | requesting all changes |
|
45 | requesting all changes | |
46 | adding changesets |
|
46 | adding changesets | |
47 | adding manifests |
|
47 | adding manifests | |
48 | adding file changes |
|
48 | adding file changes | |
49 | added 1 changesets with 1 changes to 1 files |
|
49 | added 1 changesets with 1 changes to 1 files | |
50 | new changesets 525251863cad |
|
50 | new changesets 525251863cad | |
51 | updating to branch default |
|
51 | updating to branch default | |
52 | abort: LFS HTTP error: HTTP Error 400: no such method: .git (action=download)! |
|
52 | abort: LFS HTTP error: HTTP Error 400: no such method: .git (action=download)! | |
53 | [255] |
|
53 | [255] | |
54 |
|
54 | |||
55 | $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
|
55 | $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS | |
56 |
|
56 | |||
57 | $ cat $TESTTMP/access.log $TESTTMP/errors.log |
|
57 | $ cat $TESTTMP/access.log $TESTTMP/errors.log | |
58 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
58 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
59 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D525251863cad618e55d483555f3d00a2ca99597e x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
59 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D525251863cad618e55d483555f3d00a2ca99597e x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
60 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
60 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
61 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
61 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
62 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 400 - (glob) |
|
62 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 400 - (glob) | |
63 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
63 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
64 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
64 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
65 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
65 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
66 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 400 - (glob) |
|
66 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 400 - (glob) | |
67 |
|
67 | |||
68 | Blob URIs are correct when --prefix is used |
|
68 | Blob URIs are correct when --prefix is used | |
69 |
|
69 | |||
70 | $ rm -f $TESTTMP/access.log $TESTTMP/errors.log |
|
70 | $ rm -f $TESTTMP/access.log $TESTTMP/errors.log | |
71 | $ hg --config "lfs.usercache=$TESTTMP/servercache" -R server serve -d \ |
|
71 | $ hg --config "lfs.usercache=$TESTTMP/servercache" -R server serve -d \ | |
72 | > -p $HGPORT --pid-file=hg.pid --prefix=subdir/mount/point \ |
|
72 | > -p $HGPORT --pid-file=hg.pid --prefix=subdir/mount/point \ | |
73 | > -A $TESTTMP/access.log -E $TESTTMP/errors.log |
|
73 | > -A $TESTTMP/access.log -E $TESTTMP/errors.log | |
74 | $ cat hg.pid >> $DAEMON_PIDS |
|
74 | $ cat hg.pid >> $DAEMON_PIDS | |
75 |
|
75 | |||
76 | $ hg clone --debug http://localhost:$HGPORT/subdir/mount/point cloned2 |
|
76 | $ hg clone --debug http://localhost:$HGPORT/subdir/mount/point cloned2 | |
77 | using http://localhost:$HGPORT/subdir/mount/point |
|
77 | using http://localhost:$HGPORT/subdir/mount/point | |
78 | sending capabilities command |
|
78 | sending capabilities command | |
79 | query 1; heads |
|
79 | query 1; heads | |
80 | sending batch command |
|
80 | sending batch command | |
81 | requesting all changes |
|
81 | requesting all changes | |
82 | sending getbundle command |
|
82 | sending getbundle command | |
83 | bundle2-input-bundle: with-transaction |
|
83 | bundle2-input-bundle: with-transaction | |
84 | bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported |
|
84 | bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported | |
85 | adding changesets |
|
85 | adding changesets | |
86 | add changeset 525251863cad |
|
86 | add changeset 525251863cad | |
87 | adding manifests |
|
87 | adding manifests | |
88 | adding file changes |
|
88 | adding file changes | |
89 | adding lfs.bin revisions |
|
89 | adding lfs.bin revisions | |
90 | added 1 changesets with 1 changes to 1 files |
|
90 | added 1 changesets with 1 changes to 1 files | |
91 | calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs |
|
91 | calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs | |
92 | bundle2-input-part: total payload size 648 |
|
92 | bundle2-input-part: total payload size 648 | |
93 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported |
|
93 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported | |
94 | bundle2-input-part: "phase-heads" supported |
|
94 | bundle2-input-part: "phase-heads" supported | |
95 | bundle2-input-part: total payload size 24 |
|
95 | bundle2-input-part: total payload size 24 | |
96 | bundle2-input-part: "cache:rev-branch-cache" supported |
|
96 | bundle2-input-part: "cache:rev-branch-cache" supported | |
97 | bundle2-input-part: total payload size 39 |
|
97 | bundle2-input-part: total payload size 39 | |
98 | bundle2-input-bundle: 3 parts total |
|
98 | bundle2-input-bundle: 3 parts total | |
99 | checking for updated bookmarks |
|
99 | checking for updated bookmarks | |
100 | updating the branch cache |
|
100 | updating the branch cache | |
101 | new changesets 525251863cad |
|
101 | new changesets 525251863cad | |
102 | updating to branch default |
|
102 | updating to branch default | |
103 | resolving manifests |
|
103 | resolving manifests | |
104 | branchmerge: False, force: False, partial: False |
|
104 | branchmerge: False, force: False, partial: False | |
105 | ancestor: 000000000000, local: 000000000000+, remote: 525251863cad |
|
105 | ancestor: 000000000000, local: 000000000000+, remote: 525251863cad | |
106 | lfs: assuming remote store: http://localhost:$HGPORT/subdir/mount/point/.git/info/lfs |
|
106 | lfs: assuming remote store: http://localhost:$HGPORT/subdir/mount/point/.git/info/lfs | |
107 | Status: 200 |
|
107 | Status: 200 | |
108 | Content-Length: 371 |
|
108 | Content-Length: 371 | |
109 | Content-Type: application/vnd.git-lfs+json |
|
109 | Content-Type: application/vnd.git-lfs+json | |
110 | Date: $HTTP_DATE$ |
|
110 | Date: $HTTP_DATE$ | |
111 | Server: testing stub value |
|
111 | Server: testing stub value | |
112 | { |
|
112 | { | |
113 | "objects": [ |
|
113 | "objects": [ | |
114 | { |
|
114 | { | |
115 | "actions": { |
|
115 | "actions": { | |
116 | "download": { |
|
116 | "download": { | |
117 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
117 | "expires_at": "$ISO_8601_DATE_TIME$" | |
118 | "header": { |
|
118 | "header": { | |
119 | "Accept": "application/vnd.git-lfs" |
|
119 | "Accept": "application/vnd.git-lfs" | |
120 | } |
|
120 | } | |
121 | "href": "http://localhost:$HGPORT/subdir/mount/point/.hg/lfs/objects/f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e" |
|
121 | "href": "http://localhost:$HGPORT/subdir/mount/point/.hg/lfs/objects/f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e" | |
122 | } |
|
122 | } | |
123 | } |
|
123 | } | |
124 | "oid": "f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e" |
|
124 | "oid": "f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e" | |
125 | "size": 20 |
|
125 | "size": 20 | |
126 | } |
|
126 | } | |
127 | ] |
|
127 | ] | |
128 | "transfer": "basic" |
|
128 | "transfer": "basic" | |
129 | } |
|
129 | } | |
130 | lfs: downloading f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e (20 bytes) |
|
130 | lfs: downloading f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e (20 bytes) | |
131 | Status: 200 |
|
131 | Status: 200 | |
132 | Content-Length: 20 |
|
132 | Content-Length: 20 | |
133 | Content-Type: application/octet-stream |
|
133 | Content-Type: application/octet-stream | |
134 | Date: $HTTP_DATE$ |
|
134 | Date: $HTTP_DATE$ | |
135 | Server: testing stub value |
|
135 | Server: testing stub value | |
136 | lfs: adding f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e to the usercache |
|
136 | lfs: adding f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e to the usercache | |
137 | lfs: processed: f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e |
|
137 | lfs: processed: f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e | |
138 | lfs: downloaded 1 files (20 bytes) |
|
138 | lfs: downloaded 1 files (20 bytes) | |
139 | lfs.bin: remote created -> g |
|
139 | lfs.bin: remote created -> g | |
140 | getting lfs.bin |
|
140 | getting lfs.bin | |
141 | lfs: found f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e in the local lfs store |
|
141 | lfs: found f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e in the local lfs store | |
142 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
142 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
143 |
|
143 | |||
144 | $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
|
144 | $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS | |
145 |
|
145 | |||
146 | $ cat $TESTTMP/access.log $TESTTMP/errors.log |
|
146 | $ cat $TESTTMP/access.log $TESTTMP/errors.log | |
147 | $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
147 | $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point?cmd=capabilities HTTP/1.1" 200 - (glob) | |
148 | $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
148 | $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
149 | $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
149 | $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
150 | $LOCALIP - - [$LOGDATE$] "POST /subdir/mount/point/.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
150 | $LOCALIP - - [$LOGDATE$] "POST /subdir/mount/point/.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
151 | $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point/.hg/lfs/objects/f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e HTTP/1.1" 200 - (glob) |
|
151 | $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point/.hg/lfs/objects/f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e HTTP/1.1" 200 - (glob) | |
152 |
|
152 | |||
153 | $ cat >> $TESTTMP/lfsstoreerror.py <<EOF |
|
153 | $ cat >> $TESTTMP/lfsstoreerror.py <<EOF | |
154 | > import errno |
|
154 | > import errno | |
155 | > from hgext.lfs import blobstore |
|
155 | > from hgext.lfs import blobstore | |
156 | > |
|
156 | > | |
157 | > _numverifies = 0 |
|
157 | > _numverifies = 0 | |
158 | > _readerr = True |
|
158 | > _readerr = True | |
159 | > |
|
159 | > | |
160 | > def reposetup(ui, repo): |
|
160 | > def reposetup(ui, repo): | |
161 | > # Nothing to do with a remote repo |
|
161 | > # Nothing to do with a remote repo | |
162 | > if not repo.local(): |
|
162 | > if not repo.local(): | |
163 | > return |
|
163 | > return | |
164 | > |
|
164 | > | |
165 | > store = repo.svfs.lfslocalblobstore |
|
165 | > store = repo.svfs.lfslocalblobstore | |
166 | > class badstore(store.__class__): |
|
166 | > class badstore(store.__class__): | |
167 | > def download(self, oid, src): |
|
167 | > def download(self, oid, src): | |
168 | > '''Called in the server to handle reading from the client in a |
|
168 | > '''Called in the server to handle reading from the client in a | |
169 | > PUT request.''' |
|
169 | > PUT request.''' | |
170 | > origread = src.read |
|
170 | > origread = src.read | |
171 | > def _badread(nbytes): |
|
171 | > def _badread(nbytes): | |
172 | > # Simulate bad data/checksum failure from the client |
|
172 | > # Simulate bad data/checksum failure from the client | |
173 | > return b'0' * len(origread(nbytes)) |
|
173 | > return b'0' * len(origread(nbytes)) | |
174 | > src.read = _badread |
|
174 | > src.read = _badread | |
175 | > super(badstore, self).download(oid, src) |
|
175 | > super(badstore, self).download(oid, src) | |
176 | > |
|
176 | > | |
177 | > def _read(self, vfs, oid, verify): |
|
177 | > def _read(self, vfs, oid, verify): | |
178 | > '''Called in the server to read data for a GET request, and then |
|
178 | > '''Called in the server to read data for a GET request, and then | |
179 | > calls self._verify() on it before returning.''' |
|
179 | > calls self._verify() on it before returning.''' | |
180 | > global _readerr |
|
180 | > global _readerr | |
181 | > # One time simulation of a read error |
|
181 | > # One time simulation of a read error | |
182 | > if _readerr: |
|
182 | > if _readerr: | |
183 | > _readerr = False |
|
183 | > _readerr = False | |
184 | > raise IOError(errno.EIO, '%s: I/O error' % oid) |
|
184 | > raise IOError(errno.EIO, '%s: I/O error' % oid) | |
185 | > # Simulate corrupt content on client download |
|
185 | > # Simulate corrupt content on client download | |
186 | > blobstore._verify(oid, 'dummy content') |
|
186 | > blobstore._verify(oid, 'dummy content') | |
187 | > |
|
187 | > | |
188 | > def verify(self, oid): |
|
188 | > def verify(self, oid): | |
189 | > '''Called in the server to populate the Batch API response, |
|
189 | > '''Called in the server to populate the Batch API response, | |
190 | > letting the client re-upload if the file is corrupt.''' |
|
190 | > letting the client re-upload if the file is corrupt.''' | |
191 | > # Fail verify in Batch API for one clone command and one push |
|
191 | > # Fail verify in Batch API for one clone command and one push | |
192 | > # command with an IOError. Then let it through to access other |
|
192 | > # command with an IOError. Then let it through to access other | |
193 | > # functions. Checksum failure is tested elsewhere. |
|
193 | > # functions. Checksum failure is tested elsewhere. | |
194 | > global _numverifies |
|
194 | > global _numverifies | |
195 | > _numverifies += 1 |
|
195 | > _numverifies += 1 | |
196 | > if _numverifies <= 2: |
|
196 | > if _numverifies <= 2: | |
197 | > raise IOError(errno.EIO, '%s: I/O error' % oid) |
|
197 | > raise IOError(errno.EIO, '%s: I/O error' % oid) | |
198 | > return super(badstore, self).verify(oid) |
|
198 | > return super(badstore, self).verify(oid) | |
199 | > |
|
199 | > | |
200 | > store.__class__ = badstore |
|
200 | > store.__class__ = badstore | |
201 | > EOF |
|
201 | > EOF | |
202 |
|
202 | |||
203 | $ rm -rf `hg config lfs.usercache` |
|
203 | $ rm -rf `hg config lfs.usercache` | |
204 | $ rm -f $TESTTMP/access.log $TESTTMP/errors.log |
|
204 | $ rm -f $TESTTMP/access.log $TESTTMP/errors.log | |
205 | $ hg --config "lfs.usercache=$TESTTMP/servercache" \ |
|
205 | $ hg --config "lfs.usercache=$TESTTMP/servercache" \ | |
206 | > --config extensions.lfsstoreerror=$TESTTMP/lfsstoreerror.py \ |
|
206 | > --config extensions.lfsstoreerror=$TESTTMP/lfsstoreerror.py \ | |
207 | > -R server serve -d \ |
|
207 | > -R server serve -d \ | |
208 | > -p $HGPORT1 --pid-file=hg.pid -A $TESTTMP/access.log -E $TESTTMP/errors.log |
|
208 | > -p $HGPORT1 --pid-file=hg.pid -A $TESTTMP/access.log -E $TESTTMP/errors.log | |
209 | $ cat hg.pid >> $DAEMON_PIDS |
|
209 | $ cat hg.pid >> $DAEMON_PIDS | |
210 |
|
210 | |||
211 | Test an I/O error in localstore.verify() (Batch API) with GET |
|
211 | Test an I/O error in localstore.verify() (Batch API) with GET | |
212 |
|
212 | |||
213 | $ hg clone http://localhost:$HGPORT1 httpclone2 |
|
213 | $ hg clone http://localhost:$HGPORT1 httpclone2 | |
214 | requesting all changes |
|
214 | requesting all changes | |
215 | adding changesets |
|
215 | adding changesets | |
216 | adding manifests |
|
216 | adding manifests | |
217 | adding file changes |
|
217 | adding file changes | |
218 | added 1 changesets with 1 changes to 1 files |
|
218 | added 1 changesets with 1 changes to 1 files | |
219 | new changesets 525251863cad |
|
219 | new changesets 525251863cad | |
220 | updating to branch default |
|
220 | updating to branch default | |
221 | abort: LFS server error for "lfs.bin": Internal server error! |
|
221 | abort: LFS server error for "lfs.bin": Internal server error! | |
222 | [255] |
|
222 | [255] | |
223 |
|
223 | |||
224 | Test an I/O error in localstore.verify() (Batch API) with PUT |
|
224 | Test an I/O error in localstore.verify() (Batch API) with PUT | |
225 |
|
225 | |||
226 | $ echo foo > client/lfs.bin |
|
226 | $ echo foo > client/lfs.bin | |
227 | $ hg -R client ci -m 'mod lfs' |
|
227 | $ hg -R client ci -m 'mod lfs' | |
228 | $ hg -R client push http://localhost:$HGPORT1 |
|
228 | $ hg -R client push http://localhost:$HGPORT1 | |
229 | pushing to http://localhost:$HGPORT1/ |
|
229 | pushing to http://localhost:$HGPORT1/ | |
230 | searching for changes |
|
230 | searching for changes | |
231 | abort: LFS server error for "unknown": Internal server error! |
|
231 | abort: LFS server error for "unknown": Internal server error! | |
232 | [255] |
|
232 | [255] | |
233 | TODO: figure out how to associate the file name in the error above |
|
233 | TODO: figure out how to associate the file name in the error above | |
234 |
|
234 | |||
235 | Test a bad checksum sent by the client in the transfer API |
|
235 | Test a bad checksum sent by the client in the transfer API | |
236 |
|
236 | |||
237 | $ hg -R client push http://localhost:$HGPORT1 |
|
237 | $ hg -R client push http://localhost:$HGPORT1 | |
238 | pushing to http://localhost:$HGPORT1/ |
|
238 | pushing to http://localhost:$HGPORT1/ | |
239 | searching for changes |
|
239 | searching for changes | |
240 | abort: HTTP error: HTTP Error 422: corrupt blob (oid=b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c, action=upload)! |
|
240 | abort: HTTP error: HTTP Error 422: corrupt blob (oid=b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c, action=upload)! | |
241 | [255] |
|
241 | [255] | |
242 |
|
242 | |||
243 | $ echo 'test lfs file' > server/lfs3.bin |
|
243 | $ echo 'test lfs file' > server/lfs3.bin | |
244 | $ hg --config experimental.lfs.disableusercache=True \ |
|
244 | $ hg --config experimental.lfs.disableusercache=True \ | |
245 | > -R server ci -Aqm 'another lfs file' |
|
245 | > -R server ci -Aqm 'another lfs file' | |
246 | $ hg -R client pull -q http://localhost:$HGPORT1 |
|
246 | $ hg -R client pull -q http://localhost:$HGPORT1 | |
247 |
|
247 | |||
248 | Test an I/O error during the processing of the GET request |
|
248 | Test an I/O error during the processing of the GET request | |
249 |
|
249 | |||
250 | $ hg --config lfs.url=http://localhost:$HGPORT1/.git/info/lfs \ |
|
250 | $ hg --config lfs.url=http://localhost:$HGPORT1/.git/info/lfs \ | |
251 | > -R client update -r tip |
|
251 | > -R client update -r tip | |
252 | abort: HTTP error: HTTP Error 500: Internal Server Error (oid=276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d, action=download)! |
|
252 | abort: HTTP error: HTTP Error 500: Internal Server Error (oid=276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d, action=download)! | |
253 | [255] |
|
253 | [255] | |
254 |
|
254 | |||
255 | Test a checksum failure during the processing of the GET request |
|
255 | Test a checksum failure during the processing of the GET request | |
256 |
|
256 | |||
257 | $ hg --config lfs.url=http://localhost:$HGPORT1/.git/info/lfs \ |
|
257 | $ hg --config lfs.url=http://localhost:$HGPORT1/.git/info/lfs \ | |
258 | > -R client update -r tip |
|
258 | > -R client update -r tip | |
259 | abort: HTTP error: HTTP Error 422: corrupt blob (oid=276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d, action=download)! |
|
259 | abort: HTTP error: HTTP Error 422: corrupt blob (oid=276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d, action=download)! | |
260 | [255] |
|
260 | [255] | |
261 |
|
261 | |||
262 | $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
|
262 | $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS | |
263 |
|
263 | |||
264 | $ cat $TESTTMP/access.log |
|
264 | $ cat $TESTTMP/access.log | |
265 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
265 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
266 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
266 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
267 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
267 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
268 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
268 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
269 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
269 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
270 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D392c05922088bacf8e68a6939b480017afbf245d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
270 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D392c05922088bacf8e68a6939b480017afbf245d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
271 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
271 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
272 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
272 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
273 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
273 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
274 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
274 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
275 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
275 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
276 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
276 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
277 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D392c05922088bacf8e68a6939b480017afbf245d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
277 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D392c05922088bacf8e68a6939b480017afbf245d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
278 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
278 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
279 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
279 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
280 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
280 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
281 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
281 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
282 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
282 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
283 | $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c HTTP/1.1" 422 - (glob) |
|
283 | $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c HTTP/1.1" 422 - (glob) | |
284 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
284 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
285 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D392c05922088bacf8e68a6939b480017afbf245d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
285 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D392c05922088bacf8e68a6939b480017afbf245d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
286 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=525251863cad618e55d483555f3d00a2ca99597e&heads=506bf3d83f78c54b89e81c6411adee19fdf02156+525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
286 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=525251863cad618e55d483555f3d00a2ca99597e&heads=506bf3d83f78c54b89e81c6411adee19fdf02156+525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
287 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
287 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
288 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d HTTP/1.1" 500 - (glob) |
|
288 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d HTTP/1.1" 500 - (glob) | |
289 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
289 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
290 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d HTTP/1.1" 422 - (glob) |
|
290 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d HTTP/1.1" 422 - (glob) | |
291 |
|
291 | |||
292 | $ grep -v ' File "' $TESTTMP/errors.log |
|
292 | $ grep -v ' File "' $TESTTMP/errors.log | |
293 | $LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.git/info/lfs/objects/batch': (glob) |
|
293 | $LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.git/info/lfs/objects/batch': (glob) | |
294 | $LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob) |
|
294 | $LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob) | |
295 | $LOCALIP - - [$ERRDATE$] HG error: verifies = store.verify(oid) (glob) |
|
295 | $LOCALIP - - [$ERRDATE$] HG error: verifies = store.verify(oid) (glob) | |
296 | $LOCALIP - - [$ERRDATE$] HG error: raise IOError(errno.EIO, '%s: I/O error' % oid) (glob) |
|
296 | $LOCALIP - - [$ERRDATE$] HG error: raise IOError(errno.EIO, '%s: I/O error' % oid) (glob) | |
297 | $LOCALIP - - [$ERRDATE$] HG error: IOError: [Errno 5] f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e: I/O error (glob) |
|
297 | $LOCALIP - - [$ERRDATE$] HG error: IOError: [Errno 5] f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e: I/O error (glob) | |
298 | $LOCALIP - - [$ERRDATE$] HG error: (glob) |
|
298 | $LOCALIP - - [$ERRDATE$] HG error: (glob) | |
299 | $LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.git/info/lfs/objects/batch': (glob) |
|
299 | $LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.git/info/lfs/objects/batch': (glob) | |
300 | $LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob) |
|
300 | $LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob) | |
301 | $LOCALIP - - [$ERRDATE$] HG error: verifies = store.verify(oid) (glob) |
|
301 | $LOCALIP - - [$ERRDATE$] HG error: verifies = store.verify(oid) (glob) | |
302 | $LOCALIP - - [$ERRDATE$] HG error: raise IOError(errno.EIO, '%s: I/O error' % oid) (glob) |
|
302 | $LOCALIP - - [$ERRDATE$] HG error: raise IOError(errno.EIO, '%s: I/O error' % oid) (glob) | |
303 | $LOCALIP - - [$ERRDATE$] HG error: IOError: [Errno 5] b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c: I/O error (glob) |
|
303 | $LOCALIP - - [$ERRDATE$] HG error: IOError: [Errno 5] b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c: I/O error (glob) | |
304 | $LOCALIP - - [$ERRDATE$] HG error: (glob) |
|
304 | $LOCALIP - - [$ERRDATE$] HG error: (glob) | |
305 | $LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.hg/lfs/objects/b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c': (glob) |
|
305 | $LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.hg/lfs/objects/b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c': (glob) | |
306 | $LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob) |
|
306 | $LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob) | |
307 | $LOCALIP - - [$ERRDATE$] HG error: localstore.download(oid, req.bodyfh) (glob) |
|
307 | $LOCALIP - - [$ERRDATE$] HG error: localstore.download(oid, req.bodyfh) (glob) | |
308 | $LOCALIP - - [$ERRDATE$] HG error: super(badstore, self).download(oid, src) (glob) |
|
308 | $LOCALIP - - [$ERRDATE$] HG error: super(badstore, self).download(oid, src) (glob) | |
309 | $LOCALIP - - [$ERRDATE$] HG error: % oid) (glob) |
|
309 | $LOCALIP - - [$ERRDATE$] HG error: % oid) (glob) | |
310 | $LOCALIP - - [$ERRDATE$] HG error: LfsCorruptionError: corrupt remote lfs object: b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c (glob) |
|
310 | $LOCALIP - - [$ERRDATE$] HG error: LfsCorruptionError: corrupt remote lfs object: b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c (glob) | |
311 | $LOCALIP - - [$ERRDATE$] HG error: (glob) |
|
311 | $LOCALIP - - [$ERRDATE$] HG error: (glob) | |
312 | $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d': (glob) |
|
312 | $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d': (glob) | |
313 | Traceback (most recent call last): |
|
313 | Traceback (most recent call last): | |
314 | self.do_write() |
|
314 | self.do_write() | |
315 | self.do_hgweb() |
|
315 | self.do_hgweb() | |
316 | for chunk in self.server.application(env, self._start_response): |
|
316 | for chunk in self.server.application(env, self._start_response): | |
317 | for r in self._runwsgi(req, res, repo): |
|
317 | for r in self._runwsgi(req, res, repo): | |
318 | rctx, req, res, self.check_perm) |
|
318 | rctx, req, res, self.check_perm) | |
319 | return func(*(args + a), **kw) |
|
319 | return func(*(args + a), **kw) | |
320 | lambda perm: |
|
320 | lambda perm: | |
321 | res.setbodybytes(localstore.read(oid)) |
|
321 | res.setbodybytes(localstore.read(oid)) | |
322 | blob = self._read(self.vfs, oid, verify) |
|
322 | blob = self._read(self.vfs, oid, verify) | |
323 | raise IOError(errno.EIO, '%s: I/O error' % oid) |
|
323 | raise IOError(errno.EIO, '%s: I/O error' % oid) | |
324 | IOError: [Errno 5] 276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d: I/O error |
|
324 | IOError: [Errno 5] 276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d: I/O error | |
325 |
|
325 | |||
326 | $LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d': (glob) |
|
326 | $LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d': (glob) | |
327 | $LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob) |
|
327 | $LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob) | |
328 | $LOCALIP - - [$ERRDATE$] HG error: res.setbodybytes(localstore.read(oid)) (glob) |
|
328 | $LOCALIP - - [$ERRDATE$] HG error: res.setbodybytes(localstore.read(oid)) (glob) | |
329 | $LOCALIP - - [$ERRDATE$] HG error: blob = self._read(self.vfs, oid, verify) (glob) |
|
329 | $LOCALIP - - [$ERRDATE$] HG error: blob = self._read(self.vfs, oid, verify) (glob) | |
330 | $LOCALIP - - [$ERRDATE$] HG error: blobstore._verify(oid, 'dummy content') (glob) |
|
330 | $LOCALIP - - [$ERRDATE$] HG error: blobstore._verify(oid, 'dummy content') (glob) | |
331 | $LOCALIP - - [$ERRDATE$] HG error: hint=_('run hg verify')) (glob) |
|
331 | $LOCALIP - - [$ERRDATE$] HG error: hint=_('run hg verify')) (glob) | |
332 | $LOCALIP - - [$ERRDATE$] HG error: LfsCorruptionError: detected corrupt lfs object: 276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d (glob) |
|
332 | $LOCALIP - - [$ERRDATE$] HG error: LfsCorruptionError: detected corrupt lfs object: 276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d (glob) | |
333 | $LOCALIP - - [$ERRDATE$] HG error: (glob) |
|
333 | $LOCALIP - - [$ERRDATE$] HG error: (glob) | |
334 |
|
334 | |||
335 | Basic Authorization headers are returned by the Batch API, and sent back with |
|
335 | Basic Authorization headers are returned by the Batch API, and sent back with | |
336 | the GET/PUT request. |
|
336 | the GET/PUT request. | |
337 |
|
337 | |||
338 | $ rm -f $TESTTMP/access.log $TESTTMP/errors.log |
|
338 | $ rm -f $TESTTMP/access.log $TESTTMP/errors.log | |
339 |
|
339 | |||
340 | $ cat >> $HGRCPATH << EOF |
|
340 | $ cat >> $HGRCPATH << EOF | |
341 | > [experimental] |
|
341 | > [experimental] | |
342 | > lfs.disableusercache = True |
|
342 | > lfs.disableusercache = True | |
343 | > [auth] |
|
343 | > [auth] | |
344 | > l.schemes=http |
|
344 | > l.schemes=http | |
345 | > l.prefix=lo |
|
345 | > l.prefix=lo | |
346 | > l.username=user |
|
346 | > l.username=user | |
347 | > l.password=pass |
|
347 | > l.password=pass | |
348 | > EOF |
|
348 | > EOF | |
349 |
|
349 | |||
350 | $ cat << EOF > userpass.py |
|
350 | $ cat << EOF > userpass.py | |
351 | > import base64 |
|
351 | > import base64 | |
352 | > from mercurial.hgweb import common |
|
352 | > from mercurial.hgweb import common | |
353 | > def perform_authentication(hgweb, req, op): |
|
353 | > def perform_authentication(hgweb, req, op): | |
354 | > auth = req.headers.get(b'Authorization') |
|
354 | > auth = req.headers.get(b'Authorization') | |
355 | > if not auth: |
|
355 | > if not auth: | |
356 | > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, b'who', |
|
356 | > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, b'who', | |
357 | > [(b'WWW-Authenticate', b'Basic Realm="mercurial"')]) |
|
357 | > [(b'WWW-Authenticate', b'Basic Realm="mercurial"')]) | |
358 | > if base64.b64decode(auth.split()[1]).split(b':', 1) != [b'user', |
|
358 | > if base64.b64decode(auth.split()[1]).split(b':', 1) != [b'user', | |
359 | > b'pass']: |
|
359 | > b'pass']: | |
360 | > raise common.ErrorResponse(common.HTTP_FORBIDDEN, b'no') |
|
360 | > raise common.ErrorResponse(common.HTTP_FORBIDDEN, b'no') | |
361 | > def extsetup(): |
|
361 | > def extsetup(): | |
362 | > common.permhooks.insert(0, perform_authentication) |
|
362 | > common.permhooks.insert(0, perform_authentication) | |
363 | > EOF |
|
363 | > EOF | |
364 |
|
364 | |||
365 | $ hg --config extensions.x=$TESTTMP/userpass.py \ |
|
365 | $ hg --config extensions.x=$TESTTMP/userpass.py \ | |
366 | > -R server serve -d -p $HGPORT1 --pid-file=hg.pid \ |
|
366 | > -R server serve -d -p $HGPORT1 --pid-file=hg.pid \ | |
367 | > -A $TESTTMP/access.log -E $TESTTMP/errors.log |
|
367 | > -A $TESTTMP/access.log -E $TESTTMP/errors.log | |
368 | $ mv hg.pid $DAEMON_PIDS |
|
368 | $ mv hg.pid $DAEMON_PIDS | |
369 |
|
369 | |||
370 | $ hg clone --debug http://localhost:$HGPORT1 auth_clone | egrep '^[{}]| ' |
|
370 | $ hg clone --debug http://localhost:$HGPORT1 auth_clone | egrep '^[{}]| ' | |
371 | { |
|
371 | { | |
372 | "objects": [ |
|
372 | "objects": [ | |
373 | { |
|
373 | { | |
374 | "actions": { |
|
374 | "actions": { | |
375 | "download": { |
|
375 | "download": { | |
376 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
376 | "expires_at": "$ISO_8601_DATE_TIME$" | |
377 | "header": { |
|
377 | "header": { | |
378 | "Accept": "application/vnd.git-lfs" |
|
378 | "Accept": "application/vnd.git-lfs" | |
379 | "Authorization": "Basic dXNlcjpwYXNz" |
|
379 | "Authorization": "Basic dXNlcjpwYXNz" | |
380 | } |
|
380 | } | |
381 | "href": "http://localhost:$HGPORT1/.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d" |
|
381 | "href": "http://localhost:$HGPORT1/.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d" | |
382 | } |
|
382 | } | |
383 | } |
|
383 | } | |
384 | "oid": "276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d" |
|
384 | "oid": "276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d" | |
385 | "size": 14 |
|
385 | "size": 14 | |
386 | } |
|
386 | } | |
387 | ] |
|
387 | ] | |
388 | "transfer": "basic" |
|
388 | "transfer": "basic" | |
389 | } |
|
389 | } | |
390 |
|
390 | |||
391 | $ echo 'another blob' > auth_clone/lfs.blob |
|
391 | $ echo 'another blob' > auth_clone/lfs.blob | |
392 | $ hg -R auth_clone ci -Aqm 'add blob' |
|
392 | $ hg -R auth_clone ci -Aqm 'add blob' | |
393 | $ hg -R auth_clone --debug push | egrep '^[{}]| ' |
|
393 | $ hg -R auth_clone --debug push | egrep '^[{}]| ' | |
394 | { |
|
394 | { | |
395 | "objects": [ |
|
395 | "objects": [ | |
396 | { |
|
396 | { | |
397 | "actions": { |
|
397 | "actions": { | |
398 | "upload": { |
|
398 | "upload": { | |
399 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
399 | "expires_at": "$ISO_8601_DATE_TIME$" | |
400 | "header": { |
|
400 | "header": { | |
401 | "Accept": "application/vnd.git-lfs" |
|
401 | "Accept": "application/vnd.git-lfs" | |
402 | "Authorization": "Basic dXNlcjpwYXNz" |
|
402 | "Authorization": "Basic dXNlcjpwYXNz" | |
403 | } |
|
403 | } | |
404 | "href": "http://localhost:$HGPORT1/.hg/lfs/objects/df14287d8d75f076a6459e7a3703ca583ca9fb3f4918caed10c77ac8622d49b3" |
|
404 | "href": "http://localhost:$HGPORT1/.hg/lfs/objects/df14287d8d75f076a6459e7a3703ca583ca9fb3f4918caed10c77ac8622d49b3" | |
405 | } |
|
405 | } | |
406 | } |
|
406 | } | |
407 | "oid": "df14287d8d75f076a6459e7a3703ca583ca9fb3f4918caed10c77ac8622d49b3" |
|
407 | "oid": "df14287d8d75f076a6459e7a3703ca583ca9fb3f4918caed10c77ac8622d49b3" | |
408 | "size": 13 |
|
408 | "size": 13 | |
409 | } |
|
409 | } | |
410 | ] |
|
410 | ] | |
411 | "transfer": "basic" |
|
411 | "transfer": "basic" | |
412 | } |
|
412 | } | |
413 |
|
413 | |||
414 | $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
|
414 | $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS | |
415 |
|
415 | |||
416 | $ cat $TESTTMP/access.log $TESTTMP/errors.log |
|
416 | $ cat $TESTTMP/access.log $TESTTMP/errors.log | |
417 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 401 - (glob) |
|
417 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 401 - (glob) | |
418 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
418 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
419 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
419 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
420 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=506bf3d83f78c54b89e81c6411adee19fdf02156+525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
420 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=506bf3d83f78c54b89e81c6411adee19fdf02156+525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
421 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 401 - (glob) |
|
421 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 401 - (glob) | |
422 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
422 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
423 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d HTTP/1.1" 200 - (glob) |
|
423 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d HTTP/1.1" 200 - (glob) | |
424 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 401 - (glob) |
|
424 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 401 - (glob) | |
425 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
425 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
426 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D525251863cad618e55d483555f3d00a2ca99597e+4d9397055dc0c205f3132f331f36353ab1a525a3 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
426 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D525251863cad618e55d483555f3d00a2ca99597e+4d9397055dc0c205f3132f331f36353ab1a525a3 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
427 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
427 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
428 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
428 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
429 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
429 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
430 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
430 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
431 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 401 - (glob) |
|
431 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 401 - (glob) | |
432 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
432 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
433 | $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/df14287d8d75f076a6459e7a3703ca583ca9fb3f4918caed10c77ac8622d49b3 HTTP/1.1" 201 - (glob) |
|
433 | $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/df14287d8d75f076a6459e7a3703ca583ca9fb3f4918caed10c77ac8622d49b3 HTTP/1.1" 201 - (glob) | |
434 | $LOCALIP - - [$LOGDATE$] "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
434 | $LOCALIP - - [$LOGDATE$] "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) | |
435 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
435 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
@@ -1,450 +1,450 b'' | |||||
1 | #testcases lfsremote-on lfsremote-off |
|
1 | #testcases lfsremote-on lfsremote-off | |
2 | #require serve no-reposimplestore |
|
2 | #require serve no-reposimplestore no-chg | |
3 |
|
3 | |||
4 | This test splits `hg serve` with and without using the extension into separate |
|
4 | This test splits `hg serve` with and without using the extension into separate | |
5 | tests cases. The tests are broken down as follows, where "LFS"/"No-LFS" |
|
5 | tests cases. The tests are broken down as follows, where "LFS"/"No-LFS" | |
6 | indicates whether or not there are commits that use an LFS file, and "D"/"E" |
|
6 | indicates whether or not there are commits that use an LFS file, and "D"/"E" | |
7 | indicates whether or not the extension is loaded. The "X" cases are not tested |
|
7 | indicates whether or not the extension is loaded. The "X" cases are not tested | |
8 | individually, because the lfs requirement causes the process to bail early if |
|
8 | individually, because the lfs requirement causes the process to bail early if | |
9 | the extension is disabled. |
|
9 | the extension is disabled. | |
10 |
|
10 | |||
11 | . Server |
|
11 | . Server | |
12 | . |
|
12 | . | |
13 | . No-LFS LFS |
|
13 | . No-LFS LFS | |
14 | . +----------------------------+ |
|
14 | . +----------------------------+ | |
15 | . | || D | E | D | E | |
|
15 | . | || D | E | D | E | | |
16 | . |---++=======================| |
|
16 | . |---++=======================| | |
17 | . C | D || N/A | #1 | X | #4 | |
|
17 | . C | D || N/A | #1 | X | #4 | | |
18 | . l No +---++-----------------------| |
|
18 | . l No +---++-----------------------| | |
19 | . i LFS | E || #2 | #2 | X | #5 | |
|
19 | . i LFS | E || #2 | #2 | X | #5 | | |
20 | . e +---++-----------------------| |
|
20 | . e +---++-----------------------| | |
21 | . n | D || X | X | X | X | |
|
21 | . n | D || X | X | X | X | | |
22 | . t LFS |---++-----------------------| |
|
22 | . t LFS |---++-----------------------| | |
23 | . | E || #3 | #3 | X | #6 | |
|
23 | . | E || #3 | #3 | X | #6 | | |
24 | . |---++-----------------------+ |
|
24 | . |---++-----------------------+ | |
25 |
|
25 | |||
26 | $ hg init server |
|
26 | $ hg init server | |
27 | $ SERVER_REQUIRES="$TESTTMP/server/.hg/requires" |
|
27 | $ SERVER_REQUIRES="$TESTTMP/server/.hg/requires" | |
28 |
|
28 | |||
29 | Skip the experimental.changegroup3=True config. Failure to agree on this comes |
|
29 | Skip the experimental.changegroup3=True config. Failure to agree on this comes | |
30 | first, and causes a "ValueError: no common changegroup version" or "abort: |
|
30 | first, and causes a "ValueError: no common changegroup version" or "abort: | |
31 | HTTP Error 500: Internal Server Error", if the extension is only loaded on one |
|
31 | HTTP Error 500: Internal Server Error", if the extension is only loaded on one | |
32 | side. If that *is* enabled, the subsequent failure is "abort: missing processor |
|
32 | side. If that *is* enabled, the subsequent failure is "abort: missing processor | |
33 | for flag '0x2000'!" if the extension is only loaded on one side (possibly also |
|
33 | for flag '0x2000'!" if the extension is only loaded on one side (possibly also | |
34 | masked by the Internal Server Error message). |
|
34 | masked by the Internal Server Error message). | |
35 | $ cat >> $HGRCPATH <<EOF |
|
35 | $ cat >> $HGRCPATH <<EOF | |
36 | > [experimental] |
|
36 | > [experimental] | |
37 | > lfs.disableusercache = True |
|
37 | > lfs.disableusercache = True | |
38 | > [lfs] |
|
38 | > [lfs] | |
39 | > threshold=10 |
|
39 | > threshold=10 | |
40 | > [web] |
|
40 | > [web] | |
41 | > allow_push=* |
|
41 | > allow_push=* | |
42 | > push_ssl=False |
|
42 | > push_ssl=False | |
43 | > EOF |
|
43 | > EOF | |
44 |
|
44 | |||
45 | #if lfsremote-on |
|
45 | #if lfsremote-on | |
46 | $ hg --config extensions.lfs= -R server \ |
|
46 | $ hg --config extensions.lfs= -R server \ | |
47 | > serve -p $HGPORT -d --pid-file=hg.pid --errorlog=$TESTTMP/errors.log |
|
47 | > serve -p $HGPORT -d --pid-file=hg.pid --errorlog=$TESTTMP/errors.log | |
48 | #else |
|
48 | #else | |
49 | $ hg --config extensions.lfs=! -R server \ |
|
49 | $ hg --config extensions.lfs=! -R server \ | |
50 | > serve -p $HGPORT -d --pid-file=hg.pid --errorlog=$TESTTMP/errors.log |
|
50 | > serve -p $HGPORT -d --pid-file=hg.pid --errorlog=$TESTTMP/errors.log | |
51 | #endif |
|
51 | #endif | |
52 |
|
52 | |||
53 | $ cat hg.pid >> $DAEMON_PIDS |
|
53 | $ cat hg.pid >> $DAEMON_PIDS | |
54 | $ hg clone -q http://localhost:$HGPORT client |
|
54 | $ hg clone -q http://localhost:$HGPORT client | |
55 | $ grep 'lfs' client/.hg/requires $SERVER_REQUIRES |
|
55 | $ grep 'lfs' client/.hg/requires $SERVER_REQUIRES | |
56 | [1] |
|
56 | [1] | |
57 |
|
57 | |||
58 | -------------------------------------------------------------------------------- |
|
58 | -------------------------------------------------------------------------------- | |
59 | Case #1: client with non-lfs content and the extension disabled; server with |
|
59 | Case #1: client with non-lfs content and the extension disabled; server with | |
60 | non-lfs content, and the extension enabled. |
|
60 | non-lfs content, and the extension enabled. | |
61 |
|
61 | |||
62 | $ cd client |
|
62 | $ cd client | |
63 | $ echo 'non-lfs' > nonlfs.txt |
|
63 | $ echo 'non-lfs' > nonlfs.txt | |
64 | $ hg ci -Aqm 'non-lfs' |
|
64 | $ hg ci -Aqm 'non-lfs' | |
65 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES |
|
65 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES | |
66 | [1] |
|
66 | [1] | |
67 |
|
67 | |||
68 | #if lfsremote-on |
|
68 | #if lfsremote-on | |
69 |
|
69 | |||
70 | $ hg push -q |
|
70 | $ hg push -q | |
71 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES |
|
71 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES | |
72 | [1] |
|
72 | [1] | |
73 |
|
73 | |||
74 | $ hg clone -q http://localhost:$HGPORT $TESTTMP/client1_clone |
|
74 | $ hg clone -q http://localhost:$HGPORT $TESTTMP/client1_clone | |
75 | $ grep 'lfs' $TESTTMP/client1_clone/.hg/requires $SERVER_REQUIRES |
|
75 | $ grep 'lfs' $TESTTMP/client1_clone/.hg/requires $SERVER_REQUIRES | |
76 | [1] |
|
76 | [1] | |
77 |
|
77 | |||
78 | $ hg init $TESTTMP/client1_pull |
|
78 | $ hg init $TESTTMP/client1_pull | |
79 | $ hg -R $TESTTMP/client1_pull pull -q http://localhost:$HGPORT |
|
79 | $ hg -R $TESTTMP/client1_pull pull -q http://localhost:$HGPORT | |
80 | $ grep 'lfs' $TESTTMP/client1_pull/.hg/requires $SERVER_REQUIRES |
|
80 | $ grep 'lfs' $TESTTMP/client1_pull/.hg/requires $SERVER_REQUIRES | |
81 | [1] |
|
81 | [1] | |
82 |
|
82 | |||
83 | $ hg identify http://localhost:$HGPORT |
|
83 | $ hg identify http://localhost:$HGPORT | |
84 | d437e1d24fbd |
|
84 | d437e1d24fbd | |
85 |
|
85 | |||
86 | #endif |
|
86 | #endif | |
87 |
|
87 | |||
88 | -------------------------------------------------------------------------------- |
|
88 | -------------------------------------------------------------------------------- | |
89 | Case #2: client with non-lfs content and the extension enabled; server with |
|
89 | Case #2: client with non-lfs content and the extension enabled; server with | |
90 | non-lfs content, and the extension state controlled by #testcases. |
|
90 | non-lfs content, and the extension state controlled by #testcases. | |
91 |
|
91 | |||
92 | $ cat >> $HGRCPATH <<EOF |
|
92 | $ cat >> $HGRCPATH <<EOF | |
93 | > [extensions] |
|
93 | > [extensions] | |
94 | > lfs = |
|
94 | > lfs = | |
95 | > EOF |
|
95 | > EOF | |
96 | $ echo 'non-lfs' > nonlfs2.txt |
|
96 | $ echo 'non-lfs' > nonlfs2.txt | |
97 | $ hg ci -Aqm 'non-lfs file with lfs client' |
|
97 | $ hg ci -Aqm 'non-lfs file with lfs client' | |
98 |
|
98 | |||
99 | Since no lfs content has been added yet, the push is allowed, even when the |
|
99 | Since no lfs content has been added yet, the push is allowed, even when the | |
100 | extension is not enabled remotely. |
|
100 | extension is not enabled remotely. | |
101 |
|
101 | |||
102 | $ hg push -q |
|
102 | $ hg push -q | |
103 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES |
|
103 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES | |
104 | [1] |
|
104 | [1] | |
105 |
|
105 | |||
106 | $ hg clone -q http://localhost:$HGPORT $TESTTMP/client2_clone |
|
106 | $ hg clone -q http://localhost:$HGPORT $TESTTMP/client2_clone | |
107 | $ grep 'lfs' $TESTTMP/client2_clone/.hg/requires $SERVER_REQUIRES |
|
107 | $ grep 'lfs' $TESTTMP/client2_clone/.hg/requires $SERVER_REQUIRES | |
108 | [1] |
|
108 | [1] | |
109 |
|
109 | |||
110 | $ hg init $TESTTMP/client2_pull |
|
110 | $ hg init $TESTTMP/client2_pull | |
111 | $ hg -R $TESTTMP/client2_pull pull -q http://localhost:$HGPORT |
|
111 | $ hg -R $TESTTMP/client2_pull pull -q http://localhost:$HGPORT | |
112 | $ grep 'lfs' $TESTTMP/client2_pull/.hg/requires $SERVER_REQUIRES |
|
112 | $ grep 'lfs' $TESTTMP/client2_pull/.hg/requires $SERVER_REQUIRES | |
113 | [1] |
|
113 | [1] | |
114 |
|
114 | |||
115 | $ hg identify http://localhost:$HGPORT |
|
115 | $ hg identify http://localhost:$HGPORT | |
116 | 1477875038c6 |
|
116 | 1477875038c6 | |
117 |
|
117 | |||
118 | -------------------------------------------------------------------------------- |
|
118 | -------------------------------------------------------------------------------- | |
119 | Case #3: client with lfs content and the extension enabled; server with |
|
119 | Case #3: client with lfs content and the extension enabled; server with | |
120 | non-lfs content, and the extension state controlled by #testcases. The server |
|
120 | non-lfs content, and the extension state controlled by #testcases. The server | |
121 | should have an 'lfs' requirement after it picks up its first commit with a blob. |
|
121 | should have an 'lfs' requirement after it picks up its first commit with a blob. | |
122 |
|
122 | |||
123 | $ echo 'this is a big lfs file' > lfs.bin |
|
123 | $ echo 'this is a big lfs file' > lfs.bin | |
124 | $ hg ci -Aqm 'lfs' |
|
124 | $ hg ci -Aqm 'lfs' | |
125 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES |
|
125 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES | |
126 | .hg/requires:lfs |
|
126 | .hg/requires:lfs | |
127 |
|
127 | |||
128 | #if lfsremote-off |
|
128 | #if lfsremote-off | |
129 | $ hg push -q |
|
129 | $ hg push -q | |
130 | abort: required features are not supported in the destination: lfs |
|
130 | abort: required features are not supported in the destination: lfs | |
131 | (enable the lfs extension on the server) |
|
131 | (enable the lfs extension on the server) | |
132 | [255] |
|
132 | [255] | |
133 | #else |
|
133 | #else | |
134 | $ hg push -q |
|
134 | $ hg push -q | |
135 | #endif |
|
135 | #endif | |
136 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES |
|
136 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES | |
137 | .hg/requires:lfs |
|
137 | .hg/requires:lfs | |
138 | $TESTTMP/server/.hg/requires:lfs (lfsremote-on !) |
|
138 | $TESTTMP/server/.hg/requires:lfs (lfsremote-on !) | |
139 |
|
139 | |||
140 | $ hg clone -q http://localhost:$HGPORT $TESTTMP/client3_clone |
|
140 | $ hg clone -q http://localhost:$HGPORT $TESTTMP/client3_clone | |
141 | $ grep 'lfs' $TESTTMP/client3_clone/.hg/requires $SERVER_REQUIRES || true |
|
141 | $ grep 'lfs' $TESTTMP/client3_clone/.hg/requires $SERVER_REQUIRES || true | |
142 | $TESTTMP/client3_clone/.hg/requires:lfs (lfsremote-on !) |
|
142 | $TESTTMP/client3_clone/.hg/requires:lfs (lfsremote-on !) | |
143 | $TESTTMP/server/.hg/requires:lfs (lfsremote-on !) |
|
143 | $TESTTMP/server/.hg/requires:lfs (lfsremote-on !) | |
144 |
|
144 | |||
145 | $ hg init $TESTTMP/client3_pull |
|
145 | $ hg init $TESTTMP/client3_pull | |
146 | $ hg -R $TESTTMP/client3_pull pull -q http://localhost:$HGPORT |
|
146 | $ hg -R $TESTTMP/client3_pull pull -q http://localhost:$HGPORT | |
147 | $ grep 'lfs' $TESTTMP/client3_pull/.hg/requires $SERVER_REQUIRES || true |
|
147 | $ grep 'lfs' $TESTTMP/client3_pull/.hg/requires $SERVER_REQUIRES || true | |
148 | $TESTTMP/client3_pull/.hg/requires:lfs (lfsremote-on !) |
|
148 | $TESTTMP/client3_pull/.hg/requires:lfs (lfsremote-on !) | |
149 | $TESTTMP/server/.hg/requires:lfs (lfsremote-on !) |
|
149 | $TESTTMP/server/.hg/requires:lfs (lfsremote-on !) | |
150 |
|
150 | |||
151 | The difference here is the push failed above when the extension isn't |
|
151 | The difference here is the push failed above when the extension isn't | |
152 | enabled on the server. |
|
152 | enabled on the server. | |
153 | $ hg identify http://localhost:$HGPORT |
|
153 | $ hg identify http://localhost:$HGPORT | |
154 | 8374dc4052cb (lfsremote-on !) |
|
154 | 8374dc4052cb (lfsremote-on !) | |
155 | 1477875038c6 (lfsremote-off !) |
|
155 | 1477875038c6 (lfsremote-off !) | |
156 |
|
156 | |||
157 | Don't bother testing the lfsremote-off cases- the server won't be able |
|
157 | Don't bother testing the lfsremote-off cases- the server won't be able | |
158 | to launch if there's lfs content and the extension is disabled. |
|
158 | to launch if there's lfs content and the extension is disabled. | |
159 |
|
159 | |||
160 | #if lfsremote-on |
|
160 | #if lfsremote-on | |
161 |
|
161 | |||
162 | -------------------------------------------------------------------------------- |
|
162 | -------------------------------------------------------------------------------- | |
163 | Case #4: client with non-lfs content and the extension disabled; server with |
|
163 | Case #4: client with non-lfs content and the extension disabled; server with | |
164 | lfs content, and the extension enabled. |
|
164 | lfs content, and the extension enabled. | |
165 |
|
165 | |||
166 | $ cat >> $HGRCPATH <<EOF |
|
166 | $ cat >> $HGRCPATH <<EOF | |
167 | > [extensions] |
|
167 | > [extensions] | |
168 | > lfs = ! |
|
168 | > lfs = ! | |
169 | > EOF |
|
169 | > EOF | |
170 |
|
170 | |||
171 | $ hg init $TESTTMP/client4 |
|
171 | $ hg init $TESTTMP/client4 | |
172 | $ cd $TESTTMP/client4 |
|
172 | $ cd $TESTTMP/client4 | |
173 | $ cat >> .hg/hgrc <<EOF |
|
173 | $ cat >> .hg/hgrc <<EOF | |
174 | > [paths] |
|
174 | > [paths] | |
175 | > default = http://localhost:$HGPORT |
|
175 | > default = http://localhost:$HGPORT | |
176 | > EOF |
|
176 | > EOF | |
177 | $ echo 'non-lfs' > nonlfs2.txt |
|
177 | $ echo 'non-lfs' > nonlfs2.txt | |
178 | $ hg ci -Aqm 'non-lfs' |
|
178 | $ hg ci -Aqm 'non-lfs' | |
179 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES |
|
179 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES | |
180 | $TESTTMP/server/.hg/requires:lfs |
|
180 | $TESTTMP/server/.hg/requires:lfs | |
181 |
|
181 | |||
182 | $ hg push -q --force |
|
182 | $ hg push -q --force | |
183 | warning: repository is unrelated |
|
183 | warning: repository is unrelated | |
184 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES |
|
184 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES | |
185 | $TESTTMP/server/.hg/requires:lfs |
|
185 | $TESTTMP/server/.hg/requires:lfs | |
186 |
|
186 | |||
187 | TODO: fail more gracefully. |
|
187 | TODO: fail more gracefully. | |
188 |
|
188 | |||
189 | $ hg clone -q http://localhost:$HGPORT $TESTTMP/client4_clone |
|
189 | $ hg clone -q http://localhost:$HGPORT $TESTTMP/client4_clone | |
190 | abort: HTTP Error 500: Internal Server Error |
|
190 | abort: HTTP Error 500: Internal Server Error | |
191 | [255] |
|
191 | [255] | |
192 | $ grep 'lfs' $TESTTMP/client4_clone/.hg/requires $SERVER_REQUIRES |
|
192 | $ grep 'lfs' $TESTTMP/client4_clone/.hg/requires $SERVER_REQUIRES | |
193 | grep: $TESTTMP/client4_clone/.hg/requires: $ENOENT$ |
|
193 | grep: $TESTTMP/client4_clone/.hg/requires: $ENOENT$ | |
194 | $TESTTMP/server/.hg/requires:lfs |
|
194 | $TESTTMP/server/.hg/requires:lfs | |
195 | [2] |
|
195 | [2] | |
196 |
|
196 | |||
197 | TODO: fail more gracefully. |
|
197 | TODO: fail more gracefully. | |
198 |
|
198 | |||
199 | $ hg init $TESTTMP/client4_pull |
|
199 | $ hg init $TESTTMP/client4_pull | |
200 | $ hg -R $TESTTMP/client4_pull pull -q http://localhost:$HGPORT |
|
200 | $ hg -R $TESTTMP/client4_pull pull -q http://localhost:$HGPORT | |
201 | abort: HTTP Error 500: Internal Server Error |
|
201 | abort: HTTP Error 500: Internal Server Error | |
202 | [255] |
|
202 | [255] | |
203 | $ grep 'lfs' $TESTTMP/client4_pull/.hg/requires $SERVER_REQUIRES |
|
203 | $ grep 'lfs' $TESTTMP/client4_pull/.hg/requires $SERVER_REQUIRES | |
204 | $TESTTMP/server/.hg/requires:lfs |
|
204 | $TESTTMP/server/.hg/requires:lfs | |
205 |
|
205 | |||
206 | $ hg identify http://localhost:$HGPORT |
|
206 | $ hg identify http://localhost:$HGPORT | |
207 | 03b080fa9d93 |
|
207 | 03b080fa9d93 | |
208 |
|
208 | |||
209 | -------------------------------------------------------------------------------- |
|
209 | -------------------------------------------------------------------------------- | |
210 | Case #5: client with non-lfs content and the extension enabled; server with |
|
210 | Case #5: client with non-lfs content and the extension enabled; server with | |
211 | lfs content, and the extension enabled. |
|
211 | lfs content, and the extension enabled. | |
212 |
|
212 | |||
213 | $ cat >> $HGRCPATH <<EOF |
|
213 | $ cat >> $HGRCPATH <<EOF | |
214 | > [extensions] |
|
214 | > [extensions] | |
215 | > lfs = |
|
215 | > lfs = | |
216 | > EOF |
|
216 | > EOF | |
217 | $ echo 'non-lfs' > nonlfs3.txt |
|
217 | $ echo 'non-lfs' > nonlfs3.txt | |
218 | $ hg ci -Aqm 'non-lfs file with lfs client' |
|
218 | $ hg ci -Aqm 'non-lfs file with lfs client' | |
219 |
|
219 | |||
220 | $ hg push -q |
|
220 | $ hg push -q | |
221 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES |
|
221 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES | |
222 | $TESTTMP/server/.hg/requires:lfs |
|
222 | $TESTTMP/server/.hg/requires:lfs | |
223 |
|
223 | |||
224 | $ hg clone -q http://localhost:$HGPORT $TESTTMP/client5_clone |
|
224 | $ hg clone -q http://localhost:$HGPORT $TESTTMP/client5_clone | |
225 | $ grep 'lfs' $TESTTMP/client5_clone/.hg/requires $SERVER_REQUIRES |
|
225 | $ grep 'lfs' $TESTTMP/client5_clone/.hg/requires $SERVER_REQUIRES | |
226 | $TESTTMP/client5_clone/.hg/requires:lfs |
|
226 | $TESTTMP/client5_clone/.hg/requires:lfs | |
227 | $TESTTMP/server/.hg/requires:lfs |
|
227 | $TESTTMP/server/.hg/requires:lfs | |
228 |
|
228 | |||
229 | $ hg init $TESTTMP/client5_pull |
|
229 | $ hg init $TESTTMP/client5_pull | |
230 | $ hg -R $TESTTMP/client5_pull pull -q http://localhost:$HGPORT |
|
230 | $ hg -R $TESTTMP/client5_pull pull -q http://localhost:$HGPORT | |
231 | $ grep 'lfs' $TESTTMP/client5_pull/.hg/requires $SERVER_REQUIRES |
|
231 | $ grep 'lfs' $TESTTMP/client5_pull/.hg/requires $SERVER_REQUIRES | |
232 | $TESTTMP/client5_pull/.hg/requires:lfs |
|
232 | $TESTTMP/client5_pull/.hg/requires:lfs | |
233 | $TESTTMP/server/.hg/requires:lfs |
|
233 | $TESTTMP/server/.hg/requires:lfs | |
234 |
|
234 | |||
235 | $ hg identify http://localhost:$HGPORT |
|
235 | $ hg identify http://localhost:$HGPORT | |
236 | c729025cc5e3 |
|
236 | c729025cc5e3 | |
237 |
|
237 | |||
238 | -------------------------------------------------------------------------------- |
|
238 | -------------------------------------------------------------------------------- | |
239 | Case #6: client with lfs content and the extension enabled; server with |
|
239 | Case #6: client with lfs content and the extension enabled; server with | |
240 | lfs content, and the extension enabled. |
|
240 | lfs content, and the extension enabled. | |
241 |
|
241 | |||
242 | $ echo 'this is another lfs file' > lfs2.txt |
|
242 | $ echo 'this is another lfs file' > lfs2.txt | |
243 | $ hg ci -Aqm 'lfs file with lfs client' |
|
243 | $ hg ci -Aqm 'lfs file with lfs client' | |
244 |
|
244 | |||
245 | $ hg --config paths.default= push -v http://localhost:$HGPORT |
|
245 | $ hg --config paths.default= push -v http://localhost:$HGPORT | |
246 | pushing to http://localhost:$HGPORT/ |
|
246 | pushing to http://localhost:$HGPORT/ | |
247 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs |
|
247 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
248 | searching for changes |
|
248 | searching for changes | |
249 | remote has heads on branch 'default' that are not known locally: 8374dc4052cb |
|
249 | remote has heads on branch 'default' that are not known locally: 8374dc4052cb | |
250 | lfs: uploading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes) |
|
250 | lfs: uploading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes) | |
251 | lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de |
|
251 | lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de | |
252 | lfs: uploaded 1 files (25 bytes) |
|
252 | lfs: uploaded 1 files (25 bytes) | |
253 | 1 changesets found |
|
253 | 1 changesets found | |
254 | uncompressed size of bundle content: |
|
254 | uncompressed size of bundle content: | |
255 | 206 (changelog) |
|
255 | 206 (changelog) | |
256 | 172 (manifests) |
|
256 | 172 (manifests) | |
257 | 275 lfs2.txt |
|
257 | 275 lfs2.txt | |
258 | remote: adding changesets |
|
258 | remote: adding changesets | |
259 | remote: adding manifests |
|
259 | remote: adding manifests | |
260 | remote: adding file changes |
|
260 | remote: adding file changes | |
261 | remote: added 1 changesets with 1 changes to 1 files |
|
261 | remote: added 1 changesets with 1 changes to 1 files | |
262 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES |
|
262 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES | |
263 | .hg/requires:lfs |
|
263 | .hg/requires:lfs | |
264 | $TESTTMP/server/.hg/requires:lfs |
|
264 | $TESTTMP/server/.hg/requires:lfs | |
265 |
|
265 | |||
266 | $ hg clone -q http://localhost:$HGPORT $TESTTMP/client6_clone |
|
266 | $ hg clone -q http://localhost:$HGPORT $TESTTMP/client6_clone | |
267 | $ grep 'lfs' $TESTTMP/client6_clone/.hg/requires $SERVER_REQUIRES |
|
267 | $ grep 'lfs' $TESTTMP/client6_clone/.hg/requires $SERVER_REQUIRES | |
268 | $TESTTMP/client6_clone/.hg/requires:lfs |
|
268 | $TESTTMP/client6_clone/.hg/requires:lfs | |
269 | $TESTTMP/server/.hg/requires:lfs |
|
269 | $TESTTMP/server/.hg/requires:lfs | |
270 |
|
270 | |||
271 | $ hg init $TESTTMP/client6_pull |
|
271 | $ hg init $TESTTMP/client6_pull | |
272 | $ hg -R $TESTTMP/client6_pull pull -u -v http://localhost:$HGPORT |
|
272 | $ hg -R $TESTTMP/client6_pull pull -u -v http://localhost:$HGPORT | |
273 | pulling from http://localhost:$HGPORT/ |
|
273 | pulling from http://localhost:$HGPORT/ | |
274 | requesting all changes |
|
274 | requesting all changes | |
275 | adding changesets |
|
275 | adding changesets | |
276 | adding manifests |
|
276 | adding manifests | |
277 | adding file changes |
|
277 | adding file changes | |
278 | added 6 changesets with 5 changes to 5 files (+1 heads) |
|
278 | added 6 changesets with 5 changes to 5 files (+1 heads) | |
279 | calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs |
|
279 | calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs | |
280 | new changesets d437e1d24fbd:d3b84d50eacb |
|
280 | new changesets d437e1d24fbd:d3b84d50eacb | |
281 | resolving manifests |
|
281 | resolving manifests | |
282 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs |
|
282 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
283 | lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes) |
|
283 | lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes) | |
284 | lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de |
|
284 | lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de | |
285 | lfs: downloaded 1 files (25 bytes) |
|
285 | lfs: downloaded 1 files (25 bytes) | |
286 | getting lfs2.txt |
|
286 | getting lfs2.txt | |
287 | lfs: found a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de in the local lfs store |
|
287 | lfs: found a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de in the local lfs store | |
288 | getting nonlfs2.txt |
|
288 | getting nonlfs2.txt | |
289 | getting nonlfs3.txt |
|
289 | getting nonlfs3.txt | |
290 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
290 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
291 | updated to "d3b84d50eacb: lfs file with lfs client" |
|
291 | updated to "d3b84d50eacb: lfs file with lfs client" | |
292 | 1 other heads for branch "default" |
|
292 | 1 other heads for branch "default" | |
293 | $ grep 'lfs' $TESTTMP/client6_pull/.hg/requires $SERVER_REQUIRES |
|
293 | $ grep 'lfs' $TESTTMP/client6_pull/.hg/requires $SERVER_REQUIRES | |
294 | $TESTTMP/client6_pull/.hg/requires:lfs |
|
294 | $TESTTMP/client6_pull/.hg/requires:lfs | |
295 | $TESTTMP/server/.hg/requires:lfs |
|
295 | $TESTTMP/server/.hg/requires:lfs | |
296 |
|
296 | |||
297 | $ hg identify http://localhost:$HGPORT |
|
297 | $ hg identify http://localhost:$HGPORT | |
298 | d3b84d50eacb |
|
298 | d3b84d50eacb | |
299 |
|
299 | |||
300 | -------------------------------------------------------------------------------- |
|
300 | -------------------------------------------------------------------------------- | |
301 | Misc: process dies early if a requirement exists and the extension is disabled |
|
301 | Misc: process dies early if a requirement exists and the extension is disabled | |
302 |
|
302 | |||
303 | $ hg --config extensions.lfs=! summary |
|
303 | $ hg --config extensions.lfs=! summary | |
304 | abort: repository requires features unknown to this Mercurial: lfs! |
|
304 | abort: repository requires features unknown to this Mercurial: lfs! | |
305 | (see https://mercurial-scm.org/wiki/MissingRequirement for more information) |
|
305 | (see https://mercurial-scm.org/wiki/MissingRequirement for more information) | |
306 | [255] |
|
306 | [255] | |
307 |
|
307 | |||
308 | $ echo 'this is an lfs file' > $TESTTMP/client6_clone/lfspair1.bin |
|
308 | $ echo 'this is an lfs file' > $TESTTMP/client6_clone/lfspair1.bin | |
309 | $ echo 'this is an lfs file too' > $TESTTMP/client6_clone/lfspair2.bin |
|
309 | $ echo 'this is an lfs file too' > $TESTTMP/client6_clone/lfspair2.bin | |
310 | $ hg -R $TESTTMP/client6_clone ci -Aqm 'add lfs pair' |
|
310 | $ hg -R $TESTTMP/client6_clone ci -Aqm 'add lfs pair' | |
311 | $ hg -R $TESTTMP/client6_clone push -q |
|
311 | $ hg -R $TESTTMP/client6_clone push -q | |
312 |
|
312 | |||
313 | $ hg clone -qU http://localhost:$HGPORT $TESTTMP/bulkfetch |
|
313 | $ hg clone -qU http://localhost:$HGPORT $TESTTMP/bulkfetch | |
314 |
|
314 | |||
315 | Export will prefetch all needed files across all needed revisions |
|
315 | Export will prefetch all needed files across all needed revisions | |
316 |
|
316 | |||
317 | $ hg -R $TESTTMP/bulkfetch -v export -r 0:tip -o all.export |
|
317 | $ hg -R $TESTTMP/bulkfetch -v export -r 0:tip -o all.export | |
318 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs |
|
318 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
319 | exporting patches: |
|
319 | exporting patches: | |
320 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs |
|
320 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
321 | lfs: need to transfer 4 objects (92 bytes) |
|
321 | lfs: need to transfer 4 objects (92 bytes) | |
322 | lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes) |
|
322 | lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes) | |
323 | lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de |
|
323 | lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de | |
324 | lfs: downloading bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc (23 bytes) |
|
324 | lfs: downloading bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc (23 bytes) | |
325 | lfs: processed: bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc |
|
325 | lfs: processed: bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc | |
326 | lfs: downloading cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 (20 bytes) |
|
326 | lfs: downloading cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 (20 bytes) | |
327 | lfs: processed: cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 |
|
327 | lfs: processed: cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 | |
328 | lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes) |
|
328 | lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes) | |
329 | lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e |
|
329 | lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e | |
330 | lfs: downloaded 4 files (92 bytes) |
|
330 | lfs: downloaded 4 files (92 bytes) | |
331 | all.export |
|
331 | all.export | |
332 | lfs: found bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc in the local lfs store |
|
332 | lfs: found bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc in the local lfs store | |
333 | lfs: found a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de in the local lfs store |
|
333 | lfs: found a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de in the local lfs store | |
334 | lfs: found cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 in the local lfs store |
|
334 | lfs: found cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 in the local lfs store | |
335 | lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store |
|
335 | lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store | |
336 |
|
336 | |||
337 | Export with selected files is used with `extdiff --patch` |
|
337 | Export with selected files is used with `extdiff --patch` | |
338 |
|
338 | |||
339 | $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs |
|
339 | $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs | |
340 | $ hg --config extensions.extdiff= \ |
|
340 | $ hg --config extensions.extdiff= \ | |
341 | > -R $TESTTMP/bulkfetch -v extdiff -r 2:tip --patch $TESTTMP/bulkfetch/lfs.bin |
|
341 | > -R $TESTTMP/bulkfetch -v extdiff -r 2:tip --patch $TESTTMP/bulkfetch/lfs.bin | |
342 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs |
|
342 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
343 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs |
|
343 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
344 | lfs: downloading bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc (23 bytes) |
|
344 | lfs: downloading bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc (23 bytes) | |
345 | lfs: processed: bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc |
|
345 | lfs: processed: bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc | |
346 | lfs: downloaded 1 files (23 bytes) |
|
346 | lfs: downloaded 1 files (23 bytes) | |
347 | */hg-8374dc4052cb.patch (glob) |
|
347 | */hg-8374dc4052cb.patch (glob) | |
348 | lfs: found bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc in the local lfs store |
|
348 | lfs: found bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc in the local lfs store | |
349 | */hg-9640b57e77b1.patch (glob) |
|
349 | */hg-9640b57e77b1.patch (glob) | |
350 | --- */hg-8374dc4052cb.patch * (glob) |
|
350 | --- */hg-8374dc4052cb.patch * (glob) | |
351 | +++ */hg-9640b57e77b1.patch * (glob) |
|
351 | +++ */hg-9640b57e77b1.patch * (glob) | |
352 | @@ -2,12 +2,7 @@ |
|
352 | @@ -2,12 +2,7 @@ | |
353 | # User test |
|
353 | # User test | |
354 | # Date 0 0 |
|
354 | # Date 0 0 | |
355 | # Thu Jan 01 00:00:00 1970 +0000 |
|
355 | # Thu Jan 01 00:00:00 1970 +0000 | |
356 | -# Node ID 8374dc4052cbd388e79d9dc4ddb29784097aa354 |
|
356 | -# Node ID 8374dc4052cbd388e79d9dc4ddb29784097aa354 | |
357 | -# Parent 1477875038c60152e391238920a16381c627b487 |
|
357 | -# Parent 1477875038c60152e391238920a16381c627b487 | |
358 | -lfs |
|
358 | -lfs | |
359 | +# Node ID 9640b57e77b14c3a0144fb4478b6cc13e13ea0d1 |
|
359 | +# Node ID 9640b57e77b14c3a0144fb4478b6cc13e13ea0d1 | |
360 | +# Parent d3b84d50eacbd56638e11abce6b8616aaba54420 |
|
360 | +# Parent d3b84d50eacbd56638e11abce6b8616aaba54420 | |
361 | +add lfs pair |
|
361 | +add lfs pair | |
362 |
|
362 | |||
363 | -diff -r 1477875038c6 -r 8374dc4052cb lfs.bin |
|
363 | -diff -r 1477875038c6 -r 8374dc4052cb lfs.bin | |
364 | ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
364 | ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
365 | -+++ b/lfs.bin Thu Jan 01 00:00:00 1970 +0000 |
|
365 | -+++ b/lfs.bin Thu Jan 01 00:00:00 1970 +0000 | |
366 | -@@ -0,0 +1,1 @@ |
|
366 | -@@ -0,0 +1,1 @@ | |
367 | -+this is a big lfs file |
|
367 | -+this is a big lfs file | |
368 | cleaning up temp directory |
|
368 | cleaning up temp directory | |
369 | [1] |
|
369 | [1] | |
370 |
|
370 | |||
371 | Diff will prefetch files |
|
371 | Diff will prefetch files | |
372 |
|
372 | |||
373 | $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs |
|
373 | $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs | |
374 | $ hg -R $TESTTMP/bulkfetch -v diff -r 2:tip |
|
374 | $ hg -R $TESTTMP/bulkfetch -v diff -r 2:tip | |
375 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs |
|
375 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
376 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs |
|
376 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
377 | lfs: need to transfer 4 objects (92 bytes) |
|
377 | lfs: need to transfer 4 objects (92 bytes) | |
378 | lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes) |
|
378 | lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes) | |
379 | lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de |
|
379 | lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de | |
380 | lfs: downloading bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc (23 bytes) |
|
380 | lfs: downloading bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc (23 bytes) | |
381 | lfs: processed: bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc |
|
381 | lfs: processed: bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc | |
382 | lfs: downloading cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 (20 bytes) |
|
382 | lfs: downloading cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 (20 bytes) | |
383 | lfs: processed: cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 |
|
383 | lfs: processed: cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 | |
384 | lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes) |
|
384 | lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes) | |
385 | lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e |
|
385 | lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e | |
386 | lfs: downloaded 4 files (92 bytes) |
|
386 | lfs: downloaded 4 files (92 bytes) | |
387 | lfs: found bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc in the local lfs store |
|
387 | lfs: found bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc in the local lfs store | |
388 | lfs: found a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de in the local lfs store |
|
388 | lfs: found a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de in the local lfs store | |
389 | lfs: found cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 in the local lfs store |
|
389 | lfs: found cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 in the local lfs store | |
390 | lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store |
|
390 | lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store | |
391 | diff -r 8374dc4052cb -r 9640b57e77b1 lfs.bin |
|
391 | diff -r 8374dc4052cb -r 9640b57e77b1 lfs.bin | |
392 | --- a/lfs.bin Thu Jan 01 00:00:00 1970 +0000 |
|
392 | --- a/lfs.bin Thu Jan 01 00:00:00 1970 +0000 | |
393 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
393 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
394 | @@ -1,1 +0,0 @@ |
|
394 | @@ -1,1 +0,0 @@ | |
395 | -this is a big lfs file |
|
395 | -this is a big lfs file | |
396 | diff -r 8374dc4052cb -r 9640b57e77b1 lfs2.txt |
|
396 | diff -r 8374dc4052cb -r 9640b57e77b1 lfs2.txt | |
397 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
397 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
398 | +++ b/lfs2.txt Thu Jan 01 00:00:00 1970 +0000 |
|
398 | +++ b/lfs2.txt Thu Jan 01 00:00:00 1970 +0000 | |
399 | @@ -0,0 +1,1 @@ |
|
399 | @@ -0,0 +1,1 @@ | |
400 | +this is another lfs file |
|
400 | +this is another lfs file | |
401 | diff -r 8374dc4052cb -r 9640b57e77b1 lfspair1.bin |
|
401 | diff -r 8374dc4052cb -r 9640b57e77b1 lfspair1.bin | |
402 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
402 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
403 | +++ b/lfspair1.bin Thu Jan 01 00:00:00 1970 +0000 |
|
403 | +++ b/lfspair1.bin Thu Jan 01 00:00:00 1970 +0000 | |
404 | @@ -0,0 +1,1 @@ |
|
404 | @@ -0,0 +1,1 @@ | |
405 | +this is an lfs file |
|
405 | +this is an lfs file | |
406 | diff -r 8374dc4052cb -r 9640b57e77b1 lfspair2.bin |
|
406 | diff -r 8374dc4052cb -r 9640b57e77b1 lfspair2.bin | |
407 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
407 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
408 | +++ b/lfspair2.bin Thu Jan 01 00:00:00 1970 +0000 |
|
408 | +++ b/lfspair2.bin Thu Jan 01 00:00:00 1970 +0000 | |
409 | @@ -0,0 +1,1 @@ |
|
409 | @@ -0,0 +1,1 @@ | |
410 | +this is an lfs file too |
|
410 | +this is an lfs file too | |
411 | diff -r 8374dc4052cb -r 9640b57e77b1 nonlfs.txt |
|
411 | diff -r 8374dc4052cb -r 9640b57e77b1 nonlfs.txt | |
412 | --- a/nonlfs.txt Thu Jan 01 00:00:00 1970 +0000 |
|
412 | --- a/nonlfs.txt Thu Jan 01 00:00:00 1970 +0000 | |
413 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
413 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
414 | @@ -1,1 +0,0 @@ |
|
414 | @@ -1,1 +0,0 @@ | |
415 | -non-lfs |
|
415 | -non-lfs | |
416 | diff -r 8374dc4052cb -r 9640b57e77b1 nonlfs3.txt |
|
416 | diff -r 8374dc4052cb -r 9640b57e77b1 nonlfs3.txt | |
417 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
417 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
418 | +++ b/nonlfs3.txt Thu Jan 01 00:00:00 1970 +0000 |
|
418 | +++ b/nonlfs3.txt Thu Jan 01 00:00:00 1970 +0000 | |
419 | @@ -0,0 +1,1 @@ |
|
419 | @@ -0,0 +1,1 @@ | |
420 | +non-lfs |
|
420 | +non-lfs | |
421 |
|
421 | |||
422 | Only the files required by diff are prefetched |
|
422 | Only the files required by diff are prefetched | |
423 |
|
423 | |||
424 | $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs |
|
424 | $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs | |
425 | $ hg -R $TESTTMP/bulkfetch -v diff -r 2:tip $TESTTMP/bulkfetch/lfspair2.bin |
|
425 | $ hg -R $TESTTMP/bulkfetch -v diff -r 2:tip $TESTTMP/bulkfetch/lfspair2.bin | |
426 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs |
|
426 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
427 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs |
|
427 | lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs | |
428 | lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes) |
|
428 | lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes) | |
429 | lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e |
|
429 | lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e | |
430 | lfs: downloaded 1 files (24 bytes) |
|
430 | lfs: downloaded 1 files (24 bytes) | |
431 | lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store |
|
431 | lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store | |
432 | diff -r 8374dc4052cb -r 9640b57e77b1 lfspair2.bin |
|
432 | diff -r 8374dc4052cb -r 9640b57e77b1 lfspair2.bin | |
433 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
433 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
434 | +++ b/lfspair2.bin Thu Jan 01 00:00:00 1970 +0000 |
|
434 | +++ b/lfspair2.bin Thu Jan 01 00:00:00 1970 +0000 | |
435 | @@ -0,0 +1,1 @@ |
|
435 | @@ -0,0 +1,1 @@ | |
436 | +this is an lfs file too |
|
436 | +this is an lfs file too | |
437 |
|
437 | |||
438 | #endif |
|
438 | #endif | |
439 |
|
439 | |||
440 | $ $PYTHON $TESTDIR/killdaemons.py $DAEMON_PIDS |
|
440 | $ $PYTHON $TESTDIR/killdaemons.py $DAEMON_PIDS | |
441 |
|
441 | |||
442 | #if lfsremote-on |
|
442 | #if lfsremote-on | |
443 | $ cat $TESTTMP/errors.log | grep '^[A-Z]' |
|
443 | $ cat $TESTTMP/errors.log | grep '^[A-Z]' | |
444 | Traceback (most recent call last): |
|
444 | Traceback (most recent call last): | |
445 | ValueError: no common changegroup version |
|
445 | ValueError: no common changegroup version | |
446 | Traceback (most recent call last): |
|
446 | Traceback (most recent call last): | |
447 | ValueError: no common changegroup version |
|
447 | ValueError: no common changegroup version | |
448 | #else |
|
448 | #else | |
449 | $ cat $TESTTMP/errors.log |
|
449 | $ cat $TESTTMP/errors.log | |
450 | #endif |
|
450 | #endif |
@@ -1,941 +1,941 b'' | |||||
1 | #require no-reposimplestore |
|
1 | #require no-reposimplestore no-chg | |
2 | #testcases git-server hg-server |
|
2 | #testcases git-server hg-server | |
3 |
|
3 | |||
4 | #if git-server |
|
4 | #if git-server | |
5 | #require lfs-test-server |
|
5 | #require lfs-test-server | |
6 | #else |
|
6 | #else | |
7 | #require serve |
|
7 | #require serve | |
8 | #endif |
|
8 | #endif | |
9 |
|
9 | |||
10 | #if git-server |
|
10 | #if git-server | |
11 | $ LFS_LISTEN="tcp://:$HGPORT" |
|
11 | $ LFS_LISTEN="tcp://:$HGPORT" | |
12 | $ LFS_HOST="localhost:$HGPORT" |
|
12 | $ LFS_HOST="localhost:$HGPORT" | |
13 | $ LFS_PUBLIC=1 |
|
13 | $ LFS_PUBLIC=1 | |
14 | $ export LFS_LISTEN LFS_HOST LFS_PUBLIC |
|
14 | $ export LFS_LISTEN LFS_HOST LFS_PUBLIC | |
15 | #else |
|
15 | #else | |
16 | $ LFS_HOST="localhost:$HGPORT/.git/info/lfs" |
|
16 | $ LFS_HOST="localhost:$HGPORT/.git/info/lfs" | |
17 | #endif |
|
17 | #endif | |
18 |
|
18 | |||
19 | #if no-windows git-server |
|
19 | #if no-windows git-server | |
20 | $ lfs-test-server &> lfs-server.log & |
|
20 | $ lfs-test-server &> lfs-server.log & | |
21 | $ echo $! >> $DAEMON_PIDS |
|
21 | $ echo $! >> $DAEMON_PIDS | |
22 | #endif |
|
22 | #endif | |
23 |
|
23 | |||
24 | #if windows git-server |
|
24 | #if windows git-server | |
25 | $ cat >> $TESTTMP/spawn.py <<EOF |
|
25 | $ cat >> $TESTTMP/spawn.py <<EOF | |
26 | > import os |
|
26 | > import os | |
27 | > import subprocess |
|
27 | > import subprocess | |
28 | > import sys |
|
28 | > import sys | |
29 | > |
|
29 | > | |
30 | > for path in os.environ["PATH"].split(os.pathsep): |
|
30 | > for path in os.environ["PATH"].split(os.pathsep): | |
31 | > exe = os.path.join(path, 'lfs-test-server.exe') |
|
31 | > exe = os.path.join(path, 'lfs-test-server.exe') | |
32 | > if os.path.exists(exe): |
|
32 | > if os.path.exists(exe): | |
33 | > with open('lfs-server.log', 'wb') as out: |
|
33 | > with open('lfs-server.log', 'wb') as out: | |
34 | > p = subprocess.Popen(exe, stdout=out, stderr=out) |
|
34 | > p = subprocess.Popen(exe, stdout=out, stderr=out) | |
35 | > sys.stdout.write('%s\n' % p.pid) |
|
35 | > sys.stdout.write('%s\n' % p.pid) | |
36 | > sys.exit(0) |
|
36 | > sys.exit(0) | |
37 | > sys.exit(1) |
|
37 | > sys.exit(1) | |
38 | > EOF |
|
38 | > EOF | |
39 | $ $PYTHON $TESTTMP/spawn.py >> $DAEMON_PIDS |
|
39 | $ $PYTHON $TESTTMP/spawn.py >> $DAEMON_PIDS | |
40 | #endif |
|
40 | #endif | |
41 |
|
41 | |||
42 | $ cat >> $HGRCPATH <<EOF |
|
42 | $ cat >> $HGRCPATH <<EOF | |
43 | > [extensions] |
|
43 | > [extensions] | |
44 | > lfs= |
|
44 | > lfs= | |
45 | > [lfs] |
|
45 | > [lfs] | |
46 | > url=http://foo:bar@$LFS_HOST |
|
46 | > url=http://foo:bar@$LFS_HOST | |
47 | > track=all() |
|
47 | > track=all() | |
48 | > [web] |
|
48 | > [web] | |
49 | > push_ssl = False |
|
49 | > push_ssl = False | |
50 | > allow-push = * |
|
50 | > allow-push = * | |
51 | > EOF |
|
51 | > EOF | |
52 |
|
52 | |||
53 | Use a separate usercache, otherwise the server sees what the client commits, and |
|
53 | Use a separate usercache, otherwise the server sees what the client commits, and | |
54 | never requests a transfer. |
|
54 | never requests a transfer. | |
55 |
|
55 | |||
56 | #if hg-server |
|
56 | #if hg-server | |
57 | $ hg init server |
|
57 | $ hg init server | |
58 | $ hg --config "lfs.usercache=$TESTTMP/servercache" -R server serve -d \ |
|
58 | $ hg --config "lfs.usercache=$TESTTMP/servercache" -R server serve -d \ | |
59 | > -p $HGPORT --pid-file=hg.pid -A $TESTTMP/access.log -E $TESTTMP/errors.log |
|
59 | > -p $HGPORT --pid-file=hg.pid -A $TESTTMP/access.log -E $TESTTMP/errors.log | |
60 | $ cat hg.pid >> $DAEMON_PIDS |
|
60 | $ cat hg.pid >> $DAEMON_PIDS | |
61 | #endif |
|
61 | #endif | |
62 |
|
62 | |||
63 | $ hg init repo1 |
|
63 | $ hg init repo1 | |
64 | $ cd repo1 |
|
64 | $ cd repo1 | |
65 | $ echo THIS-IS-LFS > a |
|
65 | $ echo THIS-IS-LFS > a | |
66 | $ hg commit -m a -A a |
|
66 | $ hg commit -m a -A a | |
67 |
|
67 | |||
68 | A push can be serviced directly from the usercache if it isn't in the local |
|
68 | A push can be serviced directly from the usercache if it isn't in the local | |
69 | store. |
|
69 | store. | |
70 |
|
70 | |||
71 | $ hg init ../repo2 |
|
71 | $ hg init ../repo2 | |
72 | $ mv .hg/store/lfs .hg/store/lfs_ |
|
72 | $ mv .hg/store/lfs .hg/store/lfs_ | |
73 | $ hg push ../repo2 --debug |
|
73 | $ hg push ../repo2 --debug | |
74 | http auth: user foo, password *** |
|
74 | http auth: user foo, password *** | |
75 | pushing to ../repo2 |
|
75 | pushing to ../repo2 | |
76 | http auth: user foo, password *** |
|
76 | http auth: user foo, password *** | |
77 | http auth: user foo, password *** |
|
77 | http auth: user foo, password *** | |
78 | query 1; heads |
|
78 | query 1; heads | |
79 | searching for changes |
|
79 | searching for changes | |
80 | 1 total queries in *s (glob) |
|
80 | 1 total queries in *s (glob) | |
81 | listing keys for "phases" |
|
81 | listing keys for "phases" | |
82 | checking for updated bookmarks |
|
82 | checking for updated bookmarks | |
83 | listing keys for "bookmarks" |
|
83 | listing keys for "bookmarks" | |
84 | lfs: computing set of blobs to upload |
|
84 | lfs: computing set of blobs to upload | |
85 | Status: 200 |
|
85 | Status: 200 | |
86 | Content-Length: 309 (git-server !) |
|
86 | Content-Length: 309 (git-server !) | |
87 | Content-Length: 350 (hg-server !) |
|
87 | Content-Length: 350 (hg-server !) | |
88 | Content-Type: application/vnd.git-lfs+json |
|
88 | Content-Type: application/vnd.git-lfs+json | |
89 | Date: $HTTP_DATE$ |
|
89 | Date: $HTTP_DATE$ | |
90 | Server: testing stub value (hg-server !) |
|
90 | Server: testing stub value (hg-server !) | |
91 | { |
|
91 | { | |
92 | "objects": [ |
|
92 | "objects": [ | |
93 | { |
|
93 | { | |
94 | "actions": { |
|
94 | "actions": { | |
95 | "upload": { |
|
95 | "upload": { | |
96 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
96 | "expires_at": "$ISO_8601_DATE_TIME$" | |
97 | "header": { |
|
97 | "header": { | |
98 | "Accept": "application/vnd.git-lfs" |
|
98 | "Accept": "application/vnd.git-lfs" | |
99 | } |
|
99 | } | |
100 | "href": "http://localhost:$HGPORT/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (git-server !) |
|
100 | "href": "http://localhost:$HGPORT/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (git-server !) | |
101 | "href": "http://localhost:$HGPORT/.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (hg-server !) |
|
101 | "href": "http://localhost:$HGPORT/.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (hg-server !) | |
102 | } |
|
102 | } | |
103 | } |
|
103 | } | |
104 | "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" |
|
104 | "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" | |
105 | "size": 12 |
|
105 | "size": 12 | |
106 | } |
|
106 | } | |
107 | ] |
|
107 | ] | |
108 | "transfer": "basic" (hg-server !) |
|
108 | "transfer": "basic" (hg-server !) | |
109 | } |
|
109 | } | |
110 | lfs: uploading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) |
|
110 | lfs: uploading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) | |
111 | Status: 200 (git-server !) |
|
111 | Status: 200 (git-server !) | |
112 | Status: 201 (hg-server !) |
|
112 | Status: 201 (hg-server !) | |
113 | Content-Length: 0 |
|
113 | Content-Length: 0 | |
114 | Content-Type: text/plain; charset=utf-8 |
|
114 | Content-Type: text/plain; charset=utf-8 | |
115 | Date: $HTTP_DATE$ |
|
115 | Date: $HTTP_DATE$ | |
116 | Server: testing stub value (hg-server !) |
|
116 | Server: testing stub value (hg-server !) | |
117 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b |
|
117 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b | |
118 | lfs: uploaded 1 files (12 bytes) |
|
118 | lfs: uploaded 1 files (12 bytes) | |
119 | 1 changesets found |
|
119 | 1 changesets found | |
120 | list of changesets: |
|
120 | list of changesets: | |
121 | 99a7098854a3984a5c9eab0fc7a2906697b7cb5c |
|
121 | 99a7098854a3984a5c9eab0fc7a2906697b7cb5c | |
122 | bundle2-output-bundle: "HG20", 4 parts total |
|
122 | bundle2-output-bundle: "HG20", 4 parts total | |
123 | bundle2-output-part: "replycaps" * bytes payload (glob) |
|
123 | bundle2-output-part: "replycaps" * bytes payload (glob) | |
124 | bundle2-output-part: "check:heads" streamed payload |
|
124 | bundle2-output-part: "check:heads" streamed payload | |
125 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
125 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
126 | bundle2-output-part: "phase-heads" 24 bytes payload |
|
126 | bundle2-output-part: "phase-heads" 24 bytes payload | |
127 | bundle2-input-bundle: with-transaction |
|
127 | bundle2-input-bundle: with-transaction | |
128 | bundle2-input-part: "replycaps" supported |
|
128 | bundle2-input-part: "replycaps" supported | |
129 | bundle2-input-part: total payload size * (glob) |
|
129 | bundle2-input-part: total payload size * (glob) | |
130 | bundle2-input-part: "check:heads" supported |
|
130 | bundle2-input-part: "check:heads" supported | |
131 | bundle2-input-part: total payload size 20 |
|
131 | bundle2-input-part: total payload size 20 | |
132 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
132 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
133 | adding changesets |
|
133 | adding changesets | |
134 | add changeset 99a7098854a3 |
|
134 | add changeset 99a7098854a3 | |
135 | adding manifests |
|
135 | adding manifests | |
136 | adding file changes |
|
136 | adding file changes | |
137 | adding a revisions |
|
137 | adding a revisions | |
138 | added 1 changesets with 1 changes to 1 files |
|
138 | added 1 changesets with 1 changes to 1 files | |
139 | calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs |
|
139 | calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs | |
140 | bundle2-input-part: total payload size 617 |
|
140 | bundle2-input-part: total payload size 617 | |
141 | bundle2-input-part: "phase-heads" supported |
|
141 | bundle2-input-part: "phase-heads" supported | |
142 | bundle2-input-part: total payload size 24 |
|
142 | bundle2-input-part: total payload size 24 | |
143 | bundle2-input-bundle: 3 parts total |
|
143 | bundle2-input-bundle: 3 parts total | |
144 | updating the branch cache |
|
144 | updating the branch cache | |
145 | bundle2-output-bundle: "HG20", 1 parts total |
|
145 | bundle2-output-bundle: "HG20", 1 parts total | |
146 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
146 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload | |
147 | bundle2-input-bundle: no-transaction |
|
147 | bundle2-input-bundle: no-transaction | |
148 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
148 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | |
149 | bundle2-input-bundle: 0 parts total |
|
149 | bundle2-input-bundle: 0 parts total | |
150 | listing keys for "phases" |
|
150 | listing keys for "phases" | |
151 | $ mv .hg/store/lfs_ .hg/store/lfs |
|
151 | $ mv .hg/store/lfs_ .hg/store/lfs | |
152 |
|
152 | |||
153 | Clear the cache to force a download |
|
153 | Clear the cache to force a download | |
154 | $ rm -rf `hg config lfs.usercache` |
|
154 | $ rm -rf `hg config lfs.usercache` | |
155 | $ cd ../repo2 |
|
155 | $ cd ../repo2 | |
156 | $ hg update tip --debug |
|
156 | $ hg update tip --debug | |
157 | http auth: user foo, password *** |
|
157 | http auth: user foo, password *** | |
158 | resolving manifests |
|
158 | resolving manifests | |
159 | branchmerge: False, force: False, partial: False |
|
159 | branchmerge: False, force: False, partial: False | |
160 | ancestor: 000000000000, local: 000000000000+, remote: 99a7098854a3 |
|
160 | ancestor: 000000000000, local: 000000000000+, remote: 99a7098854a3 | |
161 | http auth: user foo, password *** |
|
161 | http auth: user foo, password *** | |
162 | Status: 200 |
|
162 | Status: 200 | |
163 | Content-Length: 311 (git-server !) |
|
163 | Content-Length: 311 (git-server !) | |
164 | Content-Length: 352 (hg-server !) |
|
164 | Content-Length: 352 (hg-server !) | |
165 | Content-Type: application/vnd.git-lfs+json |
|
165 | Content-Type: application/vnd.git-lfs+json | |
166 | Date: $HTTP_DATE$ |
|
166 | Date: $HTTP_DATE$ | |
167 | Server: testing stub value (hg-server !) |
|
167 | Server: testing stub value (hg-server !) | |
168 | { |
|
168 | { | |
169 | "objects": [ |
|
169 | "objects": [ | |
170 | { |
|
170 | { | |
171 | "actions": { |
|
171 | "actions": { | |
172 | "download": { |
|
172 | "download": { | |
173 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
173 | "expires_at": "$ISO_8601_DATE_TIME$" | |
174 | "header": { |
|
174 | "header": { | |
175 | "Accept": "application/vnd.git-lfs" |
|
175 | "Accept": "application/vnd.git-lfs" | |
176 | } |
|
176 | } | |
177 | "href": "http://localhost:$HGPORT/*/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (glob) |
|
177 | "href": "http://localhost:$HGPORT/*/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (glob) | |
178 | } |
|
178 | } | |
179 | } |
|
179 | } | |
180 | "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" |
|
180 | "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" | |
181 | "size": 12 |
|
181 | "size": 12 | |
182 | } |
|
182 | } | |
183 | ] |
|
183 | ] | |
184 | "transfer": "basic" (hg-server !) |
|
184 | "transfer": "basic" (hg-server !) | |
185 | } |
|
185 | } | |
186 | lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) |
|
186 | lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) | |
187 | Status: 200 |
|
187 | Status: 200 | |
188 | Content-Length: 12 |
|
188 | Content-Length: 12 | |
189 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
189 | Content-Type: text/plain; charset=utf-8 (git-server !) | |
190 | Content-Type: application/octet-stream (hg-server !) |
|
190 | Content-Type: application/octet-stream (hg-server !) | |
191 | Date: $HTTP_DATE$ |
|
191 | Date: $HTTP_DATE$ | |
192 | Server: testing stub value (hg-server !) |
|
192 | Server: testing stub value (hg-server !) | |
193 | lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache |
|
193 | lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache | |
194 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b |
|
194 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b | |
195 | lfs: downloaded 1 files (12 bytes) |
|
195 | lfs: downloaded 1 files (12 bytes) | |
196 | a: remote created -> g |
|
196 | a: remote created -> g | |
197 | getting a |
|
197 | getting a | |
198 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
198 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store | |
199 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
199 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
200 |
|
200 | |||
201 | When the server has some blobs already. `hg serve` doesn't offer to upload |
|
201 | When the server has some blobs already. `hg serve` doesn't offer to upload | |
202 | blobs that it already knows about. Note that lfs-test-server is simply |
|
202 | blobs that it already knows about. Note that lfs-test-server is simply | |
203 | toggling the action to 'download'. The Batch API spec says it should omit the |
|
203 | toggling the action to 'download'. The Batch API spec says it should omit the | |
204 | actions property completely. |
|
204 | actions property completely. | |
205 |
|
205 | |||
206 | $ hg mv a b |
|
206 | $ hg mv a b | |
207 | $ echo ANOTHER-LARGE-FILE > c |
|
207 | $ echo ANOTHER-LARGE-FILE > c | |
208 | $ echo ANOTHER-LARGE-FILE2 > d |
|
208 | $ echo ANOTHER-LARGE-FILE2 > d | |
209 | $ hg commit -m b-and-c -A b c d |
|
209 | $ hg commit -m b-and-c -A b c d | |
210 | $ hg push ../repo1 --debug |
|
210 | $ hg push ../repo1 --debug | |
211 | http auth: user foo, password *** |
|
211 | http auth: user foo, password *** | |
212 | pushing to ../repo1 |
|
212 | pushing to ../repo1 | |
213 | http auth: user foo, password *** |
|
213 | http auth: user foo, password *** | |
214 | http auth: user foo, password *** |
|
214 | http auth: user foo, password *** | |
215 | query 1; heads |
|
215 | query 1; heads | |
216 | searching for changes |
|
216 | searching for changes | |
217 | all remote heads known locally |
|
217 | all remote heads known locally | |
218 | listing keys for "phases" |
|
218 | listing keys for "phases" | |
219 | checking for updated bookmarks |
|
219 | checking for updated bookmarks | |
220 | listing keys for "bookmarks" |
|
220 | listing keys for "bookmarks" | |
221 | listing keys for "bookmarks" |
|
221 | listing keys for "bookmarks" | |
222 | lfs: computing set of blobs to upload |
|
222 | lfs: computing set of blobs to upload | |
223 | Status: 200 |
|
223 | Status: 200 | |
224 | Content-Length: 901 (git-server !) |
|
224 | Content-Length: 901 (git-server !) | |
225 | Content-Length: 755 (hg-server !) |
|
225 | Content-Length: 755 (hg-server !) | |
226 | Content-Type: application/vnd.git-lfs+json |
|
226 | Content-Type: application/vnd.git-lfs+json | |
227 | Date: $HTTP_DATE$ |
|
227 | Date: $HTTP_DATE$ | |
228 | Server: testing stub value (hg-server !) |
|
228 | Server: testing stub value (hg-server !) | |
229 | { |
|
229 | { | |
230 | "objects": [ |
|
230 | "objects": [ | |
231 | { |
|
231 | { | |
232 | "actions": { (git-server !) |
|
232 | "actions": { (git-server !) | |
233 | "download": { (git-server !) |
|
233 | "download": { (git-server !) | |
234 | "expires_at": "$ISO_8601_DATE_TIME$" (git-server !) |
|
234 | "expires_at": "$ISO_8601_DATE_TIME$" (git-server !) | |
235 | "header": { (git-server !) |
|
235 | "header": { (git-server !) | |
236 | "Accept": "application/vnd.git-lfs" (git-server !) |
|
236 | "Accept": "application/vnd.git-lfs" (git-server !) | |
237 | } (git-server !) |
|
237 | } (git-server !) | |
238 | "href": "http://localhost:$HGPORT/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (git-server !) |
|
238 | "href": "http://localhost:$HGPORT/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (git-server !) | |
239 | } (git-server !) |
|
239 | } (git-server !) | |
240 | } (git-server !) |
|
240 | } (git-server !) | |
241 | "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" |
|
241 | "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" | |
242 | "size": 12 |
|
242 | "size": 12 | |
243 | } |
|
243 | } | |
244 | { |
|
244 | { | |
245 | "actions": { |
|
245 | "actions": { | |
246 | "upload": { |
|
246 | "upload": { | |
247 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
247 | "expires_at": "$ISO_8601_DATE_TIME$" | |
248 | "header": { |
|
248 | "header": { | |
249 | "Accept": "application/vnd.git-lfs" |
|
249 | "Accept": "application/vnd.git-lfs" | |
250 | } |
|
250 | } | |
251 | "href": "http://localhost:$HGPORT/*/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" (glob) |
|
251 | "href": "http://localhost:$HGPORT/*/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" (glob) | |
252 | } |
|
252 | } | |
253 | } |
|
253 | } | |
254 | "oid": "37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" |
|
254 | "oid": "37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" | |
255 | "size": 20 |
|
255 | "size": 20 | |
256 | } |
|
256 | } | |
257 | { |
|
257 | { | |
258 | "actions": { |
|
258 | "actions": { | |
259 | "upload": { |
|
259 | "upload": { | |
260 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
260 | "expires_at": "$ISO_8601_DATE_TIME$" | |
261 | "header": { |
|
261 | "header": { | |
262 | "Accept": "application/vnd.git-lfs" |
|
262 | "Accept": "application/vnd.git-lfs" | |
263 | } |
|
263 | } | |
264 | "href": "http://localhost:$HGPORT/*/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (glob) |
|
264 | "href": "http://localhost:$HGPORT/*/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (glob) | |
265 | } |
|
265 | } | |
266 | } |
|
266 | } | |
267 | "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" |
|
267 | "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" | |
268 | "size": 19 |
|
268 | "size": 19 | |
269 | } |
|
269 | } | |
270 | ] |
|
270 | ] | |
271 | "transfer": "basic" (hg-server !) |
|
271 | "transfer": "basic" (hg-server !) | |
272 | } |
|
272 | } | |
273 | lfs: need to transfer 2 objects (39 bytes) |
|
273 | lfs: need to transfer 2 objects (39 bytes) | |
274 | lfs: uploading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes) |
|
274 | lfs: uploading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes) | |
275 | Status: 200 (git-server !) |
|
275 | Status: 200 (git-server !) | |
276 | Status: 201 (hg-server !) |
|
276 | Status: 201 (hg-server !) | |
277 | Content-Length: 0 |
|
277 | Content-Length: 0 | |
278 | Content-Type: text/plain; charset=utf-8 |
|
278 | Content-Type: text/plain; charset=utf-8 | |
279 | Date: $HTTP_DATE$ |
|
279 | Date: $HTTP_DATE$ | |
280 | Server: testing stub value (hg-server !) |
|
280 | Server: testing stub value (hg-server !) | |
281 | lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 |
|
281 | lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 | |
282 | lfs: uploading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) |
|
282 | lfs: uploading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) | |
283 | Status: 200 (git-server !) |
|
283 | Status: 200 (git-server !) | |
284 | Status: 201 (hg-server !) |
|
284 | Status: 201 (hg-server !) | |
285 | Content-Length: 0 |
|
285 | Content-Length: 0 | |
286 | Content-Type: text/plain; charset=utf-8 |
|
286 | Content-Type: text/plain; charset=utf-8 | |
287 | Date: $HTTP_DATE$ |
|
287 | Date: $HTTP_DATE$ | |
288 | Server: testing stub value (hg-server !) |
|
288 | Server: testing stub value (hg-server !) | |
289 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
289 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
290 | lfs: uploaded 2 files (39 bytes) |
|
290 | lfs: uploaded 2 files (39 bytes) | |
291 | 1 changesets found |
|
291 | 1 changesets found | |
292 | list of changesets: |
|
292 | list of changesets: | |
293 | dfca2c9e2ef24996aa61ba2abd99277d884b3d63 |
|
293 | dfca2c9e2ef24996aa61ba2abd99277d884b3d63 | |
294 | bundle2-output-bundle: "HG20", 5 parts total |
|
294 | bundle2-output-bundle: "HG20", 5 parts total | |
295 | bundle2-output-part: "replycaps" * bytes payload (glob) |
|
295 | bundle2-output-part: "replycaps" * bytes payload (glob) | |
296 | bundle2-output-part: "check:phases" 24 bytes payload |
|
296 | bundle2-output-part: "check:phases" 24 bytes payload | |
297 | bundle2-output-part: "check:heads" streamed payload |
|
297 | bundle2-output-part: "check:heads" streamed payload | |
298 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
298 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
299 | bundle2-output-part: "phase-heads" 24 bytes payload |
|
299 | bundle2-output-part: "phase-heads" 24 bytes payload | |
300 | bundle2-input-bundle: with-transaction |
|
300 | bundle2-input-bundle: with-transaction | |
301 | bundle2-input-part: "replycaps" supported |
|
301 | bundle2-input-part: "replycaps" supported | |
302 | bundle2-input-part: total payload size * (glob) |
|
302 | bundle2-input-part: total payload size * (glob) | |
303 | bundle2-input-part: "check:phases" supported |
|
303 | bundle2-input-part: "check:phases" supported | |
304 | bundle2-input-part: total payload size 24 |
|
304 | bundle2-input-part: total payload size 24 | |
305 | bundle2-input-part: "check:heads" supported |
|
305 | bundle2-input-part: "check:heads" supported | |
306 | bundle2-input-part: total payload size 20 |
|
306 | bundle2-input-part: total payload size 20 | |
307 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
307 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
308 | adding changesets |
|
308 | adding changesets | |
309 | add changeset dfca2c9e2ef2 |
|
309 | add changeset dfca2c9e2ef2 | |
310 | adding manifests |
|
310 | adding manifests | |
311 | adding file changes |
|
311 | adding file changes | |
312 | adding b revisions |
|
312 | adding b revisions | |
313 | adding c revisions |
|
313 | adding c revisions | |
314 | adding d revisions |
|
314 | adding d revisions | |
315 | added 1 changesets with 3 changes to 3 files |
|
315 | added 1 changesets with 3 changes to 3 files | |
316 | bundle2-input-part: total payload size 1315 |
|
316 | bundle2-input-part: total payload size 1315 | |
317 | bundle2-input-part: "phase-heads" supported |
|
317 | bundle2-input-part: "phase-heads" supported | |
318 | bundle2-input-part: total payload size 24 |
|
318 | bundle2-input-part: total payload size 24 | |
319 | bundle2-input-bundle: 4 parts total |
|
319 | bundle2-input-bundle: 4 parts total | |
320 | updating the branch cache |
|
320 | updating the branch cache | |
321 | bundle2-output-bundle: "HG20", 1 parts total |
|
321 | bundle2-output-bundle: "HG20", 1 parts total | |
322 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
322 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload | |
323 | bundle2-input-bundle: no-transaction |
|
323 | bundle2-input-bundle: no-transaction | |
324 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
324 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | |
325 | bundle2-input-bundle: 0 parts total |
|
325 | bundle2-input-bundle: 0 parts total | |
326 | listing keys for "phases" |
|
326 | listing keys for "phases" | |
327 |
|
327 | |||
328 | Clear the cache to force a download |
|
328 | Clear the cache to force a download | |
329 | $ rm -rf `hg config lfs.usercache` |
|
329 | $ rm -rf `hg config lfs.usercache` | |
330 | $ hg --repo ../repo1 update tip --debug |
|
330 | $ hg --repo ../repo1 update tip --debug | |
331 | http auth: user foo, password *** |
|
331 | http auth: user foo, password *** | |
332 | resolving manifests |
|
332 | resolving manifests | |
333 | branchmerge: False, force: False, partial: False |
|
333 | branchmerge: False, force: False, partial: False | |
334 | ancestor: 99a7098854a3, local: 99a7098854a3+, remote: dfca2c9e2ef2 |
|
334 | ancestor: 99a7098854a3, local: 99a7098854a3+, remote: dfca2c9e2ef2 | |
335 | http auth: user foo, password *** |
|
335 | http auth: user foo, password *** | |
336 | Status: 200 |
|
336 | Status: 200 | |
337 | Content-Length: 608 (git-server !) |
|
337 | Content-Length: 608 (git-server !) | |
338 | Content-Length: 670 (hg-server !) |
|
338 | Content-Length: 670 (hg-server !) | |
339 | Content-Type: application/vnd.git-lfs+json |
|
339 | Content-Type: application/vnd.git-lfs+json | |
340 | Date: $HTTP_DATE$ |
|
340 | Date: $HTTP_DATE$ | |
341 | Server: testing stub value (hg-server !) |
|
341 | Server: testing stub value (hg-server !) | |
342 | { |
|
342 | { | |
343 | "objects": [ |
|
343 | "objects": [ | |
344 | { |
|
344 | { | |
345 | "actions": { |
|
345 | "actions": { | |
346 | "download": { |
|
346 | "download": { | |
347 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
347 | "expires_at": "$ISO_8601_DATE_TIME$" | |
348 | "header": { |
|
348 | "header": { | |
349 | "Accept": "application/vnd.git-lfs" |
|
349 | "Accept": "application/vnd.git-lfs" | |
350 | } |
|
350 | } | |
351 | "href": "http://localhost:$HGPORT/*/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" (glob) |
|
351 | "href": "http://localhost:$HGPORT/*/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" (glob) | |
352 | } |
|
352 | } | |
353 | } |
|
353 | } | |
354 | "oid": "37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" |
|
354 | "oid": "37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" | |
355 | "size": 20 |
|
355 | "size": 20 | |
356 | } |
|
356 | } | |
357 | { |
|
357 | { | |
358 | "actions": { |
|
358 | "actions": { | |
359 | "download": { |
|
359 | "download": { | |
360 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
360 | "expires_at": "$ISO_8601_DATE_TIME$" | |
361 | "header": { |
|
361 | "header": { | |
362 | "Accept": "application/vnd.git-lfs" |
|
362 | "Accept": "application/vnd.git-lfs" | |
363 | } |
|
363 | } | |
364 | "href": "http://localhost:$HGPORT/*/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (glob) |
|
364 | "href": "http://localhost:$HGPORT/*/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (glob) | |
365 | } |
|
365 | } | |
366 | } |
|
366 | } | |
367 | "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" |
|
367 | "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" | |
368 | "size": 19 |
|
368 | "size": 19 | |
369 | } |
|
369 | } | |
370 | ] |
|
370 | ] | |
371 | "transfer": "basic" (hg-server !) |
|
371 | "transfer": "basic" (hg-server !) | |
372 | } |
|
372 | } | |
373 | lfs: need to transfer 2 objects (39 bytes) |
|
373 | lfs: need to transfer 2 objects (39 bytes) | |
374 | lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes) |
|
374 | lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes) | |
375 | Status: 200 |
|
375 | Status: 200 | |
376 | Content-Length: 20 |
|
376 | Content-Length: 20 | |
377 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
377 | Content-Type: text/plain; charset=utf-8 (git-server !) | |
378 | Content-Type: application/octet-stream (hg-server !) |
|
378 | Content-Type: application/octet-stream (hg-server !) | |
379 | Date: $HTTP_DATE$ |
|
379 | Date: $HTTP_DATE$ | |
380 | Server: testing stub value (hg-server !) |
|
380 | Server: testing stub value (hg-server !) | |
381 | lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache |
|
381 | lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache | |
382 | lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 |
|
382 | lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 | |
383 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) |
|
383 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) | |
384 | Status: 200 |
|
384 | Status: 200 | |
385 | Content-Length: 19 |
|
385 | Content-Length: 19 | |
386 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
386 | Content-Type: text/plain; charset=utf-8 (git-server !) | |
387 | Content-Type: application/octet-stream (hg-server !) |
|
387 | Content-Type: application/octet-stream (hg-server !) | |
388 | Date: $HTTP_DATE$ |
|
388 | Date: $HTTP_DATE$ | |
389 | Server: testing stub value (hg-server !) |
|
389 | Server: testing stub value (hg-server !) | |
390 | lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache |
|
390 | lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache | |
391 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
391 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
392 | lfs: downloaded 2 files (39 bytes) |
|
392 | lfs: downloaded 2 files (39 bytes) | |
393 | b: remote created -> g |
|
393 | b: remote created -> g | |
394 | getting b |
|
394 | getting b | |
395 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
395 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store | |
396 | c: remote created -> g |
|
396 | c: remote created -> g | |
397 | getting c |
|
397 | getting c | |
398 | lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store |
|
398 | lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store | |
399 | d: remote created -> g |
|
399 | d: remote created -> g | |
400 | getting d |
|
400 | getting d | |
401 | lfs: found 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 in the local lfs store |
|
401 | lfs: found 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 in the local lfs store | |
402 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
402 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
403 |
|
403 | |||
404 | Test a corrupt file download, but clear the cache first to force a download. |
|
404 | Test a corrupt file download, but clear the cache first to force a download. | |
405 | `hg serve` indicates a corrupt file without transferring it, unlike |
|
405 | `hg serve` indicates a corrupt file without transferring it, unlike | |
406 | lfs-test-server. |
|
406 | lfs-test-server. | |
407 |
|
407 | |||
408 | $ rm -rf `hg config lfs.usercache` |
|
408 | $ rm -rf `hg config lfs.usercache` | |
409 | #if git-server |
|
409 | #if git-server | |
410 | $ cp $TESTTMP/lfs-content/d1/1e/1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 blob |
|
410 | $ cp $TESTTMP/lfs-content/d1/1e/1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 blob | |
411 | $ echo 'damage' > $TESTTMP/lfs-content/d1/1e/1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
411 | $ echo 'damage' > $TESTTMP/lfs-content/d1/1e/1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
412 | #else |
|
412 | #else | |
413 | $ cp $TESTTMP/server/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 blob |
|
413 | $ cp $TESTTMP/server/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 blob | |
414 | $ echo 'damage' > $TESTTMP/server/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
414 | $ echo 'damage' > $TESTTMP/server/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
415 | #endif |
|
415 | #endif | |
416 | $ rm ../repo1/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
416 | $ rm ../repo1/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
417 | $ rm ../repo1/* |
|
417 | $ rm ../repo1/* | |
418 |
|
418 | |||
419 | TODO: give the proper error indication from `hg serve` |
|
419 | TODO: give the proper error indication from `hg serve` | |
420 |
|
420 | |||
421 | $ hg --repo ../repo1 update -C tip --debug |
|
421 | $ hg --repo ../repo1 update -C tip --debug | |
422 | http auth: user foo, password *** |
|
422 | http auth: user foo, password *** | |
423 | resolving manifests |
|
423 | resolving manifests | |
424 | branchmerge: False, force: True, partial: False |
|
424 | branchmerge: False, force: True, partial: False | |
425 | ancestor: dfca2c9e2ef2+, local: dfca2c9e2ef2+, remote: dfca2c9e2ef2 |
|
425 | ancestor: dfca2c9e2ef2+, local: dfca2c9e2ef2+, remote: dfca2c9e2ef2 | |
426 | http auth: user foo, password *** |
|
426 | http auth: user foo, password *** | |
427 | Status: 200 |
|
427 | Status: 200 | |
428 | Content-Length: 311 (git-server !) |
|
428 | Content-Length: 311 (git-server !) | |
429 | Content-Length: 183 (hg-server !) |
|
429 | Content-Length: 183 (hg-server !) | |
430 | Content-Type: application/vnd.git-lfs+json |
|
430 | Content-Type: application/vnd.git-lfs+json | |
431 | Date: $HTTP_DATE$ |
|
431 | Date: $HTTP_DATE$ | |
432 | Server: testing stub value (hg-server !) |
|
432 | Server: testing stub value (hg-server !) | |
433 | { |
|
433 | { | |
434 | "objects": [ |
|
434 | "objects": [ | |
435 | { |
|
435 | { | |
436 | "actions": { (git-server !) |
|
436 | "actions": { (git-server !) | |
437 | "download": { (git-server !) |
|
437 | "download": { (git-server !) | |
438 | "expires_at": "$ISO_8601_DATE_TIME$" (git-server !) |
|
438 | "expires_at": "$ISO_8601_DATE_TIME$" (git-server !) | |
439 | "header": { (git-server !) |
|
439 | "header": { (git-server !) | |
440 | "Accept": "application/vnd.git-lfs" (git-server !) |
|
440 | "Accept": "application/vnd.git-lfs" (git-server !) | |
441 | } (git-server !) |
|
441 | } (git-server !) | |
442 | "href": "http://localhost:$HGPORT/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (git-server !) |
|
442 | "href": "http://localhost:$HGPORT/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (git-server !) | |
443 | } (git-server !) |
|
443 | } (git-server !) | |
444 | "error": { (hg-server !) |
|
444 | "error": { (hg-server !) | |
445 | "code": 422 (hg-server !) |
|
445 | "code": 422 (hg-server !) | |
446 | "message": "The object is corrupt" (hg-server !) |
|
446 | "message": "The object is corrupt" (hg-server !) | |
447 | } |
|
447 | } | |
448 | "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" |
|
448 | "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" | |
449 | "size": 19 |
|
449 | "size": 19 | |
450 | } |
|
450 | } | |
451 | ] |
|
451 | ] | |
452 | "transfer": "basic" (hg-server !) |
|
452 | "transfer": "basic" (hg-server !) | |
453 | } |
|
453 | } | |
454 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) (git-server !) |
|
454 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) (git-server !) | |
455 | Status: 200 (git-server !) |
|
455 | Status: 200 (git-server !) | |
456 | Content-Length: 7 (git-server !) |
|
456 | Content-Length: 7 (git-server !) | |
457 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
457 | Content-Type: text/plain; charset=utf-8 (git-server !) | |
458 | Date: $HTTP_DATE$ (git-server !) |
|
458 | Date: $HTTP_DATE$ (git-server !) | |
459 | abort: corrupt remote lfs object: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (git-server !) |
|
459 | abort: corrupt remote lfs object: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (git-server !) | |
460 | abort: LFS server error for "c": Validation error! (hg-server !) |
|
460 | abort: LFS server error for "c": Validation error! (hg-server !) | |
461 | [255] |
|
461 | [255] | |
462 |
|
462 | |||
463 | The corrupted blob is not added to the usercache or local store |
|
463 | The corrupted blob is not added to the usercache or local store | |
464 |
|
464 | |||
465 | $ test -f ../repo1/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
465 | $ test -f ../repo1/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
466 | [1] |
|
466 | [1] | |
467 | $ test -f `hg config lfs.usercache`/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
467 | $ test -f `hg config lfs.usercache`/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
468 | [1] |
|
468 | [1] | |
469 | #if git-server |
|
469 | #if git-server | |
470 | $ cp blob $TESTTMP/lfs-content/d1/1e/1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
470 | $ cp blob $TESTTMP/lfs-content/d1/1e/1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
471 | #else |
|
471 | #else | |
472 | $ cp blob $TESTTMP/server/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
472 | $ cp blob $TESTTMP/server/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
473 | #endif |
|
473 | #endif | |
474 |
|
474 | |||
475 | Test a corrupted file upload |
|
475 | Test a corrupted file upload | |
476 |
|
476 | |||
477 | $ echo 'another lfs blob' > b |
|
477 | $ echo 'another lfs blob' > b | |
478 | $ hg ci -m 'another blob' |
|
478 | $ hg ci -m 'another blob' | |
479 | $ echo 'damage' > .hg/store/lfs/objects/e6/59058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0 |
|
479 | $ echo 'damage' > .hg/store/lfs/objects/e6/59058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0 | |
480 | $ hg push --debug ../repo1 |
|
480 | $ hg push --debug ../repo1 | |
481 | http auth: user foo, password *** |
|
481 | http auth: user foo, password *** | |
482 | pushing to ../repo1 |
|
482 | pushing to ../repo1 | |
483 | http auth: user foo, password *** |
|
483 | http auth: user foo, password *** | |
484 | http auth: user foo, password *** |
|
484 | http auth: user foo, password *** | |
485 | query 1; heads |
|
485 | query 1; heads | |
486 | searching for changes |
|
486 | searching for changes | |
487 | all remote heads known locally |
|
487 | all remote heads known locally | |
488 | listing keys for "phases" |
|
488 | listing keys for "phases" | |
489 | checking for updated bookmarks |
|
489 | checking for updated bookmarks | |
490 | listing keys for "bookmarks" |
|
490 | listing keys for "bookmarks" | |
491 | listing keys for "bookmarks" |
|
491 | listing keys for "bookmarks" | |
492 | lfs: computing set of blobs to upload |
|
492 | lfs: computing set of blobs to upload | |
493 | Status: 200 |
|
493 | Status: 200 | |
494 | Content-Length: 309 (git-server !) |
|
494 | Content-Length: 309 (git-server !) | |
495 | Content-Length: 350 (hg-server !) |
|
495 | Content-Length: 350 (hg-server !) | |
496 | Content-Type: application/vnd.git-lfs+json |
|
496 | Content-Type: application/vnd.git-lfs+json | |
497 | Date: $HTTP_DATE$ |
|
497 | Date: $HTTP_DATE$ | |
498 | Server: testing stub value (hg-server !) |
|
498 | Server: testing stub value (hg-server !) | |
499 | { |
|
499 | { | |
500 | "objects": [ |
|
500 | "objects": [ | |
501 | { |
|
501 | { | |
502 | "actions": { |
|
502 | "actions": { | |
503 | "upload": { |
|
503 | "upload": { | |
504 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
504 | "expires_at": "$ISO_8601_DATE_TIME$" | |
505 | "header": { |
|
505 | "header": { | |
506 | "Accept": "application/vnd.git-lfs" |
|
506 | "Accept": "application/vnd.git-lfs" | |
507 | } |
|
507 | } | |
508 | "href": "http://localhost:$HGPORT/*/e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0" (glob) |
|
508 | "href": "http://localhost:$HGPORT/*/e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0" (glob) | |
509 | } |
|
509 | } | |
510 | } |
|
510 | } | |
511 | "oid": "e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0" |
|
511 | "oid": "e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0" | |
512 | "size": 17 |
|
512 | "size": 17 | |
513 | } |
|
513 | } | |
514 | ] |
|
514 | ] | |
515 | "transfer": "basic" (hg-server !) |
|
515 | "transfer": "basic" (hg-server !) | |
516 | } |
|
516 | } | |
517 | lfs: uploading e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0 (17 bytes) |
|
517 | lfs: uploading e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0 (17 bytes) | |
518 | abort: detected corrupt lfs object: e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0 |
|
518 | abort: detected corrupt lfs object: e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0 | |
519 | (run hg verify) |
|
519 | (run hg verify) | |
520 | [255] |
|
520 | [255] | |
521 |
|
521 | |||
522 | Archive will prefetch blobs in a group |
|
522 | Archive will prefetch blobs in a group | |
523 |
|
523 | |||
524 | $ rm -rf .hg/store/lfs `hg config lfs.usercache` |
|
524 | $ rm -rf .hg/store/lfs `hg config lfs.usercache` | |
525 | $ hg archive --debug -r 1 ../archive |
|
525 | $ hg archive --debug -r 1 ../archive | |
526 | http auth: user foo, password *** |
|
526 | http auth: user foo, password *** | |
527 | http auth: user foo, password *** |
|
527 | http auth: user foo, password *** | |
528 | Status: 200 |
|
528 | Status: 200 | |
529 | Content-Length: 905 (git-server !) |
|
529 | Content-Length: 905 (git-server !) | |
530 | Content-Length: 988 (hg-server !) |
|
530 | Content-Length: 988 (hg-server !) | |
531 | Content-Type: application/vnd.git-lfs+json |
|
531 | Content-Type: application/vnd.git-lfs+json | |
532 | Date: $HTTP_DATE$ |
|
532 | Date: $HTTP_DATE$ | |
533 | Server: testing stub value (hg-server !) |
|
533 | Server: testing stub value (hg-server !) | |
534 | { |
|
534 | { | |
535 | "objects": [ |
|
535 | "objects": [ | |
536 | { |
|
536 | { | |
537 | "actions": { |
|
537 | "actions": { | |
538 | "download": { |
|
538 | "download": { | |
539 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
539 | "expires_at": "$ISO_8601_DATE_TIME$" | |
540 | "header": { |
|
540 | "header": { | |
541 | "Accept": "application/vnd.git-lfs" |
|
541 | "Accept": "application/vnd.git-lfs" | |
542 | } |
|
542 | } | |
543 | "href": "http://localhost:$HGPORT/*/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (glob) |
|
543 | "href": "http://localhost:$HGPORT/*/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (glob) | |
544 | } |
|
544 | } | |
545 | } |
|
545 | } | |
546 | "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" |
|
546 | "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" | |
547 | "size": 12 |
|
547 | "size": 12 | |
548 | } |
|
548 | } | |
549 | { |
|
549 | { | |
550 | "actions": { |
|
550 | "actions": { | |
551 | "download": { |
|
551 | "download": { | |
552 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
552 | "expires_at": "$ISO_8601_DATE_TIME$" | |
553 | "header": { |
|
553 | "header": { | |
554 | "Accept": "application/vnd.git-lfs" |
|
554 | "Accept": "application/vnd.git-lfs" | |
555 | } |
|
555 | } | |
556 | "href": "http://localhost:$HGPORT/*/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" (glob) |
|
556 | "href": "http://localhost:$HGPORT/*/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" (glob) | |
557 | } |
|
557 | } | |
558 | } |
|
558 | } | |
559 | "oid": "37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" |
|
559 | "oid": "37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" | |
560 | "size": 20 |
|
560 | "size": 20 | |
561 | } |
|
561 | } | |
562 | { |
|
562 | { | |
563 | "actions": { |
|
563 | "actions": { | |
564 | "download": { |
|
564 | "download": { | |
565 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
565 | "expires_at": "$ISO_8601_DATE_TIME$" | |
566 | "header": { |
|
566 | "header": { | |
567 | "Accept": "application/vnd.git-lfs" |
|
567 | "Accept": "application/vnd.git-lfs" | |
568 | } |
|
568 | } | |
569 | "href": "http://localhost:$HGPORT/*/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (glob) |
|
569 | "href": "http://localhost:$HGPORT/*/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (glob) | |
570 | } |
|
570 | } | |
571 | } |
|
571 | } | |
572 | "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" |
|
572 | "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" | |
573 | "size": 19 |
|
573 | "size": 19 | |
574 | } |
|
574 | } | |
575 | ] |
|
575 | ] | |
576 | "transfer": "basic" (hg-server !) |
|
576 | "transfer": "basic" (hg-server !) | |
577 | } |
|
577 | } | |
578 | lfs: need to transfer 3 objects (51 bytes) |
|
578 | lfs: need to transfer 3 objects (51 bytes) | |
579 | lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) |
|
579 | lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) | |
580 | Status: 200 |
|
580 | Status: 200 | |
581 | Content-Length: 12 |
|
581 | Content-Length: 12 | |
582 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
582 | Content-Type: text/plain; charset=utf-8 (git-server !) | |
583 | Content-Type: application/octet-stream (hg-server !) |
|
583 | Content-Type: application/octet-stream (hg-server !) | |
584 | Date: $HTTP_DATE$ |
|
584 | Date: $HTTP_DATE$ | |
585 | Server: testing stub value (hg-server !) |
|
585 | Server: testing stub value (hg-server !) | |
586 | lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache |
|
586 | lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache | |
587 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b |
|
587 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b | |
588 | lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes) |
|
588 | lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes) | |
589 | Status: 200 |
|
589 | Status: 200 | |
590 | Content-Length: 20 |
|
590 | Content-Length: 20 | |
591 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
591 | Content-Type: text/plain; charset=utf-8 (git-server !) | |
592 | Content-Type: application/octet-stream (hg-server !) |
|
592 | Content-Type: application/octet-stream (hg-server !) | |
593 | Date: $HTTP_DATE$ |
|
593 | Date: $HTTP_DATE$ | |
594 | Server: testing stub value (hg-server !) |
|
594 | Server: testing stub value (hg-server !) | |
595 | lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache |
|
595 | lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache | |
596 | lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 |
|
596 | lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 | |
597 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) |
|
597 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) | |
598 | Status: 200 |
|
598 | Status: 200 | |
599 | Content-Length: 19 |
|
599 | Content-Length: 19 | |
600 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
600 | Content-Type: text/plain; charset=utf-8 (git-server !) | |
601 | Content-Type: application/octet-stream (hg-server !) |
|
601 | Content-Type: application/octet-stream (hg-server !) | |
602 | Date: $HTTP_DATE$ |
|
602 | Date: $HTTP_DATE$ | |
603 | Server: testing stub value (hg-server !) |
|
603 | Server: testing stub value (hg-server !) | |
604 | lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache |
|
604 | lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache | |
605 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
605 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
606 | lfs: downloaded 3 files (51 bytes) |
|
606 | lfs: downloaded 3 files (51 bytes) | |
607 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
607 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store | |
608 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
608 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store | |
609 | lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store |
|
609 | lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store | |
610 | lfs: found 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 in the local lfs store |
|
610 | lfs: found 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 in the local lfs store | |
611 | $ find ../archive | sort |
|
611 | $ find ../archive | sort | |
612 | ../archive |
|
612 | ../archive | |
613 | ../archive/.hg_archival.txt |
|
613 | ../archive/.hg_archival.txt | |
614 | ../archive/a |
|
614 | ../archive/a | |
615 | ../archive/b |
|
615 | ../archive/b | |
616 | ../archive/c |
|
616 | ../archive/c | |
617 | ../archive/d |
|
617 | ../archive/d | |
618 |
|
618 | |||
619 | Cat will prefetch blobs in a group |
|
619 | Cat will prefetch blobs in a group | |
620 |
|
620 | |||
621 | $ rm -rf .hg/store/lfs `hg config lfs.usercache` |
|
621 | $ rm -rf .hg/store/lfs `hg config lfs.usercache` | |
622 | $ hg cat --debug -r 1 a b c nonexistent |
|
622 | $ hg cat --debug -r 1 a b c nonexistent | |
623 | http auth: user foo, password *** |
|
623 | http auth: user foo, password *** | |
624 | http auth: user foo, password *** |
|
624 | http auth: user foo, password *** | |
625 | Status: 200 |
|
625 | Status: 200 | |
626 | Content-Length: 608 (git-server !) |
|
626 | Content-Length: 608 (git-server !) | |
627 | Content-Length: 670 (hg-server !) |
|
627 | Content-Length: 670 (hg-server !) | |
628 | Content-Type: application/vnd.git-lfs+json |
|
628 | Content-Type: application/vnd.git-lfs+json | |
629 | Date: $HTTP_DATE$ |
|
629 | Date: $HTTP_DATE$ | |
630 | Server: testing stub value (hg-server !) |
|
630 | Server: testing stub value (hg-server !) | |
631 | { |
|
631 | { | |
632 | "objects": [ |
|
632 | "objects": [ | |
633 | { |
|
633 | { | |
634 | "actions": { |
|
634 | "actions": { | |
635 | "download": { |
|
635 | "download": { | |
636 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
636 | "expires_at": "$ISO_8601_DATE_TIME$" | |
637 | "header": { |
|
637 | "header": { | |
638 | "Accept": "application/vnd.git-lfs" |
|
638 | "Accept": "application/vnd.git-lfs" | |
639 | } |
|
639 | } | |
640 | "href": "http://localhost:$HGPORT/*/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (glob) |
|
640 | "href": "http://localhost:$HGPORT/*/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (glob) | |
641 | } |
|
641 | } | |
642 | } |
|
642 | } | |
643 | "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" |
|
643 | "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" | |
644 | "size": 12 |
|
644 | "size": 12 | |
645 | } |
|
645 | } | |
646 | { |
|
646 | { | |
647 | "actions": { |
|
647 | "actions": { | |
648 | "download": { |
|
648 | "download": { | |
649 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
649 | "expires_at": "$ISO_8601_DATE_TIME$" | |
650 | "header": { |
|
650 | "header": { | |
651 | "Accept": "application/vnd.git-lfs" |
|
651 | "Accept": "application/vnd.git-lfs" | |
652 | } |
|
652 | } | |
653 | "href": "http://localhost:$HGPORT/*/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (glob) |
|
653 | "href": "http://localhost:$HGPORT/*/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (glob) | |
654 | } |
|
654 | } | |
655 | } |
|
655 | } | |
656 | "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" |
|
656 | "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" | |
657 | "size": 19 |
|
657 | "size": 19 | |
658 | } |
|
658 | } | |
659 | ] |
|
659 | ] | |
660 | "transfer": "basic" (hg-server !) |
|
660 | "transfer": "basic" (hg-server !) | |
661 | } |
|
661 | } | |
662 | lfs: need to transfer 2 objects (31 bytes) |
|
662 | lfs: need to transfer 2 objects (31 bytes) | |
663 | lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) |
|
663 | lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) | |
664 | Status: 200 |
|
664 | Status: 200 | |
665 | Content-Length: 12 |
|
665 | Content-Length: 12 | |
666 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
666 | Content-Type: text/plain; charset=utf-8 (git-server !) | |
667 | Content-Type: application/octet-stream (hg-server !) |
|
667 | Content-Type: application/octet-stream (hg-server !) | |
668 | Date: $HTTP_DATE$ |
|
668 | Date: $HTTP_DATE$ | |
669 | Server: testing stub value (hg-server !) |
|
669 | Server: testing stub value (hg-server !) | |
670 | lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache |
|
670 | lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache | |
671 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b |
|
671 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b | |
672 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) |
|
672 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) | |
673 | Status: 200 |
|
673 | Status: 200 | |
674 | Content-Length: 19 |
|
674 | Content-Length: 19 | |
675 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
675 | Content-Type: text/plain; charset=utf-8 (git-server !) | |
676 | Content-Type: application/octet-stream (hg-server !) |
|
676 | Content-Type: application/octet-stream (hg-server !) | |
677 | Date: $HTTP_DATE$ |
|
677 | Date: $HTTP_DATE$ | |
678 | Server: testing stub value (hg-server !) |
|
678 | Server: testing stub value (hg-server !) | |
679 | lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache |
|
679 | lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache | |
680 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
680 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
681 | lfs: downloaded 2 files (31 bytes) |
|
681 | lfs: downloaded 2 files (31 bytes) | |
682 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
682 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store | |
683 | THIS-IS-LFS |
|
683 | THIS-IS-LFS | |
684 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
684 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store | |
685 | THIS-IS-LFS |
|
685 | THIS-IS-LFS | |
686 | lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store |
|
686 | lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store | |
687 | ANOTHER-LARGE-FILE |
|
687 | ANOTHER-LARGE-FILE | |
688 | nonexistent: no such file in rev dfca2c9e2ef2 |
|
688 | nonexistent: no such file in rev dfca2c9e2ef2 | |
689 |
|
689 | |||
690 | Revert will prefetch blobs in a group |
|
690 | Revert will prefetch blobs in a group | |
691 |
|
691 | |||
692 | $ rm -rf .hg/store/lfs |
|
692 | $ rm -rf .hg/store/lfs | |
693 | $ rm -rf `hg config lfs.usercache` |
|
693 | $ rm -rf `hg config lfs.usercache` | |
694 | $ rm * |
|
694 | $ rm * | |
695 | $ hg revert --all -r 1 --debug |
|
695 | $ hg revert --all -r 1 --debug | |
696 | http auth: user foo, password *** |
|
696 | http auth: user foo, password *** | |
697 | adding a |
|
697 | adding a | |
698 | reverting b |
|
698 | reverting b | |
699 | reverting c |
|
699 | reverting c | |
700 | reverting d |
|
700 | reverting d | |
701 | http auth: user foo, password *** |
|
701 | http auth: user foo, password *** | |
702 | Status: 200 |
|
702 | Status: 200 | |
703 | Content-Length: 905 (git-server !) |
|
703 | Content-Length: 905 (git-server !) | |
704 | Content-Length: 988 (hg-server !) |
|
704 | Content-Length: 988 (hg-server !) | |
705 | Content-Type: application/vnd.git-lfs+json |
|
705 | Content-Type: application/vnd.git-lfs+json | |
706 | Date: $HTTP_DATE$ |
|
706 | Date: $HTTP_DATE$ | |
707 | Server: testing stub value (hg-server !) |
|
707 | Server: testing stub value (hg-server !) | |
708 | { |
|
708 | { | |
709 | "objects": [ |
|
709 | "objects": [ | |
710 | { |
|
710 | { | |
711 | "actions": { |
|
711 | "actions": { | |
712 | "download": { |
|
712 | "download": { | |
713 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
713 | "expires_at": "$ISO_8601_DATE_TIME$" | |
714 | "header": { |
|
714 | "header": { | |
715 | "Accept": "application/vnd.git-lfs" |
|
715 | "Accept": "application/vnd.git-lfs" | |
716 | } |
|
716 | } | |
717 | "href": "http://localhost:$HGPORT/*/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (glob) |
|
717 | "href": "http://localhost:$HGPORT/*/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (glob) | |
718 | } |
|
718 | } | |
719 | } |
|
719 | } | |
720 | "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" |
|
720 | "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" | |
721 | "size": 12 |
|
721 | "size": 12 | |
722 | } |
|
722 | } | |
723 | { |
|
723 | { | |
724 | "actions": { |
|
724 | "actions": { | |
725 | "download": { |
|
725 | "download": { | |
726 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
726 | "expires_at": "$ISO_8601_DATE_TIME$" | |
727 | "header": { |
|
727 | "header": { | |
728 | "Accept": "application/vnd.git-lfs" |
|
728 | "Accept": "application/vnd.git-lfs" | |
729 | } |
|
729 | } | |
730 | "href": "http://localhost:$HGPORT/*/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" (glob) |
|
730 | "href": "http://localhost:$HGPORT/*/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" (glob) | |
731 | } |
|
731 | } | |
732 | } |
|
732 | } | |
733 | "oid": "37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" |
|
733 | "oid": "37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" | |
734 | "size": 20 |
|
734 | "size": 20 | |
735 | } |
|
735 | } | |
736 | { |
|
736 | { | |
737 | "actions": { |
|
737 | "actions": { | |
738 | "download": { |
|
738 | "download": { | |
739 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
739 | "expires_at": "$ISO_8601_DATE_TIME$" | |
740 | "header": { |
|
740 | "header": { | |
741 | "Accept": "application/vnd.git-lfs" |
|
741 | "Accept": "application/vnd.git-lfs" | |
742 | } |
|
742 | } | |
743 | "href": "http://localhost:$HGPORT/*/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (glob) |
|
743 | "href": "http://localhost:$HGPORT/*/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (glob) | |
744 | } |
|
744 | } | |
745 | } |
|
745 | } | |
746 | "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" |
|
746 | "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" | |
747 | "size": 19 |
|
747 | "size": 19 | |
748 | } |
|
748 | } | |
749 | ] |
|
749 | ] | |
750 | "transfer": "basic" (hg-server !) |
|
750 | "transfer": "basic" (hg-server !) | |
751 | } |
|
751 | } | |
752 | lfs: need to transfer 3 objects (51 bytes) |
|
752 | lfs: need to transfer 3 objects (51 bytes) | |
753 | lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) |
|
753 | lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) | |
754 | Status: 200 |
|
754 | Status: 200 | |
755 | Content-Length: 12 |
|
755 | Content-Length: 12 | |
756 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
756 | Content-Type: text/plain; charset=utf-8 (git-server !) | |
757 | Content-Type: application/octet-stream (hg-server !) |
|
757 | Content-Type: application/octet-stream (hg-server !) | |
758 | Date: $HTTP_DATE$ |
|
758 | Date: $HTTP_DATE$ | |
759 | Server: testing stub value (hg-server !) |
|
759 | Server: testing stub value (hg-server !) | |
760 | lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache |
|
760 | lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache | |
761 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b |
|
761 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b | |
762 | lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes) |
|
762 | lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes) | |
763 | Status: 200 |
|
763 | Status: 200 | |
764 | Content-Length: 20 |
|
764 | Content-Length: 20 | |
765 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
765 | Content-Type: text/plain; charset=utf-8 (git-server !) | |
766 | Content-Type: application/octet-stream (hg-server !) |
|
766 | Content-Type: application/octet-stream (hg-server !) | |
767 | Date: $HTTP_DATE$ |
|
767 | Date: $HTTP_DATE$ | |
768 | Server: testing stub value (hg-server !) |
|
768 | Server: testing stub value (hg-server !) | |
769 | lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache |
|
769 | lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache | |
770 | lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 |
|
770 | lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 | |
771 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) |
|
771 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) | |
772 | Status: 200 |
|
772 | Status: 200 | |
773 | Content-Length: 19 |
|
773 | Content-Length: 19 | |
774 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
774 | Content-Type: text/plain; charset=utf-8 (git-server !) | |
775 | Content-Type: application/octet-stream (hg-server !) |
|
775 | Content-Type: application/octet-stream (hg-server !) | |
776 | Date: $HTTP_DATE$ |
|
776 | Date: $HTTP_DATE$ | |
777 | Server: testing stub value (hg-server !) |
|
777 | Server: testing stub value (hg-server !) | |
778 | lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache |
|
778 | lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache | |
779 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
779 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
780 | lfs: downloaded 3 files (51 bytes) |
|
780 | lfs: downloaded 3 files (51 bytes) | |
781 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
781 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store | |
782 | lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store |
|
782 | lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store | |
783 | lfs: found 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 in the local lfs store |
|
783 | lfs: found 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 in the local lfs store | |
784 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
784 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store | |
785 |
|
785 | |||
786 | Check error message when the remote missed a blob: |
|
786 | Check error message when the remote missed a blob: | |
787 |
|
787 | |||
788 | $ echo FFFFF > b |
|
788 | $ echo FFFFF > b | |
789 | $ hg commit -m b -A b |
|
789 | $ hg commit -m b -A b | |
790 | $ echo FFFFF >> b |
|
790 | $ echo FFFFF >> b | |
791 | $ hg commit -m b b |
|
791 | $ hg commit -m b b | |
792 | $ rm -rf .hg/store/lfs |
|
792 | $ rm -rf .hg/store/lfs | |
793 | $ rm -rf `hg config lfs.usercache` |
|
793 | $ rm -rf `hg config lfs.usercache` | |
794 | $ hg update -C '.^' --debug |
|
794 | $ hg update -C '.^' --debug | |
795 | http auth: user foo, password *** |
|
795 | http auth: user foo, password *** | |
796 | resolving manifests |
|
796 | resolving manifests | |
797 | branchmerge: False, force: True, partial: False |
|
797 | branchmerge: False, force: True, partial: False | |
798 | ancestor: 62fdbaf221c6+, local: 62fdbaf221c6+, remote: ef0564edf47e |
|
798 | ancestor: 62fdbaf221c6+, local: 62fdbaf221c6+, remote: ef0564edf47e | |
799 | http auth: user foo, password *** |
|
799 | http auth: user foo, password *** | |
800 | Status: 200 |
|
800 | Status: 200 | |
801 | Content-Length: 308 (git-server !) |
|
801 | Content-Length: 308 (git-server !) | |
802 | Content-Length: 186 (hg-server !) |
|
802 | Content-Length: 186 (hg-server !) | |
803 | Content-Type: application/vnd.git-lfs+json |
|
803 | Content-Type: application/vnd.git-lfs+json | |
804 | Date: $HTTP_DATE$ |
|
804 | Date: $HTTP_DATE$ | |
805 | Server: testing stub value (hg-server !) |
|
805 | Server: testing stub value (hg-server !) | |
806 | { |
|
806 | { | |
807 | "objects": [ |
|
807 | "objects": [ | |
808 | { |
|
808 | { | |
809 | "actions": { (git-server !) |
|
809 | "actions": { (git-server !) | |
810 | "upload": { (git-server !) |
|
810 | "upload": { (git-server !) | |
811 | "expires_at": "$ISO_8601_DATE_TIME$" (git-server !) |
|
811 | "expires_at": "$ISO_8601_DATE_TIME$" (git-server !) | |
812 | "header": { (git-server !) |
|
812 | "header": { (git-server !) | |
813 | "Accept": "application/vnd.git-lfs" (git-server !) |
|
813 | "Accept": "application/vnd.git-lfs" (git-server !) | |
814 | } (git-server !) |
|
814 | } (git-server !) | |
815 | "href": "http://localhost:$HGPORT/objects/8e6ea5f6c066b44a0efa43bcce86aea73f17e6e23f0663df0251e7524e140a13" (git-server !) |
|
815 | "href": "http://localhost:$HGPORT/objects/8e6ea5f6c066b44a0efa43bcce86aea73f17e6e23f0663df0251e7524e140a13" (git-server !) | |
816 | } (git-server !) |
|
816 | } (git-server !) | |
817 | "error": { (hg-server !) |
|
817 | "error": { (hg-server !) | |
818 | "code": 404 (hg-server !) |
|
818 | "code": 404 (hg-server !) | |
819 | "message": "The object does not exist" (hg-server !) |
|
819 | "message": "The object does not exist" (hg-server !) | |
820 | } |
|
820 | } | |
821 | "oid": "8e6ea5f6c066b44a0efa43bcce86aea73f17e6e23f0663df0251e7524e140a13" |
|
821 | "oid": "8e6ea5f6c066b44a0efa43bcce86aea73f17e6e23f0663df0251e7524e140a13" | |
822 | "size": 6 |
|
822 | "size": 6 | |
823 | } |
|
823 | } | |
824 | ] |
|
824 | ] | |
825 | "transfer": "basic" (hg-server !) |
|
825 | "transfer": "basic" (hg-server !) | |
826 | } |
|
826 | } | |
827 | abort: LFS server error for "b": The object does not exist! |
|
827 | abort: LFS server error for "b": The object does not exist! | |
828 | [255] |
|
828 | [255] | |
829 |
|
829 | |||
830 | Check error message when object does not exist: |
|
830 | Check error message when object does not exist: | |
831 |
|
831 | |||
832 | $ cd $TESTTMP |
|
832 | $ cd $TESTTMP | |
833 | $ hg init test && cd test |
|
833 | $ hg init test && cd test | |
834 | $ echo "[extensions]" >> .hg/hgrc |
|
834 | $ echo "[extensions]" >> .hg/hgrc | |
835 | $ echo "lfs=" >> .hg/hgrc |
|
835 | $ echo "lfs=" >> .hg/hgrc | |
836 | $ echo "[lfs]" >> .hg/hgrc |
|
836 | $ echo "[lfs]" >> .hg/hgrc | |
837 | $ echo "threshold=1" >> .hg/hgrc |
|
837 | $ echo "threshold=1" >> .hg/hgrc | |
838 | $ echo a > a |
|
838 | $ echo a > a | |
839 | $ hg add a |
|
839 | $ hg add a | |
840 | $ hg commit -m 'test' |
|
840 | $ hg commit -m 'test' | |
841 | $ echo aaaaa > a |
|
841 | $ echo aaaaa > a | |
842 | $ hg commit -m 'largefile' |
|
842 | $ hg commit -m 'largefile' | |
843 | $ hg debugdata a 1 # verify this is no the file content but includes "oid", the LFS "pointer". |
|
843 | $ hg debugdata a 1 # verify this is no the file content but includes "oid", the LFS "pointer". | |
844 | version https://git-lfs.github.com/spec/v1 |
|
844 | version https://git-lfs.github.com/spec/v1 | |
845 | oid sha256:bdc26931acfb734b142a8d675f205becf27560dc461f501822de13274fe6fc8a |
|
845 | oid sha256:bdc26931acfb734b142a8d675f205becf27560dc461f501822de13274fe6fc8a | |
846 | size 6 |
|
846 | size 6 | |
847 | x-is-binary 0 |
|
847 | x-is-binary 0 | |
848 | $ cd .. |
|
848 | $ cd .. | |
849 | $ rm -rf `hg config lfs.usercache` |
|
849 | $ rm -rf `hg config lfs.usercache` | |
850 |
|
850 | |||
851 | (Restart the server in a different location so it no longer has the content) |
|
851 | (Restart the server in a different location so it no longer has the content) | |
852 |
|
852 | |||
853 | $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
|
853 | $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS | |
854 |
|
854 | |||
855 | #if hg-server |
|
855 | #if hg-server | |
856 | $ cat $TESTTMP/access.log $TESTTMP/errors.log |
|
856 | $ cat $TESTTMP/access.log $TESTTMP/errors.log | |
857 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
857 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
858 | $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1" 201 - (glob) |
|
858 | $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1" 201 - (glob) | |
859 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
859 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
860 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1" 200 - (glob) |
|
860 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1" 200 - (glob) | |
861 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
861 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
862 | $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 HTTP/1.1" 201 - (glob) |
|
862 | $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 HTTP/1.1" 201 - (glob) | |
863 | $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 HTTP/1.1" 201 - (glob) |
|
863 | $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 HTTP/1.1" 201 - (glob) | |
864 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
864 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
865 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 HTTP/1.1" 200 - (glob) |
|
865 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 HTTP/1.1" 200 - (glob) | |
866 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 HTTP/1.1" 200 - (glob) |
|
866 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 HTTP/1.1" 200 - (glob) | |
867 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
867 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
868 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
868 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
869 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
869 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
870 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1" 200 - (glob) |
|
870 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1" 200 - (glob) | |
871 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 HTTP/1.1" 200 - (glob) |
|
871 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 HTTP/1.1" 200 - (glob) | |
872 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 HTTP/1.1" 200 - (glob) |
|
872 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 HTTP/1.1" 200 - (glob) | |
873 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
873 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
874 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1" 200 - (glob) |
|
874 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1" 200 - (glob) | |
875 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 HTTP/1.1" 200 - (glob) |
|
875 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 HTTP/1.1" 200 - (glob) | |
876 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
876 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
877 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1" 200 - (glob) |
|
877 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1" 200 - (glob) | |
878 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 HTTP/1.1" 200 - (glob) |
|
878 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 HTTP/1.1" 200 - (glob) | |
879 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 HTTP/1.1" 200 - (glob) |
|
879 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 HTTP/1.1" 200 - (glob) | |
880 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
880 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
881 | #endif |
|
881 | #endif | |
882 |
|
882 | |||
883 | $ mkdir $TESTTMP/lfs-server2 |
|
883 | $ mkdir $TESTTMP/lfs-server2 | |
884 | $ cd $TESTTMP/lfs-server2 |
|
884 | $ cd $TESTTMP/lfs-server2 | |
885 | #if no-windows git-server |
|
885 | #if no-windows git-server | |
886 | $ lfs-test-server &> lfs-server.log & |
|
886 | $ lfs-test-server &> lfs-server.log & | |
887 | $ echo $! >> $DAEMON_PIDS |
|
887 | $ echo $! >> $DAEMON_PIDS | |
888 | #endif |
|
888 | #endif | |
889 |
|
889 | |||
890 | #if windows git-server |
|
890 | #if windows git-server | |
891 | $ $PYTHON $TESTTMP/spawn.py >> $DAEMON_PIDS |
|
891 | $ $PYTHON $TESTTMP/spawn.py >> $DAEMON_PIDS | |
892 | #endif |
|
892 | #endif | |
893 |
|
893 | |||
894 | #if hg-server |
|
894 | #if hg-server | |
895 | $ hg init server2 |
|
895 | $ hg init server2 | |
896 | $ hg --config "lfs.usercache=$TESTTMP/servercache2" -R server2 serve -d \ |
|
896 | $ hg --config "lfs.usercache=$TESTTMP/servercache2" -R server2 serve -d \ | |
897 | > -p $HGPORT --pid-file=hg.pid -A $TESTTMP/access.log -E $TESTTMP/errors.log |
|
897 | > -p $HGPORT --pid-file=hg.pid -A $TESTTMP/access.log -E $TESTTMP/errors.log | |
898 | $ cat hg.pid >> $DAEMON_PIDS |
|
898 | $ cat hg.pid >> $DAEMON_PIDS | |
899 | #endif |
|
899 | #endif | |
900 |
|
900 | |||
901 | $ cd $TESTTMP |
|
901 | $ cd $TESTTMP | |
902 | $ hg --debug clone test test2 |
|
902 | $ hg --debug clone test test2 | |
903 | http auth: user foo, password *** |
|
903 | http auth: user foo, password *** | |
904 | linked 6 files |
|
904 | linked 6 files | |
905 | http auth: user foo, password *** |
|
905 | http auth: user foo, password *** | |
906 | updating to branch default |
|
906 | updating to branch default | |
907 | resolving manifests |
|
907 | resolving manifests | |
908 | branchmerge: False, force: False, partial: False |
|
908 | branchmerge: False, force: False, partial: False | |
909 | ancestor: 000000000000, local: 000000000000+, remote: d2a338f184a8 |
|
909 | ancestor: 000000000000, local: 000000000000+, remote: d2a338f184a8 | |
910 | http auth: user foo, password *** |
|
910 | http auth: user foo, password *** | |
911 | Status: 200 |
|
911 | Status: 200 | |
912 | Content-Length: 308 (git-server !) |
|
912 | Content-Length: 308 (git-server !) | |
913 | Content-Length: 186 (hg-server !) |
|
913 | Content-Length: 186 (hg-server !) | |
914 | Content-Type: application/vnd.git-lfs+json |
|
914 | Content-Type: application/vnd.git-lfs+json | |
915 | Date: $HTTP_DATE$ |
|
915 | Date: $HTTP_DATE$ | |
916 | Server: testing stub value (hg-server !) |
|
916 | Server: testing stub value (hg-server !) | |
917 | { |
|
917 | { | |
918 | "objects": [ |
|
918 | "objects": [ | |
919 | { |
|
919 | { | |
920 | "actions": { (git-server !) |
|
920 | "actions": { (git-server !) | |
921 | "upload": { (git-server !) |
|
921 | "upload": { (git-server !) | |
922 | "expires_at": "$ISO_8601_DATE_TIME$" (git-server !) |
|
922 | "expires_at": "$ISO_8601_DATE_TIME$" (git-server !) | |
923 | "header": { (git-server !) |
|
923 | "header": { (git-server !) | |
924 | "Accept": "application/vnd.git-lfs" (git-server !) |
|
924 | "Accept": "application/vnd.git-lfs" (git-server !) | |
925 | } (git-server !) |
|
925 | } (git-server !) | |
926 | "href": "http://localhost:$HGPORT/objects/bdc26931acfb734b142a8d675f205becf27560dc461f501822de13274fe6fc8a" (git-server !) |
|
926 | "href": "http://localhost:$HGPORT/objects/bdc26931acfb734b142a8d675f205becf27560dc461f501822de13274fe6fc8a" (git-server !) | |
927 | } (git-server !) |
|
927 | } (git-server !) | |
928 | "error": { (hg-server !) |
|
928 | "error": { (hg-server !) | |
929 | "code": 404 (hg-server !) |
|
929 | "code": 404 (hg-server !) | |
930 | "message": "The object does not exist" (hg-server !) |
|
930 | "message": "The object does not exist" (hg-server !) | |
931 | } |
|
931 | } | |
932 | "oid": "bdc26931acfb734b142a8d675f205becf27560dc461f501822de13274fe6fc8a" |
|
932 | "oid": "bdc26931acfb734b142a8d675f205becf27560dc461f501822de13274fe6fc8a" | |
933 | "size": 6 |
|
933 | "size": 6 | |
934 | } |
|
934 | } | |
935 | ] |
|
935 | ] | |
936 | "transfer": "basic" (hg-server !) |
|
936 | "transfer": "basic" (hg-server !) | |
937 | } |
|
937 | } | |
938 | abort: LFS server error for "a": The object does not exist! |
|
938 | abort: LFS server error for "a": The object does not exist! | |
939 | [255] |
|
939 | [255] | |
940 |
|
940 | |||
941 | $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
|
941 | $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
@@ -1,1104 +1,1104 b'' | |||||
1 | #require no-reposimplestore |
|
1 | #require no-reposimplestore no-chg | |
2 |
|
2 | |||
3 | # Initial setup |
|
3 | # Initial setup | |
4 |
|
4 | |||
5 | $ cat >> $HGRCPATH << EOF |
|
5 | $ cat >> $HGRCPATH << EOF | |
6 | > [extensions] |
|
6 | > [extensions] | |
7 | > lfs= |
|
7 | > lfs= | |
8 | > [lfs] |
|
8 | > [lfs] | |
9 | > # Test deprecated config |
|
9 | > # Test deprecated config | |
10 | > threshold=1000B |
|
10 | > threshold=1000B | |
11 | > EOF |
|
11 | > EOF | |
12 |
|
12 | |||
13 | $ LONG=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
|
13 | $ LONG=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC | |
14 |
|
14 | |||
15 | # Prepare server and enable extension |
|
15 | # Prepare server and enable extension | |
16 | $ hg init server |
|
16 | $ hg init server | |
17 | $ hg clone -q server client |
|
17 | $ hg clone -q server client | |
18 | $ cd client |
|
18 | $ cd client | |
19 |
|
19 | |||
20 | # Commit small file |
|
20 | # Commit small file | |
21 | $ echo s > smallfile |
|
21 | $ echo s > smallfile | |
22 | $ echo '**.py = LF' > .hgeol |
|
22 | $ echo '**.py = LF' > .hgeol | |
23 | $ hg --config lfs.track='"size(\">1000B\")"' commit -Aqm "add small file" |
|
23 | $ hg --config lfs.track='"size(\">1000B\")"' commit -Aqm "add small file" | |
24 | hg: parse error: unsupported file pattern: size(">1000B") |
|
24 | hg: parse error: unsupported file pattern: size(">1000B") | |
25 | (paths must be prefixed with "path:") |
|
25 | (paths must be prefixed with "path:") | |
26 | [255] |
|
26 | [255] | |
27 | $ hg --config lfs.track='size(">1000B")' commit -Aqm "add small file" |
|
27 | $ hg --config lfs.track='size(">1000B")' commit -Aqm "add small file" | |
28 |
|
28 | |||
29 | # Commit large file |
|
29 | # Commit large file | |
30 | $ echo $LONG > largefile |
|
30 | $ echo $LONG > largefile | |
31 | $ grep lfs .hg/requires |
|
31 | $ grep lfs .hg/requires | |
32 | [1] |
|
32 | [1] | |
33 | $ hg commit --traceback -Aqm "add large file" |
|
33 | $ hg commit --traceback -Aqm "add large file" | |
34 | $ grep lfs .hg/requires |
|
34 | $ grep lfs .hg/requires | |
35 | lfs |
|
35 | lfs | |
36 |
|
36 | |||
37 | # Ensure metadata is stored |
|
37 | # Ensure metadata is stored | |
38 | $ hg debugdata largefile 0 |
|
38 | $ hg debugdata largefile 0 | |
39 | version https://git-lfs.github.com/spec/v1 |
|
39 | version https://git-lfs.github.com/spec/v1 | |
40 | oid sha256:f11e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b |
|
40 | oid sha256:f11e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b | |
41 | size 1501 |
|
41 | size 1501 | |
42 | x-is-binary 0 |
|
42 | x-is-binary 0 | |
43 |
|
43 | |||
44 | # Check the blobstore is populated |
|
44 | # Check the blobstore is populated | |
45 | $ find .hg/store/lfs/objects | sort |
|
45 | $ find .hg/store/lfs/objects | sort | |
46 | .hg/store/lfs/objects |
|
46 | .hg/store/lfs/objects | |
47 | .hg/store/lfs/objects/f1 |
|
47 | .hg/store/lfs/objects/f1 | |
48 | .hg/store/lfs/objects/f1/1e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b |
|
48 | .hg/store/lfs/objects/f1/1e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b | |
49 |
|
49 | |||
50 | # Check the blob stored contains the actual contents of the file |
|
50 | # Check the blob stored contains the actual contents of the file | |
51 | $ cat .hg/store/lfs/objects/f1/1e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b |
|
51 | $ cat .hg/store/lfs/objects/f1/1e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b | |
52 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
|
52 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC | |
53 |
|
53 | |||
54 | # Push changes to the server |
|
54 | # Push changes to the server | |
55 |
|
55 | |||
56 | $ hg push |
|
56 | $ hg push | |
57 | pushing to $TESTTMP/server |
|
57 | pushing to $TESTTMP/server | |
58 | searching for changes |
|
58 | searching for changes | |
59 | abort: lfs.url needs to be configured |
|
59 | abort: lfs.url needs to be configured | |
60 | [255] |
|
60 | [255] | |
61 |
|
61 | |||
62 | $ cat >> $HGRCPATH << EOF |
|
62 | $ cat >> $HGRCPATH << EOF | |
63 | > [lfs] |
|
63 | > [lfs] | |
64 | > url=file:$TESTTMP/dummy-remote/ |
|
64 | > url=file:$TESTTMP/dummy-remote/ | |
65 | > EOF |
|
65 | > EOF | |
66 |
|
66 | |||
67 | Push to a local non-lfs repo with the extension enabled will add the |
|
67 | Push to a local non-lfs repo with the extension enabled will add the | |
68 | lfs requirement |
|
68 | lfs requirement | |
69 |
|
69 | |||
70 | $ grep lfs $TESTTMP/server/.hg/requires |
|
70 | $ grep lfs $TESTTMP/server/.hg/requires | |
71 | [1] |
|
71 | [1] | |
72 | $ hg push -v | egrep -v '^(uncompressed| )' |
|
72 | $ hg push -v | egrep -v '^(uncompressed| )' | |
73 | pushing to $TESTTMP/server |
|
73 | pushing to $TESTTMP/server | |
74 | searching for changes |
|
74 | searching for changes | |
75 | lfs: found f11e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b in the local lfs store |
|
75 | lfs: found f11e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b in the local lfs store | |
76 | 2 changesets found |
|
76 | 2 changesets found | |
77 | adding changesets |
|
77 | adding changesets | |
78 | adding manifests |
|
78 | adding manifests | |
79 | adding file changes |
|
79 | adding file changes | |
80 | added 2 changesets with 3 changes to 3 files |
|
80 | added 2 changesets with 3 changes to 3 files | |
81 | calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs |
|
81 | calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs | |
82 | $ grep lfs $TESTTMP/server/.hg/requires |
|
82 | $ grep lfs $TESTTMP/server/.hg/requires | |
83 | lfs |
|
83 | lfs | |
84 |
|
84 | |||
85 | # Unknown URL scheme |
|
85 | # Unknown URL scheme | |
86 |
|
86 | |||
87 | $ hg push --config lfs.url=ftp://foobar |
|
87 | $ hg push --config lfs.url=ftp://foobar | |
88 | abort: lfs: unknown url scheme: ftp |
|
88 | abort: lfs: unknown url scheme: ftp | |
89 | [255] |
|
89 | [255] | |
90 |
|
90 | |||
91 | $ cd ../ |
|
91 | $ cd ../ | |
92 |
|
92 | |||
93 | # Initialize new client (not cloning) and setup extension |
|
93 | # Initialize new client (not cloning) and setup extension | |
94 | $ hg init client2 |
|
94 | $ hg init client2 | |
95 | $ cd client2 |
|
95 | $ cd client2 | |
96 | $ cat >> .hg/hgrc <<EOF |
|
96 | $ cat >> .hg/hgrc <<EOF | |
97 | > [paths] |
|
97 | > [paths] | |
98 | > default = $TESTTMP/server |
|
98 | > default = $TESTTMP/server | |
99 | > EOF |
|
99 | > EOF | |
100 |
|
100 | |||
101 | # Pull from server |
|
101 | # Pull from server | |
102 |
|
102 | |||
103 | Pulling a local lfs repo into a local non-lfs repo with the extension |
|
103 | Pulling a local lfs repo into a local non-lfs repo with the extension | |
104 | enabled adds the lfs requirement |
|
104 | enabled adds the lfs requirement | |
105 |
|
105 | |||
106 | $ grep lfs .hg/requires $TESTTMP/server/.hg/requires |
|
106 | $ grep lfs .hg/requires $TESTTMP/server/.hg/requires | |
107 | $TESTTMP/server/.hg/requires:lfs |
|
107 | $TESTTMP/server/.hg/requires:lfs | |
108 | $ hg pull default |
|
108 | $ hg pull default | |
109 | pulling from $TESTTMP/server |
|
109 | pulling from $TESTTMP/server | |
110 | requesting all changes |
|
110 | requesting all changes | |
111 | adding changesets |
|
111 | adding changesets | |
112 | adding manifests |
|
112 | adding manifests | |
113 | adding file changes |
|
113 | adding file changes | |
114 | added 2 changesets with 3 changes to 3 files |
|
114 | added 2 changesets with 3 changes to 3 files | |
115 | new changesets 0ead593177f7:b88141481348 |
|
115 | new changesets 0ead593177f7:b88141481348 | |
116 | (run 'hg update' to get a working copy) |
|
116 | (run 'hg update' to get a working copy) | |
117 | $ grep lfs .hg/requires $TESTTMP/server/.hg/requires |
|
117 | $ grep lfs .hg/requires $TESTTMP/server/.hg/requires | |
118 | .hg/requires:lfs |
|
118 | .hg/requires:lfs | |
119 | $TESTTMP/server/.hg/requires:lfs |
|
119 | $TESTTMP/server/.hg/requires:lfs | |
120 |
|
120 | |||
121 | # Check the blobstore is not yet populated |
|
121 | # Check the blobstore is not yet populated | |
122 | $ [ -d .hg/store/lfs/objects ] |
|
122 | $ [ -d .hg/store/lfs/objects ] | |
123 | [1] |
|
123 | [1] | |
124 |
|
124 | |||
125 | # Update to the last revision containing the large file |
|
125 | # Update to the last revision containing the large file | |
126 | $ hg update |
|
126 | $ hg update | |
127 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
127 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
128 |
|
128 | |||
129 | # Check the blobstore has been populated on update |
|
129 | # Check the blobstore has been populated on update | |
130 | $ find .hg/store/lfs/objects | sort |
|
130 | $ find .hg/store/lfs/objects | sort | |
131 | .hg/store/lfs/objects |
|
131 | .hg/store/lfs/objects | |
132 | .hg/store/lfs/objects/f1 |
|
132 | .hg/store/lfs/objects/f1 | |
133 | .hg/store/lfs/objects/f1/1e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b |
|
133 | .hg/store/lfs/objects/f1/1e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b | |
134 |
|
134 | |||
135 | # Check the contents of the file are fetched from blobstore when requested |
|
135 | # Check the contents of the file are fetched from blobstore when requested | |
136 | $ hg cat -r . largefile |
|
136 | $ hg cat -r . largefile | |
137 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
|
137 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC | |
138 |
|
138 | |||
139 | # Check the file has been copied in the working copy |
|
139 | # Check the file has been copied in the working copy | |
140 | $ cat largefile |
|
140 | $ cat largefile | |
141 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
|
141 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC | |
142 |
|
142 | |||
143 | $ cd .. |
|
143 | $ cd .. | |
144 |
|
144 | |||
145 | # Check rename, and switch between large and small files |
|
145 | # Check rename, and switch between large and small files | |
146 |
|
146 | |||
147 | $ hg init repo3 |
|
147 | $ hg init repo3 | |
148 | $ cd repo3 |
|
148 | $ cd repo3 | |
149 | $ cat >> .hg/hgrc << EOF |
|
149 | $ cat >> .hg/hgrc << EOF | |
150 | > [lfs] |
|
150 | > [lfs] | |
151 | > track=size(">10B") |
|
151 | > track=size(">10B") | |
152 | > EOF |
|
152 | > EOF | |
153 |
|
153 | |||
154 | $ echo LONGER-THAN-TEN-BYTES-WILL-TRIGGER-LFS > large |
|
154 | $ echo LONGER-THAN-TEN-BYTES-WILL-TRIGGER-LFS > large | |
155 | $ echo SHORTER > small |
|
155 | $ echo SHORTER > small | |
156 | $ hg add . -q |
|
156 | $ hg add . -q | |
157 | $ hg commit -m 'commit with lfs content' |
|
157 | $ hg commit -m 'commit with lfs content' | |
158 |
|
158 | |||
159 | $ hg files -r . 'set:added()' |
|
159 | $ hg files -r . 'set:added()' | |
160 | large |
|
160 | large | |
161 | small |
|
161 | small | |
162 | $ hg files -r . 'set:added() & lfs()' |
|
162 | $ hg files -r . 'set:added() & lfs()' | |
163 | large |
|
163 | large | |
164 |
|
164 | |||
165 | $ hg mv large l |
|
165 | $ hg mv large l | |
166 | $ hg mv small s |
|
166 | $ hg mv small s | |
167 | $ hg status 'set:removed()' |
|
167 | $ hg status 'set:removed()' | |
168 | R large |
|
168 | R large | |
169 | R small |
|
169 | R small | |
170 | $ hg status 'set:removed() & lfs()' |
|
170 | $ hg status 'set:removed() & lfs()' | |
171 | R large |
|
171 | R large | |
172 | $ hg commit -m 'renames' |
|
172 | $ hg commit -m 'renames' | |
173 |
|
173 | |||
174 | $ hg files -r . 'set:copied()' |
|
174 | $ hg files -r . 'set:copied()' | |
175 | l |
|
175 | l | |
176 | s |
|
176 | s | |
177 | $ hg files -r . 'set:copied() & lfs()' |
|
177 | $ hg files -r . 'set:copied() & lfs()' | |
178 | l |
|
178 | l | |
179 | $ hg status --change . 'set:removed()' |
|
179 | $ hg status --change . 'set:removed()' | |
180 | R large |
|
180 | R large | |
181 | R small |
|
181 | R small | |
182 | $ hg status --change . 'set:removed() & lfs()' |
|
182 | $ hg status --change . 'set:removed() & lfs()' | |
183 | R large |
|
183 | R large | |
184 |
|
184 | |||
185 | $ echo SHORT > l |
|
185 | $ echo SHORT > l | |
186 | $ echo BECOME-LARGER-FROM-SHORTER > s |
|
186 | $ echo BECOME-LARGER-FROM-SHORTER > s | |
187 | $ hg commit -m 'large to small, small to large' |
|
187 | $ hg commit -m 'large to small, small to large' | |
188 |
|
188 | |||
189 | $ echo 1 >> l |
|
189 | $ echo 1 >> l | |
190 | $ echo 2 >> s |
|
190 | $ echo 2 >> s | |
191 | $ hg commit -m 'random modifications' |
|
191 | $ hg commit -m 'random modifications' | |
192 |
|
192 | |||
193 | $ echo RESTORE-TO-BE-LARGE > l |
|
193 | $ echo RESTORE-TO-BE-LARGE > l | |
194 | $ echo SHORTER > s |
|
194 | $ echo SHORTER > s | |
195 | $ hg commit -m 'switch large and small again' |
|
195 | $ hg commit -m 'switch large and small again' | |
196 |
|
196 | |||
197 | # Test lfs_files template |
|
197 | # Test lfs_files template | |
198 |
|
198 | |||
199 | $ hg log -r 'all()' -T '{rev} {join(lfs_files, ", ")}\n' |
|
199 | $ hg log -r 'all()' -T '{rev} {join(lfs_files, ", ")}\n' | |
200 | 0 large |
|
200 | 0 large | |
201 | 1 l, large |
|
201 | 1 l, large | |
202 | 2 s |
|
202 | 2 s | |
203 | 3 s |
|
203 | 3 s | |
204 | 4 l |
|
204 | 4 l | |
205 |
|
205 | |||
206 | # Push and pull the above repo |
|
206 | # Push and pull the above repo | |
207 |
|
207 | |||
208 | $ hg --cwd .. init repo4 |
|
208 | $ hg --cwd .. init repo4 | |
209 | $ hg push ../repo4 |
|
209 | $ hg push ../repo4 | |
210 | pushing to ../repo4 |
|
210 | pushing to ../repo4 | |
211 | searching for changes |
|
211 | searching for changes | |
212 | adding changesets |
|
212 | adding changesets | |
213 | adding manifests |
|
213 | adding manifests | |
214 | adding file changes |
|
214 | adding file changes | |
215 | added 5 changesets with 10 changes to 4 files |
|
215 | added 5 changesets with 10 changes to 4 files | |
216 |
|
216 | |||
217 | $ hg --cwd .. init repo5 |
|
217 | $ hg --cwd .. init repo5 | |
218 | $ hg --cwd ../repo5 pull ../repo3 |
|
218 | $ hg --cwd ../repo5 pull ../repo3 | |
219 | pulling from ../repo3 |
|
219 | pulling from ../repo3 | |
220 | requesting all changes |
|
220 | requesting all changes | |
221 | adding changesets |
|
221 | adding changesets | |
222 | adding manifests |
|
222 | adding manifests | |
223 | adding file changes |
|
223 | adding file changes | |
224 | added 5 changesets with 10 changes to 4 files |
|
224 | added 5 changesets with 10 changes to 4 files | |
225 | new changesets fd47a419c4f7:5adf850972b9 |
|
225 | new changesets fd47a419c4f7:5adf850972b9 | |
226 | (run 'hg update' to get a working copy) |
|
226 | (run 'hg update' to get a working copy) | |
227 |
|
227 | |||
228 | $ cd .. |
|
228 | $ cd .. | |
229 |
|
229 | |||
230 | # Test clone |
|
230 | # Test clone | |
231 |
|
231 | |||
232 | $ hg init repo6 |
|
232 | $ hg init repo6 | |
233 | $ cd repo6 |
|
233 | $ cd repo6 | |
234 | $ cat >> .hg/hgrc << EOF |
|
234 | $ cat >> .hg/hgrc << EOF | |
235 | > [lfs] |
|
235 | > [lfs] | |
236 | > track=size(">30B") |
|
236 | > track=size(">30B") | |
237 | > EOF |
|
237 | > EOF | |
238 |
|
238 | |||
239 | $ echo LARGE-BECAUSE-IT-IS-MORE-THAN-30-BYTES > large |
|
239 | $ echo LARGE-BECAUSE-IT-IS-MORE-THAN-30-BYTES > large | |
240 | $ echo SMALL > small |
|
240 | $ echo SMALL > small | |
241 | $ hg commit -Aqm 'create a lfs file' large small |
|
241 | $ hg commit -Aqm 'create a lfs file' large small | |
242 | $ hg debuglfsupload -r 'all()' -v |
|
242 | $ hg debuglfsupload -r 'all()' -v | |
243 | lfs: found 8e92251415339ae9b148c8da89ed5ec665905166a1ab11b09dca8fad83344738 in the local lfs store |
|
243 | lfs: found 8e92251415339ae9b148c8da89ed5ec665905166a1ab11b09dca8fad83344738 in the local lfs store | |
244 |
|
244 | |||
245 | $ cd .. |
|
245 | $ cd .. | |
246 |
|
246 | |||
247 | $ hg clone repo6 repo7 |
|
247 | $ hg clone repo6 repo7 | |
248 | updating to branch default |
|
248 | updating to branch default | |
249 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
249 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
250 | $ cd repo7 |
|
250 | $ cd repo7 | |
251 | $ hg config extensions --debug | grep lfs |
|
251 | $ hg config extensions --debug | grep lfs | |
252 | $TESTTMP/repo7/.hg/hgrc:*: extensions.lfs= (glob) |
|
252 | $TESTTMP/repo7/.hg/hgrc:*: extensions.lfs= (glob) | |
253 | $ cat large |
|
253 | $ cat large | |
254 | LARGE-BECAUSE-IT-IS-MORE-THAN-30-BYTES |
|
254 | LARGE-BECAUSE-IT-IS-MORE-THAN-30-BYTES | |
255 | $ cat small |
|
255 | $ cat small | |
256 | SMALL |
|
256 | SMALL | |
257 |
|
257 | |||
258 | $ cd .. |
|
258 | $ cd .. | |
259 |
|
259 | |||
260 | $ hg --config extensions.share= share repo7 sharedrepo |
|
260 | $ hg --config extensions.share= share repo7 sharedrepo | |
261 | updating working directory |
|
261 | updating working directory | |
262 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
262 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
263 | $ hg -R sharedrepo config extensions --debug | grep lfs |
|
263 | $ hg -R sharedrepo config extensions --debug | grep lfs | |
264 | $TESTTMP/sharedrepo/.hg/hgrc:*: extensions.lfs= (glob) |
|
264 | $TESTTMP/sharedrepo/.hg/hgrc:*: extensions.lfs= (glob) | |
265 |
|
265 | |||
266 | # Test rename and status |
|
266 | # Test rename and status | |
267 |
|
267 | |||
268 | $ hg init repo8 |
|
268 | $ hg init repo8 | |
269 | $ cd repo8 |
|
269 | $ cd repo8 | |
270 | $ cat >> .hg/hgrc << EOF |
|
270 | $ cat >> .hg/hgrc << EOF | |
271 | > [lfs] |
|
271 | > [lfs] | |
272 | > track=size(">10B") |
|
272 | > track=size(">10B") | |
273 | > EOF |
|
273 | > EOF | |
274 |
|
274 | |||
275 | $ echo THIS-IS-LFS-BECAUSE-10-BYTES > a1 |
|
275 | $ echo THIS-IS-LFS-BECAUSE-10-BYTES > a1 | |
276 | $ echo SMALL > a2 |
|
276 | $ echo SMALL > a2 | |
277 | $ hg commit -m a -A a1 a2 |
|
277 | $ hg commit -m a -A a1 a2 | |
278 | $ hg status |
|
278 | $ hg status | |
279 | $ hg mv a1 b1 |
|
279 | $ hg mv a1 b1 | |
280 | $ hg mv a2 a1 |
|
280 | $ hg mv a2 a1 | |
281 | $ hg mv b1 a2 |
|
281 | $ hg mv b1 a2 | |
282 | $ hg commit -m b |
|
282 | $ hg commit -m b | |
283 | $ hg status |
|
283 | $ hg status | |
284 | >>> with open('a2', 'wb') as f: |
|
284 | >>> with open('a2', 'wb') as f: | |
285 | ... f.write(b'\1\nSTART-WITH-HG-FILELOG-METADATA') |
|
285 | ... f.write(b'\1\nSTART-WITH-HG-FILELOG-METADATA') | |
286 | >>> with open('a1', 'wb') as f: |
|
286 | >>> with open('a1', 'wb') as f: | |
287 | ... f.write(b'\1\nMETA\n') |
|
287 | ... f.write(b'\1\nMETA\n') | |
288 | $ hg commit -m meta |
|
288 | $ hg commit -m meta | |
289 | $ hg status |
|
289 | $ hg status | |
290 | $ hg log -T '{rev}: {file_copies} | {file_dels} | {file_adds}\n' |
|
290 | $ hg log -T '{rev}: {file_copies} | {file_dels} | {file_adds}\n' | |
291 | 2: | | |
|
291 | 2: | | | |
292 | 1: a1 (a2)a2 (a1) | | |
|
292 | 1: a1 (a2)a2 (a1) | | | |
293 | 0: | | a1 a2 |
|
293 | 0: | | a1 a2 | |
294 |
|
294 | |||
295 | $ for n in a1 a2; do |
|
295 | $ for n in a1 a2; do | |
296 | > for r in 0 1 2; do |
|
296 | > for r in 0 1 2; do | |
297 | > printf '\n%s @ %s\n' $n $r |
|
297 | > printf '\n%s @ %s\n' $n $r | |
298 | > hg debugdata $n $r |
|
298 | > hg debugdata $n $r | |
299 | > done |
|
299 | > done | |
300 | > done |
|
300 | > done | |
301 |
|
301 | |||
302 | a1 @ 0 |
|
302 | a1 @ 0 | |
303 | version https://git-lfs.github.com/spec/v1 |
|
303 | version https://git-lfs.github.com/spec/v1 | |
304 | oid sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 |
|
304 | oid sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 | |
305 | size 29 |
|
305 | size 29 | |
306 | x-is-binary 0 |
|
306 | x-is-binary 0 | |
307 |
|
307 | |||
308 | a1 @ 1 |
|
308 | a1 @ 1 | |
309 | \x01 (esc) |
|
309 | \x01 (esc) | |
310 | copy: a2 |
|
310 | copy: a2 | |
311 | copyrev: 50470ad23cf937b1f4b9f80bfe54df38e65b50d9 |
|
311 | copyrev: 50470ad23cf937b1f4b9f80bfe54df38e65b50d9 | |
312 | \x01 (esc) |
|
312 | \x01 (esc) | |
313 | SMALL |
|
313 | SMALL | |
314 |
|
314 | |||
315 | a1 @ 2 |
|
315 | a1 @ 2 | |
316 | \x01 (esc) |
|
316 | \x01 (esc) | |
317 | \x01 (esc) |
|
317 | \x01 (esc) | |
318 | \x01 (esc) |
|
318 | \x01 (esc) | |
319 | META |
|
319 | META | |
320 |
|
320 | |||
321 | a2 @ 0 |
|
321 | a2 @ 0 | |
322 | SMALL |
|
322 | SMALL | |
323 |
|
323 | |||
324 | a2 @ 1 |
|
324 | a2 @ 1 | |
325 | version https://git-lfs.github.com/spec/v1 |
|
325 | version https://git-lfs.github.com/spec/v1 | |
326 | oid sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 |
|
326 | oid sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 | |
327 | size 29 |
|
327 | size 29 | |
328 | x-hg-copy a1 |
|
328 | x-hg-copy a1 | |
329 | x-hg-copyrev be23af27908a582af43e5cda209a5a9b319de8d4 |
|
329 | x-hg-copyrev be23af27908a582af43e5cda209a5a9b319de8d4 | |
330 | x-is-binary 0 |
|
330 | x-is-binary 0 | |
331 |
|
331 | |||
332 | a2 @ 2 |
|
332 | a2 @ 2 | |
333 | version https://git-lfs.github.com/spec/v1 |
|
333 | version https://git-lfs.github.com/spec/v1 | |
334 | oid sha256:876dadc86a8542f9798048f2c47f51dbf8e4359aed883e8ec80c5db825f0d943 |
|
334 | oid sha256:876dadc86a8542f9798048f2c47f51dbf8e4359aed883e8ec80c5db825f0d943 | |
335 | size 32 |
|
335 | size 32 | |
336 | x-is-binary 0 |
|
336 | x-is-binary 0 | |
337 |
|
337 | |||
338 | # Verify commit hashes include rename metadata |
|
338 | # Verify commit hashes include rename metadata | |
339 |
|
339 | |||
340 | $ hg log -T '{rev}:{node|short} {desc}\n' |
|
340 | $ hg log -T '{rev}:{node|short} {desc}\n' | |
341 | 2:0fae949de7fa meta |
|
341 | 2:0fae949de7fa meta | |
342 | 1:9cd6bdffdac0 b |
|
342 | 1:9cd6bdffdac0 b | |
343 | 0:7f96794915f7 a |
|
343 | 0:7f96794915f7 a | |
344 |
|
344 | |||
345 | $ cd .. |
|
345 | $ cd .. | |
346 |
|
346 | |||
347 | # Test bundle |
|
347 | # Test bundle | |
348 |
|
348 | |||
349 | $ hg init repo9 |
|
349 | $ hg init repo9 | |
350 | $ cd repo9 |
|
350 | $ cd repo9 | |
351 | $ cat >> .hg/hgrc << EOF |
|
351 | $ cat >> .hg/hgrc << EOF | |
352 | > [lfs] |
|
352 | > [lfs] | |
353 | > track=size(">10B") |
|
353 | > track=size(">10B") | |
354 | > [diff] |
|
354 | > [diff] | |
355 | > git=1 |
|
355 | > git=1 | |
356 | > EOF |
|
356 | > EOF | |
357 |
|
357 | |||
358 | $ for i in 0 single two three 4; do |
|
358 | $ for i in 0 single two three 4; do | |
359 | > echo 'THIS-IS-LFS-'$i > a |
|
359 | > echo 'THIS-IS-LFS-'$i > a | |
360 | > hg commit -m a-$i -A a |
|
360 | > hg commit -m a-$i -A a | |
361 | > done |
|
361 | > done | |
362 |
|
362 | |||
363 | $ hg update 2 -q |
|
363 | $ hg update 2 -q | |
364 | $ echo 'THIS-IS-LFS-2-CHILD' > a |
|
364 | $ echo 'THIS-IS-LFS-2-CHILD' > a | |
365 | $ hg commit -m branching -q |
|
365 | $ hg commit -m branching -q | |
366 |
|
366 | |||
367 | $ hg bundle --base 1 bundle.hg -v |
|
367 | $ hg bundle --base 1 bundle.hg -v | |
368 | lfs: found 5ab7a3739a5feec94a562d070a14f36dba7cad17e5484a4a89eea8e5f3166888 in the local lfs store |
|
368 | lfs: found 5ab7a3739a5feec94a562d070a14f36dba7cad17e5484a4a89eea8e5f3166888 in the local lfs store | |
369 | lfs: found a9c7d1cd6ce2b9bbdf46ed9a862845228717b921c089d0d42e3bcaed29eb612e in the local lfs store |
|
369 | lfs: found a9c7d1cd6ce2b9bbdf46ed9a862845228717b921c089d0d42e3bcaed29eb612e in the local lfs store | |
370 | lfs: found f693890c49c409ec33673b71e53f297681f76c1166daf33b2ad7ebf8b1d3237e in the local lfs store |
|
370 | lfs: found f693890c49c409ec33673b71e53f297681f76c1166daf33b2ad7ebf8b1d3237e in the local lfs store | |
371 | lfs: found fda198fea753eb66a252e9856915e1f5cddbe41723bd4b695ece2604ad3c9f75 in the local lfs store |
|
371 | lfs: found fda198fea753eb66a252e9856915e1f5cddbe41723bd4b695ece2604ad3c9f75 in the local lfs store | |
372 | 4 changesets found |
|
372 | 4 changesets found | |
373 | uncompressed size of bundle content: |
|
373 | uncompressed size of bundle content: | |
374 | * (changelog) (glob) |
|
374 | * (changelog) (glob) | |
375 | * (manifests) (glob) |
|
375 | * (manifests) (glob) | |
376 | * a (glob) |
|
376 | * a (glob) | |
377 | $ hg --config extensions.strip= strip -r 2 --no-backup --force -q |
|
377 | $ hg --config extensions.strip= strip -r 2 --no-backup --force -q | |
378 | $ hg -R bundle.hg log -p -T '{rev} {desc}\n' a |
|
378 | $ hg -R bundle.hg log -p -T '{rev} {desc}\n' a | |
379 | 5 branching |
|
379 | 5 branching | |
380 | diff --git a/a b/a |
|
380 | diff --git a/a b/a | |
381 | --- a/a |
|
381 | --- a/a | |
382 | +++ b/a |
|
382 | +++ b/a | |
383 | @@ -1,1 +1,1 @@ |
|
383 | @@ -1,1 +1,1 @@ | |
384 | -THIS-IS-LFS-two |
|
384 | -THIS-IS-LFS-two | |
385 | +THIS-IS-LFS-2-CHILD |
|
385 | +THIS-IS-LFS-2-CHILD | |
386 |
|
386 | |||
387 | 4 a-4 |
|
387 | 4 a-4 | |
388 | diff --git a/a b/a |
|
388 | diff --git a/a b/a | |
389 | --- a/a |
|
389 | --- a/a | |
390 | +++ b/a |
|
390 | +++ b/a | |
391 | @@ -1,1 +1,1 @@ |
|
391 | @@ -1,1 +1,1 @@ | |
392 | -THIS-IS-LFS-three |
|
392 | -THIS-IS-LFS-three | |
393 | +THIS-IS-LFS-4 |
|
393 | +THIS-IS-LFS-4 | |
394 |
|
394 | |||
395 | 3 a-three |
|
395 | 3 a-three | |
396 | diff --git a/a b/a |
|
396 | diff --git a/a b/a | |
397 | --- a/a |
|
397 | --- a/a | |
398 | +++ b/a |
|
398 | +++ b/a | |
399 | @@ -1,1 +1,1 @@ |
|
399 | @@ -1,1 +1,1 @@ | |
400 | -THIS-IS-LFS-two |
|
400 | -THIS-IS-LFS-two | |
401 | +THIS-IS-LFS-three |
|
401 | +THIS-IS-LFS-three | |
402 |
|
402 | |||
403 | 2 a-two |
|
403 | 2 a-two | |
404 | diff --git a/a b/a |
|
404 | diff --git a/a b/a | |
405 | --- a/a |
|
405 | --- a/a | |
406 | +++ b/a |
|
406 | +++ b/a | |
407 | @@ -1,1 +1,1 @@ |
|
407 | @@ -1,1 +1,1 @@ | |
408 | -THIS-IS-LFS-single |
|
408 | -THIS-IS-LFS-single | |
409 | +THIS-IS-LFS-two |
|
409 | +THIS-IS-LFS-two | |
410 |
|
410 | |||
411 | 1 a-single |
|
411 | 1 a-single | |
412 | diff --git a/a b/a |
|
412 | diff --git a/a b/a | |
413 | --- a/a |
|
413 | --- a/a | |
414 | +++ b/a |
|
414 | +++ b/a | |
415 | @@ -1,1 +1,1 @@ |
|
415 | @@ -1,1 +1,1 @@ | |
416 | -THIS-IS-LFS-0 |
|
416 | -THIS-IS-LFS-0 | |
417 | +THIS-IS-LFS-single |
|
417 | +THIS-IS-LFS-single | |
418 |
|
418 | |||
419 | 0 a-0 |
|
419 | 0 a-0 | |
420 | diff --git a/a b/a |
|
420 | diff --git a/a b/a | |
421 | new file mode 100644 |
|
421 | new file mode 100644 | |
422 | --- /dev/null |
|
422 | --- /dev/null | |
423 | +++ b/a |
|
423 | +++ b/a | |
424 | @@ -0,0 +1,1 @@ |
|
424 | @@ -0,0 +1,1 @@ | |
425 | +THIS-IS-LFS-0 |
|
425 | +THIS-IS-LFS-0 | |
426 |
|
426 | |||
427 | $ hg bundle -R bundle.hg --base 1 bundle-again.hg -q |
|
427 | $ hg bundle -R bundle.hg --base 1 bundle-again.hg -q | |
428 | $ hg -R bundle-again.hg log -p -T '{rev} {desc}\n' a |
|
428 | $ hg -R bundle-again.hg log -p -T '{rev} {desc}\n' a | |
429 | 5 branching |
|
429 | 5 branching | |
430 | diff --git a/a b/a |
|
430 | diff --git a/a b/a | |
431 | --- a/a |
|
431 | --- a/a | |
432 | +++ b/a |
|
432 | +++ b/a | |
433 | @@ -1,1 +1,1 @@ |
|
433 | @@ -1,1 +1,1 @@ | |
434 | -THIS-IS-LFS-two |
|
434 | -THIS-IS-LFS-two | |
435 | +THIS-IS-LFS-2-CHILD |
|
435 | +THIS-IS-LFS-2-CHILD | |
436 |
|
436 | |||
437 | 4 a-4 |
|
437 | 4 a-4 | |
438 | diff --git a/a b/a |
|
438 | diff --git a/a b/a | |
439 | --- a/a |
|
439 | --- a/a | |
440 | +++ b/a |
|
440 | +++ b/a | |
441 | @@ -1,1 +1,1 @@ |
|
441 | @@ -1,1 +1,1 @@ | |
442 | -THIS-IS-LFS-three |
|
442 | -THIS-IS-LFS-three | |
443 | +THIS-IS-LFS-4 |
|
443 | +THIS-IS-LFS-4 | |
444 |
|
444 | |||
445 | 3 a-three |
|
445 | 3 a-three | |
446 | diff --git a/a b/a |
|
446 | diff --git a/a b/a | |
447 | --- a/a |
|
447 | --- a/a | |
448 | +++ b/a |
|
448 | +++ b/a | |
449 | @@ -1,1 +1,1 @@ |
|
449 | @@ -1,1 +1,1 @@ | |
450 | -THIS-IS-LFS-two |
|
450 | -THIS-IS-LFS-two | |
451 | +THIS-IS-LFS-three |
|
451 | +THIS-IS-LFS-three | |
452 |
|
452 | |||
453 | 2 a-two |
|
453 | 2 a-two | |
454 | diff --git a/a b/a |
|
454 | diff --git a/a b/a | |
455 | --- a/a |
|
455 | --- a/a | |
456 | +++ b/a |
|
456 | +++ b/a | |
457 | @@ -1,1 +1,1 @@ |
|
457 | @@ -1,1 +1,1 @@ | |
458 | -THIS-IS-LFS-single |
|
458 | -THIS-IS-LFS-single | |
459 | +THIS-IS-LFS-two |
|
459 | +THIS-IS-LFS-two | |
460 |
|
460 | |||
461 | 1 a-single |
|
461 | 1 a-single | |
462 | diff --git a/a b/a |
|
462 | diff --git a/a b/a | |
463 | --- a/a |
|
463 | --- a/a | |
464 | +++ b/a |
|
464 | +++ b/a | |
465 | @@ -1,1 +1,1 @@ |
|
465 | @@ -1,1 +1,1 @@ | |
466 | -THIS-IS-LFS-0 |
|
466 | -THIS-IS-LFS-0 | |
467 | +THIS-IS-LFS-single |
|
467 | +THIS-IS-LFS-single | |
468 |
|
468 | |||
469 | 0 a-0 |
|
469 | 0 a-0 | |
470 | diff --git a/a b/a |
|
470 | diff --git a/a b/a | |
471 | new file mode 100644 |
|
471 | new file mode 100644 | |
472 | --- /dev/null |
|
472 | --- /dev/null | |
473 | +++ b/a |
|
473 | +++ b/a | |
474 | @@ -0,0 +1,1 @@ |
|
474 | @@ -0,0 +1,1 @@ | |
475 | +THIS-IS-LFS-0 |
|
475 | +THIS-IS-LFS-0 | |
476 |
|
476 | |||
477 | $ cd .. |
|
477 | $ cd .. | |
478 |
|
478 | |||
479 | # Test isbinary |
|
479 | # Test isbinary | |
480 |
|
480 | |||
481 | $ hg init repo10 |
|
481 | $ hg init repo10 | |
482 | $ cd repo10 |
|
482 | $ cd repo10 | |
483 | $ cat >> .hg/hgrc << EOF |
|
483 | $ cat >> .hg/hgrc << EOF | |
484 | > [extensions] |
|
484 | > [extensions] | |
485 | > lfs= |
|
485 | > lfs= | |
486 | > [lfs] |
|
486 | > [lfs] | |
487 | > track=all() |
|
487 | > track=all() | |
488 | > EOF |
|
488 | > EOF | |
489 | $ $PYTHON <<'EOF' |
|
489 | $ $PYTHON <<'EOF' | |
490 | > def write(path, content): |
|
490 | > def write(path, content): | |
491 | > with open(path, 'wb') as f: |
|
491 | > with open(path, 'wb') as f: | |
492 | > f.write(content) |
|
492 | > f.write(content) | |
493 | > write('a', b'\0\0') |
|
493 | > write('a', b'\0\0') | |
494 | > write('b', b'\1\n') |
|
494 | > write('b', b'\1\n') | |
495 | > write('c', b'\1\n\0') |
|
495 | > write('c', b'\1\n\0') | |
496 | > write('d', b'xx') |
|
496 | > write('d', b'xx') | |
497 | > EOF |
|
497 | > EOF | |
498 | $ hg add a b c d |
|
498 | $ hg add a b c d | |
499 | $ hg diff --stat |
|
499 | $ hg diff --stat | |
500 | a | Bin |
|
500 | a | Bin | |
501 | b | 1 + |
|
501 | b | 1 + | |
502 | c | Bin |
|
502 | c | Bin | |
503 | d | 1 + |
|
503 | d | 1 + | |
504 | 4 files changed, 2 insertions(+), 0 deletions(-) |
|
504 | 4 files changed, 2 insertions(+), 0 deletions(-) | |
505 | $ hg commit -m binarytest |
|
505 | $ hg commit -m binarytest | |
506 | $ cat > $TESTTMP/dumpbinary.py << EOF |
|
506 | $ cat > $TESTTMP/dumpbinary.py << EOF | |
507 | > def reposetup(ui, repo): |
|
507 | > def reposetup(ui, repo): | |
508 | > for n in 'abcd': |
|
508 | > for n in 'abcd': | |
509 | > ui.write(('%s: binary=%s\n') % (n, repo['.'][n].isbinary())) |
|
509 | > ui.write(('%s: binary=%s\n') % (n, repo['.'][n].isbinary())) | |
510 | > EOF |
|
510 | > EOF | |
511 | $ hg --config extensions.dumpbinary=$TESTTMP/dumpbinary.py id --trace |
|
511 | $ hg --config extensions.dumpbinary=$TESTTMP/dumpbinary.py id --trace | |
512 | a: binary=True |
|
512 | a: binary=True | |
513 | b: binary=False |
|
513 | b: binary=False | |
514 | c: binary=True |
|
514 | c: binary=True | |
515 | d: binary=False |
|
515 | d: binary=False | |
516 | b55353847f02 tip |
|
516 | b55353847f02 tip | |
517 |
|
517 | |||
518 | $ cd .. |
|
518 | $ cd .. | |
519 |
|
519 | |||
520 | # Test fctx.cmp fastpath - diff without LFS blobs |
|
520 | # Test fctx.cmp fastpath - diff without LFS blobs | |
521 |
|
521 | |||
522 | $ hg init repo12 |
|
522 | $ hg init repo12 | |
523 | $ cd repo12 |
|
523 | $ cd repo12 | |
524 | $ cat >> .hg/hgrc <<EOF |
|
524 | $ cat >> .hg/hgrc <<EOF | |
525 | > [lfs] |
|
525 | > [lfs] | |
526 | > threshold=1 |
|
526 | > threshold=1 | |
527 | > EOF |
|
527 | > EOF | |
528 | $ cat > ../patch.diff <<EOF |
|
528 | $ cat > ../patch.diff <<EOF | |
529 | > # HG changeset patch |
|
529 | > # HG changeset patch | |
530 | > 2 |
|
530 | > 2 | |
531 | > |
|
531 | > | |
532 | > diff --git a/a b/a |
|
532 | > diff --git a/a b/a | |
533 | > old mode 100644 |
|
533 | > old mode 100644 | |
534 | > new mode 100755 |
|
534 | > new mode 100755 | |
535 | > EOF |
|
535 | > EOF | |
536 |
|
536 | |||
537 | $ for i in 1 2 3; do |
|
537 | $ for i in 1 2 3; do | |
538 | > cp ../repo10/a a |
|
538 | > cp ../repo10/a a | |
539 | > if [ $i = 3 ]; then |
|
539 | > if [ $i = 3 ]; then | |
540 | > # make a content-only change |
|
540 | > # make a content-only change | |
541 | > hg import -q --bypass ../patch.diff |
|
541 | > hg import -q --bypass ../patch.diff | |
542 | > hg update -q |
|
542 | > hg update -q | |
543 | > rm ../patch.diff |
|
543 | > rm ../patch.diff | |
544 | > else |
|
544 | > else | |
545 | > echo $i >> a |
|
545 | > echo $i >> a | |
546 | > hg commit -m $i -A a |
|
546 | > hg commit -m $i -A a | |
547 | > fi |
|
547 | > fi | |
548 | > done |
|
548 | > done | |
549 | $ [ -d .hg/store/lfs/objects ] |
|
549 | $ [ -d .hg/store/lfs/objects ] | |
550 |
|
550 | |||
551 | $ cd .. |
|
551 | $ cd .. | |
552 |
|
552 | |||
553 | $ hg clone repo12 repo13 --noupdate |
|
553 | $ hg clone repo12 repo13 --noupdate | |
554 | $ cd repo13 |
|
554 | $ cd repo13 | |
555 | $ hg log --removed -p a -T '{desc}\n' --config diff.nobinary=1 --git |
|
555 | $ hg log --removed -p a -T '{desc}\n' --config diff.nobinary=1 --git | |
556 | 2 |
|
556 | 2 | |
557 | diff --git a/a b/a |
|
557 | diff --git a/a b/a | |
558 | old mode 100644 |
|
558 | old mode 100644 | |
559 | new mode 100755 |
|
559 | new mode 100755 | |
560 |
|
560 | |||
561 | 2 |
|
561 | 2 | |
562 | diff --git a/a b/a |
|
562 | diff --git a/a b/a | |
563 | Binary file a has changed |
|
563 | Binary file a has changed | |
564 |
|
564 | |||
565 | 1 |
|
565 | 1 | |
566 | diff --git a/a b/a |
|
566 | diff --git a/a b/a | |
567 | new file mode 100644 |
|
567 | new file mode 100644 | |
568 | Binary file a has changed |
|
568 | Binary file a has changed | |
569 |
|
569 | |||
570 | $ [ -d .hg/store/lfs/objects ] |
|
570 | $ [ -d .hg/store/lfs/objects ] | |
571 | [1] |
|
571 | [1] | |
572 |
|
572 | |||
573 | $ cd .. |
|
573 | $ cd .. | |
574 |
|
574 | |||
575 | # Test filter |
|
575 | # Test filter | |
576 |
|
576 | |||
577 | $ hg init repo11 |
|
577 | $ hg init repo11 | |
578 | $ cd repo11 |
|
578 | $ cd repo11 | |
579 | $ cat >> .hg/hgrc << EOF |
|
579 | $ cat >> .hg/hgrc << EOF | |
580 | > [lfs] |
|
580 | > [lfs] | |
581 | > track=(**.a & size(">5B")) | (**.b & !size(">5B")) |
|
581 | > track=(**.a & size(">5B")) | (**.b & !size(">5B")) | |
582 | > | (**.c & "path:d" & !"path:d/c.c") | size(">10B") |
|
582 | > | (**.c & "path:d" & !"path:d/c.c") | size(">10B") | |
583 | > EOF |
|
583 | > EOF | |
584 |
|
584 | |||
585 | $ mkdir a |
|
585 | $ mkdir a | |
586 | $ echo aaaaaa > a/1.a |
|
586 | $ echo aaaaaa > a/1.a | |
587 | $ echo a > a/2.a |
|
587 | $ echo a > a/2.a | |
588 | $ echo aaaaaa > 1.b |
|
588 | $ echo aaaaaa > 1.b | |
589 | $ echo a > 2.b |
|
589 | $ echo a > 2.b | |
590 | $ echo a > 1.c |
|
590 | $ echo a > 1.c | |
591 | $ mkdir d |
|
591 | $ mkdir d | |
592 | $ echo a > d/c.c |
|
592 | $ echo a > d/c.c | |
593 | $ echo a > d/d.c |
|
593 | $ echo a > d/d.c | |
594 | $ echo aaaaaaaaaaaa > x |
|
594 | $ echo aaaaaaaaaaaa > x | |
595 | $ hg add . -q |
|
595 | $ hg add . -q | |
596 | $ hg commit -m files |
|
596 | $ hg commit -m files | |
597 |
|
597 | |||
598 | $ for p in a/1.a a/2.a 1.b 2.b 1.c d/c.c d/d.c x; do |
|
598 | $ for p in a/1.a a/2.a 1.b 2.b 1.c d/c.c d/d.c x; do | |
599 | > if hg debugdata $p 0 2>&1 | grep git-lfs >/dev/null; then |
|
599 | > if hg debugdata $p 0 2>&1 | grep git-lfs >/dev/null; then | |
600 | > echo "${p}: is lfs" |
|
600 | > echo "${p}: is lfs" | |
601 | > else |
|
601 | > else | |
602 | > echo "${p}: not lfs" |
|
602 | > echo "${p}: not lfs" | |
603 | > fi |
|
603 | > fi | |
604 | > done |
|
604 | > done | |
605 | a/1.a: is lfs |
|
605 | a/1.a: is lfs | |
606 | a/2.a: not lfs |
|
606 | a/2.a: not lfs | |
607 | 1.b: not lfs |
|
607 | 1.b: not lfs | |
608 | 2.b: is lfs |
|
608 | 2.b: is lfs | |
609 | 1.c: not lfs |
|
609 | 1.c: not lfs | |
610 | d/c.c: not lfs |
|
610 | d/c.c: not lfs | |
611 | d/d.c: is lfs |
|
611 | d/d.c: is lfs | |
612 | x: is lfs |
|
612 | x: is lfs | |
613 |
|
613 | |||
614 | $ cd .. |
|
614 | $ cd .. | |
615 |
|
615 | |||
616 | # Verify the repos |
|
616 | # Verify the repos | |
617 |
|
617 | |||
618 | $ cat > $TESTTMP/dumpflog.py << EOF |
|
618 | $ cat > $TESTTMP/dumpflog.py << EOF | |
619 | > # print raw revision sizes, flags, and hashes for certain files |
|
619 | > # print raw revision sizes, flags, and hashes for certain files | |
620 | > import hashlib |
|
620 | > import hashlib | |
621 | > from mercurial.node import short |
|
621 | > from mercurial.node import short | |
622 | > from mercurial import revlog |
|
622 | > from mercurial import revlog | |
623 | > def hash(rawtext): |
|
623 | > def hash(rawtext): | |
624 | > h = hashlib.sha512() |
|
624 | > h = hashlib.sha512() | |
625 | > h.update(rawtext) |
|
625 | > h.update(rawtext) | |
626 | > return h.hexdigest()[:4] |
|
626 | > return h.hexdigest()[:4] | |
627 | > def reposetup(ui, repo): |
|
627 | > def reposetup(ui, repo): | |
628 | > # these 2 files are interesting |
|
628 | > # these 2 files are interesting | |
629 | > for name in ['l', 's']: |
|
629 | > for name in ['l', 's']: | |
630 | > fl = repo.file(name) |
|
630 | > fl = repo.file(name) | |
631 | > if len(fl) == 0: |
|
631 | > if len(fl) == 0: | |
632 | > continue |
|
632 | > continue | |
633 | > sizes = [fl.rawsize(i) for i in fl] |
|
633 | > sizes = [fl.rawsize(i) for i in fl] | |
634 | > texts = [fl.revision(i, raw=True) for i in fl] |
|
634 | > texts = [fl.revision(i, raw=True) for i in fl] | |
635 | > flags = [int(fl.flags(i)) for i in fl] |
|
635 | > flags = [int(fl.flags(i)) for i in fl] | |
636 | > hashes = [hash(t) for t in texts] |
|
636 | > hashes = [hash(t) for t in texts] | |
637 | > print(' %s: rawsizes=%r flags=%r hashes=%r' |
|
637 | > print(' %s: rawsizes=%r flags=%r hashes=%r' | |
638 | > % (name, sizes, flags, hashes)) |
|
638 | > % (name, sizes, flags, hashes)) | |
639 | > EOF |
|
639 | > EOF | |
640 |
|
640 | |||
641 | $ for i in client client2 server repo3 repo4 repo5 repo6 repo7 repo8 repo9 \ |
|
641 | $ for i in client client2 server repo3 repo4 repo5 repo6 repo7 repo8 repo9 \ | |
642 | > repo10; do |
|
642 | > repo10; do | |
643 | > echo 'repo:' $i |
|
643 | > echo 'repo:' $i | |
644 | > hg --cwd $i verify --config extensions.dumpflog=$TESTTMP/dumpflog.py -q |
|
644 | > hg --cwd $i verify --config extensions.dumpflog=$TESTTMP/dumpflog.py -q | |
645 | > done |
|
645 | > done | |
646 | repo: client |
|
646 | repo: client | |
647 | repo: client2 |
|
647 | repo: client2 | |
648 | repo: server |
|
648 | repo: server | |
649 | repo: repo3 |
|
649 | repo: repo3 | |
650 | l: rawsizes=[211, 6, 8, 141] flags=[8192, 0, 0, 8192] hashes=['d2b8', '948c', 'cc88', '724d'] |
|
650 | l: rawsizes=[211, 6, 8, 141] flags=[8192, 0, 0, 8192] hashes=['d2b8', '948c', 'cc88', '724d'] | |
651 | s: rawsizes=[74, 141, 141, 8] flags=[0, 8192, 8192, 0] hashes=['3c80', 'fce0', '874a', '826b'] |
|
651 | s: rawsizes=[74, 141, 141, 8] flags=[0, 8192, 8192, 0] hashes=['3c80', 'fce0', '874a', '826b'] | |
652 | repo: repo4 |
|
652 | repo: repo4 | |
653 | l: rawsizes=[211, 6, 8, 141] flags=[8192, 0, 0, 8192] hashes=['d2b8', '948c', 'cc88', '724d'] |
|
653 | l: rawsizes=[211, 6, 8, 141] flags=[8192, 0, 0, 8192] hashes=['d2b8', '948c', 'cc88', '724d'] | |
654 | s: rawsizes=[74, 141, 141, 8] flags=[0, 8192, 8192, 0] hashes=['3c80', 'fce0', '874a', '826b'] |
|
654 | s: rawsizes=[74, 141, 141, 8] flags=[0, 8192, 8192, 0] hashes=['3c80', 'fce0', '874a', '826b'] | |
655 | repo: repo5 |
|
655 | repo: repo5 | |
656 | l: rawsizes=[211, 6, 8, 141] flags=[8192, 0, 0, 8192] hashes=['d2b8', '948c', 'cc88', '724d'] |
|
656 | l: rawsizes=[211, 6, 8, 141] flags=[8192, 0, 0, 8192] hashes=['d2b8', '948c', 'cc88', '724d'] | |
657 | s: rawsizes=[74, 141, 141, 8] flags=[0, 8192, 8192, 0] hashes=['3c80', 'fce0', '874a', '826b'] |
|
657 | s: rawsizes=[74, 141, 141, 8] flags=[0, 8192, 8192, 0] hashes=['3c80', 'fce0', '874a', '826b'] | |
658 | repo: repo6 |
|
658 | repo: repo6 | |
659 | repo: repo7 |
|
659 | repo: repo7 | |
660 | repo: repo8 |
|
660 | repo: repo8 | |
661 | repo: repo9 |
|
661 | repo: repo9 | |
662 | repo: repo10 |
|
662 | repo: repo10 | |
663 |
|
663 | |||
664 | repo13 doesn't have any cached lfs files and its source never pushed its |
|
664 | repo13 doesn't have any cached lfs files and its source never pushed its | |
665 | files. Therefore, the files don't exist in the remote store. Use the files in |
|
665 | files. Therefore, the files don't exist in the remote store. Use the files in | |
666 | the user cache. |
|
666 | the user cache. | |
667 |
|
667 | |||
668 | $ test -d $TESTTMP/repo13/.hg/store/lfs/objects |
|
668 | $ test -d $TESTTMP/repo13/.hg/store/lfs/objects | |
669 | [1] |
|
669 | [1] | |
670 |
|
670 | |||
671 | $ hg --config extensions.share= share repo13 repo14 |
|
671 | $ hg --config extensions.share= share repo13 repo14 | |
672 | updating working directory |
|
672 | updating working directory | |
673 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
673 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
674 | $ hg -R repo14 -q verify |
|
674 | $ hg -R repo14 -q verify | |
675 |
|
675 | |||
676 | $ hg clone repo13 repo15 |
|
676 | $ hg clone repo13 repo15 | |
677 | updating to branch default |
|
677 | updating to branch default | |
678 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
678 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
679 | $ hg -R repo15 -q verify |
|
679 | $ hg -R repo15 -q verify | |
680 |
|
680 | |||
681 | If the source repo doesn't have the blob (maybe it was pulled or cloned with |
|
681 | If the source repo doesn't have the blob (maybe it was pulled or cloned with | |
682 | --noupdate), the blob is still accessible via the global cache to send to the |
|
682 | --noupdate), the blob is still accessible via the global cache to send to the | |
683 | remote store. |
|
683 | remote store. | |
684 |
|
684 | |||
685 | $ rm -rf $TESTTMP/repo15/.hg/store/lfs |
|
685 | $ rm -rf $TESTTMP/repo15/.hg/store/lfs | |
686 | $ hg init repo16 |
|
686 | $ hg init repo16 | |
687 | $ hg -R repo15 push repo16 |
|
687 | $ hg -R repo15 push repo16 | |
688 | pushing to repo16 |
|
688 | pushing to repo16 | |
689 | searching for changes |
|
689 | searching for changes | |
690 | adding changesets |
|
690 | adding changesets | |
691 | adding manifests |
|
691 | adding manifests | |
692 | adding file changes |
|
692 | adding file changes | |
693 | added 3 changesets with 2 changes to 1 files |
|
693 | added 3 changesets with 2 changes to 1 files | |
694 | $ hg -R repo15 -q verify |
|
694 | $ hg -R repo15 -q verify | |
695 |
|
695 | |||
696 | Test damaged file scenarios. (This also damages the usercache because of the |
|
696 | Test damaged file scenarios. (This also damages the usercache because of the | |
697 | hardlinks.) |
|
697 | hardlinks.) | |
698 |
|
698 | |||
699 | $ echo 'damage' >> repo5/.hg/store/lfs/objects/66/100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e |
|
699 | $ echo 'damage' >> repo5/.hg/store/lfs/objects/66/100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e | |
700 |
|
700 | |||
701 | Repo with damaged lfs objects in any revision will fail verification. |
|
701 | Repo with damaged lfs objects in any revision will fail verification. | |
702 |
|
702 | |||
703 | $ hg -R repo5 verify |
|
703 | $ hg -R repo5 verify | |
704 | checking changesets |
|
704 | checking changesets | |
705 | checking manifests |
|
705 | checking manifests | |
706 | crosschecking files in changesets and manifests |
|
706 | crosschecking files in changesets and manifests | |
707 | checking files |
|
707 | checking files | |
708 | l@1: unpacking 46a2f24864bc: integrity check failed on data/l.i:0 |
|
708 | l@1: unpacking 46a2f24864bc: integrity check failed on data/l.i:0 | |
709 | large@0: unpacking 2c531e0992ff: integrity check failed on data/large.i:0 |
|
709 | large@0: unpacking 2c531e0992ff: integrity check failed on data/large.i:0 | |
710 | 4 files, 5 changesets, 10 total revisions |
|
710 | 4 files, 5 changesets, 10 total revisions | |
711 | 2 integrity errors encountered! |
|
711 | 2 integrity errors encountered! | |
712 | (first damaged changeset appears to be 0) |
|
712 | (first damaged changeset appears to be 0) | |
713 | [1] |
|
713 | [1] | |
714 |
|
714 | |||
715 | Updates work after cloning a damaged repo, if the damaged lfs objects aren't in |
|
715 | Updates work after cloning a damaged repo, if the damaged lfs objects aren't in | |
716 | the update destination. Those objects won't be added to the new repo's store |
|
716 | the update destination. Those objects won't be added to the new repo's store | |
717 | because they aren't accessed. |
|
717 | because they aren't accessed. | |
718 |
|
718 | |||
719 | $ hg clone -v repo5 fromcorrupt |
|
719 | $ hg clone -v repo5 fromcorrupt | |
720 | updating to branch default |
|
720 | updating to branch default | |
721 | resolving manifests |
|
721 | resolving manifests | |
722 | getting l |
|
722 | getting l | |
723 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the usercache |
|
723 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the usercache | |
724 | getting s |
|
724 | getting s | |
725 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
725 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
726 | $ test -f fromcorrupt/.hg/store/lfs/objects/66/100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e |
|
726 | $ test -f fromcorrupt/.hg/store/lfs/objects/66/100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e | |
727 | [1] |
|
727 | [1] | |
728 |
|
728 | |||
729 | Verify will copy/link all lfs objects into the local store that aren't already |
|
729 | Verify will copy/link all lfs objects into the local store that aren't already | |
730 | present. Bypass the corrupted usercache to show that verify works when fed by |
|
730 | present. Bypass the corrupted usercache to show that verify works when fed by | |
731 | the (uncorrupted) remote store. |
|
731 | the (uncorrupted) remote store. | |
732 |
|
732 | |||
733 | $ hg -R fromcorrupt --config lfs.usercache=emptycache verify -v |
|
733 | $ hg -R fromcorrupt --config lfs.usercache=emptycache verify -v | |
734 | repository uses revlog format 1 |
|
734 | repository uses revlog format 1 | |
735 | checking changesets |
|
735 | checking changesets | |
736 | checking manifests |
|
736 | checking manifests | |
737 | crosschecking files in changesets and manifests |
|
737 | crosschecking files in changesets and manifests | |
738 | checking files |
|
738 | checking files | |
739 | lfs: adding 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e to the usercache |
|
739 | lfs: adding 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e to the usercache | |
740 | lfs: found 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e in the local lfs store |
|
740 | lfs: found 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e in the local lfs store | |
741 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store |
|
741 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store | |
742 | lfs: found 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e in the local lfs store |
|
742 | lfs: found 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e in the local lfs store | |
743 | lfs: adding 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 to the usercache |
|
743 | lfs: adding 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 to the usercache | |
744 | lfs: found 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 in the local lfs store |
|
744 | lfs: found 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 in the local lfs store | |
745 | lfs: adding b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c to the usercache |
|
745 | lfs: adding b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c to the usercache | |
746 | lfs: found b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c in the local lfs store |
|
746 | lfs: found b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c in the local lfs store | |
747 | 4 files, 5 changesets, 10 total revisions |
|
747 | 4 files, 5 changesets, 10 total revisions | |
748 |
|
748 | |||
749 | Verify will not copy/link a corrupted file from the usercache into the local |
|
749 | Verify will not copy/link a corrupted file from the usercache into the local | |
750 | store, and poison it. (The verify with a good remote now works.) |
|
750 | store, and poison it. (The verify with a good remote now works.) | |
751 |
|
751 | |||
752 | $ rm -r fromcorrupt/.hg/store/lfs/objects/66/100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e |
|
752 | $ rm -r fromcorrupt/.hg/store/lfs/objects/66/100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e | |
753 | $ hg -R fromcorrupt verify -v |
|
753 | $ hg -R fromcorrupt verify -v | |
754 | repository uses revlog format 1 |
|
754 | repository uses revlog format 1 | |
755 | checking changesets |
|
755 | checking changesets | |
756 | checking manifests |
|
756 | checking manifests | |
757 | crosschecking files in changesets and manifests |
|
757 | crosschecking files in changesets and manifests | |
758 | checking files |
|
758 | checking files | |
759 | l@1: unpacking 46a2f24864bc: integrity check failed on data/l.i:0 |
|
759 | l@1: unpacking 46a2f24864bc: integrity check failed on data/l.i:0 | |
760 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store |
|
760 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store | |
761 | large@0: unpacking 2c531e0992ff: integrity check failed on data/large.i:0 |
|
761 | large@0: unpacking 2c531e0992ff: integrity check failed on data/large.i:0 | |
762 | lfs: found 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 in the local lfs store |
|
762 | lfs: found 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 in the local lfs store | |
763 | lfs: found b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c in the local lfs store |
|
763 | lfs: found b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c in the local lfs store | |
764 | 4 files, 5 changesets, 10 total revisions |
|
764 | 4 files, 5 changesets, 10 total revisions | |
765 | 2 integrity errors encountered! |
|
765 | 2 integrity errors encountered! | |
766 | (first damaged changeset appears to be 0) |
|
766 | (first damaged changeset appears to be 0) | |
767 | [1] |
|
767 | [1] | |
768 | $ hg -R fromcorrupt --config lfs.usercache=emptycache verify -v |
|
768 | $ hg -R fromcorrupt --config lfs.usercache=emptycache verify -v | |
769 | repository uses revlog format 1 |
|
769 | repository uses revlog format 1 | |
770 | checking changesets |
|
770 | checking changesets | |
771 | checking manifests |
|
771 | checking manifests | |
772 | crosschecking files in changesets and manifests |
|
772 | crosschecking files in changesets and manifests | |
773 | checking files |
|
773 | checking files | |
774 | lfs: found 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e in the usercache |
|
774 | lfs: found 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e in the usercache | |
775 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store |
|
775 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store | |
776 | lfs: found 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e in the local lfs store |
|
776 | lfs: found 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e in the local lfs store | |
777 | lfs: found 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 in the local lfs store |
|
777 | lfs: found 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 in the local lfs store | |
778 | lfs: found b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c in the local lfs store |
|
778 | lfs: found b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c in the local lfs store | |
779 | 4 files, 5 changesets, 10 total revisions |
|
779 | 4 files, 5 changesets, 10 total revisions | |
780 |
|
780 | |||
781 | Damaging a file required by the update destination fails the update. |
|
781 | Damaging a file required by the update destination fails the update. | |
782 |
|
782 | |||
783 | $ echo 'damage' >> $TESTTMP/dummy-remote/22/f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b |
|
783 | $ echo 'damage' >> $TESTTMP/dummy-remote/22/f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b | |
784 | $ hg --config lfs.usercache=emptycache clone -v repo5 fromcorrupt2 |
|
784 | $ hg --config lfs.usercache=emptycache clone -v repo5 fromcorrupt2 | |
785 | updating to branch default |
|
785 | updating to branch default | |
786 | resolving manifests |
|
786 | resolving manifests | |
787 | abort: corrupt remote lfs object: 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b |
|
787 | abort: corrupt remote lfs object: 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b | |
788 | [255] |
|
788 | [255] | |
789 |
|
789 | |||
790 | A corrupted lfs blob is not transferred from a file://remotestore to the |
|
790 | A corrupted lfs blob is not transferred from a file://remotestore to the | |
791 | usercache or local store. |
|
791 | usercache or local store. | |
792 |
|
792 | |||
793 | $ test -f emptycache/22/f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b |
|
793 | $ test -f emptycache/22/f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b | |
794 | [1] |
|
794 | [1] | |
795 | $ test -f fromcorrupt2/.hg/store/lfs/objects/22/f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b |
|
795 | $ test -f fromcorrupt2/.hg/store/lfs/objects/22/f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b | |
796 | [1] |
|
796 | [1] | |
797 |
|
797 | |||
798 | $ hg -R fromcorrupt2 verify |
|
798 | $ hg -R fromcorrupt2 verify | |
799 | checking changesets |
|
799 | checking changesets | |
800 | checking manifests |
|
800 | checking manifests | |
801 | crosschecking files in changesets and manifests |
|
801 | crosschecking files in changesets and manifests | |
802 | checking files |
|
802 | checking files | |
803 | l@1: unpacking 46a2f24864bc: integrity check failed on data/l.i:0 |
|
803 | l@1: unpacking 46a2f24864bc: integrity check failed on data/l.i:0 | |
804 | large@0: unpacking 2c531e0992ff: integrity check failed on data/large.i:0 |
|
804 | large@0: unpacking 2c531e0992ff: integrity check failed on data/large.i:0 | |
805 | 4 files, 5 changesets, 10 total revisions |
|
805 | 4 files, 5 changesets, 10 total revisions | |
806 | 2 integrity errors encountered! |
|
806 | 2 integrity errors encountered! | |
807 | (first damaged changeset appears to be 0) |
|
807 | (first damaged changeset appears to be 0) | |
808 | [1] |
|
808 | [1] | |
809 |
|
809 | |||
810 | Corrupt local files are not sent upstream. (The alternate dummy remote |
|
810 | Corrupt local files are not sent upstream. (The alternate dummy remote | |
811 | avoids the corrupt lfs object in the original remote.) |
|
811 | avoids the corrupt lfs object in the original remote.) | |
812 |
|
812 | |||
813 | $ mkdir $TESTTMP/dummy-remote2 |
|
813 | $ mkdir $TESTTMP/dummy-remote2 | |
814 | $ hg init dest |
|
814 | $ hg init dest | |
815 | $ hg -R fromcorrupt2 --config lfs.url=file:///$TESTTMP/dummy-remote2 push -v dest |
|
815 | $ hg -R fromcorrupt2 --config lfs.url=file:///$TESTTMP/dummy-remote2 push -v dest | |
816 | pushing to dest |
|
816 | pushing to dest | |
817 | searching for changes |
|
817 | searching for changes | |
818 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store |
|
818 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store | |
819 | lfs: found 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 in the local lfs store |
|
819 | lfs: found 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 in the local lfs store | |
820 | lfs: found b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c in the local lfs store |
|
820 | lfs: found b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c in the local lfs store | |
821 | abort: detected corrupt lfs object: 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e |
|
821 | abort: detected corrupt lfs object: 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e | |
822 | (run hg verify) |
|
822 | (run hg verify) | |
823 | [255] |
|
823 | [255] | |
824 |
|
824 | |||
825 | $ hg -R fromcorrupt2 --config lfs.url=file:///$TESTTMP/dummy-remote2 verify -v |
|
825 | $ hg -R fromcorrupt2 --config lfs.url=file:///$TESTTMP/dummy-remote2 verify -v | |
826 | repository uses revlog format 1 |
|
826 | repository uses revlog format 1 | |
827 | checking changesets |
|
827 | checking changesets | |
828 | checking manifests |
|
828 | checking manifests | |
829 | crosschecking files in changesets and manifests |
|
829 | crosschecking files in changesets and manifests | |
830 | checking files |
|
830 | checking files | |
831 | l@1: unpacking 46a2f24864bc: integrity check failed on data/l.i:0 |
|
831 | l@1: unpacking 46a2f24864bc: integrity check failed on data/l.i:0 | |
832 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store |
|
832 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store | |
833 | large@0: unpacking 2c531e0992ff: integrity check failed on data/large.i:0 |
|
833 | large@0: unpacking 2c531e0992ff: integrity check failed on data/large.i:0 | |
834 | lfs: found 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 in the local lfs store |
|
834 | lfs: found 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 in the local lfs store | |
835 | lfs: found b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c in the local lfs store |
|
835 | lfs: found b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c in the local lfs store | |
836 | 4 files, 5 changesets, 10 total revisions |
|
836 | 4 files, 5 changesets, 10 total revisions | |
837 | 2 integrity errors encountered! |
|
837 | 2 integrity errors encountered! | |
838 | (first damaged changeset appears to be 0) |
|
838 | (first damaged changeset appears to be 0) | |
839 | [1] |
|
839 | [1] | |
840 |
|
840 | |||
841 | $ cat $TESTTMP/dummy-remote2/22/f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b | $TESTDIR/f --sha256 |
|
841 | $ cat $TESTTMP/dummy-remote2/22/f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b | $TESTDIR/f --sha256 | |
842 | sha256=22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b |
|
842 | sha256=22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b | |
843 | $ cat fromcorrupt2/.hg/store/lfs/objects/22/f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b | $TESTDIR/f --sha256 |
|
843 | $ cat fromcorrupt2/.hg/store/lfs/objects/22/f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b | $TESTDIR/f --sha256 | |
844 | sha256=22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b |
|
844 | sha256=22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b | |
845 | $ test -f $TESTTMP/dummy-remote2/66/100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e |
|
845 | $ test -f $TESTTMP/dummy-remote2/66/100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e | |
846 | [1] |
|
846 | [1] | |
847 |
|
847 | |||
848 | Accessing a corrupt file will complain |
|
848 | Accessing a corrupt file will complain | |
849 |
|
849 | |||
850 | $ hg --cwd fromcorrupt2 cat -r 0 large |
|
850 | $ hg --cwd fromcorrupt2 cat -r 0 large | |
851 | abort: integrity check failed on data/large.i:0! |
|
851 | abort: integrity check failed on data/large.i:0! | |
852 | [255] |
|
852 | [255] | |
853 |
|
853 | |||
854 | lfs -> normal -> lfs round trip conversions are possible. The 'none()' |
|
854 | lfs -> normal -> lfs round trip conversions are possible. The 'none()' | |
855 | predicate on the command line will override whatever is configured globally and |
|
855 | predicate on the command line will override whatever is configured globally and | |
856 | locally, and ensures everything converts to a regular file. For lfs -> normal, |
|
856 | locally, and ensures everything converts to a regular file. For lfs -> normal, | |
857 | there's no 'lfs' destination repo requirement. For normal -> lfs, there is. |
|
857 | there's no 'lfs' destination repo requirement. For normal -> lfs, there is. | |
858 |
|
858 | |||
859 | $ hg --config extensions.convert= --config 'lfs.track=none()' \ |
|
859 | $ hg --config extensions.convert= --config 'lfs.track=none()' \ | |
860 | > convert repo8 convert_normal |
|
860 | > convert repo8 convert_normal | |
861 | initializing destination convert_normal repository |
|
861 | initializing destination convert_normal repository | |
862 | scanning source... |
|
862 | scanning source... | |
863 | sorting... |
|
863 | sorting... | |
864 | converting... |
|
864 | converting... | |
865 | 2 a |
|
865 | 2 a | |
866 | 1 b |
|
866 | 1 b | |
867 | 0 meta |
|
867 | 0 meta | |
868 | $ grep 'lfs' convert_normal/.hg/requires |
|
868 | $ grep 'lfs' convert_normal/.hg/requires | |
869 | [1] |
|
869 | [1] | |
870 | $ hg --cwd convert_normal cat a1 -r 0 -T '{rawdata}' |
|
870 | $ hg --cwd convert_normal cat a1 -r 0 -T '{rawdata}' | |
871 | THIS-IS-LFS-BECAUSE-10-BYTES |
|
871 | THIS-IS-LFS-BECAUSE-10-BYTES | |
872 |
|
872 | |||
873 | $ hg --config extensions.convert= --config lfs.threshold=10B \ |
|
873 | $ hg --config extensions.convert= --config lfs.threshold=10B \ | |
874 | > convert convert_normal convert_lfs |
|
874 | > convert convert_normal convert_lfs | |
875 | initializing destination convert_lfs repository |
|
875 | initializing destination convert_lfs repository | |
876 | scanning source... |
|
876 | scanning source... | |
877 | sorting... |
|
877 | sorting... | |
878 | converting... |
|
878 | converting... | |
879 | 2 a |
|
879 | 2 a | |
880 | 1 b |
|
880 | 1 b | |
881 | 0 meta |
|
881 | 0 meta | |
882 |
|
882 | |||
883 | $ hg --cwd convert_lfs cat -r 0 a1 -T '{rawdata}' |
|
883 | $ hg --cwd convert_lfs cat -r 0 a1 -T '{rawdata}' | |
884 | version https://git-lfs.github.com/spec/v1 |
|
884 | version https://git-lfs.github.com/spec/v1 | |
885 | oid sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 |
|
885 | oid sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 | |
886 | size 29 |
|
886 | size 29 | |
887 | x-is-binary 0 |
|
887 | x-is-binary 0 | |
888 | $ hg --cwd convert_lfs debugdata a1 0 |
|
888 | $ hg --cwd convert_lfs debugdata a1 0 | |
889 | version https://git-lfs.github.com/spec/v1 |
|
889 | version https://git-lfs.github.com/spec/v1 | |
890 | oid sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 |
|
890 | oid sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 | |
891 | size 29 |
|
891 | size 29 | |
892 | x-is-binary 0 |
|
892 | x-is-binary 0 | |
893 | $ hg --cwd convert_lfs log -r 0 -T "{lfs_files % '{lfspointer % '{key}={value}\n'}'}" |
|
893 | $ hg --cwd convert_lfs log -r 0 -T "{lfs_files % '{lfspointer % '{key}={value}\n'}'}" | |
894 | version=https://git-lfs.github.com/spec/v1 |
|
894 | version=https://git-lfs.github.com/spec/v1 | |
895 | oid=sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 |
|
895 | oid=sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 | |
896 | size=29 |
|
896 | size=29 | |
897 | x-is-binary=0 |
|
897 | x-is-binary=0 | |
898 | $ hg --cwd convert_lfs log -r 0 \ |
|
898 | $ hg --cwd convert_lfs log -r 0 \ | |
899 | > -T '{lfs_files % "{get(lfspointer, "oid")}\n"}{lfs_files % "{lfspointer.oid}\n"}' |
|
899 | > -T '{lfs_files % "{get(lfspointer, "oid")}\n"}{lfs_files % "{lfspointer.oid}\n"}' | |
900 | sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 |
|
900 | sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 | |
901 | sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 |
|
901 | sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 | |
902 | $ hg --cwd convert_lfs log -r 0 -T '{lfs_files % "{lfspointer}\n"}' |
|
902 | $ hg --cwd convert_lfs log -r 0 -T '{lfs_files % "{lfspointer}\n"}' | |
903 | version=https://git-lfs.github.com/spec/v1 oid=sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 size=29 x-is-binary=0 |
|
903 | version=https://git-lfs.github.com/spec/v1 oid=sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 size=29 x-is-binary=0 | |
904 | $ hg --cwd convert_lfs \ |
|
904 | $ hg --cwd convert_lfs \ | |
905 | > log -r 'all()' -T '{rev}: {lfs_files % "{file}: {lfsoid}\n"}' |
|
905 | > log -r 'all()' -T '{rev}: {lfs_files % "{file}: {lfsoid}\n"}' | |
906 | 0: a1: 5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 |
|
906 | 0: a1: 5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 | |
907 | 1: a2: 5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 |
|
907 | 1: a2: 5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 | |
908 | 2: a2: 876dadc86a8542f9798048f2c47f51dbf8e4359aed883e8ec80c5db825f0d943 |
|
908 | 2: a2: 876dadc86a8542f9798048f2c47f51dbf8e4359aed883e8ec80c5db825f0d943 | |
909 |
|
909 | |||
910 | $ grep 'lfs' convert_lfs/.hg/requires |
|
910 | $ grep 'lfs' convert_lfs/.hg/requires | |
911 | lfs |
|
911 | lfs | |
912 |
|
912 | |||
913 | The hashes in all stages of the conversion are unchanged. |
|
913 | The hashes in all stages of the conversion are unchanged. | |
914 |
|
914 | |||
915 | $ hg -R repo8 log -T '{node|short}\n' |
|
915 | $ hg -R repo8 log -T '{node|short}\n' | |
916 | 0fae949de7fa |
|
916 | 0fae949de7fa | |
917 | 9cd6bdffdac0 |
|
917 | 9cd6bdffdac0 | |
918 | 7f96794915f7 |
|
918 | 7f96794915f7 | |
919 | $ hg -R convert_normal log -T '{node|short}\n' |
|
919 | $ hg -R convert_normal log -T '{node|short}\n' | |
920 | 0fae949de7fa |
|
920 | 0fae949de7fa | |
921 | 9cd6bdffdac0 |
|
921 | 9cd6bdffdac0 | |
922 | 7f96794915f7 |
|
922 | 7f96794915f7 | |
923 | $ hg -R convert_lfs log -T '{node|short}\n' |
|
923 | $ hg -R convert_lfs log -T '{node|short}\n' | |
924 | 0fae949de7fa |
|
924 | 0fae949de7fa | |
925 | 9cd6bdffdac0 |
|
925 | 9cd6bdffdac0 | |
926 | 7f96794915f7 |
|
926 | 7f96794915f7 | |
927 |
|
927 | |||
928 | This convert is trickier, because it contains deleted files (via `hg mv`) |
|
928 | This convert is trickier, because it contains deleted files (via `hg mv`) | |
929 |
|
929 | |||
930 | $ hg --config extensions.convert= --config lfs.threshold=1000M \ |
|
930 | $ hg --config extensions.convert= --config lfs.threshold=1000M \ | |
931 | > convert repo3 convert_normal2 |
|
931 | > convert repo3 convert_normal2 | |
932 | initializing destination convert_normal2 repository |
|
932 | initializing destination convert_normal2 repository | |
933 | scanning source... |
|
933 | scanning source... | |
934 | sorting... |
|
934 | sorting... | |
935 | converting... |
|
935 | converting... | |
936 | 4 commit with lfs content |
|
936 | 4 commit with lfs content | |
937 | 3 renames |
|
937 | 3 renames | |
938 | 2 large to small, small to large |
|
938 | 2 large to small, small to large | |
939 | 1 random modifications |
|
939 | 1 random modifications | |
940 | 0 switch large and small again |
|
940 | 0 switch large and small again | |
941 | $ grep 'lfs' convert_normal2/.hg/requires |
|
941 | $ grep 'lfs' convert_normal2/.hg/requires | |
942 | [1] |
|
942 | [1] | |
943 | $ hg --cwd convert_normal2 debugdata large 0 |
|
943 | $ hg --cwd convert_normal2 debugdata large 0 | |
944 | LONGER-THAN-TEN-BYTES-WILL-TRIGGER-LFS |
|
944 | LONGER-THAN-TEN-BYTES-WILL-TRIGGER-LFS | |
945 |
|
945 | |||
946 | $ hg --config extensions.convert= --config lfs.threshold=10B \ |
|
946 | $ hg --config extensions.convert= --config lfs.threshold=10B \ | |
947 | > convert convert_normal2 convert_lfs2 |
|
947 | > convert convert_normal2 convert_lfs2 | |
948 | initializing destination convert_lfs2 repository |
|
948 | initializing destination convert_lfs2 repository | |
949 | scanning source... |
|
949 | scanning source... | |
950 | sorting... |
|
950 | sorting... | |
951 | converting... |
|
951 | converting... | |
952 | 4 commit with lfs content |
|
952 | 4 commit with lfs content | |
953 | 3 renames |
|
953 | 3 renames | |
954 | 2 large to small, small to large |
|
954 | 2 large to small, small to large | |
955 | 1 random modifications |
|
955 | 1 random modifications | |
956 | 0 switch large and small again |
|
956 | 0 switch large and small again | |
957 | $ grep 'lfs' convert_lfs2/.hg/requires |
|
957 | $ grep 'lfs' convert_lfs2/.hg/requires | |
958 | lfs |
|
958 | lfs | |
959 | $ hg --cwd convert_lfs2 debugdata large 0 |
|
959 | $ hg --cwd convert_lfs2 debugdata large 0 | |
960 | version https://git-lfs.github.com/spec/v1 |
|
960 | version https://git-lfs.github.com/spec/v1 | |
961 | oid sha256:66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e |
|
961 | oid sha256:66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e | |
962 | size 39 |
|
962 | size 39 | |
963 | x-is-binary 0 |
|
963 | x-is-binary 0 | |
964 |
|
964 | |||
965 | $ hg -R convert_lfs2 config --debug extensions | grep lfs |
|
965 | $ hg -R convert_lfs2 config --debug extensions | grep lfs | |
966 | $TESTTMP/convert_lfs2/.hg/hgrc:*: extensions.lfs= (glob) |
|
966 | $TESTTMP/convert_lfs2/.hg/hgrc:*: extensions.lfs= (glob) | |
967 |
|
967 | |||
968 | Committing deleted files works: |
|
968 | Committing deleted files works: | |
969 |
|
969 | |||
970 | $ hg init $TESTTMP/repo-del |
|
970 | $ hg init $TESTTMP/repo-del | |
971 | $ cd $TESTTMP/repo-del |
|
971 | $ cd $TESTTMP/repo-del | |
972 | $ echo 1 > A |
|
972 | $ echo 1 > A | |
973 | $ hg commit -m 'add A' -A A |
|
973 | $ hg commit -m 'add A' -A A | |
974 | $ hg rm A |
|
974 | $ hg rm A | |
975 | $ hg commit -m 'rm A' |
|
975 | $ hg commit -m 'rm A' | |
976 |
|
976 | |||
977 | Bad .hglfs files will block the commit with a useful message |
|
977 | Bad .hglfs files will block the commit with a useful message | |
978 |
|
978 | |||
979 | $ cat > .hglfs << EOF |
|
979 | $ cat > .hglfs << EOF | |
980 | > [track] |
|
980 | > [track] | |
981 | > **.test = size(">5B") |
|
981 | > **.test = size(">5B") | |
982 | > bad file ... no commit |
|
982 | > bad file ... no commit | |
983 | > EOF |
|
983 | > EOF | |
984 |
|
984 | |||
985 | $ echo x > file.txt |
|
985 | $ echo x > file.txt | |
986 | $ hg ci -Aqm 'should fail' |
|
986 | $ hg ci -Aqm 'should fail' | |
987 | hg: parse error at .hglfs:3: bad file ... no commit |
|
987 | hg: parse error at .hglfs:3: bad file ... no commit | |
988 | [255] |
|
988 | [255] | |
989 |
|
989 | |||
990 | $ cat > .hglfs << EOF |
|
990 | $ cat > .hglfs << EOF | |
991 | > [track] |
|
991 | > [track] | |
992 | > **.test = size(">5B") |
|
992 | > **.test = size(">5B") | |
993 | > ** = nonexistent() |
|
993 | > ** = nonexistent() | |
994 | > EOF |
|
994 | > EOF | |
995 |
|
995 | |||
996 | $ hg ci -Aqm 'should fail' |
|
996 | $ hg ci -Aqm 'should fail' | |
997 | abort: parse error in .hglfs: unknown identifier: nonexistent |
|
997 | abort: parse error in .hglfs: unknown identifier: nonexistent | |
998 | [255] |
|
998 | [255] | |
999 |
|
999 | |||
1000 | '**' works out to mean all files. |
|
1000 | '**' works out to mean all files. | |
1001 |
|
1001 | |||
1002 | $ cat > .hglfs << EOF |
|
1002 | $ cat > .hglfs << EOF | |
1003 | > [track] |
|
1003 | > [track] | |
1004 | > path:.hglfs = none() |
|
1004 | > path:.hglfs = none() | |
1005 | > **.test = size(">5B") |
|
1005 | > **.test = size(">5B") | |
1006 | > **.exclude = none() |
|
1006 | > **.exclude = none() | |
1007 | > ** = size(">10B") |
|
1007 | > ** = size(">10B") | |
1008 | > EOF |
|
1008 | > EOF | |
1009 |
|
1009 | |||
1010 | The LFS policy takes effect without tracking the .hglfs file |
|
1010 | The LFS policy takes effect without tracking the .hglfs file | |
1011 |
|
1011 | |||
1012 | $ echo 'largefile' > lfs.test |
|
1012 | $ echo 'largefile' > lfs.test | |
1013 | $ echo '012345678901234567890' > nolfs.exclude |
|
1013 | $ echo '012345678901234567890' > nolfs.exclude | |
1014 | $ echo '01234567890123456' > lfs.catchall |
|
1014 | $ echo '01234567890123456' > lfs.catchall | |
1015 | $ hg add * |
|
1015 | $ hg add * | |
1016 | $ hg ci -qm 'before add .hglfs' |
|
1016 | $ hg ci -qm 'before add .hglfs' | |
1017 | $ hg log -r . -T '{rev}: {lfs_files % "{file}: {lfsoid}\n"}\n' |
|
1017 | $ hg log -r . -T '{rev}: {lfs_files % "{file}: {lfsoid}\n"}\n' | |
1018 | 2: lfs.catchall: d4ec46c2869ba22eceb42a729377432052d9dd75d82fc40390ebaadecee87ee9 |
|
1018 | 2: lfs.catchall: d4ec46c2869ba22eceb42a729377432052d9dd75d82fc40390ebaadecee87ee9 | |
1019 | lfs.test: 5489e6ced8c36a7b267292bde9fd5242a5f80a7482e8f23fa0477393dfaa4d6c |
|
1019 | lfs.test: 5489e6ced8c36a7b267292bde9fd5242a5f80a7482e8f23fa0477393dfaa4d6c | |
1020 |
|
1020 | |||
1021 | The .hglfs file works when tracked |
|
1021 | The .hglfs file works when tracked | |
1022 |
|
1022 | |||
1023 | $ echo 'largefile2' > lfs.test |
|
1023 | $ echo 'largefile2' > lfs.test | |
1024 | $ echo '012345678901234567890a' > nolfs.exclude |
|
1024 | $ echo '012345678901234567890a' > nolfs.exclude | |
1025 | $ echo '01234567890123456a' > lfs.catchall |
|
1025 | $ echo '01234567890123456a' > lfs.catchall | |
1026 | $ hg ci -Aqm 'after adding .hglfs' |
|
1026 | $ hg ci -Aqm 'after adding .hglfs' | |
1027 | $ hg log -r . -T '{rev}: {lfs_files % "{file}: {lfsoid}\n"}\n' |
|
1027 | $ hg log -r . -T '{rev}: {lfs_files % "{file}: {lfsoid}\n"}\n' | |
1028 | 3: lfs.catchall: 31f43b9c62b540126b0ad5884dc013d21a61c9329b77de1fceeae2fc58511573 |
|
1028 | 3: lfs.catchall: 31f43b9c62b540126b0ad5884dc013d21a61c9329b77de1fceeae2fc58511573 | |
1029 | lfs.test: 8acd23467967bc7b8cc5a280056589b0ba0b17ff21dbd88a7b6474d6290378a6 |
|
1029 | lfs.test: 8acd23467967bc7b8cc5a280056589b0ba0b17ff21dbd88a7b6474d6290378a6 | |
1030 |
|
1030 | |||
1031 | The LFS policy stops when the .hglfs is gone |
|
1031 | The LFS policy stops when the .hglfs is gone | |
1032 |
|
1032 | |||
1033 | $ mv .hglfs .hglfs_ |
|
1033 | $ mv .hglfs .hglfs_ | |
1034 | $ echo 'largefile3' > lfs.test |
|
1034 | $ echo 'largefile3' > lfs.test | |
1035 | $ echo '012345678901234567890abc' > nolfs.exclude |
|
1035 | $ echo '012345678901234567890abc' > nolfs.exclude | |
1036 | $ echo '01234567890123456abc' > lfs.catchall |
|
1036 | $ echo '01234567890123456abc' > lfs.catchall | |
1037 | $ hg ci -qm 'file test' -X .hglfs |
|
1037 | $ hg ci -qm 'file test' -X .hglfs | |
1038 | $ hg log -r . -T '{rev}: {lfs_files % "{file}: {lfsoid}\n"}\n' |
|
1038 | $ hg log -r . -T '{rev}: {lfs_files % "{file}: {lfsoid}\n"}\n' | |
1039 | 4: |
|
1039 | 4: | |
1040 |
|
1040 | |||
1041 | $ mv .hglfs_ .hglfs |
|
1041 | $ mv .hglfs_ .hglfs | |
1042 | $ echo '012345678901234567890abc' > lfs.test |
|
1042 | $ echo '012345678901234567890abc' > lfs.test | |
1043 | $ hg ci -m 'back to lfs' |
|
1043 | $ hg ci -m 'back to lfs' | |
1044 | $ hg rm lfs.test |
|
1044 | $ hg rm lfs.test | |
1045 | $ hg ci -qm 'remove lfs' |
|
1045 | $ hg ci -qm 'remove lfs' | |
1046 |
|
1046 | |||
1047 | {lfs_files} will list deleted files too |
|
1047 | {lfs_files} will list deleted files too | |
1048 |
|
1048 | |||
1049 | $ hg log -T "{lfs_files % '{rev} {file}: {lfspointer.oid}\n'}" |
|
1049 | $ hg log -T "{lfs_files % '{rev} {file}: {lfspointer.oid}\n'}" | |
1050 | 6 lfs.test: |
|
1050 | 6 lfs.test: | |
1051 | 5 lfs.test: sha256:43f8f41171b6f62a6b61ba4ce98a8a6c1649240a47ebafd43120aa215ac9e7f6 |
|
1051 | 5 lfs.test: sha256:43f8f41171b6f62a6b61ba4ce98a8a6c1649240a47ebafd43120aa215ac9e7f6 | |
1052 | 3 lfs.catchall: sha256:31f43b9c62b540126b0ad5884dc013d21a61c9329b77de1fceeae2fc58511573 |
|
1052 | 3 lfs.catchall: sha256:31f43b9c62b540126b0ad5884dc013d21a61c9329b77de1fceeae2fc58511573 | |
1053 | 3 lfs.test: sha256:8acd23467967bc7b8cc5a280056589b0ba0b17ff21dbd88a7b6474d6290378a6 |
|
1053 | 3 lfs.test: sha256:8acd23467967bc7b8cc5a280056589b0ba0b17ff21dbd88a7b6474d6290378a6 | |
1054 | 2 lfs.catchall: sha256:d4ec46c2869ba22eceb42a729377432052d9dd75d82fc40390ebaadecee87ee9 |
|
1054 | 2 lfs.catchall: sha256:d4ec46c2869ba22eceb42a729377432052d9dd75d82fc40390ebaadecee87ee9 | |
1055 | 2 lfs.test: sha256:5489e6ced8c36a7b267292bde9fd5242a5f80a7482e8f23fa0477393dfaa4d6c |
|
1055 | 2 lfs.test: sha256:5489e6ced8c36a7b267292bde9fd5242a5f80a7482e8f23fa0477393dfaa4d6c | |
1056 |
|
1056 | |||
1057 | $ hg log -r 'file("set:lfs()")' -T '{rev} {join(lfs_files, ", ")}\n' |
|
1057 | $ hg log -r 'file("set:lfs()")' -T '{rev} {join(lfs_files, ", ")}\n' | |
1058 | 2 lfs.catchall, lfs.test |
|
1058 | 2 lfs.catchall, lfs.test | |
1059 | 3 lfs.catchall, lfs.test |
|
1059 | 3 lfs.catchall, lfs.test | |
1060 | 5 lfs.test |
|
1060 | 5 lfs.test | |
1061 | 6 lfs.test |
|
1061 | 6 lfs.test | |
1062 |
|
1062 | |||
1063 | $ cd .. |
|
1063 | $ cd .. | |
1064 |
|
1064 | |||
1065 | Unbundling adds a requirement to a non-lfs repo, if necessary. |
|
1065 | Unbundling adds a requirement to a non-lfs repo, if necessary. | |
1066 |
|
1066 | |||
1067 | $ hg bundle -R $TESTTMP/repo-del -qr 0 --base null nolfs.hg |
|
1067 | $ hg bundle -R $TESTTMP/repo-del -qr 0 --base null nolfs.hg | |
1068 | $ hg bundle -R convert_lfs2 -qr tip --base null lfs.hg |
|
1068 | $ hg bundle -R convert_lfs2 -qr tip --base null lfs.hg | |
1069 | $ hg init unbundle |
|
1069 | $ hg init unbundle | |
1070 | $ hg pull -R unbundle -q nolfs.hg |
|
1070 | $ hg pull -R unbundle -q nolfs.hg | |
1071 | $ grep lfs unbundle/.hg/requires |
|
1071 | $ grep lfs unbundle/.hg/requires | |
1072 | [1] |
|
1072 | [1] | |
1073 | $ hg pull -R unbundle -q lfs.hg |
|
1073 | $ hg pull -R unbundle -q lfs.hg | |
1074 | $ grep lfs unbundle/.hg/requires |
|
1074 | $ grep lfs unbundle/.hg/requires | |
1075 | lfs |
|
1075 | lfs | |
1076 |
|
1076 | |||
1077 | $ hg init no_lfs |
|
1077 | $ hg init no_lfs | |
1078 | $ cat >> no_lfs/.hg/hgrc <<EOF |
|
1078 | $ cat >> no_lfs/.hg/hgrc <<EOF | |
1079 | > [experimental] |
|
1079 | > [experimental] | |
1080 | > changegroup3 = True |
|
1080 | > changegroup3 = True | |
1081 | > [extensions] |
|
1081 | > [extensions] | |
1082 | > lfs=! |
|
1082 | > lfs=! | |
1083 | > EOF |
|
1083 | > EOF | |
1084 | $ cp -R no_lfs no_lfs2 |
|
1084 | $ cp -R no_lfs no_lfs2 | |
1085 |
|
1085 | |||
1086 | Pushing from a local lfs repo to a local repo without an lfs requirement and |
|
1086 | Pushing from a local lfs repo to a local repo without an lfs requirement and | |
1087 | with lfs disabled, fails. |
|
1087 | with lfs disabled, fails. | |
1088 |
|
1088 | |||
1089 | $ hg push -R convert_lfs2 no_lfs |
|
1089 | $ hg push -R convert_lfs2 no_lfs | |
1090 | pushing to no_lfs |
|
1090 | pushing to no_lfs | |
1091 | abort: required features are not supported in the destination: lfs |
|
1091 | abort: required features are not supported in the destination: lfs | |
1092 | [255] |
|
1092 | [255] | |
1093 | $ grep lfs no_lfs/.hg/requires |
|
1093 | $ grep lfs no_lfs/.hg/requires | |
1094 | [1] |
|
1094 | [1] | |
1095 |
|
1095 | |||
1096 | Pulling from a local lfs repo to a local repo without an lfs requirement and |
|
1096 | Pulling from a local lfs repo to a local repo without an lfs requirement and | |
1097 | with lfs disabled, fails. |
|
1097 | with lfs disabled, fails. | |
1098 |
|
1098 | |||
1099 | $ hg pull -R no_lfs2 convert_lfs2 |
|
1099 | $ hg pull -R no_lfs2 convert_lfs2 | |
1100 | pulling from convert_lfs2 |
|
1100 | pulling from convert_lfs2 | |
1101 | abort: required features are not supported in the destination: lfs |
|
1101 | abort: required features are not supported in the destination: lfs | |
1102 | [255] |
|
1102 | [255] | |
1103 | $ grep lfs no_lfs2/.hg/requires |
|
1103 | $ grep lfs no_lfs2/.hg/requires | |
1104 | [1] |
|
1104 | [1] |
@@ -1,203 +1,205 b'' | |||||
|
1 | #require no-chg | |||
|
2 | ||||
1 | revlog.parseindex must be able to parse the index file even if |
|
3 | revlog.parseindex must be able to parse the index file even if | |
2 | an index entry is split between two 64k blocks. The ideal test |
|
4 | an index entry is split between two 64k blocks. The ideal test | |
3 | would be to create an index file with inline data where |
|
5 | would be to create an index file with inline data where | |
4 | 64k < size < 64k + 64 (64k is the size of the read buffer, 64 is |
|
6 | 64k < size < 64k + 64 (64k is the size of the read buffer, 64 is | |
5 | the size of an index entry) and with an index entry starting right |
|
7 | the size of an index entry) and with an index entry starting right | |
6 | before the 64k block boundary, and try to read it. |
|
8 | before the 64k block boundary, and try to read it. | |
7 | We approximate that by reducing the read buffer to 1 byte. |
|
9 | We approximate that by reducing the read buffer to 1 byte. | |
8 |
|
10 | |||
9 | $ hg init a |
|
11 | $ hg init a | |
10 | $ cd a |
|
12 | $ cd a | |
11 | $ echo abc > foo |
|
13 | $ echo abc > foo | |
12 | $ hg add foo |
|
14 | $ hg add foo | |
13 | $ hg commit -m 'add foo' |
|
15 | $ hg commit -m 'add foo' | |
14 | $ echo >> foo |
|
16 | $ echo >> foo | |
15 | $ hg commit -m 'change foo' |
|
17 | $ hg commit -m 'change foo' | |
16 | $ hg log -r 0: |
|
18 | $ hg log -r 0: | |
17 | changeset: 0:7c31755bf9b5 |
|
19 | changeset: 0:7c31755bf9b5 | |
18 | user: test |
|
20 | user: test | |
19 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
21 | date: Thu Jan 01 00:00:00 1970 +0000 | |
20 | summary: add foo |
|
22 | summary: add foo | |
21 |
|
23 | |||
22 | changeset: 1:26333235a41c |
|
24 | changeset: 1:26333235a41c | |
23 | tag: tip |
|
25 | tag: tip | |
24 | user: test |
|
26 | user: test | |
25 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
27 | date: Thu Jan 01 00:00:00 1970 +0000 | |
26 | summary: change foo |
|
28 | summary: change foo | |
27 |
|
29 | |||
28 | $ cat >> test.py << EOF |
|
30 | $ cat >> test.py << EOF | |
29 | > from mercurial import changelog, vfs |
|
31 | > from mercurial import changelog, vfs | |
30 | > from mercurial.node import * |
|
32 | > from mercurial.node import * | |
31 | > |
|
33 | > | |
32 | > class singlebyteread(object): |
|
34 | > class singlebyteread(object): | |
33 | > def __init__(self, real): |
|
35 | > def __init__(self, real): | |
34 | > self.real = real |
|
36 | > self.real = real | |
35 | > |
|
37 | > | |
36 | > def read(self, size=-1): |
|
38 | > def read(self, size=-1): | |
37 | > if size == 65536: |
|
39 | > if size == 65536: | |
38 | > size = 1 |
|
40 | > size = 1 | |
39 | > return self.real.read(size) |
|
41 | > return self.real.read(size) | |
40 | > |
|
42 | > | |
41 | > def __getattr__(self, key): |
|
43 | > def __getattr__(self, key): | |
42 | > return getattr(self.real, key) |
|
44 | > return getattr(self.real, key) | |
43 | > |
|
45 | > | |
44 | > def __enter__(self): |
|
46 | > def __enter__(self): | |
45 | > self.real.__enter__() |
|
47 | > self.real.__enter__() | |
46 | > return self |
|
48 | > return self | |
47 | > |
|
49 | > | |
48 | > def __exit__(self, *args, **kwargs): |
|
50 | > def __exit__(self, *args, **kwargs): | |
49 | > return self.real.__exit__(*args, **kwargs) |
|
51 | > return self.real.__exit__(*args, **kwargs) | |
50 | > |
|
52 | > | |
51 | > def opener(*args): |
|
53 | > def opener(*args): | |
52 | > o = vfs.vfs(*args) |
|
54 | > o = vfs.vfs(*args) | |
53 | > def wrapper(*a, **kwargs): |
|
55 | > def wrapper(*a, **kwargs): | |
54 | > f = o(*a, **kwargs) |
|
56 | > f = o(*a, **kwargs) | |
55 | > return singlebyteread(f) |
|
57 | > return singlebyteread(f) | |
56 | > return wrapper |
|
58 | > return wrapper | |
57 | > |
|
59 | > | |
58 | > cl = changelog.changelog(opener('.hg/store')) |
|
60 | > cl = changelog.changelog(opener('.hg/store')) | |
59 | > print len(cl), 'revisions:' |
|
61 | > print len(cl), 'revisions:' | |
60 | > for r in cl: |
|
62 | > for r in cl: | |
61 | > print short(cl.node(r)) |
|
63 | > print short(cl.node(r)) | |
62 | > EOF |
|
64 | > EOF | |
63 | $ $PYTHON test.py |
|
65 | $ $PYTHON test.py | |
64 | 2 revisions: |
|
66 | 2 revisions: | |
65 | 7c31755bf9b5 |
|
67 | 7c31755bf9b5 | |
66 | 26333235a41c |
|
68 | 26333235a41c | |
67 |
|
69 | |||
68 | $ cd .. |
|
70 | $ cd .. | |
69 |
|
71 | |||
70 | #if no-pure |
|
72 | #if no-pure | |
71 |
|
73 | |||
72 | Test SEGV caused by bad revision passed to reachableroots() (issue4775): |
|
74 | Test SEGV caused by bad revision passed to reachableroots() (issue4775): | |
73 |
|
75 | |||
74 | $ cd a |
|
76 | $ cd a | |
75 |
|
77 | |||
76 | $ $PYTHON <<EOF |
|
78 | $ $PYTHON <<EOF | |
77 | > from mercurial import changelog, vfs |
|
79 | > from mercurial import changelog, vfs | |
78 | > cl = changelog.changelog(vfs.vfs('.hg/store')) |
|
80 | > cl = changelog.changelog(vfs.vfs('.hg/store')) | |
79 | > print 'good heads:' |
|
81 | > print 'good heads:' | |
80 | > for head in [0, len(cl) - 1, -1]: |
|
82 | > for head in [0, len(cl) - 1, -1]: | |
81 | > print'%s: %r' % (head, cl.reachableroots(0, [head], [0])) |
|
83 | > print'%s: %r' % (head, cl.reachableroots(0, [head], [0])) | |
82 | > print 'bad heads:' |
|
84 | > print 'bad heads:' | |
83 | > for head in [len(cl), 10000, -2, -10000, None]: |
|
85 | > for head in [len(cl), 10000, -2, -10000, None]: | |
84 | > print '%s:' % head, |
|
86 | > print '%s:' % head, | |
85 | > try: |
|
87 | > try: | |
86 | > cl.reachableroots(0, [head], [0]) |
|
88 | > cl.reachableroots(0, [head], [0]) | |
87 | > print 'uncaught buffer overflow?' |
|
89 | > print 'uncaught buffer overflow?' | |
88 | > except (IndexError, TypeError) as inst: |
|
90 | > except (IndexError, TypeError) as inst: | |
89 | > print inst |
|
91 | > print inst | |
90 | > print 'good roots:' |
|
92 | > print 'good roots:' | |
91 | > for root in [0, len(cl) - 1, -1]: |
|
93 | > for root in [0, len(cl) - 1, -1]: | |
92 | > print '%s: %r' % (root, cl.reachableroots(root, [len(cl) - 1], [root])) |
|
94 | > print '%s: %r' % (root, cl.reachableroots(root, [len(cl) - 1], [root])) | |
93 | > print 'out-of-range roots are ignored:' |
|
95 | > print 'out-of-range roots are ignored:' | |
94 | > for root in [len(cl), 10000, -2, -10000]: |
|
96 | > for root in [len(cl), 10000, -2, -10000]: | |
95 | > print '%s: %r' % (root, cl.reachableroots(root, [len(cl) - 1], [root])) |
|
97 | > print '%s: %r' % (root, cl.reachableroots(root, [len(cl) - 1], [root])) | |
96 | > print 'bad roots:' |
|
98 | > print 'bad roots:' | |
97 | > for root in [None]: |
|
99 | > for root in [None]: | |
98 | > print '%s:' % root, |
|
100 | > print '%s:' % root, | |
99 | > try: |
|
101 | > try: | |
100 | > cl.reachableroots(root, [len(cl) - 1], [root]) |
|
102 | > cl.reachableroots(root, [len(cl) - 1], [root]) | |
101 | > print 'uncaught error?' |
|
103 | > print 'uncaught error?' | |
102 | > except TypeError as inst: |
|
104 | > except TypeError as inst: | |
103 | > print inst |
|
105 | > print inst | |
104 | > EOF |
|
106 | > EOF | |
105 | good heads: |
|
107 | good heads: | |
106 | 0: [0] |
|
108 | 0: [0] | |
107 | 1: [0] |
|
109 | 1: [0] | |
108 | -1: [] |
|
110 | -1: [] | |
109 | bad heads: |
|
111 | bad heads: | |
110 | 2: head out of range |
|
112 | 2: head out of range | |
111 | 10000: head out of range |
|
113 | 10000: head out of range | |
112 | -2: head out of range |
|
114 | -2: head out of range | |
113 | -10000: head out of range |
|
115 | -10000: head out of range | |
114 | None: an integer is required |
|
116 | None: an integer is required | |
115 | good roots: |
|
117 | good roots: | |
116 | 0: [0] |
|
118 | 0: [0] | |
117 | 1: [1] |
|
119 | 1: [1] | |
118 | -1: [-1] |
|
120 | -1: [-1] | |
119 | out-of-range roots are ignored: |
|
121 | out-of-range roots are ignored: | |
120 | 2: [] |
|
122 | 2: [] | |
121 | 10000: [] |
|
123 | 10000: [] | |
122 | -2: [] |
|
124 | -2: [] | |
123 | -10000: [] |
|
125 | -10000: [] | |
124 | bad roots: |
|
126 | bad roots: | |
125 | None: an integer is required |
|
127 | None: an integer is required | |
126 |
|
128 | |||
127 | $ cd .. |
|
129 | $ cd .. | |
128 |
|
130 | |||
129 | Test corrupted p1/p2 fields that could cause SEGV at parsers.c: |
|
131 | Test corrupted p1/p2 fields that could cause SEGV at parsers.c: | |
130 |
|
132 | |||
131 | $ mkdir invalidparent |
|
133 | $ mkdir invalidparent | |
132 | $ cd invalidparent |
|
134 | $ cd invalidparent | |
133 |
|
135 | |||
134 | $ hg clone --pull -q --config phases.publish=False ../a limit |
|
136 | $ hg clone --pull -q --config phases.publish=False ../a limit | |
135 | $ hg clone --pull -q --config phases.publish=False ../a segv |
|
137 | $ hg clone --pull -q --config phases.publish=False ../a segv | |
136 | $ rm -R limit/.hg/cache segv/.hg/cache |
|
138 | $ rm -R limit/.hg/cache segv/.hg/cache | |
137 |
|
139 | |||
138 | $ $PYTHON <<EOF |
|
140 | $ $PYTHON <<EOF | |
139 | > data = open("limit/.hg/store/00changelog.i", "rb").read() |
|
141 | > data = open("limit/.hg/store/00changelog.i", "rb").read() | |
140 | > for n, p in [('limit', '\0\0\0\x02'), ('segv', '\0\x01\0\0')]: |
|
142 | > for n, p in [('limit', '\0\0\0\x02'), ('segv', '\0\x01\0\0')]: | |
141 | > # corrupt p1 at rev0 and p2 at rev1 |
|
143 | > # corrupt p1 at rev0 and p2 at rev1 | |
142 | > d = data[:24] + p + data[28:127 + 28] + p + data[127 + 32:] |
|
144 | > d = data[:24] + p + data[28:127 + 28] + p + data[127 + 32:] | |
143 | > open(n + "/.hg/store/00changelog.i", "wb").write(d) |
|
145 | > open(n + "/.hg/store/00changelog.i", "wb").write(d) | |
144 | > EOF |
|
146 | > EOF | |
145 |
|
147 | |||
146 | $ hg -R limit debugindex -f1 -c |
|
148 | $ hg -R limit debugindex -f1 -c | |
147 | rev flag size link p1 p2 nodeid |
|
149 | rev flag size link p1 p2 nodeid | |
148 | 0 0000 62 0 2 -1 7c31755bf9b5 |
|
150 | 0 0000 62 0 2 -1 7c31755bf9b5 | |
149 | 1 0000 65 1 0 2 26333235a41c |
|
151 | 1 0000 65 1 0 2 26333235a41c | |
150 |
|
152 | |||
151 | $ hg -R limit debugdeltachain -c |
|
153 | $ hg -R limit debugdeltachain -c | |
152 | rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio |
|
154 | rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio | |
153 | 0 1 1 -1 base 63 62 63 1.01613 63 0 0.00000 |
|
155 | 0 1 1 -1 base 63 62 63 1.01613 63 0 0.00000 | |
154 | 1 2 1 -1 base 66 65 66 1.01538 66 0 0.00000 |
|
156 | 1 2 1 -1 base 66 65 66 1.01538 66 0 0.00000 | |
155 |
|
157 | |||
156 | $ hg -R segv debugindex -f1 -c |
|
158 | $ hg -R segv debugindex -f1 -c | |
157 | rev flag size link p1 p2 nodeid |
|
159 | rev flag size link p1 p2 nodeid | |
158 | 0 0000 62 0 65536 -1 7c31755bf9b5 |
|
160 | 0 0000 62 0 65536 -1 7c31755bf9b5 | |
159 | 1 0000 65 1 0 65536 26333235a41c |
|
161 | 1 0000 65 1 0 65536 26333235a41c | |
160 |
|
162 | |||
161 | $ hg -R segv debugdeltachain -c |
|
163 | $ hg -R segv debugdeltachain -c | |
162 | rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio |
|
164 | rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio | |
163 | 0 1 1 -1 base 63 62 63 1.01613 63 0 0.00000 |
|
165 | 0 1 1 -1 base 63 62 63 1.01613 63 0 0.00000 | |
164 | 1 2 1 -1 base 66 65 66 1.01538 66 0 0.00000 |
|
166 | 1 2 1 -1 base 66 65 66 1.01538 66 0 0.00000 | |
165 |
|
167 | |||
166 | $ cat <<EOF > test.py |
|
168 | $ cat <<EOF > test.py | |
167 | > import sys |
|
169 | > import sys | |
168 | > from mercurial import changelog, vfs |
|
170 | > from mercurial import changelog, vfs | |
169 | > cl = changelog.changelog(vfs.vfs(sys.argv[1])) |
|
171 | > cl = changelog.changelog(vfs.vfs(sys.argv[1])) | |
170 | > n0, n1 = cl.node(0), cl.node(1) |
|
172 | > n0, n1 = cl.node(0), cl.node(1) | |
171 | > ops = [ |
|
173 | > ops = [ | |
172 | > ('reachableroots', |
|
174 | > ('reachableroots', | |
173 | > lambda: cl.index.reachableroots2(0, [1], [0], False)), |
|
175 | > lambda: cl.index.reachableroots2(0, [1], [0], False)), | |
174 | > ('compute_phases_map_sets', lambda: cl.computephases([[0], []])), |
|
176 | > ('compute_phases_map_sets', lambda: cl.computephases([[0], []])), | |
175 | > ('index_headrevs', lambda: cl.headrevs()), |
|
177 | > ('index_headrevs', lambda: cl.headrevs()), | |
176 | > ('find_gca_candidates', lambda: cl.commonancestorsheads(n0, n1)), |
|
178 | > ('find_gca_candidates', lambda: cl.commonancestorsheads(n0, n1)), | |
177 | > ('find_deepest', lambda: cl.ancestor(n0, n1)), |
|
179 | > ('find_deepest', lambda: cl.ancestor(n0, n1)), | |
178 | > ] |
|
180 | > ] | |
179 | > for l, f in ops: |
|
181 | > for l, f in ops: | |
180 | > print l + ':', |
|
182 | > print l + ':', | |
181 | > try: |
|
183 | > try: | |
182 | > f() |
|
184 | > f() | |
183 | > print 'uncaught buffer overflow?' |
|
185 | > print 'uncaught buffer overflow?' | |
184 | > except ValueError, inst: |
|
186 | > except ValueError, inst: | |
185 | > print inst |
|
187 | > print inst | |
186 | > EOF |
|
188 | > EOF | |
187 |
|
189 | |||
188 | $ $PYTHON test.py limit/.hg/store |
|
190 | $ $PYTHON test.py limit/.hg/store | |
189 | reachableroots: parent out of range |
|
191 | reachableroots: parent out of range | |
190 | compute_phases_map_sets: parent out of range |
|
192 | compute_phases_map_sets: parent out of range | |
191 | index_headrevs: parent out of range |
|
193 | index_headrevs: parent out of range | |
192 | find_gca_candidates: parent out of range |
|
194 | find_gca_candidates: parent out of range | |
193 | find_deepest: parent out of range |
|
195 | find_deepest: parent out of range | |
194 | $ $PYTHON test.py segv/.hg/store |
|
196 | $ $PYTHON test.py segv/.hg/store | |
195 | reachableroots: parent out of range |
|
197 | reachableroots: parent out of range | |
196 | compute_phases_map_sets: parent out of range |
|
198 | compute_phases_map_sets: parent out of range | |
197 | index_headrevs: parent out of range |
|
199 | index_headrevs: parent out of range | |
198 | find_gca_candidates: parent out of range |
|
200 | find_gca_candidates: parent out of range | |
199 | find_deepest: parent out of range |
|
201 | find_deepest: parent out of range | |
200 |
|
202 | |||
201 | $ cd .. |
|
203 | $ cd .. | |
202 |
|
204 | |||
203 | #endif |
|
205 | #endif |
@@ -1,155 +1,157 b'' | |||||
|
1 | #require no-chg | |||
|
2 | ||||
1 | $ hg init repo |
|
3 | $ hg init repo | |
2 | $ cd repo |
|
4 | $ cd repo | |
3 | $ echo foo > foo |
|
5 | $ echo foo > foo | |
4 | $ hg ci -qAm 'add foo' |
|
6 | $ hg ci -qAm 'add foo' | |
5 | $ echo >> foo |
|
7 | $ echo >> foo | |
6 | $ hg ci -m 'change foo' |
|
8 | $ hg ci -m 'change foo' | |
7 | $ hg up -qC 0 |
|
9 | $ hg up -qC 0 | |
8 | $ echo bar > bar |
|
10 | $ echo bar > bar | |
9 | $ hg ci -qAm 'add bar' |
|
11 | $ hg ci -qAm 'add bar' | |
10 |
|
12 | |||
11 | $ hg log |
|
13 | $ hg log | |
12 | changeset: 2:effea6de0384 |
|
14 | changeset: 2:effea6de0384 | |
13 | tag: tip |
|
15 | tag: tip | |
14 | parent: 0:bbd179dfa0a7 |
|
16 | parent: 0:bbd179dfa0a7 | |
15 | user: test |
|
17 | user: test | |
16 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
18 | date: Thu Jan 01 00:00:00 1970 +0000 | |
17 | summary: add bar |
|
19 | summary: add bar | |
18 |
|
20 | |||
19 | changeset: 1:ed1b79f46b9a |
|
21 | changeset: 1:ed1b79f46b9a | |
20 | user: test |
|
22 | user: test | |
21 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
23 | date: Thu Jan 01 00:00:00 1970 +0000 | |
22 | summary: change foo |
|
24 | summary: change foo | |
23 |
|
25 | |||
24 | changeset: 0:bbd179dfa0a7 |
|
26 | changeset: 0:bbd179dfa0a7 | |
25 | user: test |
|
27 | user: test | |
26 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
28 | date: Thu Jan 01 00:00:00 1970 +0000 | |
27 | summary: add foo |
|
29 | summary: add foo | |
28 |
|
30 | |||
29 | $ cd .. |
|
31 | $ cd .. | |
30 |
|
32 | |||
31 | Test pullbundle functionality |
|
33 | Test pullbundle functionality | |
32 |
|
34 | |||
33 | $ cd repo |
|
35 | $ cd repo | |
34 | $ cat <<EOF > .hg/hgrc |
|
36 | $ cat <<EOF > .hg/hgrc | |
35 | > [server] |
|
37 | > [server] | |
36 | > pullbundle = True |
|
38 | > pullbundle = True | |
37 | > [extensions] |
|
39 | > [extensions] | |
38 | > blackbox = |
|
40 | > blackbox = | |
39 | > EOF |
|
41 | > EOF | |
40 | $ hg bundle --base null -r 0 .hg/0.hg |
|
42 | $ hg bundle --base null -r 0 .hg/0.hg | |
41 | 1 changesets found |
|
43 | 1 changesets found | |
42 | $ hg bundle --base 0 -r 1 .hg/1.hg |
|
44 | $ hg bundle --base 0 -r 1 .hg/1.hg | |
43 | 1 changesets found |
|
45 | 1 changesets found | |
44 | $ hg bundle --base 1 -r 2 .hg/2.hg |
|
46 | $ hg bundle --base 1 -r 2 .hg/2.hg | |
45 | 1 changesets found |
|
47 | 1 changesets found | |
46 | $ cat <<EOF > .hg/pullbundles.manifest |
|
48 | $ cat <<EOF > .hg/pullbundles.manifest | |
47 | > 2.hg heads=effea6de0384e684f44435651cb7bd70b8735bd4 bases=bbd179dfa0a71671c253b3ae0aa1513b60d199fa |
|
49 | > 2.hg heads=effea6de0384e684f44435651cb7bd70b8735bd4 bases=bbd179dfa0a71671c253b3ae0aa1513b60d199fa | |
48 | > 1.hg heads=ed1b79f46b9a29f5a6efa59cf12fcfca43bead5a bases=bbd179dfa0a71671c253b3ae0aa1513b60d199fa |
|
50 | > 1.hg heads=ed1b79f46b9a29f5a6efa59cf12fcfca43bead5a bases=bbd179dfa0a71671c253b3ae0aa1513b60d199fa | |
49 | > 0.hg heads=bbd179dfa0a71671c253b3ae0aa1513b60d199fa |
|
51 | > 0.hg heads=bbd179dfa0a71671c253b3ae0aa1513b60d199fa | |
50 | > EOF |
|
52 | > EOF | |
51 | $ hg --config blackbox.track=debug --debug serve -p $HGPORT2 -d --pid-file=../repo.pid |
|
53 | $ hg --config blackbox.track=debug --debug serve -p $HGPORT2 -d --pid-file=../repo.pid | |
52 | listening at http://*:$HGPORT2/ (bound to $LOCALIP:$HGPORT2) (glob) (?) |
|
54 | listening at http://*:$HGPORT2/ (bound to $LOCALIP:$HGPORT2) (glob) (?) | |
53 | $ cat ../repo.pid >> $DAEMON_PIDS |
|
55 | $ cat ../repo.pid >> $DAEMON_PIDS | |
54 | $ cd .. |
|
56 | $ cd .. | |
55 | $ hg clone -r 0 http://localhost:$HGPORT2/ repo.pullbundle |
|
57 | $ hg clone -r 0 http://localhost:$HGPORT2/ repo.pullbundle | |
56 | adding changesets |
|
58 | adding changesets | |
57 | adding manifests |
|
59 | adding manifests | |
58 | adding file changes |
|
60 | adding file changes | |
59 | added 1 changesets with 1 changes to 1 files |
|
61 | added 1 changesets with 1 changes to 1 files | |
60 | new changesets bbd179dfa0a7 |
|
62 | new changesets bbd179dfa0a7 | |
61 | updating to branch default |
|
63 | updating to branch default | |
62 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
64 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
63 | $ cd repo.pullbundle |
|
65 | $ cd repo.pullbundle | |
64 | $ hg pull -r 1 |
|
66 | $ hg pull -r 1 | |
65 | pulling from http://localhost:$HGPORT2/ |
|
67 | pulling from http://localhost:$HGPORT2/ | |
66 | searching for changes |
|
68 | searching for changes | |
67 | adding changesets |
|
69 | adding changesets | |
68 | adding manifests |
|
70 | adding manifests | |
69 | adding file changes |
|
71 | adding file changes | |
70 | added 1 changesets with 1 changes to 1 files |
|
72 | added 1 changesets with 1 changes to 1 files | |
71 | new changesets ed1b79f46b9a |
|
73 | new changesets ed1b79f46b9a | |
72 | (run 'hg update' to get a working copy) |
|
74 | (run 'hg update' to get a working copy) | |
73 | $ hg pull -r 2 |
|
75 | $ hg pull -r 2 | |
74 | pulling from http://localhost:$HGPORT2/ |
|
76 | pulling from http://localhost:$HGPORT2/ | |
75 | searching for changes |
|
77 | searching for changes | |
76 | adding changesets |
|
78 | adding changesets | |
77 | adding manifests |
|
79 | adding manifests | |
78 | adding file changes |
|
80 | adding file changes | |
79 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
81 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
80 | new changesets effea6de0384 |
|
82 | new changesets effea6de0384 | |
81 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
83 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
82 | $ cd .. |
|
84 | $ cd .. | |
83 | $ killdaemons.py |
|
85 | $ killdaemons.py | |
84 | $ grep 'sending pullbundle ' repo/.hg/blackbox.log |
|
86 | $ grep 'sending pullbundle ' repo/.hg/blackbox.log | |
85 | * sending pullbundle "0.hg" (glob) |
|
87 | * sending pullbundle "0.hg" (glob) | |
86 | * sending pullbundle "1.hg" (glob) |
|
88 | * sending pullbundle "1.hg" (glob) | |
87 | * sending pullbundle "2.hg" (glob) |
|
89 | * sending pullbundle "2.hg" (glob) | |
88 | $ rm repo/.hg/blackbox.log |
|
90 | $ rm repo/.hg/blackbox.log | |
89 |
|
91 | |||
90 | Test pullbundle functionality for incremental pulls |
|
92 | Test pullbundle functionality for incremental pulls | |
91 |
|
93 | |||
92 | $ cd repo |
|
94 | $ cd repo | |
93 | $ hg --config blackbox.track=debug --debug serve -p $HGPORT2 -d --pid-file=../repo.pid |
|
95 | $ hg --config blackbox.track=debug --debug serve -p $HGPORT2 -d --pid-file=../repo.pid | |
94 | listening at http://*:$HGPORT2/ (bound to $LOCALIP:$HGPORT2) (glob) (?) |
|
96 | listening at http://*:$HGPORT2/ (bound to $LOCALIP:$HGPORT2) (glob) (?) | |
95 | $ cat ../repo.pid >> $DAEMON_PIDS |
|
97 | $ cat ../repo.pid >> $DAEMON_PIDS | |
96 | $ cd .. |
|
98 | $ cd .. | |
97 | $ hg clone http://localhost:$HGPORT2/ repo.pullbundle2 |
|
99 | $ hg clone http://localhost:$HGPORT2/ repo.pullbundle2 | |
98 | requesting all changes |
|
100 | requesting all changes | |
99 | adding changesets |
|
101 | adding changesets | |
100 | adding manifests |
|
102 | adding manifests | |
101 | adding file changes |
|
103 | adding file changes | |
102 | added 1 changesets with 1 changes to 1 files |
|
104 | added 1 changesets with 1 changes to 1 files | |
103 | adding changesets |
|
105 | adding changesets | |
104 | adding manifests |
|
106 | adding manifests | |
105 | adding file changes |
|
107 | adding file changes | |
106 | added 1 changesets with 1 changes to 1 files |
|
108 | added 1 changesets with 1 changes to 1 files | |
107 | adding changesets |
|
109 | adding changesets | |
108 | adding manifests |
|
110 | adding manifests | |
109 | adding file changes |
|
111 | adding file changes | |
110 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
112 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
111 | new changesets bbd179dfa0a7:ed1b79f46b9a |
|
113 | new changesets bbd179dfa0a7:ed1b79f46b9a | |
112 | updating to branch default |
|
114 | updating to branch default | |
113 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
115 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
114 | $ killdaemons.py |
|
116 | $ killdaemons.py | |
115 | $ grep 'sending pullbundle ' repo/.hg/blackbox.log |
|
117 | $ grep 'sending pullbundle ' repo/.hg/blackbox.log | |
116 | * sending pullbundle "0.hg" (glob) |
|
118 | * sending pullbundle "0.hg" (glob) | |
117 | * sending pullbundle "2.hg" (glob) |
|
119 | * sending pullbundle "2.hg" (glob) | |
118 | * sending pullbundle "1.hg" (glob) |
|
120 | * sending pullbundle "1.hg" (glob) | |
119 | $ rm repo/.hg/blackbox.log |
|
121 | $ rm repo/.hg/blackbox.log | |
120 |
|
122 | |||
121 | Test recovery from misconfigured server sending no new data |
|
123 | Test recovery from misconfigured server sending no new data | |
122 |
|
124 | |||
123 | $ cd repo |
|
125 | $ cd repo | |
124 | $ cat <<EOF > .hg/pullbundles.manifest |
|
126 | $ cat <<EOF > .hg/pullbundles.manifest | |
125 | > 0.hg heads=ed1b79f46b9a29f5a6efa59cf12fcfca43bead5a bases=bbd179dfa0a71671c253b3ae0aa1513b60d199fa |
|
127 | > 0.hg heads=ed1b79f46b9a29f5a6efa59cf12fcfca43bead5a bases=bbd179dfa0a71671c253b3ae0aa1513b60d199fa | |
126 | > 0.hg heads=bbd179dfa0a71671c253b3ae0aa1513b60d199fa |
|
128 | > 0.hg heads=bbd179dfa0a71671c253b3ae0aa1513b60d199fa | |
127 | > EOF |
|
129 | > EOF | |
128 | $ hg --config blackbox.track=debug --debug serve -p $HGPORT2 -d --pid-file=../repo.pid |
|
130 | $ hg --config blackbox.track=debug --debug serve -p $HGPORT2 -d --pid-file=../repo.pid | |
129 | listening at http://*:$HGPORT2/ (bound to $LOCALIP:$HGPORT2) (glob) (?) |
|
131 | listening at http://*:$HGPORT2/ (bound to $LOCALIP:$HGPORT2) (glob) (?) | |
130 | $ cat ../repo.pid >> $DAEMON_PIDS |
|
132 | $ cat ../repo.pid >> $DAEMON_PIDS | |
131 | $ cd .. |
|
133 | $ cd .. | |
132 | $ hg clone -r 0 http://localhost:$HGPORT2/ repo.pullbundle3 |
|
134 | $ hg clone -r 0 http://localhost:$HGPORT2/ repo.pullbundle3 | |
133 | adding changesets |
|
135 | adding changesets | |
134 | adding manifests |
|
136 | adding manifests | |
135 | adding file changes |
|
137 | adding file changes | |
136 | added 1 changesets with 1 changes to 1 files |
|
138 | added 1 changesets with 1 changes to 1 files | |
137 | new changesets bbd179dfa0a7 |
|
139 | new changesets bbd179dfa0a7 | |
138 | updating to branch default |
|
140 | updating to branch default | |
139 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
141 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
140 | $ cd repo.pullbundle3 |
|
142 | $ cd repo.pullbundle3 | |
141 | $ hg pull -r 1 |
|
143 | $ hg pull -r 1 | |
142 | pulling from http://localhost:$HGPORT2/ |
|
144 | pulling from http://localhost:$HGPORT2/ | |
143 | searching for changes |
|
145 | searching for changes | |
144 | adding changesets |
|
146 | adding changesets | |
145 | adding manifests |
|
147 | adding manifests | |
146 | adding file changes |
|
148 | adding file changes | |
147 | added 0 changesets with 0 changes to 1 files |
|
149 | added 0 changesets with 0 changes to 1 files | |
148 | abort: 00changelog.i@ed1b79f46b9a: no node! |
|
150 | abort: 00changelog.i@ed1b79f46b9a: no node! | |
149 | [255] |
|
151 | [255] | |
150 | $ cd .. |
|
152 | $ cd .. | |
151 | $ killdaemons.py |
|
153 | $ killdaemons.py | |
152 | $ grep 'sending pullbundle ' repo/.hg/blackbox.log |
|
154 | $ grep 'sending pullbundle ' repo/.hg/blackbox.log | |
153 | * sending pullbundle "0.hg" (glob) |
|
155 | * sending pullbundle "0.hg" (glob) | |
154 | * sending pullbundle "0.hg" (glob) |
|
156 | * sending pullbundle "0.hg" (glob) | |
155 | $ rm repo/.hg/blackbox.log |
|
157 | $ rm repo/.hg/blackbox.log |
@@ -1,424 +1,426 b'' | |||||
|
1 | #require no-chg | |||
|
2 | ||||
1 | #testcases bundle1 bundle2 |
|
3 | #testcases bundle1 bundle2 | |
2 |
|
4 | |||
3 | #if bundle1 |
|
5 | #if bundle1 | |
4 | $ cat << EOF >> $HGRCPATH |
|
6 | $ cat << EOF >> $HGRCPATH | |
5 | > [devel] |
|
7 | > [devel] | |
6 | > # This test is dedicated to interaction through old bundle |
|
8 | > # This test is dedicated to interaction through old bundle | |
7 | > legacy.exchange = bundle1 |
|
9 | > legacy.exchange = bundle1 | |
8 | > EOF |
|
10 | > EOF | |
9 | #endif |
|
11 | #endif | |
10 |
|
12 | |||
11 | $ hg init test |
|
13 | $ hg init test | |
12 | $ cd test |
|
14 | $ cd test | |
13 | $ echo a > a |
|
15 | $ echo a > a | |
14 | $ hg ci -Ama |
|
16 | $ hg ci -Ama | |
15 | adding a |
|
17 | adding a | |
16 | $ cd .. |
|
18 | $ cd .. | |
17 | $ hg clone test test2 |
|
19 | $ hg clone test test2 | |
18 | updating to branch default |
|
20 | updating to branch default | |
19 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
21 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
20 | $ cd test2 |
|
22 | $ cd test2 | |
21 | $ echo a >> a |
|
23 | $ echo a >> a | |
22 | $ hg ci -mb |
|
24 | $ hg ci -mb | |
23 | $ req() { |
|
25 | $ req() { | |
24 | > hg $1 serve -p $HGPORT -d --pid-file=hg.pid -E errors.log |
|
26 | > hg $1 serve -p $HGPORT -d --pid-file=hg.pid -E errors.log | |
25 | > cat hg.pid >> $DAEMON_PIDS |
|
27 | > cat hg.pid >> $DAEMON_PIDS | |
26 | > hg --cwd ../test2 push http://localhost:$HGPORT/ |
|
28 | > hg --cwd ../test2 push http://localhost:$HGPORT/ | |
27 | > exitstatus=$? |
|
29 | > exitstatus=$? | |
28 | > killdaemons.py |
|
30 | > killdaemons.py | |
29 | > echo % serve errors |
|
31 | > echo % serve errors | |
30 | > cat errors.log |
|
32 | > cat errors.log | |
31 | > return $exitstatus |
|
33 | > return $exitstatus | |
32 | > } |
|
34 | > } | |
33 | $ cd ../test |
|
35 | $ cd ../test | |
34 |
|
36 | |||
35 | expect ssl error |
|
37 | expect ssl error | |
36 |
|
38 | |||
37 | $ req |
|
39 | $ req | |
38 | pushing to http://localhost:$HGPORT/ |
|
40 | pushing to http://localhost:$HGPORT/ | |
39 | searching for changes |
|
41 | searching for changes | |
40 | abort: HTTP Error 403: ssl required |
|
42 | abort: HTTP Error 403: ssl required | |
41 | % serve errors |
|
43 | % serve errors | |
42 | [255] |
|
44 | [255] | |
43 |
|
45 | |||
44 | expect authorization error |
|
46 | expect authorization error | |
45 |
|
47 | |||
46 | $ echo '[web]' > .hg/hgrc |
|
48 | $ echo '[web]' > .hg/hgrc | |
47 | $ echo 'push_ssl = false' >> .hg/hgrc |
|
49 | $ echo 'push_ssl = false' >> .hg/hgrc | |
48 | $ req |
|
50 | $ req | |
49 | pushing to http://localhost:$HGPORT/ |
|
51 | pushing to http://localhost:$HGPORT/ | |
50 | searching for changes |
|
52 | searching for changes | |
51 | abort: authorization failed |
|
53 | abort: authorization failed | |
52 | % serve errors |
|
54 | % serve errors | |
53 | [255] |
|
55 | [255] | |
54 |
|
56 | |||
55 | expect authorization error: must have authorized user |
|
57 | expect authorization error: must have authorized user | |
56 |
|
58 | |||
57 | $ echo 'allow_push = unperson' >> .hg/hgrc |
|
59 | $ echo 'allow_push = unperson' >> .hg/hgrc | |
58 | $ req |
|
60 | $ req | |
59 | pushing to http://localhost:$HGPORT/ |
|
61 | pushing to http://localhost:$HGPORT/ | |
60 | searching for changes |
|
62 | searching for changes | |
61 | abort: authorization failed |
|
63 | abort: authorization failed | |
62 | % serve errors |
|
64 | % serve errors | |
63 | [255] |
|
65 | [255] | |
64 |
|
66 | |||
65 | expect success |
|
67 | expect success | |
66 |
|
68 | |||
67 | $ cat > $TESTTMP/hook.sh <<'EOF' |
|
69 | $ cat > $TESTTMP/hook.sh <<'EOF' | |
68 | > echo "phase-move: $HG_NODE: $HG_OLDPHASE -> $HG_PHASE" |
|
70 | > echo "phase-move: $HG_NODE: $HG_OLDPHASE -> $HG_PHASE" | |
69 | > EOF |
|
71 | > EOF | |
70 |
|
72 | |||
71 | #if bundle1 |
|
73 | #if bundle1 | |
72 | $ cat >> .hg/hgrc <<EOF |
|
74 | $ cat >> .hg/hgrc <<EOF | |
73 | > allow_push = * |
|
75 | > allow_push = * | |
74 | > [hooks] |
|
76 | > [hooks] | |
75 | > changegroup = sh -c "printenv.py changegroup 0" |
|
77 | > changegroup = sh -c "printenv.py changegroup 0" | |
76 | > pushkey = sh -c "printenv.py pushkey 0" |
|
78 | > pushkey = sh -c "printenv.py pushkey 0" | |
77 | > txnclose-phase.test = sh $TESTTMP/hook.sh |
|
79 | > txnclose-phase.test = sh $TESTTMP/hook.sh | |
78 | > EOF |
|
80 | > EOF | |
79 | $ req "--debug --config extensions.blackbox=" |
|
81 | $ req "--debug --config extensions.blackbox=" | |
80 | listening at http://*:$HGPORT/ (bound to $LOCALIP:$HGPORT) (glob) (?) |
|
82 | listening at http://*:$HGPORT/ (bound to $LOCALIP:$HGPORT) (glob) (?) | |
81 | pushing to http://localhost:$HGPORT/ |
|
83 | pushing to http://localhost:$HGPORT/ | |
82 | searching for changes |
|
84 | searching for changes | |
83 | remote: redirecting incoming bundle to */hg-unbundle-* (glob) |
|
85 | remote: redirecting incoming bundle to */hg-unbundle-* (glob) | |
84 | remote: adding changesets |
|
86 | remote: adding changesets | |
85 | remote: add changeset ba677d0156c1 |
|
87 | remote: add changeset ba677d0156c1 | |
86 | remote: adding manifests |
|
88 | remote: adding manifests | |
87 | remote: adding file changes |
|
89 | remote: adding file changes | |
88 | remote: adding a revisions |
|
90 | remote: adding a revisions | |
89 | remote: added 1 changesets with 1 changes to 1 files |
|
91 | remote: added 1 changesets with 1 changes to 1 files | |
90 | remote: updating the branch cache |
|
92 | remote: updating the branch cache | |
91 | remote: running hook txnclose-phase.test: sh $TESTTMP/hook.sh |
|
93 | remote: running hook txnclose-phase.test: sh $TESTTMP/hook.sh | |
92 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public |
|
94 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public | |
93 | remote: running hook txnclose-phase.test: sh $TESTTMP/hook.sh |
|
95 | remote: running hook txnclose-phase.test: sh $TESTTMP/hook.sh | |
94 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public |
|
96 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public | |
95 | remote: running hook changegroup: sh -c "printenv.py changegroup 0" |
|
97 | remote: running hook changegroup: sh -c "printenv.py changegroup 0" | |
96 | remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) |
|
98 | remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) | |
97 | % serve errors |
|
99 | % serve errors | |
98 | $ hg rollback |
|
100 | $ hg rollback | |
99 | repository tip rolled back to revision 0 (undo serve) |
|
101 | repository tip rolled back to revision 0 (undo serve) | |
100 | $ req "--debug --config server.streamunbundle=True --config extensions.blackbox=" |
|
102 | $ req "--debug --config server.streamunbundle=True --config extensions.blackbox=" | |
101 | listening at http://*:$HGPORT/ (bound to $LOCALIP:$HGPORT) (glob) (?) |
|
103 | listening at http://*:$HGPORT/ (bound to $LOCALIP:$HGPORT) (glob) (?) | |
102 | pushing to http://localhost:$HGPORT/ |
|
104 | pushing to http://localhost:$HGPORT/ | |
103 | searching for changes |
|
105 | searching for changes | |
104 | remote: adding changesets |
|
106 | remote: adding changesets | |
105 | remote: add changeset ba677d0156c1 |
|
107 | remote: add changeset ba677d0156c1 | |
106 | remote: adding manifests |
|
108 | remote: adding manifests | |
107 | remote: adding file changes |
|
109 | remote: adding file changes | |
108 | remote: adding a revisions |
|
110 | remote: adding a revisions | |
109 | remote: added 1 changesets with 1 changes to 1 files |
|
111 | remote: added 1 changesets with 1 changes to 1 files | |
110 | remote: updating the branch cache |
|
112 | remote: updating the branch cache | |
111 | remote: running hook txnclose-phase.test: sh $TESTTMP/hook.sh |
|
113 | remote: running hook txnclose-phase.test: sh $TESTTMP/hook.sh | |
112 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public |
|
114 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public | |
113 | remote: running hook txnclose-phase.test: sh $TESTTMP/hook.sh |
|
115 | remote: running hook txnclose-phase.test: sh $TESTTMP/hook.sh | |
114 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public |
|
116 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public | |
115 | remote: running hook changegroup: sh -c "printenv.py changegroup 0" |
|
117 | remote: running hook changegroup: sh -c "printenv.py changegroup 0" | |
116 | remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) |
|
118 | remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) | |
117 | % serve errors |
|
119 | % serve errors | |
118 | $ hg rollback |
|
120 | $ hg rollback | |
119 | repository tip rolled back to revision 0 (undo serve) |
|
121 | repository tip rolled back to revision 0 (undo serve) | |
120 | #endif |
|
122 | #endif | |
121 |
|
123 | |||
122 | #if bundle2 |
|
124 | #if bundle2 | |
123 | $ cat >> .hg/hgrc <<EOF |
|
125 | $ cat >> .hg/hgrc <<EOF | |
124 | > allow_push = * |
|
126 | > allow_push = * | |
125 | > [hooks] |
|
127 | > [hooks] | |
126 | > changegroup = sh -c "printenv.py changegroup 0" |
|
128 | > changegroup = sh -c "printenv.py changegroup 0" | |
127 | > pushkey = sh -c "printenv.py pushkey 0" |
|
129 | > pushkey = sh -c "printenv.py pushkey 0" | |
128 | > txnclose-phase.test = sh $TESTTMP/hook.sh |
|
130 | > txnclose-phase.test = sh $TESTTMP/hook.sh | |
129 | > EOF |
|
131 | > EOF | |
130 | $ req |
|
132 | $ req | |
131 | pushing to http://localhost:$HGPORT/ |
|
133 | pushing to http://localhost:$HGPORT/ | |
132 | searching for changes |
|
134 | searching for changes | |
133 | remote: adding changesets |
|
135 | remote: adding changesets | |
134 | remote: adding manifests |
|
136 | remote: adding manifests | |
135 | remote: adding file changes |
|
137 | remote: adding file changes | |
136 | remote: added 1 changesets with 1 changes to 1 files |
|
138 | remote: added 1 changesets with 1 changes to 1 files | |
137 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public |
|
139 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public | |
138 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public |
|
140 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public | |
139 | remote: changegroup hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) |
|
141 | remote: changegroup hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) | |
140 | % serve errors |
|
142 | % serve errors | |
141 | $ hg rollback |
|
143 | $ hg rollback | |
142 | repository tip rolled back to revision 0 (undo serve) |
|
144 | repository tip rolled back to revision 0 (undo serve) | |
143 | #endif |
|
145 | #endif | |
144 |
|
146 | |||
145 | expect success, server lacks the httpheader capability |
|
147 | expect success, server lacks the httpheader capability | |
146 |
|
148 | |||
147 | $ CAP=httpheader |
|
149 | $ CAP=httpheader | |
148 | $ . "$TESTDIR/notcapable" |
|
150 | $ . "$TESTDIR/notcapable" | |
149 | $ req |
|
151 | $ req | |
150 | pushing to http://localhost:$HGPORT/ |
|
152 | pushing to http://localhost:$HGPORT/ | |
151 | searching for changes |
|
153 | searching for changes | |
152 | remote: adding changesets |
|
154 | remote: adding changesets | |
153 | remote: adding manifests |
|
155 | remote: adding manifests | |
154 | remote: adding file changes |
|
156 | remote: adding file changes | |
155 | remote: added 1 changesets with 1 changes to 1 files |
|
157 | remote: added 1 changesets with 1 changes to 1 files | |
156 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public |
|
158 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public | |
157 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public |
|
159 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public | |
158 | remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) (bundle1 !) |
|
160 | remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) (bundle1 !) | |
159 | remote: changegroup hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) (bundle2 !) |
|
161 | remote: changegroup hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) (bundle2 !) | |
160 | % serve errors |
|
162 | % serve errors | |
161 | $ hg rollback |
|
163 | $ hg rollback | |
162 | repository tip rolled back to revision 0 (undo serve) |
|
164 | repository tip rolled back to revision 0 (undo serve) | |
163 |
|
165 | |||
164 | expect success, server lacks the unbundlehash capability |
|
166 | expect success, server lacks the unbundlehash capability | |
165 |
|
167 | |||
166 | $ CAP=unbundlehash |
|
168 | $ CAP=unbundlehash | |
167 | $ . "$TESTDIR/notcapable" |
|
169 | $ . "$TESTDIR/notcapable" | |
168 | $ req |
|
170 | $ req | |
169 | pushing to http://localhost:$HGPORT/ |
|
171 | pushing to http://localhost:$HGPORT/ | |
170 | searching for changes |
|
172 | searching for changes | |
171 | remote: adding changesets |
|
173 | remote: adding changesets | |
172 | remote: adding manifests |
|
174 | remote: adding manifests | |
173 | remote: adding file changes |
|
175 | remote: adding file changes | |
174 | remote: added 1 changesets with 1 changes to 1 files |
|
176 | remote: added 1 changesets with 1 changes to 1 files | |
175 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public |
|
177 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public | |
176 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public |
|
178 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public | |
177 | remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) (bundle1 !) |
|
179 | remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) (bundle1 !) | |
178 | remote: changegroup hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) (bundle2 !) |
|
180 | remote: changegroup hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) (bundle2 !) | |
179 | % serve errors |
|
181 | % serve errors | |
180 | $ hg rollback |
|
182 | $ hg rollback | |
181 | repository tip rolled back to revision 0 (undo serve) |
|
183 | repository tip rolled back to revision 0 (undo serve) | |
182 |
|
184 | |||
183 | expect success, pre-d1b16a746db6 server supports the unbundle capability, but |
|
185 | expect success, pre-d1b16a746db6 server supports the unbundle capability, but | |
184 | has no parameter |
|
186 | has no parameter | |
185 |
|
187 | |||
186 | $ cat <<EOF > notcapable-unbundleparam.py |
|
188 | $ cat <<EOF > notcapable-unbundleparam.py | |
187 | > from mercurial import extensions, httppeer |
|
189 | > from mercurial import extensions, httppeer | |
188 | > def capable(orig, self, name): |
|
190 | > def capable(orig, self, name): | |
189 | > if name == 'unbundle': |
|
191 | > if name == 'unbundle': | |
190 | > return True |
|
192 | > return True | |
191 | > return orig(self, name) |
|
193 | > return orig(self, name) | |
192 | > def uisetup(ui): |
|
194 | > def uisetup(ui): | |
193 | > extensions.wrapfunction(httppeer.httppeer, 'capable', capable) |
|
195 | > extensions.wrapfunction(httppeer.httppeer, 'capable', capable) | |
194 | > EOF |
|
196 | > EOF | |
195 | $ cp $HGRCPATH $HGRCPATH.orig |
|
197 | $ cp $HGRCPATH $HGRCPATH.orig | |
196 | $ cat <<EOF >> $HGRCPATH |
|
198 | $ cat <<EOF >> $HGRCPATH | |
197 | > [extensions] |
|
199 | > [extensions] | |
198 | > notcapable-unbundleparam = `pwd`/notcapable-unbundleparam.py |
|
200 | > notcapable-unbundleparam = `pwd`/notcapable-unbundleparam.py | |
199 | > EOF |
|
201 | > EOF | |
200 | $ req |
|
202 | $ req | |
201 | pushing to http://localhost:$HGPORT/ |
|
203 | pushing to http://localhost:$HGPORT/ | |
202 | searching for changes |
|
204 | searching for changes | |
203 | remote: adding changesets |
|
205 | remote: adding changesets | |
204 | remote: adding manifests |
|
206 | remote: adding manifests | |
205 | remote: adding file changes |
|
207 | remote: adding file changes | |
206 | remote: added 1 changesets with 1 changes to 1 files |
|
208 | remote: added 1 changesets with 1 changes to 1 files | |
207 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public |
|
209 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public | |
208 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public |
|
210 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public | |
209 | remote: changegroup hook: * (glob) |
|
211 | remote: changegroup hook: * (glob) | |
210 | % serve errors |
|
212 | % serve errors | |
211 | $ hg rollback |
|
213 | $ hg rollback | |
212 | repository tip rolled back to revision 0 (undo serve) |
|
214 | repository tip rolled back to revision 0 (undo serve) | |
213 | $ mv $HGRCPATH.orig $HGRCPATH |
|
215 | $ mv $HGRCPATH.orig $HGRCPATH | |
214 |
|
216 | |||
215 | Test pushing to a publishing repository with a failing prepushkey hook |
|
217 | Test pushing to a publishing repository with a failing prepushkey hook | |
216 |
|
218 | |||
217 | $ cat > .hg/hgrc <<EOF |
|
219 | $ cat > .hg/hgrc <<EOF | |
218 | > [web] |
|
220 | > [web] | |
219 | > push_ssl = false |
|
221 | > push_ssl = false | |
220 | > allow_push = * |
|
222 | > allow_push = * | |
221 | > [hooks] |
|
223 | > [hooks] | |
222 | > prepushkey = sh -c "printenv.py prepushkey 1" |
|
224 | > prepushkey = sh -c "printenv.py prepushkey 1" | |
223 | > [devel] |
|
225 | > [devel] | |
224 | > legacy.exchange=phases |
|
226 | > legacy.exchange=phases | |
225 | > EOF |
|
227 | > EOF | |
226 |
|
228 | |||
227 | #if bundle1 |
|
229 | #if bundle1 | |
228 | Bundle1 works because a) phases are updated as part of changegroup application |
|
230 | Bundle1 works because a) phases are updated as part of changegroup application | |
229 | and b) client checks phases after the "unbundle" command. Since it sees no |
|
231 | and b) client checks phases after the "unbundle" command. Since it sees no | |
230 | phase changes are necessary, it doesn't send the "pushkey" command and the |
|
232 | phase changes are necessary, it doesn't send the "pushkey" command and the | |
231 | prepushkey hook never has to fire. |
|
233 | prepushkey hook never has to fire. | |
232 |
|
234 | |||
233 | $ req |
|
235 | $ req | |
234 | pushing to http://localhost:$HGPORT/ |
|
236 | pushing to http://localhost:$HGPORT/ | |
235 | searching for changes |
|
237 | searching for changes | |
236 | remote: adding changesets |
|
238 | remote: adding changesets | |
237 | remote: adding manifests |
|
239 | remote: adding manifests | |
238 | remote: adding file changes |
|
240 | remote: adding file changes | |
239 | remote: added 1 changesets with 1 changes to 1 files |
|
241 | remote: added 1 changesets with 1 changes to 1 files | |
240 | % serve errors |
|
242 | % serve errors | |
241 |
|
243 | |||
242 | #endif |
|
244 | #endif | |
243 |
|
245 | |||
244 | #if bundle2 |
|
246 | #if bundle2 | |
245 | Bundle2 sends a "pushkey" bundle2 part. This runs as part of the transaction |
|
247 | Bundle2 sends a "pushkey" bundle2 part. This runs as part of the transaction | |
246 | and fails the entire push. |
|
248 | and fails the entire push. | |
247 | $ req |
|
249 | $ req | |
248 | pushing to http://localhost:$HGPORT/ |
|
250 | pushing to http://localhost:$HGPORT/ | |
249 | searching for changes |
|
251 | searching for changes | |
250 | remote: adding changesets |
|
252 | remote: adding changesets | |
251 | remote: adding manifests |
|
253 | remote: adding manifests | |
252 | remote: adding file changes |
|
254 | remote: adding file changes | |
253 | remote: added 1 changesets with 1 changes to 1 files |
|
255 | remote: added 1 changesets with 1 changes to 1 files | |
254 | remote: prepushkey hook: HG_BUNDLE2=1 HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_OLD=1 HG_PENDING=$TESTTMP/test HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) |
|
256 | remote: prepushkey hook: HG_BUNDLE2=1 HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_OLD=1 HG_PENDING=$TESTTMP/test HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) | |
255 | remote: pushkey-abort: prepushkey hook exited with status 1 |
|
257 | remote: pushkey-abort: prepushkey hook exited with status 1 | |
256 | remote: transaction abort! |
|
258 | remote: transaction abort! | |
257 | remote: rollback completed |
|
259 | remote: rollback completed | |
258 | abort: updating ba677d0156c1 to public failed |
|
260 | abort: updating ba677d0156c1 to public failed | |
259 | % serve errors |
|
261 | % serve errors | |
260 | [255] |
|
262 | [255] | |
261 |
|
263 | |||
262 | #endif |
|
264 | #endif | |
263 |
|
265 | |||
264 | Now remove the failing prepushkey hook. |
|
266 | Now remove the failing prepushkey hook. | |
265 |
|
267 | |||
266 | $ cat >> .hg/hgrc <<EOF |
|
268 | $ cat >> .hg/hgrc <<EOF | |
267 | > [hooks] |
|
269 | > [hooks] | |
268 | > prepushkey = sh -c "printenv.py prepushkey 0" |
|
270 | > prepushkey = sh -c "printenv.py prepushkey 0" | |
269 | > EOF |
|
271 | > EOF | |
270 |
|
272 | |||
271 | We don't need to test bundle1 because it succeeded above. |
|
273 | We don't need to test bundle1 because it succeeded above. | |
272 |
|
274 | |||
273 | #if bundle2 |
|
275 | #if bundle2 | |
274 | $ req |
|
276 | $ req | |
275 | pushing to http://localhost:$HGPORT/ |
|
277 | pushing to http://localhost:$HGPORT/ | |
276 | searching for changes |
|
278 | searching for changes | |
277 | remote: adding changesets |
|
279 | remote: adding changesets | |
278 | remote: adding manifests |
|
280 | remote: adding manifests | |
279 | remote: adding file changes |
|
281 | remote: adding file changes | |
280 | remote: added 1 changesets with 1 changes to 1 files |
|
282 | remote: added 1 changesets with 1 changes to 1 files | |
281 | remote: prepushkey hook: HG_BUNDLE2=1 HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_OLD=1 HG_PENDING=$TESTTMP/test HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) |
|
283 | remote: prepushkey hook: HG_BUNDLE2=1 HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_OLD=1 HG_PENDING=$TESTTMP/test HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) | |
282 | % serve errors |
|
284 | % serve errors | |
283 | #endif |
|
285 | #endif | |
284 |
|
286 | |||
285 | $ hg --config extensions.strip= strip -r 1: |
|
287 | $ hg --config extensions.strip= strip -r 1: | |
286 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/ba677d0156c1-eea704d7-backup.hg |
|
288 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/ba677d0156c1-eea704d7-backup.hg | |
287 |
|
289 | |||
288 | Now do a variant of the above, except on a non-publishing repository |
|
290 | Now do a variant of the above, except on a non-publishing repository | |
289 |
|
291 | |||
290 | $ cat >> .hg/hgrc <<EOF |
|
292 | $ cat >> .hg/hgrc <<EOF | |
291 | > [phases] |
|
293 | > [phases] | |
292 | > publish = false |
|
294 | > publish = false | |
293 | > [hooks] |
|
295 | > [hooks] | |
294 | > prepushkey = sh -c "printenv.py prepushkey 1" |
|
296 | > prepushkey = sh -c "printenv.py prepushkey 1" | |
295 | > EOF |
|
297 | > EOF | |
296 |
|
298 | |||
297 | #if bundle1 |
|
299 | #if bundle1 | |
298 | $ req |
|
300 | $ req | |
299 | pushing to http://localhost:$HGPORT/ |
|
301 | pushing to http://localhost:$HGPORT/ | |
300 | searching for changes |
|
302 | searching for changes | |
301 | remote: adding changesets |
|
303 | remote: adding changesets | |
302 | remote: adding manifests |
|
304 | remote: adding manifests | |
303 | remote: adding file changes |
|
305 | remote: adding file changes | |
304 | remote: added 1 changesets with 1 changes to 1 files |
|
306 | remote: added 1 changesets with 1 changes to 1 files | |
305 | remote: prepushkey hook: HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_OLD=1 |
|
307 | remote: prepushkey hook: HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_OLD=1 | |
306 | remote: pushkey-abort: prepushkey hook exited with status 1 |
|
308 | remote: pushkey-abort: prepushkey hook exited with status 1 | |
307 | updating ba677d0156c1 to public failed! |
|
309 | updating ba677d0156c1 to public failed! | |
308 | % serve errors |
|
310 | % serve errors | |
309 | #endif |
|
311 | #endif | |
310 |
|
312 | |||
311 | #if bundle2 |
|
313 | #if bundle2 | |
312 | $ req |
|
314 | $ req | |
313 | pushing to http://localhost:$HGPORT/ |
|
315 | pushing to http://localhost:$HGPORT/ | |
314 | searching for changes |
|
316 | searching for changes | |
315 | remote: adding changesets |
|
317 | remote: adding changesets | |
316 | remote: adding manifests |
|
318 | remote: adding manifests | |
317 | remote: adding file changes |
|
319 | remote: adding file changes | |
318 | remote: added 1 changesets with 1 changes to 1 files |
|
320 | remote: added 1 changesets with 1 changes to 1 files | |
319 | remote: prepushkey hook: HG_BUNDLE2=1 HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_OLD=1 HG_PENDING=$TESTTMP/test HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) |
|
321 | remote: prepushkey hook: HG_BUNDLE2=1 HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_OLD=1 HG_PENDING=$TESTTMP/test HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) | |
320 | remote: pushkey-abort: prepushkey hook exited with status 1 |
|
322 | remote: pushkey-abort: prepushkey hook exited with status 1 | |
321 | remote: transaction abort! |
|
323 | remote: transaction abort! | |
322 | remote: rollback completed |
|
324 | remote: rollback completed | |
323 | abort: updating ba677d0156c1 to public failed |
|
325 | abort: updating ba677d0156c1 to public failed | |
324 | % serve errors |
|
326 | % serve errors | |
325 | [255] |
|
327 | [255] | |
326 | #endif |
|
328 | #endif | |
327 |
|
329 | |||
328 | Make phases updates work |
|
330 | Make phases updates work | |
329 |
|
331 | |||
330 | $ cat >> .hg/hgrc <<EOF |
|
332 | $ cat >> .hg/hgrc <<EOF | |
331 | > [hooks] |
|
333 | > [hooks] | |
332 | > prepushkey = sh -c "printenv.py prepushkey 0" |
|
334 | > prepushkey = sh -c "printenv.py prepushkey 0" | |
333 | > EOF |
|
335 | > EOF | |
334 |
|
336 | |||
335 | #if bundle1 |
|
337 | #if bundle1 | |
336 | $ req |
|
338 | $ req | |
337 | pushing to http://localhost:$HGPORT/ |
|
339 | pushing to http://localhost:$HGPORT/ | |
338 | searching for changes |
|
340 | searching for changes | |
339 | no changes found |
|
341 | no changes found | |
340 | remote: prepushkey hook: HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_OLD=1 |
|
342 | remote: prepushkey hook: HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_OLD=1 | |
341 | % serve errors |
|
343 | % serve errors | |
342 | [1] |
|
344 | [1] | |
343 | #endif |
|
345 | #endif | |
344 |
|
346 | |||
345 | #if bundle2 |
|
347 | #if bundle2 | |
346 | $ req |
|
348 | $ req | |
347 | pushing to http://localhost:$HGPORT/ |
|
349 | pushing to http://localhost:$HGPORT/ | |
348 | searching for changes |
|
350 | searching for changes | |
349 | remote: adding changesets |
|
351 | remote: adding changesets | |
350 | remote: adding manifests |
|
352 | remote: adding manifests | |
351 | remote: adding file changes |
|
353 | remote: adding file changes | |
352 | remote: added 1 changesets with 1 changes to 1 files |
|
354 | remote: added 1 changesets with 1 changes to 1 files | |
353 | remote: prepushkey hook: HG_BUNDLE2=1 HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_OLD=1 HG_PENDING=$TESTTMP/test HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) |
|
355 | remote: prepushkey hook: HG_BUNDLE2=1 HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_OLD=1 HG_PENDING=$TESTTMP/test HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) | |
354 | % serve errors |
|
356 | % serve errors | |
355 | #endif |
|
357 | #endif | |
356 |
|
358 | |||
357 | $ hg --config extensions.strip= strip -r 1: |
|
359 | $ hg --config extensions.strip= strip -r 1: | |
358 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/ba677d0156c1-eea704d7-backup.hg |
|
360 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/ba677d0156c1-eea704d7-backup.hg | |
359 |
|
361 | |||
360 | #if bundle2 |
|
362 | #if bundle2 | |
361 |
|
363 | |||
362 | $ cat > .hg/hgrc <<EOF |
|
364 | $ cat > .hg/hgrc <<EOF | |
363 | > [web] |
|
365 | > [web] | |
364 | > push_ssl = false |
|
366 | > push_ssl = false | |
365 | > allow_push = * |
|
367 | > allow_push = * | |
366 | > [experimental] |
|
368 | > [experimental] | |
367 | > httppostargs=true |
|
369 | > httppostargs=true | |
368 | > EOF |
|
370 | > EOF | |
369 | $ req |
|
371 | $ req | |
370 | pushing to http://localhost:$HGPORT/ |
|
372 | pushing to http://localhost:$HGPORT/ | |
371 | searching for changes |
|
373 | searching for changes | |
372 | remote: adding changesets |
|
374 | remote: adding changesets | |
373 | remote: adding manifests |
|
375 | remote: adding manifests | |
374 | remote: adding file changes |
|
376 | remote: adding file changes | |
375 | remote: added 1 changesets with 1 changes to 1 files |
|
377 | remote: added 1 changesets with 1 changes to 1 files | |
376 | % serve errors |
|
378 | % serve errors | |
377 |
|
379 | |||
378 | #endif |
|
380 | #endif | |
379 |
|
381 | |||
380 | $ cd .. |
|
382 | $ cd .. | |
381 |
|
383 | |||
382 | Pushing via hgwebdir works |
|
384 | Pushing via hgwebdir works | |
383 |
|
385 | |||
384 | $ hg init hgwebdir |
|
386 | $ hg init hgwebdir | |
385 | $ cd hgwebdir |
|
387 | $ cd hgwebdir | |
386 | $ echo 0 > a |
|
388 | $ echo 0 > a | |
387 | $ hg -q commit -A -m initial |
|
389 | $ hg -q commit -A -m initial | |
388 | $ cd .. |
|
390 | $ cd .. | |
389 |
|
391 | |||
390 | $ cat > web.conf << EOF |
|
392 | $ cat > web.conf << EOF | |
391 | > [paths] |
|
393 | > [paths] | |
392 | > / = * |
|
394 | > / = * | |
393 | > [web] |
|
395 | > [web] | |
394 | > push_ssl = false |
|
396 | > push_ssl = false | |
395 | > allow_push = * |
|
397 | > allow_push = * | |
396 | > EOF |
|
398 | > EOF | |
397 |
|
399 | |||
398 | $ hg serve --web-conf web.conf -p $HGPORT -d --pid-file hg.pid |
|
400 | $ hg serve --web-conf web.conf -p $HGPORT -d --pid-file hg.pid | |
399 | $ cat hg.pid >> $DAEMON_PIDS |
|
401 | $ cat hg.pid >> $DAEMON_PIDS | |
400 |
|
402 | |||
401 | $ hg clone http://localhost:$HGPORT/hgwebdir hgwebdir-local |
|
403 | $ hg clone http://localhost:$HGPORT/hgwebdir hgwebdir-local | |
402 | requesting all changes |
|
404 | requesting all changes | |
403 | adding changesets |
|
405 | adding changesets | |
404 | adding manifests |
|
406 | adding manifests | |
405 | adding file changes |
|
407 | adding file changes | |
406 | added 1 changesets with 1 changes to 1 files |
|
408 | added 1 changesets with 1 changes to 1 files | |
407 | new changesets 98a3f8f02ba7 |
|
409 | new changesets 98a3f8f02ba7 | |
408 | updating to branch default |
|
410 | updating to branch default | |
409 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
411 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
410 | $ cd hgwebdir-local |
|
412 | $ cd hgwebdir-local | |
411 | $ echo commit > a |
|
413 | $ echo commit > a | |
412 | $ hg commit -m 'local commit' |
|
414 | $ hg commit -m 'local commit' | |
413 |
|
415 | |||
414 | $ hg push |
|
416 | $ hg push | |
415 | pushing to http://localhost:$HGPORT/hgwebdir |
|
417 | pushing to http://localhost:$HGPORT/hgwebdir | |
416 | searching for changes |
|
418 | searching for changes | |
417 | remote: adding changesets |
|
419 | remote: adding changesets | |
418 | remote: adding manifests |
|
420 | remote: adding manifests | |
419 | remote: adding file changes |
|
421 | remote: adding file changes | |
420 | remote: added 1 changesets with 1 changes to 1 files |
|
422 | remote: added 1 changesets with 1 changes to 1 files | |
421 |
|
423 | |||
422 | $ killdaemons.py |
|
424 | $ killdaemons.py | |
423 |
|
425 | |||
424 | $ cd .. |
|
426 | $ cd .. |
@@ -1,2159 +1,2161 b'' | |||||
|
1 | #require no-chg | |||
|
2 | ||||
1 | $ cat > hgrc-sshv2 << EOF |
|
3 | $ cat > hgrc-sshv2 << EOF | |
2 | > %include $HGRCPATH |
|
4 | > %include $HGRCPATH | |
3 | > [experimental] |
|
5 | > [experimental] | |
4 | > sshpeer.advertise-v2 = true |
|
6 | > sshpeer.advertise-v2 = true | |
5 | > sshserver.support-v2 = true |
|
7 | > sshserver.support-v2 = true | |
6 | > EOF |
|
8 | > EOF | |
7 |
|
9 | |||
8 | Helper function to run protocol tests against multiple protocol versions. |
|
10 | Helper function to run protocol tests against multiple protocol versions. | |
9 | This is easier than using #testcases because managing differences between |
|
11 | This is easier than using #testcases because managing differences between | |
10 | protocols with inline conditional output is hard to read. |
|
12 | protocols with inline conditional output is hard to read. | |
11 |
|
13 | |||
12 | $ debugwireproto() { |
|
14 | $ debugwireproto() { | |
13 | > commands=`cat -` |
|
15 | > commands=`cat -` | |
14 | > echo 'testing ssh1' |
|
16 | > echo 'testing ssh1' | |
15 | > echo "${commands}" | hg --verbose debugwireproto --localssh |
|
17 | > echo "${commands}" | hg --verbose debugwireproto --localssh | |
16 | > echo "" |
|
18 | > echo "" | |
17 | > echo 'testing ssh2' |
|
19 | > echo 'testing ssh2' | |
18 | > echo "${commands}" | HGRCPATH=$TESTTMP/hgrc-sshv2 hg --verbose debugwireproto --localssh |
|
20 | > echo "${commands}" | HGRCPATH=$TESTTMP/hgrc-sshv2 hg --verbose debugwireproto --localssh | |
19 | > } |
|
21 | > } | |
20 |
|
22 | |||
21 | $ cat >> $HGRCPATH << EOF |
|
23 | $ cat >> $HGRCPATH << EOF | |
22 | > [ui] |
|
24 | > [ui] | |
23 | > ssh = $PYTHON "$TESTDIR/dummyssh" |
|
25 | > ssh = $PYTHON "$TESTDIR/dummyssh" | |
24 | > [devel] |
|
26 | > [devel] | |
25 | > debug.peer-request = true |
|
27 | > debug.peer-request = true | |
26 | > [extensions] |
|
28 | > [extensions] | |
27 | > sshprotoext = $TESTDIR/sshprotoext.py |
|
29 | > sshprotoext = $TESTDIR/sshprotoext.py | |
28 | > EOF |
|
30 | > EOF | |
29 |
|
31 | |||
30 | $ hg init server |
|
32 | $ hg init server | |
31 | $ cd server |
|
33 | $ cd server | |
32 | $ echo 0 > foo |
|
34 | $ echo 0 > foo | |
33 | $ hg -q add foo |
|
35 | $ hg -q add foo | |
34 | $ hg commit -m initial |
|
36 | $ hg commit -m initial | |
35 |
|
37 | |||
36 | A no-op connection performs a handshake |
|
38 | A no-op connection performs a handshake | |
37 |
|
39 | |||
38 | $ hg debugwireproto --localssh << EOF |
|
40 | $ hg debugwireproto --localssh << EOF | |
39 | > EOF |
|
41 | > EOF | |
40 | creating ssh peer from handshake results |
|
42 | creating ssh peer from handshake results | |
41 |
|
43 | |||
42 | Raw peers don't perform any activity |
|
44 | Raw peers don't perform any activity | |
43 |
|
45 | |||
44 | $ hg debugwireproto --localssh --peer raw << EOF |
|
46 | $ hg debugwireproto --localssh --peer raw << EOF | |
45 | > EOF |
|
47 | > EOF | |
46 | using raw connection to peer |
|
48 | using raw connection to peer | |
47 | $ hg debugwireproto --localssh --peer ssh1 << EOF |
|
49 | $ hg debugwireproto --localssh --peer ssh1 << EOF | |
48 | > EOF |
|
50 | > EOF | |
49 | creating ssh peer for wire protocol version 1 |
|
51 | creating ssh peer for wire protocol version 1 | |
50 | $ hg debugwireproto --localssh --peer ssh2 << EOF |
|
52 | $ hg debugwireproto --localssh --peer ssh2 << EOF | |
51 | > EOF |
|
53 | > EOF | |
52 | creating ssh peer for wire protocol version 2 |
|
54 | creating ssh peer for wire protocol version 2 | |
53 |
|
55 | |||
54 | Test a normal behaving server, for sanity |
|
56 | Test a normal behaving server, for sanity | |
55 |
|
57 | |||
56 | $ cd .. |
|
58 | $ cd .. | |
57 |
|
59 | |||
58 | $ hg --debug debugpeer ssh://user@dummy/server |
|
60 | $ hg --debug debugpeer ssh://user@dummy/server | |
59 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
|
61 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) | |
60 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
|
62 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) | |
61 | devel-peer-request: hello+between |
|
63 | devel-peer-request: hello+between | |
62 | devel-peer-request: pairs: 81 bytes |
|
64 | devel-peer-request: pairs: 81 bytes | |
63 | sending hello command |
|
65 | sending hello command | |
64 | sending between command |
|
66 | sending between command | |
65 | remote: 413 |
|
67 | remote: 413 | |
66 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
68 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
67 | remote: 1 |
|
69 | remote: 1 | |
68 | devel-peer-request: protocaps |
|
70 | devel-peer-request: protocaps | |
69 | devel-peer-request: caps: * bytes (glob) |
|
71 | devel-peer-request: caps: * bytes (glob) | |
70 | sending protocaps command |
|
72 | sending protocaps command | |
71 | url: ssh://user@dummy/server |
|
73 | url: ssh://user@dummy/server | |
72 | local: no |
|
74 | local: no | |
73 | pushable: yes |
|
75 | pushable: yes | |
74 |
|
76 | |||
75 | Server should answer the "hello" command in isolation |
|
77 | Server should answer the "hello" command in isolation | |
76 |
|
78 | |||
77 | $ hg -R server debugwireproto --localssh --peer raw << EOF |
|
79 | $ hg -R server debugwireproto --localssh --peer raw << EOF | |
78 | > raw |
|
80 | > raw | |
79 | > hello\n |
|
81 | > hello\n | |
80 | > readline |
|
82 | > readline | |
81 | > readline |
|
83 | > readline | |
82 | > EOF |
|
84 | > EOF | |
83 | using raw connection to peer |
|
85 | using raw connection to peer | |
84 | i> write(6) -> 6: |
|
86 | i> write(6) -> 6: | |
85 | i> hello\n |
|
87 | i> hello\n | |
86 | o> readline() -> 4: |
|
88 | o> readline() -> 4: | |
87 | o> 413\n |
|
89 | o> 413\n | |
88 | o> readline() -> 413: |
|
90 | o> readline() -> 413: | |
89 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
91 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
90 |
|
92 | |||
91 | `hg debugserve --sshstdio` works |
|
93 | `hg debugserve --sshstdio` works | |
92 |
|
94 | |||
93 | $ cd server |
|
95 | $ cd server | |
94 | $ hg debugserve --sshstdio << EOF |
|
96 | $ hg debugserve --sshstdio << EOF | |
95 | > hello |
|
97 | > hello | |
96 | > EOF |
|
98 | > EOF | |
97 | 413 |
|
99 | 413 | |
98 | capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
100 | capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
99 |
|
101 | |||
100 | I/O logging works |
|
102 | I/O logging works | |
101 |
|
103 | |||
102 | $ hg debugserve --sshstdio --logiofd 1 << EOF |
|
104 | $ hg debugserve --sshstdio --logiofd 1 << EOF | |
103 | > hello |
|
105 | > hello | |
104 | > EOF |
|
106 | > EOF | |
105 | o> write(4) -> 4: |
|
107 | o> write(4) -> 4: | |
106 | o> 413\n |
|
108 | o> 413\n | |
107 | o> write(413) -> 413: |
|
109 | o> write(413) -> 413: | |
108 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
110 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
109 | 413 |
|
111 | 413 | |
110 | capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
112 | capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
111 | o> flush() -> None |
|
113 | o> flush() -> None | |
112 |
|
114 | |||
113 | $ hg debugserve --sshstdio --logiofile $TESTTMP/io << EOF |
|
115 | $ hg debugserve --sshstdio --logiofile $TESTTMP/io << EOF | |
114 | > hello |
|
116 | > hello | |
115 | > EOF |
|
117 | > EOF | |
116 | 413 |
|
118 | 413 | |
117 | capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
119 | capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
118 |
|
120 | |||
119 | $ cat $TESTTMP/io |
|
121 | $ cat $TESTTMP/io | |
120 | o> write(4) -> 4: |
|
122 | o> write(4) -> 4: | |
121 | o> 413\n |
|
123 | o> 413\n | |
122 | o> write(413) -> 413: |
|
124 | o> write(413) -> 413: | |
123 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
125 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
124 | o> flush() -> None |
|
126 | o> flush() -> None | |
125 |
|
127 | |||
126 | $ cd .. |
|
128 | $ cd .. | |
127 |
|
129 | |||
128 | >=0.9.1 clients send a "hello" + "between" for the null range as part of handshake. |
|
130 | >=0.9.1 clients send a "hello" + "between" for the null range as part of handshake. | |
129 | Server should reply with capabilities and should send "1\n\n" as a successful |
|
131 | Server should reply with capabilities and should send "1\n\n" as a successful | |
130 | reply with empty response to the "between". |
|
132 | reply with empty response to the "between". | |
131 |
|
133 | |||
132 | $ hg -R server debugwireproto --localssh --peer raw << EOF |
|
134 | $ hg -R server debugwireproto --localssh --peer raw << EOF | |
133 | > raw |
|
135 | > raw | |
134 | > hello\n |
|
136 | > hello\n | |
135 | > readline |
|
137 | > readline | |
136 | > readline |
|
138 | > readline | |
137 | > raw |
|
139 | > raw | |
138 | > between\n |
|
140 | > between\n | |
139 | > pairs 81\n |
|
141 | > pairs 81\n | |
140 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
142 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
141 | > readline |
|
143 | > readline | |
142 | > readline |
|
144 | > readline | |
143 | > EOF |
|
145 | > EOF | |
144 | using raw connection to peer |
|
146 | using raw connection to peer | |
145 | i> write(6) -> 6: |
|
147 | i> write(6) -> 6: | |
146 | i> hello\n |
|
148 | i> hello\n | |
147 | o> readline() -> 4: |
|
149 | o> readline() -> 4: | |
148 | o> 413\n |
|
150 | o> 413\n | |
149 | o> readline() -> 413: |
|
151 | o> readline() -> 413: | |
150 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
152 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
151 | i> write(98) -> 98: |
|
153 | i> write(98) -> 98: | |
152 | i> between\n |
|
154 | i> between\n | |
153 | i> pairs 81\n |
|
155 | i> pairs 81\n | |
154 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
156 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
155 | o> readline() -> 2: |
|
157 | o> readline() -> 2: | |
156 | o> 1\n |
|
158 | o> 1\n | |
157 | o> readline() -> 1: |
|
159 | o> readline() -> 1: | |
158 | o> \n |
|
160 | o> \n | |
159 |
|
161 | |||
160 | SSH banner is not printed by default, ignored by clients |
|
162 | SSH banner is not printed by default, ignored by clients | |
161 |
|
163 | |||
162 | $ SSHSERVERMODE=banner hg debugpeer ssh://user@dummy/server |
|
164 | $ SSHSERVERMODE=banner hg debugpeer ssh://user@dummy/server | |
163 | url: ssh://user@dummy/server |
|
165 | url: ssh://user@dummy/server | |
164 | local: no |
|
166 | local: no | |
165 | pushable: yes |
|
167 | pushable: yes | |
166 |
|
168 | |||
167 | --debug will print the banner |
|
169 | --debug will print the banner | |
168 |
|
170 | |||
169 | $ SSHSERVERMODE=banner hg --debug debugpeer ssh://user@dummy/server |
|
171 | $ SSHSERVERMODE=banner hg --debug debugpeer ssh://user@dummy/server | |
170 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
|
172 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) | |
171 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
|
173 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) | |
172 | devel-peer-request: hello+between |
|
174 | devel-peer-request: hello+between | |
173 | devel-peer-request: pairs: 81 bytes |
|
175 | devel-peer-request: pairs: 81 bytes | |
174 | sending hello command |
|
176 | sending hello command | |
175 | sending between command |
|
177 | sending between command | |
176 | remote: banner: line 0 |
|
178 | remote: banner: line 0 | |
177 | remote: banner: line 1 |
|
179 | remote: banner: line 1 | |
178 | remote: banner: line 2 |
|
180 | remote: banner: line 2 | |
179 | remote: banner: line 3 |
|
181 | remote: banner: line 3 | |
180 | remote: banner: line 4 |
|
182 | remote: banner: line 4 | |
181 | remote: banner: line 5 |
|
183 | remote: banner: line 5 | |
182 | remote: banner: line 6 |
|
184 | remote: banner: line 6 | |
183 | remote: banner: line 7 |
|
185 | remote: banner: line 7 | |
184 | remote: banner: line 8 |
|
186 | remote: banner: line 8 | |
185 | remote: banner: line 9 |
|
187 | remote: banner: line 9 | |
186 | remote: 413 |
|
188 | remote: 413 | |
187 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
189 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
188 | remote: 1 |
|
190 | remote: 1 | |
189 | devel-peer-request: protocaps |
|
191 | devel-peer-request: protocaps | |
190 | devel-peer-request: caps: * bytes (glob) |
|
192 | devel-peer-request: caps: * bytes (glob) | |
191 | sending protocaps command |
|
193 | sending protocaps command | |
192 | url: ssh://user@dummy/server |
|
194 | url: ssh://user@dummy/server | |
193 | local: no |
|
195 | local: no | |
194 | pushable: yes |
|
196 | pushable: yes | |
195 |
|
197 | |||
196 | And test the banner with the raw protocol |
|
198 | And test the banner with the raw protocol | |
197 |
|
199 | |||
198 | $ SSHSERVERMODE=banner hg -R server debugwireproto --localssh --peer raw << EOF |
|
200 | $ SSHSERVERMODE=banner hg -R server debugwireproto --localssh --peer raw << EOF | |
199 | > raw |
|
201 | > raw | |
200 | > hello\n |
|
202 | > hello\n | |
201 | > readline |
|
203 | > readline | |
202 | > readline |
|
204 | > readline | |
203 | > readline |
|
205 | > readline | |
204 | > readline |
|
206 | > readline | |
205 | > readline |
|
207 | > readline | |
206 | > readline |
|
208 | > readline | |
207 | > readline |
|
209 | > readline | |
208 | > readline |
|
210 | > readline | |
209 | > readline |
|
211 | > readline | |
210 | > readline |
|
212 | > readline | |
211 | > readline |
|
213 | > readline | |
212 | > readline |
|
214 | > readline | |
213 | > raw |
|
215 | > raw | |
214 | > between\n |
|
216 | > between\n | |
215 | > pairs 81\n |
|
217 | > pairs 81\n | |
216 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
218 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
217 | > readline |
|
219 | > readline | |
218 | > readline |
|
220 | > readline | |
219 | > EOF |
|
221 | > EOF | |
220 | using raw connection to peer |
|
222 | using raw connection to peer | |
221 | i> write(6) -> 6: |
|
223 | i> write(6) -> 6: | |
222 | i> hello\n |
|
224 | i> hello\n | |
223 | o> readline() -> 15: |
|
225 | o> readline() -> 15: | |
224 | o> banner: line 0\n |
|
226 | o> banner: line 0\n | |
225 | o> readline() -> 15: |
|
227 | o> readline() -> 15: | |
226 | o> banner: line 1\n |
|
228 | o> banner: line 1\n | |
227 | o> readline() -> 15: |
|
229 | o> readline() -> 15: | |
228 | o> banner: line 2\n |
|
230 | o> banner: line 2\n | |
229 | o> readline() -> 15: |
|
231 | o> readline() -> 15: | |
230 | o> banner: line 3\n |
|
232 | o> banner: line 3\n | |
231 | o> readline() -> 15: |
|
233 | o> readline() -> 15: | |
232 | o> banner: line 4\n |
|
234 | o> banner: line 4\n | |
233 | o> readline() -> 15: |
|
235 | o> readline() -> 15: | |
234 | o> banner: line 5\n |
|
236 | o> banner: line 5\n | |
235 | o> readline() -> 15: |
|
237 | o> readline() -> 15: | |
236 | o> banner: line 6\n |
|
238 | o> banner: line 6\n | |
237 | o> readline() -> 15: |
|
239 | o> readline() -> 15: | |
238 | o> banner: line 7\n |
|
240 | o> banner: line 7\n | |
239 | o> readline() -> 15: |
|
241 | o> readline() -> 15: | |
240 | o> banner: line 8\n |
|
242 | o> banner: line 8\n | |
241 | o> readline() -> 15: |
|
243 | o> readline() -> 15: | |
242 | o> banner: line 9\n |
|
244 | o> banner: line 9\n | |
243 | o> readline() -> 4: |
|
245 | o> readline() -> 4: | |
244 | o> 413\n |
|
246 | o> 413\n | |
245 | o> readline() -> 413: |
|
247 | o> readline() -> 413: | |
246 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
248 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
247 | i> write(98) -> 98: |
|
249 | i> write(98) -> 98: | |
248 | i> between\n |
|
250 | i> between\n | |
249 | i> pairs 81\n |
|
251 | i> pairs 81\n | |
250 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
252 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
251 | o> readline() -> 2: |
|
253 | o> readline() -> 2: | |
252 | o> 1\n |
|
254 | o> 1\n | |
253 | o> readline() -> 1: |
|
255 | o> readline() -> 1: | |
254 | o> \n |
|
256 | o> \n | |
255 |
|
257 | |||
256 | Connecting to a <0.9.1 server that doesn't support the hello command. |
|
258 | Connecting to a <0.9.1 server that doesn't support the hello command. | |
257 | The client should refuse, as we dropped support for connecting to such |
|
259 | The client should refuse, as we dropped support for connecting to such | |
258 | servers. |
|
260 | servers. | |
259 |
|
261 | |||
260 | $ SSHSERVERMODE=no-hello hg --debug debugpeer ssh://user@dummy/server |
|
262 | $ SSHSERVERMODE=no-hello hg --debug debugpeer ssh://user@dummy/server | |
261 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
|
263 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) | |
262 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
|
264 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) | |
263 | devel-peer-request: hello+between |
|
265 | devel-peer-request: hello+between | |
264 | devel-peer-request: pairs: 81 bytes |
|
266 | devel-peer-request: pairs: 81 bytes | |
265 | sending hello command |
|
267 | sending hello command | |
266 | sending between command |
|
268 | sending between command | |
267 | remote: 0 |
|
269 | remote: 0 | |
268 | remote: 1 |
|
270 | remote: 1 | |
269 | abort: no suitable response from remote hg! |
|
271 | abort: no suitable response from remote hg! | |
270 | [255] |
|
272 | [255] | |
271 |
|
273 | |||
272 | Sending an unknown command to the server results in an empty response to that command |
|
274 | Sending an unknown command to the server results in an empty response to that command | |
273 |
|
275 | |||
274 | $ hg -R server debugwireproto --localssh --peer raw << EOF |
|
276 | $ hg -R server debugwireproto --localssh --peer raw << EOF | |
275 | > raw |
|
277 | > raw | |
276 | > pre-hello\n |
|
278 | > pre-hello\n | |
277 | > readline |
|
279 | > readline | |
278 | > raw |
|
280 | > raw | |
279 | > hello\n |
|
281 | > hello\n | |
280 | > readline |
|
282 | > readline | |
281 | > raw |
|
283 | > raw | |
282 | > between\n |
|
284 | > between\n | |
283 | > pairs 81\n |
|
285 | > pairs 81\n | |
284 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
286 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
285 | > readline |
|
287 | > readline | |
286 | > readline |
|
288 | > readline | |
287 | > EOF |
|
289 | > EOF | |
288 | using raw connection to peer |
|
290 | using raw connection to peer | |
289 | i> write(10) -> 10: |
|
291 | i> write(10) -> 10: | |
290 | i> pre-hello\n |
|
292 | i> pre-hello\n | |
291 | o> readline() -> 2: |
|
293 | o> readline() -> 2: | |
292 | o> 0\n |
|
294 | o> 0\n | |
293 | i> write(6) -> 6: |
|
295 | i> write(6) -> 6: | |
294 | i> hello\n |
|
296 | i> hello\n | |
295 | o> readline() -> 4: |
|
297 | o> readline() -> 4: | |
296 | o> 413\n |
|
298 | o> 413\n | |
297 | i> write(98) -> 98: |
|
299 | i> write(98) -> 98: | |
298 | i> between\n |
|
300 | i> between\n | |
299 | i> pairs 81\n |
|
301 | i> pairs 81\n | |
300 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
302 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
301 | o> readline() -> 413: |
|
303 | o> readline() -> 413: | |
302 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
304 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
303 | o> readline() -> 2: |
|
305 | o> readline() -> 2: | |
304 | o> 1\n |
|
306 | o> 1\n | |
305 |
|
307 | |||
306 | $ hg --config sshpeer.mode=extra-handshake-commands --config sshpeer.handshake-mode=pre-no-args --debug debugpeer ssh://user@dummy/server |
|
308 | $ hg --config sshpeer.mode=extra-handshake-commands --config sshpeer.handshake-mode=pre-no-args --debug debugpeer ssh://user@dummy/server | |
307 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
|
309 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) | |
308 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
|
310 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) | |
309 | sending no-args command |
|
311 | sending no-args command | |
310 | devel-peer-request: hello+between |
|
312 | devel-peer-request: hello+between | |
311 | devel-peer-request: pairs: 81 bytes |
|
313 | devel-peer-request: pairs: 81 bytes | |
312 | sending hello command |
|
314 | sending hello command | |
313 | sending between command |
|
315 | sending between command | |
314 | remote: 0 |
|
316 | remote: 0 | |
315 | remote: 413 |
|
317 | remote: 413 | |
316 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
318 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
317 | remote: 1 |
|
319 | remote: 1 | |
318 | devel-peer-request: protocaps |
|
320 | devel-peer-request: protocaps | |
319 | devel-peer-request: caps: * bytes (glob) |
|
321 | devel-peer-request: caps: * bytes (glob) | |
320 | sending protocaps command |
|
322 | sending protocaps command | |
321 | url: ssh://user@dummy/server |
|
323 | url: ssh://user@dummy/server | |
322 | local: no |
|
324 | local: no | |
323 | pushable: yes |
|
325 | pushable: yes | |
324 |
|
326 | |||
325 | Send multiple unknown commands before hello |
|
327 | Send multiple unknown commands before hello | |
326 |
|
328 | |||
327 | $ hg -R server debugwireproto --localssh --peer raw << EOF |
|
329 | $ hg -R server debugwireproto --localssh --peer raw << EOF | |
328 | > raw |
|
330 | > raw | |
329 | > unknown1\n |
|
331 | > unknown1\n | |
330 | > readline |
|
332 | > readline | |
331 | > raw |
|
333 | > raw | |
332 | > unknown2\n |
|
334 | > unknown2\n | |
333 | > readline |
|
335 | > readline | |
334 | > raw |
|
336 | > raw | |
335 | > unknown3\n |
|
337 | > unknown3\n | |
336 | > readline |
|
338 | > readline | |
337 | > raw |
|
339 | > raw | |
338 | > hello\n |
|
340 | > hello\n | |
339 | > readline |
|
341 | > readline | |
340 | > readline |
|
342 | > readline | |
341 | > raw |
|
343 | > raw | |
342 | > between\n |
|
344 | > between\n | |
343 | > pairs 81\n |
|
345 | > pairs 81\n | |
344 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
346 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
345 | > readline |
|
347 | > readline | |
346 | > readline |
|
348 | > readline | |
347 | > EOF |
|
349 | > EOF | |
348 | using raw connection to peer |
|
350 | using raw connection to peer | |
349 | i> write(9) -> 9: |
|
351 | i> write(9) -> 9: | |
350 | i> unknown1\n |
|
352 | i> unknown1\n | |
351 | o> readline() -> 2: |
|
353 | o> readline() -> 2: | |
352 | o> 0\n |
|
354 | o> 0\n | |
353 | i> write(9) -> 9: |
|
355 | i> write(9) -> 9: | |
354 | i> unknown2\n |
|
356 | i> unknown2\n | |
355 | o> readline() -> 2: |
|
357 | o> readline() -> 2: | |
356 | o> 0\n |
|
358 | o> 0\n | |
357 | i> write(9) -> 9: |
|
359 | i> write(9) -> 9: | |
358 | i> unknown3\n |
|
360 | i> unknown3\n | |
359 | o> readline() -> 2: |
|
361 | o> readline() -> 2: | |
360 | o> 0\n |
|
362 | o> 0\n | |
361 | i> write(6) -> 6: |
|
363 | i> write(6) -> 6: | |
362 | i> hello\n |
|
364 | i> hello\n | |
363 | o> readline() -> 4: |
|
365 | o> readline() -> 4: | |
364 | o> 413\n |
|
366 | o> 413\n | |
365 | o> readline() -> 413: |
|
367 | o> readline() -> 413: | |
366 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
368 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
367 | i> write(98) -> 98: |
|
369 | i> write(98) -> 98: | |
368 | i> between\n |
|
370 | i> between\n | |
369 | i> pairs 81\n |
|
371 | i> pairs 81\n | |
370 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
372 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
371 | o> readline() -> 2: |
|
373 | o> readline() -> 2: | |
372 | o> 1\n |
|
374 | o> 1\n | |
373 | o> readline() -> 1: |
|
375 | o> readline() -> 1: | |
374 | o> \n |
|
376 | o> \n | |
375 |
|
377 | |||
376 | $ hg --config sshpeer.mode=extra-handshake-commands --config sshpeer.handshake-mode=pre-multiple-no-args --debug debugpeer ssh://user@dummy/server |
|
378 | $ hg --config sshpeer.mode=extra-handshake-commands --config sshpeer.handshake-mode=pre-multiple-no-args --debug debugpeer ssh://user@dummy/server | |
377 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
|
379 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) | |
378 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
|
380 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) | |
379 | sending unknown1 command |
|
381 | sending unknown1 command | |
380 | sending unknown2 command |
|
382 | sending unknown2 command | |
381 | sending unknown3 command |
|
383 | sending unknown3 command | |
382 | devel-peer-request: hello+between |
|
384 | devel-peer-request: hello+between | |
383 | devel-peer-request: pairs: 81 bytes |
|
385 | devel-peer-request: pairs: 81 bytes | |
384 | sending hello command |
|
386 | sending hello command | |
385 | sending between command |
|
387 | sending between command | |
386 | remote: 0 |
|
388 | remote: 0 | |
387 | remote: 0 |
|
389 | remote: 0 | |
388 | remote: 0 |
|
390 | remote: 0 | |
389 | remote: 413 |
|
391 | remote: 413 | |
390 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
392 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
391 | remote: 1 |
|
393 | remote: 1 | |
392 | devel-peer-request: protocaps |
|
394 | devel-peer-request: protocaps | |
393 | devel-peer-request: caps: * bytes (glob) |
|
395 | devel-peer-request: caps: * bytes (glob) | |
394 | sending protocaps command |
|
396 | sending protocaps command | |
395 | url: ssh://user@dummy/server |
|
397 | url: ssh://user@dummy/server | |
396 | local: no |
|
398 | local: no | |
397 | pushable: yes |
|
399 | pushable: yes | |
398 |
|
400 | |||
399 | Send an unknown command before hello that has arguments |
|
401 | Send an unknown command before hello that has arguments | |
400 |
|
402 | |||
401 | $ cd server |
|
403 | $ cd server | |
402 |
|
404 | |||
403 | $ hg debugwireproto --localssh --peer raw << EOF |
|
405 | $ hg debugwireproto --localssh --peer raw << EOF | |
404 | > raw |
|
406 | > raw | |
405 | > with-args\n |
|
407 | > with-args\n | |
406 | > foo 13\n |
|
408 | > foo 13\n | |
407 | > value for foo\n |
|
409 | > value for foo\n | |
408 | > bar 13\n |
|
410 | > bar 13\n | |
409 | > value for bar\n |
|
411 | > value for bar\n | |
410 | > readline |
|
412 | > readline | |
411 | > readline |
|
413 | > readline | |
412 | > readline |
|
414 | > readline | |
413 | > readline |
|
415 | > readline | |
414 | > readline |
|
416 | > readline | |
415 | > raw |
|
417 | > raw | |
416 | > hello\n |
|
418 | > hello\n | |
417 | > readline |
|
419 | > readline | |
418 | > readline |
|
420 | > readline | |
419 | > raw |
|
421 | > raw | |
420 | > between\n |
|
422 | > between\n | |
421 | > pairs 81\n |
|
423 | > pairs 81\n | |
422 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
424 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
423 | > readline |
|
425 | > readline | |
424 | > readline |
|
426 | > readline | |
425 | > EOF |
|
427 | > EOF | |
426 | using raw connection to peer |
|
428 | using raw connection to peer | |
427 | i> write(52) -> 52: |
|
429 | i> write(52) -> 52: | |
428 | i> with-args\n |
|
430 | i> with-args\n | |
429 | i> foo 13\n |
|
431 | i> foo 13\n | |
430 | i> value for foo\n |
|
432 | i> value for foo\n | |
431 | i> bar 13\n |
|
433 | i> bar 13\n | |
432 | i> value for bar\n |
|
434 | i> value for bar\n | |
433 | o> readline() -> 2: |
|
435 | o> readline() -> 2: | |
434 | o> 0\n |
|
436 | o> 0\n | |
435 | o> readline() -> 2: |
|
437 | o> readline() -> 2: | |
436 | o> 0\n |
|
438 | o> 0\n | |
437 | o> readline() -> 2: |
|
439 | o> readline() -> 2: | |
438 | o> 0\n |
|
440 | o> 0\n | |
439 | o> readline() -> 2: |
|
441 | o> readline() -> 2: | |
440 | o> 0\n |
|
442 | o> 0\n | |
441 | o> readline() -> 2: |
|
443 | o> readline() -> 2: | |
442 | o> 0\n |
|
444 | o> 0\n | |
443 | i> write(6) -> 6: |
|
445 | i> write(6) -> 6: | |
444 | i> hello\n |
|
446 | i> hello\n | |
445 | o> readline() -> 4: |
|
447 | o> readline() -> 4: | |
446 | o> 413\n |
|
448 | o> 413\n | |
447 | o> readline() -> 413: |
|
449 | o> readline() -> 413: | |
448 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
450 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
449 | i> write(98) -> 98: |
|
451 | i> write(98) -> 98: | |
450 | i> between\n |
|
452 | i> between\n | |
451 | i> pairs 81\n |
|
453 | i> pairs 81\n | |
452 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
454 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
453 | o> readline() -> 2: |
|
455 | o> readline() -> 2: | |
454 | o> 1\n |
|
456 | o> 1\n | |
455 | o> readline() -> 1: |
|
457 | o> readline() -> 1: | |
456 | o> \n |
|
458 | o> \n | |
457 |
|
459 | |||
458 | Send an unknown command having an argument that looks numeric |
|
460 | Send an unknown command having an argument that looks numeric | |
459 |
|
461 | |||
460 | $ hg debugwireproto --localssh --peer raw << EOF |
|
462 | $ hg debugwireproto --localssh --peer raw << EOF | |
461 | > raw |
|
463 | > raw | |
462 | > unknown\n |
|
464 | > unknown\n | |
463 | > foo 1\n |
|
465 | > foo 1\n | |
464 | > 0\n |
|
466 | > 0\n | |
465 | > readline |
|
467 | > readline | |
466 | > readline |
|
468 | > readline | |
467 | > readline |
|
469 | > readline | |
468 | > raw |
|
470 | > raw | |
469 | > hello\n |
|
471 | > hello\n | |
470 | > readline |
|
472 | > readline | |
471 | > readline |
|
473 | > readline | |
472 | > raw |
|
474 | > raw | |
473 | > between\n |
|
475 | > between\n | |
474 | > pairs 81\n |
|
476 | > pairs 81\n | |
475 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
477 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
476 | > readline |
|
478 | > readline | |
477 | > readline |
|
479 | > readline | |
478 | > EOF |
|
480 | > EOF | |
479 | using raw connection to peer |
|
481 | using raw connection to peer | |
480 | i> write(16) -> 16: |
|
482 | i> write(16) -> 16: | |
481 | i> unknown\n |
|
483 | i> unknown\n | |
482 | i> foo 1\n |
|
484 | i> foo 1\n | |
483 | i> 0\n |
|
485 | i> 0\n | |
484 | o> readline() -> 2: |
|
486 | o> readline() -> 2: | |
485 | o> 0\n |
|
487 | o> 0\n | |
486 | o> readline() -> 2: |
|
488 | o> readline() -> 2: | |
487 | o> 0\n |
|
489 | o> 0\n | |
488 | o> readline() -> 2: |
|
490 | o> readline() -> 2: | |
489 | o> 0\n |
|
491 | o> 0\n | |
490 | i> write(6) -> 6: |
|
492 | i> write(6) -> 6: | |
491 | i> hello\n |
|
493 | i> hello\n | |
492 | o> readline() -> 4: |
|
494 | o> readline() -> 4: | |
493 | o> 413\n |
|
495 | o> 413\n | |
494 | o> readline() -> 413: |
|
496 | o> readline() -> 413: | |
495 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
497 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
496 | i> write(98) -> 98: |
|
498 | i> write(98) -> 98: | |
497 | i> between\n |
|
499 | i> between\n | |
498 | i> pairs 81\n |
|
500 | i> pairs 81\n | |
499 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
501 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
500 | o> readline() -> 2: |
|
502 | o> readline() -> 2: | |
501 | o> 1\n |
|
503 | o> 1\n | |
502 | o> readline() -> 1: |
|
504 | o> readline() -> 1: | |
503 | o> \n |
|
505 | o> \n | |
504 |
|
506 | |||
505 | $ hg debugwireproto --localssh --peer raw << EOF |
|
507 | $ hg debugwireproto --localssh --peer raw << EOF | |
506 | > raw |
|
508 | > raw | |
507 | > unknown\n |
|
509 | > unknown\n | |
508 | > foo 1\n |
|
510 | > foo 1\n | |
509 | > 1\n |
|
511 | > 1\n | |
510 | > readline |
|
512 | > readline | |
511 | > readline |
|
513 | > readline | |
512 | > readline |
|
514 | > readline | |
513 | > raw |
|
515 | > raw | |
514 | > hello\n |
|
516 | > hello\n | |
515 | > readline |
|
517 | > readline | |
516 | > readline |
|
518 | > readline | |
517 | > raw |
|
519 | > raw | |
518 | > between\n |
|
520 | > between\n | |
519 | > pairs 81\n |
|
521 | > pairs 81\n | |
520 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
522 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
521 | > readline |
|
523 | > readline | |
522 | > readline |
|
524 | > readline | |
523 | > EOF |
|
525 | > EOF | |
524 | using raw connection to peer |
|
526 | using raw connection to peer | |
525 | i> write(16) -> 16: |
|
527 | i> write(16) -> 16: | |
526 | i> unknown\n |
|
528 | i> unknown\n | |
527 | i> foo 1\n |
|
529 | i> foo 1\n | |
528 | i> 1\n |
|
530 | i> 1\n | |
529 | o> readline() -> 2: |
|
531 | o> readline() -> 2: | |
530 | o> 0\n |
|
532 | o> 0\n | |
531 | o> readline() -> 2: |
|
533 | o> readline() -> 2: | |
532 | o> 0\n |
|
534 | o> 0\n | |
533 | o> readline() -> 2: |
|
535 | o> readline() -> 2: | |
534 | o> 0\n |
|
536 | o> 0\n | |
535 | i> write(6) -> 6: |
|
537 | i> write(6) -> 6: | |
536 | i> hello\n |
|
538 | i> hello\n | |
537 | o> readline() -> 4: |
|
539 | o> readline() -> 4: | |
538 | o> 413\n |
|
540 | o> 413\n | |
539 | o> readline() -> 413: |
|
541 | o> readline() -> 413: | |
540 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
542 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
541 | i> write(98) -> 98: |
|
543 | i> write(98) -> 98: | |
542 | i> between\n |
|
544 | i> between\n | |
543 | i> pairs 81\n |
|
545 | i> pairs 81\n | |
544 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
546 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
545 | o> readline() -> 2: |
|
547 | o> readline() -> 2: | |
546 | o> 1\n |
|
548 | o> 1\n | |
547 | o> readline() -> 1: |
|
549 | o> readline() -> 1: | |
548 | o> \n |
|
550 | o> \n | |
549 |
|
551 | |||
550 | When sending a dict argument value, it is serialized to |
|
552 | When sending a dict argument value, it is serialized to | |
551 | "<arg> <item count>" followed by "<key> <len>\n<value>" for each item |
|
553 | "<arg> <item count>" followed by "<key> <len>\n<value>" for each item | |
552 | in the dict. |
|
554 | in the dict. | |
553 |
|
555 | |||
554 | Dictionary value for unknown command |
|
556 | Dictionary value for unknown command | |
555 |
|
557 | |||
556 | $ hg debugwireproto --localssh --peer raw << EOF |
|
558 | $ hg debugwireproto --localssh --peer raw << EOF | |
557 | > raw |
|
559 | > raw | |
558 | > unknown\n |
|
560 | > unknown\n | |
559 | > dict 3\n |
|
561 | > dict 3\n | |
560 | > key1 3\n |
|
562 | > key1 3\n | |
561 | > foo\n |
|
563 | > foo\n | |
562 | > key2 3\n |
|
564 | > key2 3\n | |
563 | > bar\n |
|
565 | > bar\n | |
564 | > key3 3\n |
|
566 | > key3 3\n | |
565 | > baz\n |
|
567 | > baz\n | |
566 | > readline |
|
568 | > readline | |
567 | > readline |
|
569 | > readline | |
568 | > readline |
|
570 | > readline | |
569 | > readline |
|
571 | > readline | |
570 | > readline |
|
572 | > readline | |
571 | > readline |
|
573 | > readline | |
572 | > readline |
|
574 | > readline | |
573 | > readline |
|
575 | > readline | |
574 | > raw |
|
576 | > raw | |
575 | > hello\n |
|
577 | > hello\n | |
576 | > readline |
|
578 | > readline | |
577 | > readline |
|
579 | > readline | |
578 | > EOF |
|
580 | > EOF | |
579 | using raw connection to peer |
|
581 | using raw connection to peer | |
580 | i> write(48) -> 48: |
|
582 | i> write(48) -> 48: | |
581 | i> unknown\n |
|
583 | i> unknown\n | |
582 | i> dict 3\n |
|
584 | i> dict 3\n | |
583 | i> key1 3\n |
|
585 | i> key1 3\n | |
584 | i> foo\n |
|
586 | i> foo\n | |
585 | i> key2 3\n |
|
587 | i> key2 3\n | |
586 | i> bar\n |
|
588 | i> bar\n | |
587 | i> key3 3\n |
|
589 | i> key3 3\n | |
588 | i> baz\n |
|
590 | i> baz\n | |
589 | o> readline() -> 2: |
|
591 | o> readline() -> 2: | |
590 | o> 0\n |
|
592 | o> 0\n | |
591 | o> readline() -> 2: |
|
593 | o> readline() -> 2: | |
592 | o> 0\n |
|
594 | o> 0\n | |
593 | o> readline() -> 2: |
|
595 | o> readline() -> 2: | |
594 | o> 0\n |
|
596 | o> 0\n | |
595 | o> readline() -> 2: |
|
597 | o> readline() -> 2: | |
596 | o> 0\n |
|
598 | o> 0\n | |
597 | o> readline() -> 2: |
|
599 | o> readline() -> 2: | |
598 | o> 0\n |
|
600 | o> 0\n | |
599 | o> readline() -> 2: |
|
601 | o> readline() -> 2: | |
600 | o> 0\n |
|
602 | o> 0\n | |
601 | o> readline() -> 2: |
|
603 | o> readline() -> 2: | |
602 | o> 0\n |
|
604 | o> 0\n | |
603 | o> readline() -> 2: |
|
605 | o> readline() -> 2: | |
604 | o> 0\n |
|
606 | o> 0\n | |
605 | i> write(6) -> 6: |
|
607 | i> write(6) -> 6: | |
606 | i> hello\n |
|
608 | i> hello\n | |
607 | o> readline() -> 4: |
|
609 | o> readline() -> 4: | |
608 | o> 413\n |
|
610 | o> 413\n | |
609 | o> readline() -> 413: |
|
611 | o> readline() -> 413: | |
610 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
612 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
611 |
|
613 | |||
612 | Incomplete dictionary send |
|
614 | Incomplete dictionary send | |
613 |
|
615 | |||
614 | $ hg debugwireproto --localssh --peer raw << EOF |
|
616 | $ hg debugwireproto --localssh --peer raw << EOF | |
615 | > raw |
|
617 | > raw | |
616 | > unknown\n |
|
618 | > unknown\n | |
617 | > dict 3\n |
|
619 | > dict 3\n | |
618 | > key1 3\n |
|
620 | > key1 3\n | |
619 | > foo\n |
|
621 | > foo\n | |
620 | > readline |
|
622 | > readline | |
621 | > readline |
|
623 | > readline | |
622 | > readline |
|
624 | > readline | |
623 | > readline |
|
625 | > readline | |
624 | > EOF |
|
626 | > EOF | |
625 | using raw connection to peer |
|
627 | using raw connection to peer | |
626 | i> write(26) -> 26: |
|
628 | i> write(26) -> 26: | |
627 | i> unknown\n |
|
629 | i> unknown\n | |
628 | i> dict 3\n |
|
630 | i> dict 3\n | |
629 | i> key1 3\n |
|
631 | i> key1 3\n | |
630 | i> foo\n |
|
632 | i> foo\n | |
631 | o> readline() -> 2: |
|
633 | o> readline() -> 2: | |
632 | o> 0\n |
|
634 | o> 0\n | |
633 | o> readline() -> 2: |
|
635 | o> readline() -> 2: | |
634 | o> 0\n |
|
636 | o> 0\n | |
635 | o> readline() -> 2: |
|
637 | o> readline() -> 2: | |
636 | o> 0\n |
|
638 | o> 0\n | |
637 | o> readline() -> 2: |
|
639 | o> readline() -> 2: | |
638 | o> 0\n |
|
640 | o> 0\n | |
639 |
|
641 | |||
640 | Incomplete value send |
|
642 | Incomplete value send | |
641 |
|
643 | |||
642 | $ hg debugwireproto --localssh --peer raw << EOF |
|
644 | $ hg debugwireproto --localssh --peer raw << EOF | |
643 | > raw |
|
645 | > raw | |
644 | > unknown\n |
|
646 | > unknown\n | |
645 | > dict 3\n |
|
647 | > dict 3\n | |
646 | > key1 3\n |
|
648 | > key1 3\n | |
647 | > fo |
|
649 | > fo | |
648 | > readline |
|
650 | > readline | |
649 | > readline |
|
651 | > readline | |
650 | > readline |
|
652 | > readline | |
651 | > EOF |
|
653 | > EOF | |
652 | using raw connection to peer |
|
654 | using raw connection to peer | |
653 | i> write(24) -> 24: |
|
655 | i> write(24) -> 24: | |
654 | i> unknown\n |
|
656 | i> unknown\n | |
655 | i> dict 3\n |
|
657 | i> dict 3\n | |
656 | i> key1 3\n |
|
658 | i> key1 3\n | |
657 | i> fo |
|
659 | i> fo | |
658 | o> readline() -> 2: |
|
660 | o> readline() -> 2: | |
659 | o> 0\n |
|
661 | o> 0\n | |
660 | o> readline() -> 2: |
|
662 | o> readline() -> 2: | |
661 | o> 0\n |
|
663 | o> 0\n | |
662 | o> readline() -> 2: |
|
664 | o> readline() -> 2: | |
663 | o> 0\n |
|
665 | o> 0\n | |
664 |
|
666 | |||
665 | Send a command line with spaces |
|
667 | Send a command line with spaces | |
666 |
|
668 | |||
667 | $ hg debugwireproto --localssh --peer raw << EOF |
|
669 | $ hg debugwireproto --localssh --peer raw << EOF | |
668 | > raw |
|
670 | > raw | |
669 | > unknown withspace\n |
|
671 | > unknown withspace\n | |
670 | > readline |
|
672 | > readline | |
671 | > raw |
|
673 | > raw | |
672 | > hello\n |
|
674 | > hello\n | |
673 | > readline |
|
675 | > readline | |
674 | > readline |
|
676 | > readline | |
675 | > raw |
|
677 | > raw | |
676 | > between\n |
|
678 | > between\n | |
677 | > pairs 81\n |
|
679 | > pairs 81\n | |
678 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
680 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
679 | > readline |
|
681 | > readline | |
680 | > readline |
|
682 | > readline | |
681 | > EOF |
|
683 | > EOF | |
682 | using raw connection to peer |
|
684 | using raw connection to peer | |
683 | i> write(18) -> 18: |
|
685 | i> write(18) -> 18: | |
684 | i> unknown withspace\n |
|
686 | i> unknown withspace\n | |
685 | o> readline() -> 2: |
|
687 | o> readline() -> 2: | |
686 | o> 0\n |
|
688 | o> 0\n | |
687 | i> write(6) -> 6: |
|
689 | i> write(6) -> 6: | |
688 | i> hello\n |
|
690 | i> hello\n | |
689 | o> readline() -> 4: |
|
691 | o> readline() -> 4: | |
690 | o> 413\n |
|
692 | o> 413\n | |
691 | o> readline() -> 413: |
|
693 | o> readline() -> 413: | |
692 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
694 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
693 | i> write(98) -> 98: |
|
695 | i> write(98) -> 98: | |
694 | i> between\n |
|
696 | i> between\n | |
695 | i> pairs 81\n |
|
697 | i> pairs 81\n | |
696 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
698 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
697 | o> readline() -> 2: |
|
699 | o> readline() -> 2: | |
698 | o> 1\n |
|
700 | o> 1\n | |
699 | o> readline() -> 1: |
|
701 | o> readline() -> 1: | |
700 | o> \n |
|
702 | o> \n | |
701 |
|
703 | |||
702 | $ hg debugwireproto --localssh --peer raw << EOF |
|
704 | $ hg debugwireproto --localssh --peer raw << EOF | |
703 | > raw |
|
705 | > raw | |
704 | > unknown with multiple spaces\n |
|
706 | > unknown with multiple spaces\n | |
705 | > readline |
|
707 | > readline | |
706 | > raw |
|
708 | > raw | |
707 | > hello\n |
|
709 | > hello\n | |
708 | > readline |
|
710 | > readline | |
709 | > readline |
|
711 | > readline | |
710 | > raw |
|
712 | > raw | |
711 | > between\n |
|
713 | > between\n | |
712 | > pairs 81\n |
|
714 | > pairs 81\n | |
713 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
715 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
714 | > readline |
|
716 | > readline | |
715 | > EOF |
|
717 | > EOF | |
716 | using raw connection to peer |
|
718 | using raw connection to peer | |
717 | i> write(29) -> 29: |
|
719 | i> write(29) -> 29: | |
718 | i> unknown with multiple spaces\n |
|
720 | i> unknown with multiple spaces\n | |
719 | o> readline() -> 2: |
|
721 | o> readline() -> 2: | |
720 | o> 0\n |
|
722 | o> 0\n | |
721 | i> write(6) -> 6: |
|
723 | i> write(6) -> 6: | |
722 | i> hello\n |
|
724 | i> hello\n | |
723 | o> readline() -> 4: |
|
725 | o> readline() -> 4: | |
724 | o> 413\n |
|
726 | o> 413\n | |
725 | o> readline() -> 413: |
|
727 | o> readline() -> 413: | |
726 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
728 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
727 | i> write(98) -> 98: |
|
729 | i> write(98) -> 98: | |
728 | i> between\n |
|
730 | i> between\n | |
729 | i> pairs 81\n |
|
731 | i> pairs 81\n | |
730 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
732 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
731 | o> readline() -> 2: |
|
733 | o> readline() -> 2: | |
732 | o> 1\n |
|
734 | o> 1\n | |
733 |
|
735 | |||
734 | $ hg debugwireproto --localssh --peer raw << EOF |
|
736 | $ hg debugwireproto --localssh --peer raw << EOF | |
735 | > raw |
|
737 | > raw | |
736 | > unknown with spaces\n |
|
738 | > unknown with spaces\n | |
737 | > key 10\n |
|
739 | > key 10\n | |
738 | > some value\n |
|
740 | > some value\n | |
739 | > readline |
|
741 | > readline | |
740 | > readline |
|
742 | > readline | |
741 | > readline |
|
743 | > readline | |
742 | > raw |
|
744 | > raw | |
743 | > hello\n |
|
745 | > hello\n | |
744 | > readline |
|
746 | > readline | |
745 | > readline |
|
747 | > readline | |
746 | > raw |
|
748 | > raw | |
747 | > between\n |
|
749 | > between\n | |
748 | > pairs 81\n |
|
750 | > pairs 81\n | |
749 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
751 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
750 | > readline |
|
752 | > readline | |
751 | > readline |
|
753 | > readline | |
752 | > EOF |
|
754 | > EOF | |
753 | using raw connection to peer |
|
755 | using raw connection to peer | |
754 | i> write(38) -> 38: |
|
756 | i> write(38) -> 38: | |
755 | i> unknown with spaces\n |
|
757 | i> unknown with spaces\n | |
756 | i> key 10\n |
|
758 | i> key 10\n | |
757 | i> some value\n |
|
759 | i> some value\n | |
758 | o> readline() -> 2: |
|
760 | o> readline() -> 2: | |
759 | o> 0\n |
|
761 | o> 0\n | |
760 | o> readline() -> 2: |
|
762 | o> readline() -> 2: | |
761 | o> 0\n |
|
763 | o> 0\n | |
762 | o> readline() -> 2: |
|
764 | o> readline() -> 2: | |
763 | o> 0\n |
|
765 | o> 0\n | |
764 | i> write(6) -> 6: |
|
766 | i> write(6) -> 6: | |
765 | i> hello\n |
|
767 | i> hello\n | |
766 | o> readline() -> 4: |
|
768 | o> readline() -> 4: | |
767 | o> 413\n |
|
769 | o> 413\n | |
768 | o> readline() -> 413: |
|
770 | o> readline() -> 413: | |
769 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
771 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
770 | i> write(98) -> 98: |
|
772 | i> write(98) -> 98: | |
771 | i> between\n |
|
773 | i> between\n | |
772 | i> pairs 81\n |
|
774 | i> pairs 81\n | |
773 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
775 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
774 | o> readline() -> 2: |
|
776 | o> readline() -> 2: | |
775 | o> 1\n |
|
777 | o> 1\n | |
776 | o> readline() -> 1: |
|
778 | o> readline() -> 1: | |
777 | o> \n |
|
779 | o> \n | |
778 | Send an unknown command after the "between" |
|
780 | Send an unknown command after the "between" | |
779 |
|
781 | |||
780 | $ hg debugwireproto --localssh --peer raw << EOF |
|
782 | $ hg debugwireproto --localssh --peer raw << EOF | |
781 | > raw |
|
783 | > raw | |
782 | > hello\n |
|
784 | > hello\n | |
783 | > readline |
|
785 | > readline | |
784 | > readline |
|
786 | > readline | |
785 | > raw |
|
787 | > raw | |
786 | > between\n |
|
788 | > between\n | |
787 | > pairs 81\n |
|
789 | > pairs 81\n | |
788 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000unknown |
|
790 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000unknown | |
789 | > readline |
|
791 | > readline | |
790 | > readline |
|
792 | > readline | |
791 | > EOF |
|
793 | > EOF | |
792 | using raw connection to peer |
|
794 | using raw connection to peer | |
793 | i> write(6) -> 6: |
|
795 | i> write(6) -> 6: | |
794 | i> hello\n |
|
796 | i> hello\n | |
795 | o> readline() -> 4: |
|
797 | o> readline() -> 4: | |
796 | o> 413\n |
|
798 | o> 413\n | |
797 | o> readline() -> 413: |
|
799 | o> readline() -> 413: | |
798 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
800 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
799 | i> write(105) -> 105: |
|
801 | i> write(105) -> 105: | |
800 | i> between\n |
|
802 | i> between\n | |
801 | i> pairs 81\n |
|
803 | i> pairs 81\n | |
802 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000unknown |
|
804 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000unknown | |
803 | o> readline() -> 2: |
|
805 | o> readline() -> 2: | |
804 | o> 1\n |
|
806 | o> 1\n | |
805 | o> readline() -> 1: |
|
807 | o> readline() -> 1: | |
806 | o> \n |
|
808 | o> \n | |
807 |
|
809 | |||
808 | And one with arguments |
|
810 | And one with arguments | |
809 |
|
811 | |||
810 | $ hg debugwireproto --localssh --peer raw << EOF |
|
812 | $ hg debugwireproto --localssh --peer raw << EOF | |
811 | > raw |
|
813 | > raw | |
812 | > hello\n |
|
814 | > hello\n | |
813 | > between\n |
|
815 | > between\n | |
814 | > pairs 81\n |
|
816 | > pairs 81\n | |
815 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
817 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
816 | > readline |
|
818 | > readline | |
817 | > readline |
|
819 | > readline | |
818 | > readline |
|
820 | > readline | |
819 | > readline |
|
821 | > readline | |
820 | > raw |
|
822 | > raw | |
821 | > unknown\n |
|
823 | > unknown\n | |
822 | > foo 5\n |
|
824 | > foo 5\n | |
823 | > \nvalue\n |
|
825 | > \nvalue\n | |
824 | > bar 3\n |
|
826 | > bar 3\n | |
825 | > baz\n |
|
827 | > baz\n | |
826 | > readline |
|
828 | > readline | |
827 | > readline |
|
829 | > readline | |
828 | > readline |
|
830 | > readline | |
829 | > EOF |
|
831 | > EOF | |
830 | using raw connection to peer |
|
832 | using raw connection to peer | |
831 | i> write(104) -> 104: |
|
833 | i> write(104) -> 104: | |
832 | i> hello\n |
|
834 | i> hello\n | |
833 | i> between\n |
|
835 | i> between\n | |
834 | i> pairs 81\n |
|
836 | i> pairs 81\n | |
835 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
837 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
836 | o> readline() -> 4: |
|
838 | o> readline() -> 4: | |
837 | o> 413\n |
|
839 | o> 413\n | |
838 | o> readline() -> 413: |
|
840 | o> readline() -> 413: | |
839 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
841 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
840 | o> readline() -> 2: |
|
842 | o> readline() -> 2: | |
841 | o> 1\n |
|
843 | o> 1\n | |
842 | o> readline() -> 1: |
|
844 | o> readline() -> 1: | |
843 | o> \n |
|
845 | o> \n | |
844 | i> write(31) -> 31: |
|
846 | i> write(31) -> 31: | |
845 | i> unknown\n |
|
847 | i> unknown\n | |
846 | i> foo 5\n |
|
848 | i> foo 5\n | |
847 | i> \n |
|
849 | i> \n | |
848 | i> value\n |
|
850 | i> value\n | |
849 | i> bar 3\n |
|
851 | i> bar 3\n | |
850 | i> baz\n |
|
852 | i> baz\n | |
851 | o> readline() -> 2: |
|
853 | o> readline() -> 2: | |
852 | o> 0\n |
|
854 | o> 0\n | |
853 | o> readline() -> 2: |
|
855 | o> readline() -> 2: | |
854 | o> 0\n |
|
856 | o> 0\n | |
855 | o> readline() -> 0: |
|
857 | o> readline() -> 0: | |
856 |
|
858 | |||
857 | Send a valid command before the handshake |
|
859 | Send a valid command before the handshake | |
858 |
|
860 | |||
859 | $ hg debugwireproto --localssh --peer raw << EOF |
|
861 | $ hg debugwireproto --localssh --peer raw << EOF | |
860 | > raw |
|
862 | > raw | |
861 | > heads\n |
|
863 | > heads\n | |
862 | > readline |
|
864 | > readline | |
863 | > raw |
|
865 | > raw | |
864 | > hello\n |
|
866 | > hello\n | |
865 | > between\n |
|
867 | > between\n | |
866 | > pairs 81\n |
|
868 | > pairs 81\n | |
867 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
869 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
868 | > readline |
|
870 | > readline | |
869 | > readline |
|
871 | > readline | |
870 | > readline |
|
872 | > readline | |
871 | > readline |
|
873 | > readline | |
872 | > EOF |
|
874 | > EOF | |
873 | using raw connection to peer |
|
875 | using raw connection to peer | |
874 | i> write(6) -> 6: |
|
876 | i> write(6) -> 6: | |
875 | i> heads\n |
|
877 | i> heads\n | |
876 | o> readline() -> 3: |
|
878 | o> readline() -> 3: | |
877 | o> 41\n |
|
879 | o> 41\n | |
878 | i> write(104) -> 104: |
|
880 | i> write(104) -> 104: | |
879 | i> hello\n |
|
881 | i> hello\n | |
880 | i> between\n |
|
882 | i> between\n | |
881 | i> pairs 81\n |
|
883 | i> pairs 81\n | |
882 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
884 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
883 | o> readline() -> 41: |
|
885 | o> readline() -> 41: | |
884 | o> 68986213bd4485ea51533535e3fc9e78007a711f\n |
|
886 | o> 68986213bd4485ea51533535e3fc9e78007a711f\n | |
885 | o> readline() -> 4: |
|
887 | o> readline() -> 4: | |
886 | o> 413\n |
|
888 | o> 413\n | |
887 | o> readline() -> 413: |
|
889 | o> readline() -> 413: | |
888 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
890 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
889 | o> readline() -> 2: |
|
891 | o> readline() -> 2: | |
890 | o> 1\n |
|
892 | o> 1\n | |
891 |
|
893 | |||
892 | And a variation that doesn't send the between command |
|
894 | And a variation that doesn't send the between command | |
893 |
|
895 | |||
894 | $ hg debugwireproto --localssh --peer raw << EOF |
|
896 | $ hg debugwireproto --localssh --peer raw << EOF | |
895 | > raw |
|
897 | > raw | |
896 | > heads\n |
|
898 | > heads\n | |
897 | > readline |
|
899 | > readline | |
898 | > raw |
|
900 | > raw | |
899 | > hello\n |
|
901 | > hello\n | |
900 | > readline |
|
902 | > readline | |
901 | > readline |
|
903 | > readline | |
902 | > EOF |
|
904 | > EOF | |
903 | using raw connection to peer |
|
905 | using raw connection to peer | |
904 | i> write(6) -> 6: |
|
906 | i> write(6) -> 6: | |
905 | i> heads\n |
|
907 | i> heads\n | |
906 | o> readline() -> 3: |
|
908 | o> readline() -> 3: | |
907 | o> 41\n |
|
909 | o> 41\n | |
908 | i> write(6) -> 6: |
|
910 | i> write(6) -> 6: | |
909 | i> hello\n |
|
911 | i> hello\n | |
910 | o> readline() -> 41: |
|
912 | o> readline() -> 41: | |
911 | o> 68986213bd4485ea51533535e3fc9e78007a711f\n |
|
913 | o> 68986213bd4485ea51533535e3fc9e78007a711f\n | |
912 | o> readline() -> 4: |
|
914 | o> readline() -> 4: | |
913 | o> 413\n |
|
915 | o> 413\n | |
914 |
|
916 | |||
915 | Send an upgrade request to a server that doesn't support that command |
|
917 | Send an upgrade request to a server that doesn't support that command | |
916 |
|
918 | |||
917 | $ hg debugwireproto --localssh --peer raw << EOF |
|
919 | $ hg debugwireproto --localssh --peer raw << EOF | |
918 | > raw |
|
920 | > raw | |
919 | > upgrade 2e82ab3f-9ce3-4b4e-8f8c-6fd1c0e9e23a proto=irrelevant1%2Cirrelevant2\n |
|
921 | > upgrade 2e82ab3f-9ce3-4b4e-8f8c-6fd1c0e9e23a proto=irrelevant1%2Cirrelevant2\n | |
920 | > readline |
|
922 | > readline | |
921 | > raw |
|
923 | > raw | |
922 | > hello\n |
|
924 | > hello\n | |
923 | > between\n |
|
925 | > between\n | |
924 | > pairs 81\n |
|
926 | > pairs 81\n | |
925 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
927 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
926 | > readline |
|
928 | > readline | |
927 | > readline |
|
929 | > readline | |
928 | > readline |
|
930 | > readline | |
929 | > readline |
|
931 | > readline | |
930 | > EOF |
|
932 | > EOF | |
931 | using raw connection to peer |
|
933 | using raw connection to peer | |
932 | i> write(77) -> 77: |
|
934 | i> write(77) -> 77: | |
933 | i> upgrade 2e82ab3f-9ce3-4b4e-8f8c-6fd1c0e9e23a proto=irrelevant1%2Cirrelevant2\n |
|
935 | i> upgrade 2e82ab3f-9ce3-4b4e-8f8c-6fd1c0e9e23a proto=irrelevant1%2Cirrelevant2\n | |
934 | o> readline() -> 2: |
|
936 | o> readline() -> 2: | |
935 | o> 0\n |
|
937 | o> 0\n | |
936 | i> write(104) -> 104: |
|
938 | i> write(104) -> 104: | |
937 | i> hello\n |
|
939 | i> hello\n | |
938 | i> between\n |
|
940 | i> between\n | |
939 | i> pairs 81\n |
|
941 | i> pairs 81\n | |
940 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
942 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
941 | o> readline() -> 4: |
|
943 | o> readline() -> 4: | |
942 | o> 413\n |
|
944 | o> 413\n | |
943 | o> readline() -> 413: |
|
945 | o> readline() -> 413: | |
944 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
946 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
945 | o> readline() -> 2: |
|
947 | o> readline() -> 2: | |
946 | o> 1\n |
|
948 | o> 1\n | |
947 | o> readline() -> 1: |
|
949 | o> readline() -> 1: | |
948 | o> \n |
|
950 | o> \n | |
949 |
|
951 | |||
950 | $ cd .. |
|
952 | $ cd .. | |
951 |
|
953 | |||
952 | $ hg --config experimental.sshpeer.advertise-v2=true --debug debugpeer ssh://user@dummy/server |
|
954 | $ hg --config experimental.sshpeer.advertise-v2=true --debug debugpeer ssh://user@dummy/server | |
953 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
|
955 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) | |
954 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
|
956 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) | |
955 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) |
|
957 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) | |
956 | devel-peer-request: hello+between |
|
958 | devel-peer-request: hello+between | |
957 | devel-peer-request: pairs: 81 bytes |
|
959 | devel-peer-request: pairs: 81 bytes | |
958 | sending hello command |
|
960 | sending hello command | |
959 | sending between command |
|
961 | sending between command | |
960 | remote: 0 |
|
962 | remote: 0 | |
961 | remote: 413 |
|
963 | remote: 413 | |
962 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
964 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
963 | remote: 1 |
|
965 | remote: 1 | |
964 | devel-peer-request: protocaps |
|
966 | devel-peer-request: protocaps | |
965 | devel-peer-request: caps: * bytes (glob) |
|
967 | devel-peer-request: caps: * bytes (glob) | |
966 | sending protocaps command |
|
968 | sending protocaps command | |
967 | url: ssh://user@dummy/server |
|
969 | url: ssh://user@dummy/server | |
968 | local: no |
|
970 | local: no | |
969 | pushable: yes |
|
971 | pushable: yes | |
970 |
|
972 | |||
971 | Enable version 2 support on server. We need to do this in hgrc because we can't |
|
973 | Enable version 2 support on server. We need to do this in hgrc because we can't | |
972 | use --config with `hg serve --stdio`. |
|
974 | use --config with `hg serve --stdio`. | |
973 |
|
975 | |||
974 | $ cat >> server/.hg/hgrc << EOF |
|
976 | $ cat >> server/.hg/hgrc << EOF | |
975 | > [experimental] |
|
977 | > [experimental] | |
976 | > sshserver.support-v2 = true |
|
978 | > sshserver.support-v2 = true | |
977 | > EOF |
|
979 | > EOF | |
978 |
|
980 | |||
979 | Send an upgrade request to a server that supports upgrade |
|
981 | Send an upgrade request to a server that supports upgrade | |
980 |
|
982 | |||
981 | $ cd server |
|
983 | $ cd server | |
982 |
|
984 | |||
983 | $ hg debugwireproto --localssh --peer raw << EOF |
|
985 | $ hg debugwireproto --localssh --peer raw << EOF | |
984 | > raw |
|
986 | > raw | |
985 | > upgrade this-is-some-token proto=exp-ssh-v2-0001\n |
|
987 | > upgrade this-is-some-token proto=exp-ssh-v2-0001\n | |
986 | > hello\n |
|
988 | > hello\n | |
987 | > between\n |
|
989 | > between\n | |
988 | > pairs 81\n |
|
990 | > pairs 81\n | |
989 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
991 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
990 | > readline |
|
992 | > readline | |
991 | > readline |
|
993 | > readline | |
992 | > readline |
|
994 | > readline | |
993 | > EOF |
|
995 | > EOF | |
994 | using raw connection to peer |
|
996 | using raw connection to peer | |
995 | i> write(153) -> 153: |
|
997 | i> write(153) -> 153: | |
996 | i> upgrade this-is-some-token proto=exp-ssh-v2-0001\n |
|
998 | i> upgrade this-is-some-token proto=exp-ssh-v2-0001\n | |
997 | i> hello\n |
|
999 | i> hello\n | |
998 | i> between\n |
|
1000 | i> between\n | |
999 | i> pairs 81\n |
|
1001 | i> pairs 81\n | |
1000 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1002 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1001 | o> readline() -> 44: |
|
1003 | o> readline() -> 44: | |
1002 | o> upgraded this-is-some-token exp-ssh-v2-0001\n |
|
1004 | o> upgraded this-is-some-token exp-ssh-v2-0001\n | |
1003 | o> readline() -> 4: |
|
1005 | o> readline() -> 4: | |
1004 | o> 412\n |
|
1006 | o> 412\n | |
1005 | o> readline() -> 413: |
|
1007 | o> readline() -> 413: | |
1006 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
1008 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
1007 |
|
1009 | |||
1008 | $ cd .. |
|
1010 | $ cd .. | |
1009 |
|
1011 | |||
1010 | $ hg --config experimental.sshpeer.advertise-v2=true --debug debugpeer ssh://user@dummy/server |
|
1012 | $ hg --config experimental.sshpeer.advertise-v2=true --debug debugpeer ssh://user@dummy/server | |
1011 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
|
1013 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) | |
1012 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
|
1014 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) | |
1013 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) |
|
1015 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) | |
1014 | devel-peer-request: hello+between |
|
1016 | devel-peer-request: hello+between | |
1015 | devel-peer-request: pairs: 81 bytes |
|
1017 | devel-peer-request: pairs: 81 bytes | |
1016 | sending hello command |
|
1018 | sending hello command | |
1017 | sending between command |
|
1019 | sending between command | |
1018 | protocol upgraded to exp-ssh-v2-0001 |
|
1020 | protocol upgraded to exp-ssh-v2-0001 | |
1019 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
1021 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
1020 | devel-peer-request: protocaps |
|
1022 | devel-peer-request: protocaps | |
1021 | devel-peer-request: caps: * bytes (glob) |
|
1023 | devel-peer-request: caps: * bytes (glob) | |
1022 | sending protocaps command |
|
1024 | sending protocaps command | |
1023 | url: ssh://user@dummy/server |
|
1025 | url: ssh://user@dummy/server | |
1024 | local: no |
|
1026 | local: no | |
1025 | pushable: yes |
|
1027 | pushable: yes | |
1026 |
|
1028 | |||
1027 | Verify the peer has capabilities |
|
1029 | Verify the peer has capabilities | |
1028 |
|
1030 | |||
1029 | $ hg --config experimental.sshpeer.advertise-v2=true --debug debugcapabilities ssh://user@dummy/server |
|
1031 | $ hg --config experimental.sshpeer.advertise-v2=true --debug debugcapabilities ssh://user@dummy/server | |
1030 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
|
1032 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) | |
1031 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
|
1033 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) | |
1032 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) |
|
1034 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) | |
1033 | devel-peer-request: hello+between |
|
1035 | devel-peer-request: hello+between | |
1034 | devel-peer-request: pairs: 81 bytes |
|
1036 | devel-peer-request: pairs: 81 bytes | |
1035 | sending hello command |
|
1037 | sending hello command | |
1036 | sending between command |
|
1038 | sending between command | |
1037 | protocol upgraded to exp-ssh-v2-0001 |
|
1039 | protocol upgraded to exp-ssh-v2-0001 | |
1038 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
1040 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
1039 | devel-peer-request: protocaps |
|
1041 | devel-peer-request: protocaps | |
1040 | devel-peer-request: caps: * bytes (glob) |
|
1042 | devel-peer-request: caps: * bytes (glob) | |
1041 | sending protocaps command |
|
1043 | sending protocaps command | |
1042 | Main capabilities: |
|
1044 | Main capabilities: | |
1043 | batch |
|
1045 | batch | |
1044 | branchmap |
|
1046 | branchmap | |
1045 | $USUAL_BUNDLE2_CAPS_SERVER$ |
|
1047 | $USUAL_BUNDLE2_CAPS_SERVER$ | |
1046 | changegroupsubset |
|
1048 | changegroupsubset | |
1047 | getbundle |
|
1049 | getbundle | |
1048 | known |
|
1050 | known | |
1049 | lookup |
|
1051 | lookup | |
1050 | protocaps |
|
1052 | protocaps | |
1051 | pushkey |
|
1053 | pushkey | |
1052 | streamreqs=generaldelta,revlogv1 |
|
1054 | streamreqs=generaldelta,revlogv1 | |
1053 | unbundle=HG10GZ,HG10BZ,HG10UN |
|
1055 | unbundle=HG10GZ,HG10BZ,HG10UN | |
1054 | unbundlehash |
|
1056 | unbundlehash | |
1055 | Bundle2 capabilities: |
|
1057 | Bundle2 capabilities: | |
1056 | HG20 |
|
1058 | HG20 | |
1057 | bookmarks |
|
1059 | bookmarks | |
1058 | changegroup |
|
1060 | changegroup | |
1059 | 01 |
|
1061 | 01 | |
1060 | 02 |
|
1062 | 02 | |
1061 | digests |
|
1063 | digests | |
1062 | md5 |
|
1064 | md5 | |
1063 | sha1 |
|
1065 | sha1 | |
1064 | sha512 |
|
1066 | sha512 | |
1065 | error |
|
1067 | error | |
1066 | abort |
|
1068 | abort | |
1067 | unsupportedcontent |
|
1069 | unsupportedcontent | |
1068 | pushraced |
|
1070 | pushraced | |
1069 | pushkey |
|
1071 | pushkey | |
1070 | hgtagsfnodes |
|
1072 | hgtagsfnodes | |
1071 | listkeys |
|
1073 | listkeys | |
1072 | phases |
|
1074 | phases | |
1073 | heads |
|
1075 | heads | |
1074 | pushkey |
|
1076 | pushkey | |
1075 | remote-changegroup |
|
1077 | remote-changegroup | |
1076 | http |
|
1078 | http | |
1077 | https |
|
1079 | https | |
1078 | rev-branch-cache |
|
1080 | rev-branch-cache | |
1079 |
|
1081 | |||
1080 | Command after upgrade to version 2 is processed |
|
1082 | Command after upgrade to version 2 is processed | |
1081 |
|
1083 | |||
1082 | $ cd server |
|
1084 | $ cd server | |
1083 |
|
1085 | |||
1084 | $ hg debugwireproto --localssh --peer raw << EOF |
|
1086 | $ hg debugwireproto --localssh --peer raw << EOF | |
1085 | > raw |
|
1087 | > raw | |
1086 | > upgrade this-is-some-token proto=exp-ssh-v2-0001\n |
|
1088 | > upgrade this-is-some-token proto=exp-ssh-v2-0001\n | |
1087 | > hello\n |
|
1089 | > hello\n | |
1088 | > between\n |
|
1090 | > between\n | |
1089 | > pairs 81\n |
|
1091 | > pairs 81\n | |
1090 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1092 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1091 | > readline |
|
1093 | > readline | |
1092 | > readline |
|
1094 | > readline | |
1093 | > readline |
|
1095 | > readline | |
1094 | > raw |
|
1096 | > raw | |
1095 | > hello\n |
|
1097 | > hello\n | |
1096 | > readline |
|
1098 | > readline | |
1097 | > readline |
|
1099 | > readline | |
1098 | > EOF |
|
1100 | > EOF | |
1099 | using raw connection to peer |
|
1101 | using raw connection to peer | |
1100 | i> write(153) -> 153: |
|
1102 | i> write(153) -> 153: | |
1101 | i> upgrade this-is-some-token proto=exp-ssh-v2-0001\n |
|
1103 | i> upgrade this-is-some-token proto=exp-ssh-v2-0001\n | |
1102 | i> hello\n |
|
1104 | i> hello\n | |
1103 | i> between\n |
|
1105 | i> between\n | |
1104 | i> pairs 81\n |
|
1106 | i> pairs 81\n | |
1105 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1107 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1106 | o> readline() -> 44: |
|
1108 | o> readline() -> 44: | |
1107 | o> upgraded this-is-some-token exp-ssh-v2-0001\n |
|
1109 | o> upgraded this-is-some-token exp-ssh-v2-0001\n | |
1108 | o> readline() -> 4: |
|
1110 | o> readline() -> 4: | |
1109 | o> 412\n |
|
1111 | o> 412\n | |
1110 | o> readline() -> 413: |
|
1112 | o> readline() -> 413: | |
1111 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
1113 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
1112 | i> write(6) -> 6: |
|
1114 | i> write(6) -> 6: | |
1113 | i> hello\n |
|
1115 | i> hello\n | |
1114 | o> readline() -> 4: |
|
1116 | o> readline() -> 4: | |
1115 | o> 397\n |
|
1117 | o> 397\n | |
1116 | o> readline() -> 397: |
|
1118 | o> readline() -> 397: | |
1117 | o> capabilities: branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
1119 | o> capabilities: branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
1118 |
|
1120 | |||
1119 | Multiple upgrades is not allowed |
|
1121 | Multiple upgrades is not allowed | |
1120 |
|
1122 | |||
1121 | $ hg debugwireproto --localssh --peer raw << EOF |
|
1123 | $ hg debugwireproto --localssh --peer raw << EOF | |
1122 | > raw |
|
1124 | > raw | |
1123 | > upgrade this-is-some-token proto=exp-ssh-v2-0001\n |
|
1125 | > upgrade this-is-some-token proto=exp-ssh-v2-0001\n | |
1124 | > hello\n |
|
1126 | > hello\n | |
1125 | > between\n |
|
1127 | > between\n | |
1126 | > pairs 81\n |
|
1128 | > pairs 81\n | |
1127 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1129 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1128 | > readline |
|
1130 | > readline | |
1129 | > readline |
|
1131 | > readline | |
1130 | > readline |
|
1132 | > readline | |
1131 | > raw |
|
1133 | > raw | |
1132 | > upgrade another-token proto=irrelevant\n |
|
1134 | > upgrade another-token proto=irrelevant\n | |
1133 | > hello\n |
|
1135 | > hello\n | |
1134 | > readline |
|
1136 | > readline | |
1135 | > readavailable |
|
1137 | > readavailable | |
1136 | > EOF |
|
1138 | > EOF | |
1137 | using raw connection to peer |
|
1139 | using raw connection to peer | |
1138 | i> write(153) -> 153: |
|
1140 | i> write(153) -> 153: | |
1139 | i> upgrade this-is-some-token proto=exp-ssh-v2-0001\n |
|
1141 | i> upgrade this-is-some-token proto=exp-ssh-v2-0001\n | |
1140 | i> hello\n |
|
1142 | i> hello\n | |
1141 | i> between\n |
|
1143 | i> between\n | |
1142 | i> pairs 81\n |
|
1144 | i> pairs 81\n | |
1143 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1145 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1144 | o> readline() -> 44: |
|
1146 | o> readline() -> 44: | |
1145 | o> upgraded this-is-some-token exp-ssh-v2-0001\n |
|
1147 | o> upgraded this-is-some-token exp-ssh-v2-0001\n | |
1146 | o> readline() -> 4: |
|
1148 | o> readline() -> 4: | |
1147 | o> 412\n |
|
1149 | o> 412\n | |
1148 | o> readline() -> 413: |
|
1150 | o> readline() -> 413: | |
1149 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
1151 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
1150 | i> write(45) -> 45: |
|
1152 | i> write(45) -> 45: | |
1151 | i> upgrade another-token proto=irrelevant\n |
|
1153 | i> upgrade another-token proto=irrelevant\n | |
1152 | i> hello\n |
|
1154 | i> hello\n | |
1153 | o> readline() -> 1: |
|
1155 | o> readline() -> 1: | |
1154 | o> \n |
|
1156 | o> \n | |
1155 | o> read(-1) -> 0: |
|
1157 | o> read(-1) -> 0: | |
1156 | e> read(-1) -> 42: |
|
1158 | e> read(-1) -> 42: | |
1157 | e> cannot upgrade protocols multiple times\n |
|
1159 | e> cannot upgrade protocols multiple times\n | |
1158 | e> -\n |
|
1160 | e> -\n | |
1159 |
|
1161 | |||
1160 | Malformed upgrade request line (not exactly 3 space delimited tokens) |
|
1162 | Malformed upgrade request line (not exactly 3 space delimited tokens) | |
1161 |
|
1163 | |||
1162 | $ hg debugwireproto --localssh --peer raw << EOF |
|
1164 | $ hg debugwireproto --localssh --peer raw << EOF | |
1163 | > raw |
|
1165 | > raw | |
1164 | > upgrade\n |
|
1166 | > upgrade\n | |
1165 | > readline |
|
1167 | > readline | |
1166 | > EOF |
|
1168 | > EOF | |
1167 | using raw connection to peer |
|
1169 | using raw connection to peer | |
1168 | i> write(8) -> 8: |
|
1170 | i> write(8) -> 8: | |
1169 | i> upgrade\n |
|
1171 | i> upgrade\n | |
1170 | o> readline() -> 2: |
|
1172 | o> readline() -> 2: | |
1171 | o> 0\n |
|
1173 | o> 0\n | |
1172 |
|
1174 | |||
1173 | $ hg debugwireproto --localssh --peer raw << EOF |
|
1175 | $ hg debugwireproto --localssh --peer raw << EOF | |
1174 | > raw |
|
1176 | > raw | |
1175 | > upgrade token\n |
|
1177 | > upgrade token\n | |
1176 | > readline |
|
1178 | > readline | |
1177 | > EOF |
|
1179 | > EOF | |
1178 | using raw connection to peer |
|
1180 | using raw connection to peer | |
1179 | i> write(14) -> 14: |
|
1181 | i> write(14) -> 14: | |
1180 | i> upgrade token\n |
|
1182 | i> upgrade token\n | |
1181 | o> readline() -> 2: |
|
1183 | o> readline() -> 2: | |
1182 | o> 0\n |
|
1184 | o> 0\n | |
1183 |
|
1185 | |||
1184 | $ hg debugwireproto --localssh --peer raw << EOF |
|
1186 | $ hg debugwireproto --localssh --peer raw << EOF | |
1185 | > raw |
|
1187 | > raw | |
1186 | > upgrade token foo=bar extra-token\n |
|
1188 | > upgrade token foo=bar extra-token\n | |
1187 | > readline |
|
1189 | > readline | |
1188 | > EOF |
|
1190 | > EOF | |
1189 | using raw connection to peer |
|
1191 | using raw connection to peer | |
1190 | i> write(34) -> 34: |
|
1192 | i> write(34) -> 34: | |
1191 | i> upgrade token foo=bar extra-token\n |
|
1193 | i> upgrade token foo=bar extra-token\n | |
1192 | o> readline() -> 2: |
|
1194 | o> readline() -> 2: | |
1193 | o> 0\n |
|
1195 | o> 0\n | |
1194 |
|
1196 | |||
1195 | Upgrade request to unsupported protocol is ignored |
|
1197 | Upgrade request to unsupported protocol is ignored | |
1196 |
|
1198 | |||
1197 | $ hg debugwireproto --localssh --peer raw << EOF |
|
1199 | $ hg debugwireproto --localssh --peer raw << EOF | |
1198 | > raw |
|
1200 | > raw | |
1199 | > upgrade this-is-some-token proto=unknown1,unknown2\n |
|
1201 | > upgrade this-is-some-token proto=unknown1,unknown2\n | |
1200 | > readline |
|
1202 | > readline | |
1201 | > raw |
|
1203 | > raw | |
1202 | > hello\n |
|
1204 | > hello\n | |
1203 | > readline |
|
1205 | > readline | |
1204 | > readline |
|
1206 | > readline | |
1205 | > raw |
|
1207 | > raw | |
1206 | > between\n |
|
1208 | > between\n | |
1207 | > pairs 81\n |
|
1209 | > pairs 81\n | |
1208 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1210 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1209 | > readline |
|
1211 | > readline | |
1210 | > readline |
|
1212 | > readline | |
1211 | > EOF |
|
1213 | > EOF | |
1212 | using raw connection to peer |
|
1214 | using raw connection to peer | |
1213 | i> write(51) -> 51: |
|
1215 | i> write(51) -> 51: | |
1214 | i> upgrade this-is-some-token proto=unknown1,unknown2\n |
|
1216 | i> upgrade this-is-some-token proto=unknown1,unknown2\n | |
1215 | o> readline() -> 2: |
|
1217 | o> readline() -> 2: | |
1216 | o> 0\n |
|
1218 | o> 0\n | |
1217 | i> write(6) -> 6: |
|
1219 | i> write(6) -> 6: | |
1218 | i> hello\n |
|
1220 | i> hello\n | |
1219 | o> readline() -> 4: |
|
1221 | o> readline() -> 4: | |
1220 | o> 413\n |
|
1222 | o> 413\n | |
1221 | o> readline() -> 413: |
|
1223 | o> readline() -> 413: | |
1222 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
1224 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
1223 | i> write(98) -> 98: |
|
1225 | i> write(98) -> 98: | |
1224 | i> between\n |
|
1226 | i> between\n | |
1225 | i> pairs 81\n |
|
1227 | i> pairs 81\n | |
1226 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1228 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1227 | o> readline() -> 2: |
|
1229 | o> readline() -> 2: | |
1228 | o> 1\n |
|
1230 | o> 1\n | |
1229 | o> readline() -> 1: |
|
1231 | o> readline() -> 1: | |
1230 | o> \n |
|
1232 | o> \n | |
1231 |
|
1233 | |||
1232 | Upgrade request must be followed by hello + between |
|
1234 | Upgrade request must be followed by hello + between | |
1233 |
|
1235 | |||
1234 | $ hg debugwireproto --localssh --peer raw << EOF |
|
1236 | $ hg debugwireproto --localssh --peer raw << EOF | |
1235 | > raw |
|
1237 | > raw | |
1236 | > upgrade token proto=exp-ssh-v2-0001\n |
|
1238 | > upgrade token proto=exp-ssh-v2-0001\n | |
1237 | > invalid\n |
|
1239 | > invalid\n | |
1238 | > readline |
|
1240 | > readline | |
1239 | > readavailable |
|
1241 | > readavailable | |
1240 | > EOF |
|
1242 | > EOF | |
1241 | using raw connection to peer |
|
1243 | using raw connection to peer | |
1242 | i> write(44) -> 44: |
|
1244 | i> write(44) -> 44: | |
1243 | i> upgrade token proto=exp-ssh-v2-0001\n |
|
1245 | i> upgrade token proto=exp-ssh-v2-0001\n | |
1244 | i> invalid\n |
|
1246 | i> invalid\n | |
1245 | o> readline() -> 1: |
|
1247 | o> readline() -> 1: | |
1246 | o> \n |
|
1248 | o> \n | |
1247 | o> read(-1) -> 0: |
|
1249 | o> read(-1) -> 0: | |
1248 | e> read(-1) -> 46: |
|
1250 | e> read(-1) -> 46: | |
1249 | e> malformed handshake protocol: missing hello\n |
|
1251 | e> malformed handshake protocol: missing hello\n | |
1250 | e> -\n |
|
1252 | e> -\n | |
1251 |
|
1253 | |||
1252 | $ hg debugwireproto --localssh --peer raw << EOF |
|
1254 | $ hg debugwireproto --localssh --peer raw << EOF | |
1253 | > raw |
|
1255 | > raw | |
1254 | > upgrade token proto=exp-ssh-v2-0001\n |
|
1256 | > upgrade token proto=exp-ssh-v2-0001\n | |
1255 | > hello\n |
|
1257 | > hello\n | |
1256 | > invalid\n |
|
1258 | > invalid\n | |
1257 | > readline |
|
1259 | > readline | |
1258 | > readavailable |
|
1260 | > readavailable | |
1259 | > EOF |
|
1261 | > EOF | |
1260 | using raw connection to peer |
|
1262 | using raw connection to peer | |
1261 | i> write(50) -> 50: |
|
1263 | i> write(50) -> 50: | |
1262 | i> upgrade token proto=exp-ssh-v2-0001\n |
|
1264 | i> upgrade token proto=exp-ssh-v2-0001\n | |
1263 | i> hello\n |
|
1265 | i> hello\n | |
1264 | i> invalid\n |
|
1266 | i> invalid\n | |
1265 | o> readline() -> 1: |
|
1267 | o> readline() -> 1: | |
1266 | o> \n |
|
1268 | o> \n | |
1267 | o> read(-1) -> 0: |
|
1269 | o> read(-1) -> 0: | |
1268 | e> read(-1) -> 48: |
|
1270 | e> read(-1) -> 48: | |
1269 | e> malformed handshake protocol: missing between\n |
|
1271 | e> malformed handshake protocol: missing between\n | |
1270 | e> -\n |
|
1272 | e> -\n | |
1271 |
|
1273 | |||
1272 | $ hg debugwireproto --localssh --peer raw << EOF |
|
1274 | $ hg debugwireproto --localssh --peer raw << EOF | |
1273 | > raw |
|
1275 | > raw | |
1274 | > upgrade token proto=exp-ssh-v2-0001\n |
|
1276 | > upgrade token proto=exp-ssh-v2-0001\n | |
1275 | > hello\n |
|
1277 | > hello\n | |
1276 | > between\n |
|
1278 | > between\n | |
1277 | > invalid\n |
|
1279 | > invalid\n | |
1278 | > readline |
|
1280 | > readline | |
1279 | > readavailable |
|
1281 | > readavailable | |
1280 | > EOF |
|
1282 | > EOF | |
1281 | using raw connection to peer |
|
1283 | using raw connection to peer | |
1282 | i> write(58) -> 58: |
|
1284 | i> write(58) -> 58: | |
1283 | i> upgrade token proto=exp-ssh-v2-0001\n |
|
1285 | i> upgrade token proto=exp-ssh-v2-0001\n | |
1284 | i> hello\n |
|
1286 | i> hello\n | |
1285 | i> between\n |
|
1287 | i> between\n | |
1286 | i> invalid\n |
|
1288 | i> invalid\n | |
1287 | o> readline() -> 1: |
|
1289 | o> readline() -> 1: | |
1288 | o> \n |
|
1290 | o> \n | |
1289 | o> read(-1) -> 0: |
|
1291 | o> read(-1) -> 0: | |
1290 | e> read(-1) -> 49: |
|
1292 | e> read(-1) -> 49: | |
1291 | e> malformed handshake protocol: missing pairs 81\n |
|
1293 | e> malformed handshake protocol: missing pairs 81\n | |
1292 | e> -\n |
|
1294 | e> -\n | |
1293 |
|
1295 | |||
1294 | Legacy commands are not exposed to version 2 of protocol |
|
1296 | Legacy commands are not exposed to version 2 of protocol | |
1295 |
|
1297 | |||
1296 | TODO re-enable these once we're back to actually using v2 commands |
|
1298 | TODO re-enable these once we're back to actually using v2 commands | |
1297 |
|
1299 | |||
1298 | $ hg --config experimental.sshpeer.advertise-v2=true debugwireproto --localssh << EOF |
|
1300 | $ hg --config experimental.sshpeer.advertise-v2=true debugwireproto --localssh << EOF | |
1299 | > command branches |
|
1301 | > command branches | |
1300 | > nodes 0000000000000000000000000000000000000000 |
|
1302 | > nodes 0000000000000000000000000000000000000000 | |
1301 | > EOF |
|
1303 | > EOF | |
1302 | creating ssh peer from handshake results |
|
1304 | creating ssh peer from handshake results | |
1303 | sending branches command |
|
1305 | sending branches command | |
1304 | response: |
|
1306 | response: | |
1305 |
|
1307 | |||
1306 | $ hg --config experimental.sshpeer.advertise-v2=true debugwireproto --localssh << EOF |
|
1308 | $ hg --config experimental.sshpeer.advertise-v2=true debugwireproto --localssh << EOF | |
1307 | > command changegroup |
|
1309 | > command changegroup | |
1308 | > roots 0000000000000000000000000000000000000000 |
|
1310 | > roots 0000000000000000000000000000000000000000 | |
1309 | > EOF |
|
1311 | > EOF | |
1310 | creating ssh peer from handshake results |
|
1312 | creating ssh peer from handshake results | |
1311 | sending changegroup command |
|
1313 | sending changegroup command | |
1312 | response: |
|
1314 | response: | |
1313 |
|
1315 | |||
1314 | $ hg --config experimental.sshpeer.advertise-v2=true debugwireproto --localssh << EOF |
|
1316 | $ hg --config experimental.sshpeer.advertise-v2=true debugwireproto --localssh << EOF | |
1315 | > command changegroupsubset |
|
1317 | > command changegroupsubset | |
1316 | > bases 0000000000000000000000000000000000000000 |
|
1318 | > bases 0000000000000000000000000000000000000000 | |
1317 | > heads 0000000000000000000000000000000000000000 |
|
1319 | > heads 0000000000000000000000000000000000000000 | |
1318 | > EOF |
|
1320 | > EOF | |
1319 | creating ssh peer from handshake results |
|
1321 | creating ssh peer from handshake results | |
1320 | sending changegroupsubset command |
|
1322 | sending changegroupsubset command | |
1321 | response: |
|
1323 | response: | |
1322 |
|
1324 | |||
1323 | $ cd .. |
|
1325 | $ cd .. | |
1324 |
|
1326 | |||
1325 | Test listkeys for listing namespaces |
|
1327 | Test listkeys for listing namespaces | |
1326 |
|
1328 | |||
1327 | $ hg init empty |
|
1329 | $ hg init empty | |
1328 | $ cd empty |
|
1330 | $ cd empty | |
1329 | $ debugwireproto << EOF |
|
1331 | $ debugwireproto << EOF | |
1330 | > command listkeys |
|
1332 | > command listkeys | |
1331 | > namespace namespaces |
|
1333 | > namespace namespaces | |
1332 | > EOF |
|
1334 | > EOF | |
1333 | testing ssh1 |
|
1335 | testing ssh1 | |
1334 | creating ssh peer from handshake results |
|
1336 | creating ssh peer from handshake results | |
1335 | i> write(104) -> 104: |
|
1337 | i> write(104) -> 104: | |
1336 | i> hello\n |
|
1338 | i> hello\n | |
1337 | i> between\n |
|
1339 | i> between\n | |
1338 | i> pairs 81\n |
|
1340 | i> pairs 81\n | |
1339 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1341 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1340 | i> flush() -> None |
|
1342 | i> flush() -> None | |
1341 | o> readline() -> 4: |
|
1343 | o> readline() -> 4: | |
1342 | o> 413\n |
|
1344 | o> 413\n | |
1343 | o> readline() -> 413: |
|
1345 | o> readline() -> 413: | |
1344 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
1346 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
1345 | o> readline() -> 2: |
|
1347 | o> readline() -> 2: | |
1346 | o> 1\n |
|
1348 | o> 1\n | |
1347 | o> readline() -> 1: |
|
1349 | o> readline() -> 1: | |
1348 | o> \n |
|
1350 | o> \n | |
1349 | sending listkeys command |
|
1351 | sending listkeys command | |
1350 | i> write(9) -> 9: |
|
1352 | i> write(9) -> 9: | |
1351 | i> listkeys\n |
|
1353 | i> listkeys\n | |
1352 | i> write(13) -> 13: |
|
1354 | i> write(13) -> 13: | |
1353 | i> namespace 10\n |
|
1355 | i> namespace 10\n | |
1354 | i> write(10) -> 10: namespaces |
|
1356 | i> write(10) -> 10: namespaces | |
1355 | i> flush() -> None |
|
1357 | i> flush() -> None | |
1356 | o> bufferedreadline() -> 3: |
|
1358 | o> bufferedreadline() -> 3: | |
1357 | o> 30\n |
|
1359 | o> 30\n | |
1358 | o> bufferedread(30) -> 30: |
|
1360 | o> bufferedread(30) -> 30: | |
1359 | o> bookmarks\t\n |
|
1361 | o> bookmarks\t\n | |
1360 | o> namespaces\t\n |
|
1362 | o> namespaces\t\n | |
1361 | o> phases\t |
|
1363 | o> phases\t | |
1362 | response: {b'bookmarks': b'', b'namespaces': b'', b'phases': b''} |
|
1364 | response: {b'bookmarks': b'', b'namespaces': b'', b'phases': b''} | |
1363 |
|
1365 | |||
1364 | testing ssh2 |
|
1366 | testing ssh2 | |
1365 | creating ssh peer from handshake results |
|
1367 | creating ssh peer from handshake results | |
1366 | i> write(171) -> 171: |
|
1368 | i> write(171) -> 171: | |
1367 | i> upgrade * proto=exp-ssh-v2-0001\n (glob) |
|
1369 | i> upgrade * proto=exp-ssh-v2-0001\n (glob) | |
1368 | i> hello\n |
|
1370 | i> hello\n | |
1369 | i> between\n |
|
1371 | i> between\n | |
1370 | i> pairs 81\n |
|
1372 | i> pairs 81\n | |
1371 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1373 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1372 | i> flush() -> None |
|
1374 | i> flush() -> None | |
1373 | o> readline() -> 62: |
|
1375 | o> readline() -> 62: | |
1374 | o> upgraded * exp-ssh-v2-0001\n (glob) |
|
1376 | o> upgraded * exp-ssh-v2-0001\n (glob) | |
1375 | o> readline() -> 4: |
|
1377 | o> readline() -> 4: | |
1376 | o> 412\n |
|
1378 | o> 412\n | |
1377 | o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
1379 | o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
1378 | o> read(1) -> 1: |
|
1380 | o> read(1) -> 1: | |
1379 | o> \n |
|
1381 | o> \n | |
1380 | sending listkeys command |
|
1382 | sending listkeys command | |
1381 | i> write(9) -> 9: |
|
1383 | i> write(9) -> 9: | |
1382 | i> listkeys\n |
|
1384 | i> listkeys\n | |
1383 | i> write(13) -> 13: |
|
1385 | i> write(13) -> 13: | |
1384 | i> namespace 10\n |
|
1386 | i> namespace 10\n | |
1385 | i> write(10) -> 10: namespaces |
|
1387 | i> write(10) -> 10: namespaces | |
1386 | i> flush() -> None |
|
1388 | i> flush() -> None | |
1387 | o> bufferedreadline() -> 3: |
|
1389 | o> bufferedreadline() -> 3: | |
1388 | o> 30\n |
|
1390 | o> 30\n | |
1389 | o> bufferedread(30) -> 30: |
|
1391 | o> bufferedread(30) -> 30: | |
1390 | o> bookmarks\t\n |
|
1392 | o> bookmarks\t\n | |
1391 | o> namespaces\t\n |
|
1393 | o> namespaces\t\n | |
1392 | o> phases\t |
|
1394 | o> phases\t | |
1393 | response: {b'bookmarks': b'', b'namespaces': b'', b'phases': b''} |
|
1395 | response: {b'bookmarks': b'', b'namespaces': b'', b'phases': b''} | |
1394 |
|
1396 | |||
1395 | $ cd .. |
|
1397 | $ cd .. | |
1396 |
|
1398 | |||
1397 | Test listkeys for bookmarks |
|
1399 | Test listkeys for bookmarks | |
1398 |
|
1400 | |||
1399 | $ hg init bookmarkrepo |
|
1401 | $ hg init bookmarkrepo | |
1400 | $ cd bookmarkrepo |
|
1402 | $ cd bookmarkrepo | |
1401 | $ echo 0 > foo |
|
1403 | $ echo 0 > foo | |
1402 | $ hg add foo |
|
1404 | $ hg add foo | |
1403 | $ hg -q commit -m initial |
|
1405 | $ hg -q commit -m initial | |
1404 | $ echo 1 > foo |
|
1406 | $ echo 1 > foo | |
1405 | $ hg commit -m second |
|
1407 | $ hg commit -m second | |
1406 |
|
1408 | |||
1407 | With no bookmarks set |
|
1409 | With no bookmarks set | |
1408 |
|
1410 | |||
1409 | $ debugwireproto << EOF |
|
1411 | $ debugwireproto << EOF | |
1410 | > command listkeys |
|
1412 | > command listkeys | |
1411 | > namespace bookmarks |
|
1413 | > namespace bookmarks | |
1412 | > EOF |
|
1414 | > EOF | |
1413 | testing ssh1 |
|
1415 | testing ssh1 | |
1414 | creating ssh peer from handshake results |
|
1416 | creating ssh peer from handshake results | |
1415 | i> write(104) -> 104: |
|
1417 | i> write(104) -> 104: | |
1416 | i> hello\n |
|
1418 | i> hello\n | |
1417 | i> between\n |
|
1419 | i> between\n | |
1418 | i> pairs 81\n |
|
1420 | i> pairs 81\n | |
1419 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1421 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1420 | i> flush() -> None |
|
1422 | i> flush() -> None | |
1421 | o> readline() -> 4: |
|
1423 | o> readline() -> 4: | |
1422 | o> 413\n |
|
1424 | o> 413\n | |
1423 | o> readline() -> 413: |
|
1425 | o> readline() -> 413: | |
1424 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
1426 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
1425 | o> readline() -> 2: |
|
1427 | o> readline() -> 2: | |
1426 | o> 1\n |
|
1428 | o> 1\n | |
1427 | o> readline() -> 1: |
|
1429 | o> readline() -> 1: | |
1428 | o> \n |
|
1430 | o> \n | |
1429 | sending listkeys command |
|
1431 | sending listkeys command | |
1430 | i> write(9) -> 9: |
|
1432 | i> write(9) -> 9: | |
1431 | i> listkeys\n |
|
1433 | i> listkeys\n | |
1432 | i> write(12) -> 12: |
|
1434 | i> write(12) -> 12: | |
1433 | i> namespace 9\n |
|
1435 | i> namespace 9\n | |
1434 | i> write(9) -> 9: bookmarks |
|
1436 | i> write(9) -> 9: bookmarks | |
1435 | i> flush() -> None |
|
1437 | i> flush() -> None | |
1436 | o> bufferedreadline() -> 2: |
|
1438 | o> bufferedreadline() -> 2: | |
1437 | o> 0\n |
|
1439 | o> 0\n | |
1438 | response: {} |
|
1440 | response: {} | |
1439 |
|
1441 | |||
1440 | testing ssh2 |
|
1442 | testing ssh2 | |
1441 | creating ssh peer from handshake results |
|
1443 | creating ssh peer from handshake results | |
1442 | i> write(171) -> 171: |
|
1444 | i> write(171) -> 171: | |
1443 | i> upgrade * proto=exp-ssh-v2-0001\n (glob) |
|
1445 | i> upgrade * proto=exp-ssh-v2-0001\n (glob) | |
1444 | i> hello\n |
|
1446 | i> hello\n | |
1445 | i> between\n |
|
1447 | i> between\n | |
1446 | i> pairs 81\n |
|
1448 | i> pairs 81\n | |
1447 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1449 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1448 | i> flush() -> None |
|
1450 | i> flush() -> None | |
1449 | o> readline() -> 62: |
|
1451 | o> readline() -> 62: | |
1450 | o> upgraded * exp-ssh-v2-0001\n (glob) |
|
1452 | o> upgraded * exp-ssh-v2-0001\n (glob) | |
1451 | o> readline() -> 4: |
|
1453 | o> readline() -> 4: | |
1452 | o> 412\n |
|
1454 | o> 412\n | |
1453 | o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
1455 | o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
1454 | o> read(1) -> 1: |
|
1456 | o> read(1) -> 1: | |
1455 | o> \n |
|
1457 | o> \n | |
1456 | sending listkeys command |
|
1458 | sending listkeys command | |
1457 | i> write(9) -> 9: |
|
1459 | i> write(9) -> 9: | |
1458 | i> listkeys\n |
|
1460 | i> listkeys\n | |
1459 | i> write(12) -> 12: |
|
1461 | i> write(12) -> 12: | |
1460 | i> namespace 9\n |
|
1462 | i> namespace 9\n | |
1461 | i> write(9) -> 9: bookmarks |
|
1463 | i> write(9) -> 9: bookmarks | |
1462 | i> flush() -> None |
|
1464 | i> flush() -> None | |
1463 | o> bufferedreadline() -> 2: |
|
1465 | o> bufferedreadline() -> 2: | |
1464 | o> 0\n |
|
1466 | o> 0\n | |
1465 | response: {} |
|
1467 | response: {} | |
1466 |
|
1468 | |||
1467 | With a single bookmark set |
|
1469 | With a single bookmark set | |
1468 |
|
1470 | |||
1469 | $ hg book -r 0 bookA |
|
1471 | $ hg book -r 0 bookA | |
1470 | $ debugwireproto << EOF |
|
1472 | $ debugwireproto << EOF | |
1471 | > command listkeys |
|
1473 | > command listkeys | |
1472 | > namespace bookmarks |
|
1474 | > namespace bookmarks | |
1473 | > EOF |
|
1475 | > EOF | |
1474 | testing ssh1 |
|
1476 | testing ssh1 | |
1475 | creating ssh peer from handshake results |
|
1477 | creating ssh peer from handshake results | |
1476 | i> write(104) -> 104: |
|
1478 | i> write(104) -> 104: | |
1477 | i> hello\n |
|
1479 | i> hello\n | |
1478 | i> between\n |
|
1480 | i> between\n | |
1479 | i> pairs 81\n |
|
1481 | i> pairs 81\n | |
1480 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1482 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1481 | i> flush() -> None |
|
1483 | i> flush() -> None | |
1482 | o> readline() -> 4: |
|
1484 | o> readline() -> 4: | |
1483 | o> 413\n |
|
1485 | o> 413\n | |
1484 | o> readline() -> 413: |
|
1486 | o> readline() -> 413: | |
1485 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
1487 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
1486 | o> readline() -> 2: |
|
1488 | o> readline() -> 2: | |
1487 | o> 1\n |
|
1489 | o> 1\n | |
1488 | o> readline() -> 1: |
|
1490 | o> readline() -> 1: | |
1489 | o> \n |
|
1491 | o> \n | |
1490 | sending listkeys command |
|
1492 | sending listkeys command | |
1491 | i> write(9) -> 9: |
|
1493 | i> write(9) -> 9: | |
1492 | i> listkeys\n |
|
1494 | i> listkeys\n | |
1493 | i> write(12) -> 12: |
|
1495 | i> write(12) -> 12: | |
1494 | i> namespace 9\n |
|
1496 | i> namespace 9\n | |
1495 | i> write(9) -> 9: bookmarks |
|
1497 | i> write(9) -> 9: bookmarks | |
1496 | i> flush() -> None |
|
1498 | i> flush() -> None | |
1497 | o> bufferedreadline() -> 3: |
|
1499 | o> bufferedreadline() -> 3: | |
1498 | o> 46\n |
|
1500 | o> 46\n | |
1499 | o> bufferedread(46) -> 46: bookA\t68986213bd4485ea51533535e3fc9e78007a711f |
|
1501 | o> bufferedread(46) -> 46: bookA\t68986213bd4485ea51533535e3fc9e78007a711f | |
1500 | response: {b'bookA': b'68986213bd4485ea51533535e3fc9e78007a711f'} |
|
1502 | response: {b'bookA': b'68986213bd4485ea51533535e3fc9e78007a711f'} | |
1501 |
|
1503 | |||
1502 | testing ssh2 |
|
1504 | testing ssh2 | |
1503 | creating ssh peer from handshake results |
|
1505 | creating ssh peer from handshake results | |
1504 | i> write(171) -> 171: |
|
1506 | i> write(171) -> 171: | |
1505 | i> upgrade * proto=exp-ssh-v2-0001\n (glob) |
|
1507 | i> upgrade * proto=exp-ssh-v2-0001\n (glob) | |
1506 | i> hello\n |
|
1508 | i> hello\n | |
1507 | i> between\n |
|
1509 | i> between\n | |
1508 | i> pairs 81\n |
|
1510 | i> pairs 81\n | |
1509 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1511 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1510 | i> flush() -> None |
|
1512 | i> flush() -> None | |
1511 | o> readline() -> 62: |
|
1513 | o> readline() -> 62: | |
1512 | o> upgraded * exp-ssh-v2-0001\n (glob) |
|
1514 | o> upgraded * exp-ssh-v2-0001\n (glob) | |
1513 | o> readline() -> 4: |
|
1515 | o> readline() -> 4: | |
1514 | o> 412\n |
|
1516 | o> 412\n | |
1515 | o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
1517 | o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
1516 | o> read(1) -> 1: |
|
1518 | o> read(1) -> 1: | |
1517 | o> \n |
|
1519 | o> \n | |
1518 | sending listkeys command |
|
1520 | sending listkeys command | |
1519 | i> write(9) -> 9: |
|
1521 | i> write(9) -> 9: | |
1520 | i> listkeys\n |
|
1522 | i> listkeys\n | |
1521 | i> write(12) -> 12: |
|
1523 | i> write(12) -> 12: | |
1522 | i> namespace 9\n |
|
1524 | i> namespace 9\n | |
1523 | i> write(9) -> 9: bookmarks |
|
1525 | i> write(9) -> 9: bookmarks | |
1524 | i> flush() -> None |
|
1526 | i> flush() -> None | |
1525 | o> bufferedreadline() -> 3: |
|
1527 | o> bufferedreadline() -> 3: | |
1526 | o> 46\n |
|
1528 | o> 46\n | |
1527 | o> bufferedread(46) -> 46: bookA\t68986213bd4485ea51533535e3fc9e78007a711f |
|
1529 | o> bufferedread(46) -> 46: bookA\t68986213bd4485ea51533535e3fc9e78007a711f | |
1528 | response: {b'bookA': b'68986213bd4485ea51533535e3fc9e78007a711f'} |
|
1530 | response: {b'bookA': b'68986213bd4485ea51533535e3fc9e78007a711f'} | |
1529 |
|
1531 | |||
1530 | With multiple bookmarks set |
|
1532 | With multiple bookmarks set | |
1531 |
|
1533 | |||
1532 | $ hg book -r 1 bookB |
|
1534 | $ hg book -r 1 bookB | |
1533 | $ debugwireproto << EOF |
|
1535 | $ debugwireproto << EOF | |
1534 | > command listkeys |
|
1536 | > command listkeys | |
1535 | > namespace bookmarks |
|
1537 | > namespace bookmarks | |
1536 | > EOF |
|
1538 | > EOF | |
1537 | testing ssh1 |
|
1539 | testing ssh1 | |
1538 | creating ssh peer from handshake results |
|
1540 | creating ssh peer from handshake results | |
1539 | i> write(104) -> 104: |
|
1541 | i> write(104) -> 104: | |
1540 | i> hello\n |
|
1542 | i> hello\n | |
1541 | i> between\n |
|
1543 | i> between\n | |
1542 | i> pairs 81\n |
|
1544 | i> pairs 81\n | |
1543 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1545 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1544 | i> flush() -> None |
|
1546 | i> flush() -> None | |
1545 | o> readline() -> 4: |
|
1547 | o> readline() -> 4: | |
1546 | o> 413\n |
|
1548 | o> 413\n | |
1547 | o> readline() -> 413: |
|
1549 | o> readline() -> 413: | |
1548 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
1550 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
1549 | o> readline() -> 2: |
|
1551 | o> readline() -> 2: | |
1550 | o> 1\n |
|
1552 | o> 1\n | |
1551 | o> readline() -> 1: |
|
1553 | o> readline() -> 1: | |
1552 | o> \n |
|
1554 | o> \n | |
1553 | sending listkeys command |
|
1555 | sending listkeys command | |
1554 | i> write(9) -> 9: |
|
1556 | i> write(9) -> 9: | |
1555 | i> listkeys\n |
|
1557 | i> listkeys\n | |
1556 | i> write(12) -> 12: |
|
1558 | i> write(12) -> 12: | |
1557 | i> namespace 9\n |
|
1559 | i> namespace 9\n | |
1558 | i> write(9) -> 9: bookmarks |
|
1560 | i> write(9) -> 9: bookmarks | |
1559 | i> flush() -> None |
|
1561 | i> flush() -> None | |
1560 | o> bufferedreadline() -> 3: |
|
1562 | o> bufferedreadline() -> 3: | |
1561 | o> 93\n |
|
1563 | o> 93\n | |
1562 | o> bufferedread(93) -> 93: |
|
1564 | o> bufferedread(93) -> 93: | |
1563 | o> bookA\t68986213bd4485ea51533535e3fc9e78007a711f\n |
|
1565 | o> bookA\t68986213bd4485ea51533535e3fc9e78007a711f\n | |
1564 | o> bookB\t1880f3755e2e52e3199e0ee5638128b08642f34d |
|
1566 | o> bookB\t1880f3755e2e52e3199e0ee5638128b08642f34d | |
1565 | response: {b'bookA': b'68986213bd4485ea51533535e3fc9e78007a711f', b'bookB': b'1880f3755e2e52e3199e0ee5638128b08642f34d'} |
|
1567 | response: {b'bookA': b'68986213bd4485ea51533535e3fc9e78007a711f', b'bookB': b'1880f3755e2e52e3199e0ee5638128b08642f34d'} | |
1566 |
|
1568 | |||
1567 | testing ssh2 |
|
1569 | testing ssh2 | |
1568 | creating ssh peer from handshake results |
|
1570 | creating ssh peer from handshake results | |
1569 | i> write(171) -> 171: |
|
1571 | i> write(171) -> 171: | |
1570 | i> upgrade * proto=exp-ssh-v2-0001\n (glob) |
|
1572 | i> upgrade * proto=exp-ssh-v2-0001\n (glob) | |
1571 | i> hello\n |
|
1573 | i> hello\n | |
1572 | i> between\n |
|
1574 | i> between\n | |
1573 | i> pairs 81\n |
|
1575 | i> pairs 81\n | |
1574 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1576 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1575 | i> flush() -> None |
|
1577 | i> flush() -> None | |
1576 | o> readline() -> 62: |
|
1578 | o> readline() -> 62: | |
1577 | o> upgraded * exp-ssh-v2-0001\n (glob) |
|
1579 | o> upgraded * exp-ssh-v2-0001\n (glob) | |
1578 | o> readline() -> 4: |
|
1580 | o> readline() -> 4: | |
1579 | o> 412\n |
|
1581 | o> 412\n | |
1580 | o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
1582 | o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
1581 | o> read(1) -> 1: |
|
1583 | o> read(1) -> 1: | |
1582 | o> \n |
|
1584 | o> \n | |
1583 | sending listkeys command |
|
1585 | sending listkeys command | |
1584 | i> write(9) -> 9: |
|
1586 | i> write(9) -> 9: | |
1585 | i> listkeys\n |
|
1587 | i> listkeys\n | |
1586 | i> write(12) -> 12: |
|
1588 | i> write(12) -> 12: | |
1587 | i> namespace 9\n |
|
1589 | i> namespace 9\n | |
1588 | i> write(9) -> 9: bookmarks |
|
1590 | i> write(9) -> 9: bookmarks | |
1589 | i> flush() -> None |
|
1591 | i> flush() -> None | |
1590 | o> bufferedreadline() -> 3: |
|
1592 | o> bufferedreadline() -> 3: | |
1591 | o> 93\n |
|
1593 | o> 93\n | |
1592 | o> bufferedread(93) -> 93: |
|
1594 | o> bufferedread(93) -> 93: | |
1593 | o> bookA\t68986213bd4485ea51533535e3fc9e78007a711f\n |
|
1595 | o> bookA\t68986213bd4485ea51533535e3fc9e78007a711f\n | |
1594 | o> bookB\t1880f3755e2e52e3199e0ee5638128b08642f34d |
|
1596 | o> bookB\t1880f3755e2e52e3199e0ee5638128b08642f34d | |
1595 | response: {b'bookA': b'68986213bd4485ea51533535e3fc9e78007a711f', b'bookB': b'1880f3755e2e52e3199e0ee5638128b08642f34d'} |
|
1597 | response: {b'bookA': b'68986213bd4485ea51533535e3fc9e78007a711f', b'bookB': b'1880f3755e2e52e3199e0ee5638128b08642f34d'} | |
1596 |
|
1598 | |||
1597 | Test pushkey for bookmarks |
|
1599 | Test pushkey for bookmarks | |
1598 |
|
1600 | |||
1599 | $ debugwireproto << EOF |
|
1601 | $ debugwireproto << EOF | |
1600 | > command pushkey |
|
1602 | > command pushkey | |
1601 | > namespace bookmarks |
|
1603 | > namespace bookmarks | |
1602 | > key remote |
|
1604 | > key remote | |
1603 | > old |
|
1605 | > old | |
1604 | > new 68986213bd4485ea51533535e3fc9e78007a711f |
|
1606 | > new 68986213bd4485ea51533535e3fc9e78007a711f | |
1605 | > EOF |
|
1607 | > EOF | |
1606 | testing ssh1 |
|
1608 | testing ssh1 | |
1607 | creating ssh peer from handshake results |
|
1609 | creating ssh peer from handshake results | |
1608 | i> write(104) -> 104: |
|
1610 | i> write(104) -> 104: | |
1609 | i> hello\n |
|
1611 | i> hello\n | |
1610 | i> between\n |
|
1612 | i> between\n | |
1611 | i> pairs 81\n |
|
1613 | i> pairs 81\n | |
1612 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1614 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1613 | i> flush() -> None |
|
1615 | i> flush() -> None | |
1614 | o> readline() -> 4: |
|
1616 | o> readline() -> 4: | |
1615 | o> 413\n |
|
1617 | o> 413\n | |
1616 | o> readline() -> 413: |
|
1618 | o> readline() -> 413: | |
1617 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
1619 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
1618 | o> readline() -> 2: |
|
1620 | o> readline() -> 2: | |
1619 | o> 1\n |
|
1621 | o> 1\n | |
1620 | o> readline() -> 1: |
|
1622 | o> readline() -> 1: | |
1621 | o> \n |
|
1623 | o> \n | |
1622 | sending pushkey command |
|
1624 | sending pushkey command | |
1623 | i> write(8) -> 8: |
|
1625 | i> write(8) -> 8: | |
1624 | i> pushkey\n |
|
1626 | i> pushkey\n | |
1625 | i> write(6) -> 6: |
|
1627 | i> write(6) -> 6: | |
1626 | i> key 6\n |
|
1628 | i> key 6\n | |
1627 | i> write(6) -> 6: remote |
|
1629 | i> write(6) -> 6: remote | |
1628 | i> write(12) -> 12: |
|
1630 | i> write(12) -> 12: | |
1629 | i> namespace 9\n |
|
1631 | i> namespace 9\n | |
1630 | i> write(9) -> 9: bookmarks |
|
1632 | i> write(9) -> 9: bookmarks | |
1631 | i> write(7) -> 7: |
|
1633 | i> write(7) -> 7: | |
1632 | i> new 40\n |
|
1634 | i> new 40\n | |
1633 | i> write(40) -> 40: 68986213bd4485ea51533535e3fc9e78007a711f |
|
1635 | i> write(40) -> 40: 68986213bd4485ea51533535e3fc9e78007a711f | |
1634 | i> write(6) -> 6: |
|
1636 | i> write(6) -> 6: | |
1635 | i> old 0\n |
|
1637 | i> old 0\n | |
1636 | i> flush() -> None |
|
1638 | i> flush() -> None | |
1637 | o> bufferedreadline() -> 2: |
|
1639 | o> bufferedreadline() -> 2: | |
1638 | o> 2\n |
|
1640 | o> 2\n | |
1639 | o> bufferedread(2) -> 2: |
|
1641 | o> bufferedread(2) -> 2: | |
1640 | o> 1\n |
|
1642 | o> 1\n | |
1641 | response: True |
|
1643 | response: True | |
1642 |
|
1644 | |||
1643 | testing ssh2 |
|
1645 | testing ssh2 | |
1644 | creating ssh peer from handshake results |
|
1646 | creating ssh peer from handshake results | |
1645 | i> write(171) -> 171: |
|
1647 | i> write(171) -> 171: | |
1646 | i> upgrade * proto=exp-ssh-v2-0001\n (glob) |
|
1648 | i> upgrade * proto=exp-ssh-v2-0001\n (glob) | |
1647 | i> hello\n |
|
1649 | i> hello\n | |
1648 | i> between\n |
|
1650 | i> between\n | |
1649 | i> pairs 81\n |
|
1651 | i> pairs 81\n | |
1650 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1652 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1651 | i> flush() -> None |
|
1653 | i> flush() -> None | |
1652 | o> readline() -> 62: |
|
1654 | o> readline() -> 62: | |
1653 | o> upgraded * exp-ssh-v2-0001\n (glob) |
|
1655 | o> upgraded * exp-ssh-v2-0001\n (glob) | |
1654 | o> readline() -> 4: |
|
1656 | o> readline() -> 4: | |
1655 | o> 412\n |
|
1657 | o> 412\n | |
1656 | o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
1658 | o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
1657 | o> read(1) -> 1: |
|
1659 | o> read(1) -> 1: | |
1658 | o> \n |
|
1660 | o> \n | |
1659 | sending pushkey command |
|
1661 | sending pushkey command | |
1660 | i> write(8) -> 8: |
|
1662 | i> write(8) -> 8: | |
1661 | i> pushkey\n |
|
1663 | i> pushkey\n | |
1662 | i> write(6) -> 6: |
|
1664 | i> write(6) -> 6: | |
1663 | i> key 6\n |
|
1665 | i> key 6\n | |
1664 | i> write(6) -> 6: remote |
|
1666 | i> write(6) -> 6: remote | |
1665 | i> write(12) -> 12: |
|
1667 | i> write(12) -> 12: | |
1666 | i> namespace 9\n |
|
1668 | i> namespace 9\n | |
1667 | i> write(9) -> 9: bookmarks |
|
1669 | i> write(9) -> 9: bookmarks | |
1668 | i> write(7) -> 7: |
|
1670 | i> write(7) -> 7: | |
1669 | i> new 40\n |
|
1671 | i> new 40\n | |
1670 | i> write(40) -> 40: 68986213bd4485ea51533535e3fc9e78007a711f |
|
1672 | i> write(40) -> 40: 68986213bd4485ea51533535e3fc9e78007a711f | |
1671 | i> write(6) -> 6: |
|
1673 | i> write(6) -> 6: | |
1672 | i> old 0\n |
|
1674 | i> old 0\n | |
1673 | i> flush() -> None |
|
1675 | i> flush() -> None | |
1674 | o> bufferedreadline() -> 2: |
|
1676 | o> bufferedreadline() -> 2: | |
1675 | o> 2\n |
|
1677 | o> 2\n | |
1676 | o> bufferedread(2) -> 2: |
|
1678 | o> bufferedread(2) -> 2: | |
1677 | o> 1\n |
|
1679 | o> 1\n | |
1678 | response: True |
|
1680 | response: True | |
1679 |
|
1681 | |||
1680 | $ hg bookmarks |
|
1682 | $ hg bookmarks | |
1681 | bookA 0:68986213bd44 |
|
1683 | bookA 0:68986213bd44 | |
1682 | bookB 1:1880f3755e2e |
|
1684 | bookB 1:1880f3755e2e | |
1683 | remote 0:68986213bd44 |
|
1685 | remote 0:68986213bd44 | |
1684 |
|
1686 | |||
1685 | $ cd .. |
|
1687 | $ cd .. | |
1686 |
|
1688 | |||
1687 | Test listkeys for phases |
|
1689 | Test listkeys for phases | |
1688 |
|
1690 | |||
1689 | $ hg init phasesrepo |
|
1691 | $ hg init phasesrepo | |
1690 | $ cd phasesrepo |
|
1692 | $ cd phasesrepo | |
1691 |
|
1693 | |||
1692 | Phases on empty repo |
|
1694 | Phases on empty repo | |
1693 |
|
1695 | |||
1694 | $ debugwireproto << EOF |
|
1696 | $ debugwireproto << EOF | |
1695 | > command listkeys |
|
1697 | > command listkeys | |
1696 | > namespace phases |
|
1698 | > namespace phases | |
1697 | > EOF |
|
1699 | > EOF | |
1698 | testing ssh1 |
|
1700 | testing ssh1 | |
1699 | creating ssh peer from handshake results |
|
1701 | creating ssh peer from handshake results | |
1700 | i> write(104) -> 104: |
|
1702 | i> write(104) -> 104: | |
1701 | i> hello\n |
|
1703 | i> hello\n | |
1702 | i> between\n |
|
1704 | i> between\n | |
1703 | i> pairs 81\n |
|
1705 | i> pairs 81\n | |
1704 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1706 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1705 | i> flush() -> None |
|
1707 | i> flush() -> None | |
1706 | o> readline() -> 4: |
|
1708 | o> readline() -> 4: | |
1707 | o> 413\n |
|
1709 | o> 413\n | |
1708 | o> readline() -> 413: |
|
1710 | o> readline() -> 413: | |
1709 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
1711 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
1710 | o> readline() -> 2: |
|
1712 | o> readline() -> 2: | |
1711 | o> 1\n |
|
1713 | o> 1\n | |
1712 | o> readline() -> 1: |
|
1714 | o> readline() -> 1: | |
1713 | o> \n |
|
1715 | o> \n | |
1714 | sending listkeys command |
|
1716 | sending listkeys command | |
1715 | i> write(9) -> 9: |
|
1717 | i> write(9) -> 9: | |
1716 | i> listkeys\n |
|
1718 | i> listkeys\n | |
1717 | i> write(12) -> 12: |
|
1719 | i> write(12) -> 12: | |
1718 | i> namespace 6\n |
|
1720 | i> namespace 6\n | |
1719 | i> write(6) -> 6: phases |
|
1721 | i> write(6) -> 6: phases | |
1720 | i> flush() -> None |
|
1722 | i> flush() -> None | |
1721 | o> bufferedreadline() -> 3: |
|
1723 | o> bufferedreadline() -> 3: | |
1722 | o> 15\n |
|
1724 | o> 15\n | |
1723 | o> bufferedread(15) -> 15: publishing\tTrue |
|
1725 | o> bufferedread(15) -> 15: publishing\tTrue | |
1724 | response: {b'publishing': b'True'} |
|
1726 | response: {b'publishing': b'True'} | |
1725 |
|
1727 | |||
1726 | testing ssh2 |
|
1728 | testing ssh2 | |
1727 | creating ssh peer from handshake results |
|
1729 | creating ssh peer from handshake results | |
1728 | i> write(171) -> 171: |
|
1730 | i> write(171) -> 171: | |
1729 | i> upgrade * proto=exp-ssh-v2-0001\n (glob) |
|
1731 | i> upgrade * proto=exp-ssh-v2-0001\n (glob) | |
1730 | i> hello\n |
|
1732 | i> hello\n | |
1731 | i> between\n |
|
1733 | i> between\n | |
1732 | i> pairs 81\n |
|
1734 | i> pairs 81\n | |
1733 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1735 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1734 | i> flush() -> None |
|
1736 | i> flush() -> None | |
1735 | o> readline() -> 62: |
|
1737 | o> readline() -> 62: | |
1736 | o> upgraded * exp-ssh-v2-0001\n (glob) |
|
1738 | o> upgraded * exp-ssh-v2-0001\n (glob) | |
1737 | o> readline() -> 4: |
|
1739 | o> readline() -> 4: | |
1738 | o> 412\n |
|
1740 | o> 412\n | |
1739 | o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
1741 | o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
1740 | o> read(1) -> 1: |
|
1742 | o> read(1) -> 1: | |
1741 | o> \n |
|
1743 | o> \n | |
1742 | sending listkeys command |
|
1744 | sending listkeys command | |
1743 | i> write(9) -> 9: |
|
1745 | i> write(9) -> 9: | |
1744 | i> listkeys\n |
|
1746 | i> listkeys\n | |
1745 | i> write(12) -> 12: |
|
1747 | i> write(12) -> 12: | |
1746 | i> namespace 6\n |
|
1748 | i> namespace 6\n | |
1747 | i> write(6) -> 6: phases |
|
1749 | i> write(6) -> 6: phases | |
1748 | i> flush() -> None |
|
1750 | i> flush() -> None | |
1749 | o> bufferedreadline() -> 3: |
|
1751 | o> bufferedreadline() -> 3: | |
1750 | o> 15\n |
|
1752 | o> 15\n | |
1751 | o> bufferedread(15) -> 15: publishing\tTrue |
|
1753 | o> bufferedread(15) -> 15: publishing\tTrue | |
1752 | response: {b'publishing': b'True'} |
|
1754 | response: {b'publishing': b'True'} | |
1753 |
|
1755 | |||
1754 | Create some commits |
|
1756 | Create some commits | |
1755 |
|
1757 | |||
1756 | $ echo 0 > foo |
|
1758 | $ echo 0 > foo | |
1757 | $ hg add foo |
|
1759 | $ hg add foo | |
1758 | $ hg -q commit -m initial |
|
1760 | $ hg -q commit -m initial | |
1759 | $ hg phase --public |
|
1761 | $ hg phase --public | |
1760 | $ echo 1 > foo |
|
1762 | $ echo 1 > foo | |
1761 | $ hg commit -m 'head 1 commit 1' |
|
1763 | $ hg commit -m 'head 1 commit 1' | |
1762 | $ echo 2 > foo |
|
1764 | $ echo 2 > foo | |
1763 | $ hg commit -m 'head 1 commit 2' |
|
1765 | $ hg commit -m 'head 1 commit 2' | |
1764 | $ hg -q up 0 |
|
1766 | $ hg -q up 0 | |
1765 | $ echo 1a > foo |
|
1767 | $ echo 1a > foo | |
1766 | $ hg commit -m 'head 2 commit 1' |
|
1768 | $ hg commit -m 'head 2 commit 1' | |
1767 | created new head |
|
1769 | created new head | |
1768 | $ echo 2a > foo |
|
1770 | $ echo 2a > foo | |
1769 | $ hg commit -m 'head 2 commit 2' |
|
1771 | $ hg commit -m 'head 2 commit 2' | |
1770 |
|
1772 | |||
1771 | Two draft heads |
|
1773 | Two draft heads | |
1772 |
|
1774 | |||
1773 | $ debugwireproto << EOF |
|
1775 | $ debugwireproto << EOF | |
1774 | > command listkeys |
|
1776 | > command listkeys | |
1775 | > namespace phases |
|
1777 | > namespace phases | |
1776 | > EOF |
|
1778 | > EOF | |
1777 | testing ssh1 |
|
1779 | testing ssh1 | |
1778 | creating ssh peer from handshake results |
|
1780 | creating ssh peer from handshake results | |
1779 | i> write(104) -> 104: |
|
1781 | i> write(104) -> 104: | |
1780 | i> hello\n |
|
1782 | i> hello\n | |
1781 | i> between\n |
|
1783 | i> between\n | |
1782 | i> pairs 81\n |
|
1784 | i> pairs 81\n | |
1783 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1785 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1784 | i> flush() -> None |
|
1786 | i> flush() -> None | |
1785 | o> readline() -> 4: |
|
1787 | o> readline() -> 4: | |
1786 | o> 413\n |
|
1788 | o> 413\n | |
1787 | o> readline() -> 413: |
|
1789 | o> readline() -> 413: | |
1788 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
1790 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
1789 | o> readline() -> 2: |
|
1791 | o> readline() -> 2: | |
1790 | o> 1\n |
|
1792 | o> 1\n | |
1791 | o> readline() -> 1: |
|
1793 | o> readline() -> 1: | |
1792 | o> \n |
|
1794 | o> \n | |
1793 | sending listkeys command |
|
1795 | sending listkeys command | |
1794 | i> write(9) -> 9: |
|
1796 | i> write(9) -> 9: | |
1795 | i> listkeys\n |
|
1797 | i> listkeys\n | |
1796 | i> write(12) -> 12: |
|
1798 | i> write(12) -> 12: | |
1797 | i> namespace 6\n |
|
1799 | i> namespace 6\n | |
1798 | i> write(6) -> 6: phases |
|
1800 | i> write(6) -> 6: phases | |
1799 | i> flush() -> None |
|
1801 | i> flush() -> None | |
1800 | o> bufferedreadline() -> 4: |
|
1802 | o> bufferedreadline() -> 4: | |
1801 | o> 101\n |
|
1803 | o> 101\n | |
1802 | o> bufferedread(101) -> 101: |
|
1804 | o> bufferedread(101) -> 101: | |
1803 | o> 20b8a89289d80036e6c4e87c2083e3bea1586637\t1\n |
|
1805 | o> 20b8a89289d80036e6c4e87c2083e3bea1586637\t1\n | |
1804 | o> c4750011d906c18ea2f0527419cbc1a544435150\t1\n |
|
1806 | o> c4750011d906c18ea2f0527419cbc1a544435150\t1\n | |
1805 | o> publishing\tTrue |
|
1807 | o> publishing\tTrue | |
1806 | response: {b'20b8a89289d80036e6c4e87c2083e3bea1586637': b'1', b'c4750011d906c18ea2f0527419cbc1a544435150': b'1', b'publishing': b'True'} |
|
1808 | response: {b'20b8a89289d80036e6c4e87c2083e3bea1586637': b'1', b'c4750011d906c18ea2f0527419cbc1a544435150': b'1', b'publishing': b'True'} | |
1807 |
|
1809 | |||
1808 | testing ssh2 |
|
1810 | testing ssh2 | |
1809 | creating ssh peer from handshake results |
|
1811 | creating ssh peer from handshake results | |
1810 | i> write(171) -> 171: |
|
1812 | i> write(171) -> 171: | |
1811 | i> upgrade * proto=exp-ssh-v2-0001\n (glob) |
|
1813 | i> upgrade * proto=exp-ssh-v2-0001\n (glob) | |
1812 | i> hello\n |
|
1814 | i> hello\n | |
1813 | i> between\n |
|
1815 | i> between\n | |
1814 | i> pairs 81\n |
|
1816 | i> pairs 81\n | |
1815 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1817 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1816 | i> flush() -> None |
|
1818 | i> flush() -> None | |
1817 | o> readline() -> 62: |
|
1819 | o> readline() -> 62: | |
1818 | o> upgraded * exp-ssh-v2-0001\n (glob) |
|
1820 | o> upgraded * exp-ssh-v2-0001\n (glob) | |
1819 | o> readline() -> 4: |
|
1821 | o> readline() -> 4: | |
1820 | o> 412\n |
|
1822 | o> 412\n | |
1821 | o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
1823 | o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
1822 | o> read(1) -> 1: |
|
1824 | o> read(1) -> 1: | |
1823 | o> \n |
|
1825 | o> \n | |
1824 | sending listkeys command |
|
1826 | sending listkeys command | |
1825 | i> write(9) -> 9: |
|
1827 | i> write(9) -> 9: | |
1826 | i> listkeys\n |
|
1828 | i> listkeys\n | |
1827 | i> write(12) -> 12: |
|
1829 | i> write(12) -> 12: | |
1828 | i> namespace 6\n |
|
1830 | i> namespace 6\n | |
1829 | i> write(6) -> 6: phases |
|
1831 | i> write(6) -> 6: phases | |
1830 | i> flush() -> None |
|
1832 | i> flush() -> None | |
1831 | o> bufferedreadline() -> 4: |
|
1833 | o> bufferedreadline() -> 4: | |
1832 | o> 101\n |
|
1834 | o> 101\n | |
1833 | o> bufferedread(101) -> 101: |
|
1835 | o> bufferedread(101) -> 101: | |
1834 | o> 20b8a89289d80036e6c4e87c2083e3bea1586637\t1\n |
|
1836 | o> 20b8a89289d80036e6c4e87c2083e3bea1586637\t1\n | |
1835 | o> c4750011d906c18ea2f0527419cbc1a544435150\t1\n |
|
1837 | o> c4750011d906c18ea2f0527419cbc1a544435150\t1\n | |
1836 | o> publishing\tTrue |
|
1838 | o> publishing\tTrue | |
1837 | response: {b'20b8a89289d80036e6c4e87c2083e3bea1586637': b'1', b'c4750011d906c18ea2f0527419cbc1a544435150': b'1', b'publishing': b'True'} |
|
1839 | response: {b'20b8a89289d80036e6c4e87c2083e3bea1586637': b'1', b'c4750011d906c18ea2f0527419cbc1a544435150': b'1', b'publishing': b'True'} | |
1838 |
|
1840 | |||
1839 | Single draft head |
|
1841 | Single draft head | |
1840 |
|
1842 | |||
1841 | $ hg phase --public -r 2 |
|
1843 | $ hg phase --public -r 2 | |
1842 | $ debugwireproto << EOF |
|
1844 | $ debugwireproto << EOF | |
1843 | > command listkeys |
|
1845 | > command listkeys | |
1844 | > namespace phases |
|
1846 | > namespace phases | |
1845 | > EOF |
|
1847 | > EOF | |
1846 | testing ssh1 |
|
1848 | testing ssh1 | |
1847 | creating ssh peer from handshake results |
|
1849 | creating ssh peer from handshake results | |
1848 | i> write(104) -> 104: |
|
1850 | i> write(104) -> 104: | |
1849 | i> hello\n |
|
1851 | i> hello\n | |
1850 | i> between\n |
|
1852 | i> between\n | |
1851 | i> pairs 81\n |
|
1853 | i> pairs 81\n | |
1852 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1854 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1853 | i> flush() -> None |
|
1855 | i> flush() -> None | |
1854 | o> readline() -> 4: |
|
1856 | o> readline() -> 4: | |
1855 | o> 413\n |
|
1857 | o> 413\n | |
1856 | o> readline() -> 413: |
|
1858 | o> readline() -> 413: | |
1857 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
1859 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
1858 | o> readline() -> 2: |
|
1860 | o> readline() -> 2: | |
1859 | o> 1\n |
|
1861 | o> 1\n | |
1860 | o> readline() -> 1: |
|
1862 | o> readline() -> 1: | |
1861 | o> \n |
|
1863 | o> \n | |
1862 | sending listkeys command |
|
1864 | sending listkeys command | |
1863 | i> write(9) -> 9: |
|
1865 | i> write(9) -> 9: | |
1864 | i> listkeys\n |
|
1866 | i> listkeys\n | |
1865 | i> write(12) -> 12: |
|
1867 | i> write(12) -> 12: | |
1866 | i> namespace 6\n |
|
1868 | i> namespace 6\n | |
1867 | i> write(6) -> 6: phases |
|
1869 | i> write(6) -> 6: phases | |
1868 | i> flush() -> None |
|
1870 | i> flush() -> None | |
1869 | o> bufferedreadline() -> 3: |
|
1871 | o> bufferedreadline() -> 3: | |
1870 | o> 58\n |
|
1872 | o> 58\n | |
1871 | o> bufferedread(58) -> 58: |
|
1873 | o> bufferedread(58) -> 58: | |
1872 | o> c4750011d906c18ea2f0527419cbc1a544435150\t1\n |
|
1874 | o> c4750011d906c18ea2f0527419cbc1a544435150\t1\n | |
1873 | o> publishing\tTrue |
|
1875 | o> publishing\tTrue | |
1874 | response: {b'c4750011d906c18ea2f0527419cbc1a544435150': b'1', b'publishing': b'True'} |
|
1876 | response: {b'c4750011d906c18ea2f0527419cbc1a544435150': b'1', b'publishing': b'True'} | |
1875 |
|
1877 | |||
1876 | testing ssh2 |
|
1878 | testing ssh2 | |
1877 | creating ssh peer from handshake results |
|
1879 | creating ssh peer from handshake results | |
1878 | i> write(171) -> 171: |
|
1880 | i> write(171) -> 171: | |
1879 | i> upgrade * proto=exp-ssh-v2-0001\n (glob) |
|
1881 | i> upgrade * proto=exp-ssh-v2-0001\n (glob) | |
1880 | i> hello\n |
|
1882 | i> hello\n | |
1881 | i> between\n |
|
1883 | i> between\n | |
1882 | i> pairs 81\n |
|
1884 | i> pairs 81\n | |
1883 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1885 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1884 | i> flush() -> None |
|
1886 | i> flush() -> None | |
1885 | o> readline() -> 62: |
|
1887 | o> readline() -> 62: | |
1886 | o> upgraded * exp-ssh-v2-0001\n (glob) |
|
1888 | o> upgraded * exp-ssh-v2-0001\n (glob) | |
1887 | o> readline() -> 4: |
|
1889 | o> readline() -> 4: | |
1888 | o> 412\n |
|
1890 | o> 412\n | |
1889 | o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
1891 | o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
1890 | o> read(1) -> 1: |
|
1892 | o> read(1) -> 1: | |
1891 | o> \n |
|
1893 | o> \n | |
1892 | sending listkeys command |
|
1894 | sending listkeys command | |
1893 | i> write(9) -> 9: |
|
1895 | i> write(9) -> 9: | |
1894 | i> listkeys\n |
|
1896 | i> listkeys\n | |
1895 | i> write(12) -> 12: |
|
1897 | i> write(12) -> 12: | |
1896 | i> namespace 6\n |
|
1898 | i> namespace 6\n | |
1897 | i> write(6) -> 6: phases |
|
1899 | i> write(6) -> 6: phases | |
1898 | i> flush() -> None |
|
1900 | i> flush() -> None | |
1899 | o> bufferedreadline() -> 3: |
|
1901 | o> bufferedreadline() -> 3: | |
1900 | o> 58\n |
|
1902 | o> 58\n | |
1901 | o> bufferedread(58) -> 58: |
|
1903 | o> bufferedread(58) -> 58: | |
1902 | o> c4750011d906c18ea2f0527419cbc1a544435150\t1\n |
|
1904 | o> c4750011d906c18ea2f0527419cbc1a544435150\t1\n | |
1903 | o> publishing\tTrue |
|
1905 | o> publishing\tTrue | |
1904 | response: {b'c4750011d906c18ea2f0527419cbc1a544435150': b'1', b'publishing': b'True'} |
|
1906 | response: {b'c4750011d906c18ea2f0527419cbc1a544435150': b'1', b'publishing': b'True'} | |
1905 |
|
1907 | |||
1906 | All public heads |
|
1908 | All public heads | |
1907 |
|
1909 | |||
1908 | $ hg phase --public -r 4 |
|
1910 | $ hg phase --public -r 4 | |
1909 | $ debugwireproto << EOF |
|
1911 | $ debugwireproto << EOF | |
1910 | > command listkeys |
|
1912 | > command listkeys | |
1911 | > namespace phases |
|
1913 | > namespace phases | |
1912 | > EOF |
|
1914 | > EOF | |
1913 | testing ssh1 |
|
1915 | testing ssh1 | |
1914 | creating ssh peer from handshake results |
|
1916 | creating ssh peer from handshake results | |
1915 | i> write(104) -> 104: |
|
1917 | i> write(104) -> 104: | |
1916 | i> hello\n |
|
1918 | i> hello\n | |
1917 | i> between\n |
|
1919 | i> between\n | |
1918 | i> pairs 81\n |
|
1920 | i> pairs 81\n | |
1919 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1921 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1920 | i> flush() -> None |
|
1922 | i> flush() -> None | |
1921 | o> readline() -> 4: |
|
1923 | o> readline() -> 4: | |
1922 | o> 413\n |
|
1924 | o> 413\n | |
1923 | o> readline() -> 413: |
|
1925 | o> readline() -> 413: | |
1924 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
1926 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
1925 | o> readline() -> 2: |
|
1927 | o> readline() -> 2: | |
1926 | o> 1\n |
|
1928 | o> 1\n | |
1927 | o> readline() -> 1: |
|
1929 | o> readline() -> 1: | |
1928 | o> \n |
|
1930 | o> \n | |
1929 | sending listkeys command |
|
1931 | sending listkeys command | |
1930 | i> write(9) -> 9: |
|
1932 | i> write(9) -> 9: | |
1931 | i> listkeys\n |
|
1933 | i> listkeys\n | |
1932 | i> write(12) -> 12: |
|
1934 | i> write(12) -> 12: | |
1933 | i> namespace 6\n |
|
1935 | i> namespace 6\n | |
1934 | i> write(6) -> 6: phases |
|
1936 | i> write(6) -> 6: phases | |
1935 | i> flush() -> None |
|
1937 | i> flush() -> None | |
1936 | o> bufferedreadline() -> 3: |
|
1938 | o> bufferedreadline() -> 3: | |
1937 | o> 15\n |
|
1939 | o> 15\n | |
1938 | o> bufferedread(15) -> 15: publishing\tTrue |
|
1940 | o> bufferedread(15) -> 15: publishing\tTrue | |
1939 | response: {b'publishing': b'True'} |
|
1941 | response: {b'publishing': b'True'} | |
1940 |
|
1942 | |||
1941 | testing ssh2 |
|
1943 | testing ssh2 | |
1942 | creating ssh peer from handshake results |
|
1944 | creating ssh peer from handshake results | |
1943 | i> write(171) -> 171: |
|
1945 | i> write(171) -> 171: | |
1944 | i> upgrade * proto=exp-ssh-v2-0001\n (glob) |
|
1946 | i> upgrade * proto=exp-ssh-v2-0001\n (glob) | |
1945 | i> hello\n |
|
1947 | i> hello\n | |
1946 | i> between\n |
|
1948 | i> between\n | |
1947 | i> pairs 81\n |
|
1949 | i> pairs 81\n | |
1948 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1950 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1949 | i> flush() -> None |
|
1951 | i> flush() -> None | |
1950 | o> readline() -> 62: |
|
1952 | o> readline() -> 62: | |
1951 | o> upgraded * exp-ssh-v2-0001\n (glob) |
|
1953 | o> upgraded * exp-ssh-v2-0001\n (glob) | |
1952 | o> readline() -> 4: |
|
1954 | o> readline() -> 4: | |
1953 | o> 412\n |
|
1955 | o> 412\n | |
1954 | o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
1956 | o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
1955 | o> read(1) -> 1: |
|
1957 | o> read(1) -> 1: | |
1956 | o> \n |
|
1958 | o> \n | |
1957 | sending listkeys command |
|
1959 | sending listkeys command | |
1958 | i> write(9) -> 9: |
|
1960 | i> write(9) -> 9: | |
1959 | i> listkeys\n |
|
1961 | i> listkeys\n | |
1960 | i> write(12) -> 12: |
|
1962 | i> write(12) -> 12: | |
1961 | i> namespace 6\n |
|
1963 | i> namespace 6\n | |
1962 | i> write(6) -> 6: phases |
|
1964 | i> write(6) -> 6: phases | |
1963 | i> flush() -> None |
|
1965 | i> flush() -> None | |
1964 | o> bufferedreadline() -> 3: |
|
1966 | o> bufferedreadline() -> 3: | |
1965 | o> 15\n |
|
1967 | o> 15\n | |
1966 | o> bufferedread(15) -> 15: publishing\tTrue |
|
1968 | o> bufferedread(15) -> 15: publishing\tTrue | |
1967 | response: {b'publishing': b'True'} |
|
1969 | response: {b'publishing': b'True'} | |
1968 |
|
1970 | |||
1969 | Setting public phase via pushkey |
|
1971 | Setting public phase via pushkey | |
1970 |
|
1972 | |||
1971 | $ hg phase --draft --force -r . |
|
1973 | $ hg phase --draft --force -r . | |
1972 |
|
1974 | |||
1973 | $ debugwireproto << EOF |
|
1975 | $ debugwireproto << EOF | |
1974 | > command pushkey |
|
1976 | > command pushkey | |
1975 | > namespace phases |
|
1977 | > namespace phases | |
1976 | > key 7127240a084fd9dc86fe8d1f98e26229161ec82b |
|
1978 | > key 7127240a084fd9dc86fe8d1f98e26229161ec82b | |
1977 | > old 1 |
|
1979 | > old 1 | |
1978 | > new 0 |
|
1980 | > new 0 | |
1979 | > EOF |
|
1981 | > EOF | |
1980 | testing ssh1 |
|
1982 | testing ssh1 | |
1981 | creating ssh peer from handshake results |
|
1983 | creating ssh peer from handshake results | |
1982 | i> write(104) -> 104: |
|
1984 | i> write(104) -> 104: | |
1983 | i> hello\n |
|
1985 | i> hello\n | |
1984 | i> between\n |
|
1986 | i> between\n | |
1985 | i> pairs 81\n |
|
1987 | i> pairs 81\n | |
1986 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1988 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1987 | i> flush() -> None |
|
1989 | i> flush() -> None | |
1988 | o> readline() -> 4: |
|
1990 | o> readline() -> 4: | |
1989 | o> 413\n |
|
1991 | o> 413\n | |
1990 | o> readline() -> 413: |
|
1992 | o> readline() -> 413: | |
1991 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
1993 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
1992 | o> readline() -> 2: |
|
1994 | o> readline() -> 2: | |
1993 | o> 1\n |
|
1995 | o> 1\n | |
1994 | o> readline() -> 1: |
|
1996 | o> readline() -> 1: | |
1995 | o> \n |
|
1997 | o> \n | |
1996 | sending pushkey command |
|
1998 | sending pushkey command | |
1997 | i> write(8) -> 8: |
|
1999 | i> write(8) -> 8: | |
1998 | i> pushkey\n |
|
2000 | i> pushkey\n | |
1999 | i> write(7) -> 7: |
|
2001 | i> write(7) -> 7: | |
2000 | i> key 40\n |
|
2002 | i> key 40\n | |
2001 | i> write(40) -> 40: 7127240a084fd9dc86fe8d1f98e26229161ec82b |
|
2003 | i> write(40) -> 40: 7127240a084fd9dc86fe8d1f98e26229161ec82b | |
2002 | i> write(12) -> 12: |
|
2004 | i> write(12) -> 12: | |
2003 | i> namespace 6\n |
|
2005 | i> namespace 6\n | |
2004 | i> write(6) -> 6: phases |
|
2006 | i> write(6) -> 6: phases | |
2005 | i> write(6) -> 6: |
|
2007 | i> write(6) -> 6: | |
2006 | i> new 1\n |
|
2008 | i> new 1\n | |
2007 | i> write(1) -> 1: 0 |
|
2009 | i> write(1) -> 1: 0 | |
2008 | i> write(6) -> 6: |
|
2010 | i> write(6) -> 6: | |
2009 | i> old 1\n |
|
2011 | i> old 1\n | |
2010 | i> write(1) -> 1: 1 |
|
2012 | i> write(1) -> 1: 1 | |
2011 | i> flush() -> None |
|
2013 | i> flush() -> None | |
2012 | o> bufferedreadline() -> 2: |
|
2014 | o> bufferedreadline() -> 2: | |
2013 | o> 2\n |
|
2015 | o> 2\n | |
2014 | o> bufferedread(2) -> 2: |
|
2016 | o> bufferedread(2) -> 2: | |
2015 | o> 1\n |
|
2017 | o> 1\n | |
2016 | response: True |
|
2018 | response: True | |
2017 |
|
2019 | |||
2018 | testing ssh2 |
|
2020 | testing ssh2 | |
2019 | creating ssh peer from handshake results |
|
2021 | creating ssh peer from handshake results | |
2020 | i> write(171) -> 171: |
|
2022 | i> write(171) -> 171: | |
2021 | i> upgrade * proto=exp-ssh-v2-0001\n (glob) |
|
2023 | i> upgrade * proto=exp-ssh-v2-0001\n (glob) | |
2022 | i> hello\n |
|
2024 | i> hello\n | |
2023 | i> between\n |
|
2025 | i> between\n | |
2024 | i> pairs 81\n |
|
2026 | i> pairs 81\n | |
2025 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
2027 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
2026 | i> flush() -> None |
|
2028 | i> flush() -> None | |
2027 | o> readline() -> 62: |
|
2029 | o> readline() -> 62: | |
2028 | o> upgraded * exp-ssh-v2-0001\n (glob) |
|
2030 | o> upgraded * exp-ssh-v2-0001\n (glob) | |
2029 | o> readline() -> 4: |
|
2031 | o> readline() -> 4: | |
2030 | o> 412\n |
|
2032 | o> 412\n | |
2031 | o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
2033 | o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
2032 | o> read(1) -> 1: |
|
2034 | o> read(1) -> 1: | |
2033 | o> \n |
|
2035 | o> \n | |
2034 | sending pushkey command |
|
2036 | sending pushkey command | |
2035 | i> write(8) -> 8: |
|
2037 | i> write(8) -> 8: | |
2036 | i> pushkey\n |
|
2038 | i> pushkey\n | |
2037 | i> write(7) -> 7: |
|
2039 | i> write(7) -> 7: | |
2038 | i> key 40\n |
|
2040 | i> key 40\n | |
2039 | i> write(40) -> 40: 7127240a084fd9dc86fe8d1f98e26229161ec82b |
|
2041 | i> write(40) -> 40: 7127240a084fd9dc86fe8d1f98e26229161ec82b | |
2040 | i> write(12) -> 12: |
|
2042 | i> write(12) -> 12: | |
2041 | i> namespace 6\n |
|
2043 | i> namespace 6\n | |
2042 | i> write(6) -> 6: phases |
|
2044 | i> write(6) -> 6: phases | |
2043 | i> write(6) -> 6: |
|
2045 | i> write(6) -> 6: | |
2044 | i> new 1\n |
|
2046 | i> new 1\n | |
2045 | i> write(1) -> 1: 0 |
|
2047 | i> write(1) -> 1: 0 | |
2046 | i> write(6) -> 6: |
|
2048 | i> write(6) -> 6: | |
2047 | i> old 1\n |
|
2049 | i> old 1\n | |
2048 | i> write(1) -> 1: 1 |
|
2050 | i> write(1) -> 1: 1 | |
2049 | i> flush() -> None |
|
2051 | i> flush() -> None | |
2050 | o> bufferedreadline() -> 2: |
|
2052 | o> bufferedreadline() -> 2: | |
2051 | o> 2\n |
|
2053 | o> 2\n | |
2052 | o> bufferedread(2) -> 2: |
|
2054 | o> bufferedread(2) -> 2: | |
2053 | o> 1\n |
|
2055 | o> 1\n | |
2054 | response: True |
|
2056 | response: True | |
2055 |
|
2057 | |||
2056 | $ hg phase . |
|
2058 | $ hg phase . | |
2057 | 4: public |
|
2059 | 4: public | |
2058 |
|
2060 | |||
2059 | $ cd .. |
|
2061 | $ cd .. | |
2060 |
|
2062 | |||
2061 | Test batching of requests |
|
2063 | Test batching of requests | |
2062 |
|
2064 | |||
2063 | $ hg init batching |
|
2065 | $ hg init batching | |
2064 | $ cd batching |
|
2066 | $ cd batching | |
2065 | $ echo 0 > foo |
|
2067 | $ echo 0 > foo | |
2066 | $ hg add foo |
|
2068 | $ hg add foo | |
2067 | $ hg -q commit -m initial |
|
2069 | $ hg -q commit -m initial | |
2068 | $ hg phase --public |
|
2070 | $ hg phase --public | |
2069 | $ echo 1 > foo |
|
2071 | $ echo 1 > foo | |
2070 | $ hg commit -m 'commit 1' |
|
2072 | $ hg commit -m 'commit 1' | |
2071 | $ hg -q up 0 |
|
2073 | $ hg -q up 0 | |
2072 | $ echo 2 > foo |
|
2074 | $ echo 2 > foo | |
2073 | $ hg commit -m 'commit 2' |
|
2075 | $ hg commit -m 'commit 2' | |
2074 | created new head |
|
2076 | created new head | |
2075 | $ hg book -r 1 bookA |
|
2077 | $ hg book -r 1 bookA | |
2076 | $ hg book -r 2 bookB |
|
2078 | $ hg book -r 2 bookB | |
2077 |
|
2079 | |||
2078 | $ debugwireproto << EOF |
|
2080 | $ debugwireproto << EOF | |
2079 | > batchbegin |
|
2081 | > batchbegin | |
2080 | > command heads |
|
2082 | > command heads | |
2081 | > command listkeys |
|
2083 | > command listkeys | |
2082 | > namespace bookmarks |
|
2084 | > namespace bookmarks | |
2083 | > command listkeys |
|
2085 | > command listkeys | |
2084 | > namespace phases |
|
2086 | > namespace phases | |
2085 | > batchsubmit |
|
2087 | > batchsubmit | |
2086 | > EOF |
|
2088 | > EOF | |
2087 | testing ssh1 |
|
2089 | testing ssh1 | |
2088 | creating ssh peer from handshake results |
|
2090 | creating ssh peer from handshake results | |
2089 | i> write(104) -> 104: |
|
2091 | i> write(104) -> 104: | |
2090 | i> hello\n |
|
2092 | i> hello\n | |
2091 | i> between\n |
|
2093 | i> between\n | |
2092 | i> pairs 81\n |
|
2094 | i> pairs 81\n | |
2093 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
2095 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
2094 | i> flush() -> None |
|
2096 | i> flush() -> None | |
2095 | o> readline() -> 4: |
|
2097 | o> readline() -> 4: | |
2096 | o> 413\n |
|
2098 | o> 413\n | |
2097 | o> readline() -> 413: |
|
2099 | o> readline() -> 413: | |
2098 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
2100 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
2099 | o> readline() -> 2: |
|
2101 | o> readline() -> 2: | |
2100 | o> 1\n |
|
2102 | o> 1\n | |
2101 | o> readline() -> 1: |
|
2103 | o> readline() -> 1: | |
2102 | o> \n |
|
2104 | o> \n | |
2103 | sending batch with 3 sub-commands |
|
2105 | sending batch with 3 sub-commands | |
2104 | i> write(6) -> 6: |
|
2106 | i> write(6) -> 6: | |
2105 | i> batch\n |
|
2107 | i> batch\n | |
2106 | i> write(4) -> 4: |
|
2108 | i> write(4) -> 4: | |
2107 | i> * 0\n |
|
2109 | i> * 0\n | |
2108 | i> write(8) -> 8: |
|
2110 | i> write(8) -> 8: | |
2109 | i> cmds 61\n |
|
2111 | i> cmds 61\n | |
2110 | i> write(61) -> 61: heads ;listkeys namespace=bookmarks;listkeys namespace=phases |
|
2112 | i> write(61) -> 61: heads ;listkeys namespace=bookmarks;listkeys namespace=phases | |
2111 | i> flush() -> None |
|
2113 | i> flush() -> None | |
2112 | o> bufferedreadline() -> 4: |
|
2114 | o> bufferedreadline() -> 4: | |
2113 | o> 278\n |
|
2115 | o> 278\n | |
2114 | o> bufferedread(278) -> 278: |
|
2116 | o> bufferedread(278) -> 278: | |
2115 | o> bfebe6bd38eebc6f8202e419c1171268987ea6a6 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n |
|
2117 | o> bfebe6bd38eebc6f8202e419c1171268987ea6a6 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n | |
2116 | o> ;bookA\t4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n |
|
2118 | o> ;bookA\t4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n | |
2117 | o> bookB\tbfebe6bd38eebc6f8202e419c1171268987ea6a6;4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\t1\n |
|
2119 | o> bookB\tbfebe6bd38eebc6f8202e419c1171268987ea6a6;4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\t1\n | |
2118 | o> bfebe6bd38eebc6f8202e419c1171268987ea6a6\t1\n |
|
2120 | o> bfebe6bd38eebc6f8202e419c1171268987ea6a6\t1\n | |
2119 | o> publishing\tTrue |
|
2121 | o> publishing\tTrue | |
2120 | response #0: bfebe6bd38eebc6f8202e419c1171268987ea6a6 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n |
|
2122 | response #0: bfebe6bd38eebc6f8202e419c1171268987ea6a6 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n | |
2121 | response #1: bookA\t4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\nbookB\tbfebe6bd38eebc6f8202e419c1171268987ea6a6 |
|
2123 | response #1: bookA\t4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\nbookB\tbfebe6bd38eebc6f8202e419c1171268987ea6a6 | |
2122 | response #2: 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\t1\nbfebe6bd38eebc6f8202e419c1171268987ea6a6\t1\npublishing\tTrue |
|
2124 | response #2: 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\t1\nbfebe6bd38eebc6f8202e419c1171268987ea6a6\t1\npublishing\tTrue | |
2123 |
|
2125 | |||
2124 | testing ssh2 |
|
2126 | testing ssh2 | |
2125 | creating ssh peer from handshake results |
|
2127 | creating ssh peer from handshake results | |
2126 | i> write(171) -> 171: |
|
2128 | i> write(171) -> 171: | |
2127 | i> upgrade * proto=exp-ssh-v2-0001\n (glob) |
|
2129 | i> upgrade * proto=exp-ssh-v2-0001\n (glob) | |
2128 | i> hello\n |
|
2130 | i> hello\n | |
2129 | i> between\n |
|
2131 | i> between\n | |
2130 | i> pairs 81\n |
|
2132 | i> pairs 81\n | |
2131 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
2133 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
2132 | i> flush() -> None |
|
2134 | i> flush() -> None | |
2133 | o> readline() -> 62: |
|
2135 | o> readline() -> 62: | |
2134 | o> upgraded * exp-ssh-v2-0001\n (glob) |
|
2136 | o> upgraded * exp-ssh-v2-0001\n (glob) | |
2135 | o> readline() -> 4: |
|
2137 | o> readline() -> 4: | |
2136 | o> 412\n |
|
2138 | o> 412\n | |
2137 | o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
2139 | o> read(412) -> 412: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
2138 | o> read(1) -> 1: |
|
2140 | o> read(1) -> 1: | |
2139 | o> \n |
|
2141 | o> \n | |
2140 | sending batch with 3 sub-commands |
|
2142 | sending batch with 3 sub-commands | |
2141 | i> write(6) -> 6: |
|
2143 | i> write(6) -> 6: | |
2142 | i> batch\n |
|
2144 | i> batch\n | |
2143 | i> write(4) -> 4: |
|
2145 | i> write(4) -> 4: | |
2144 | i> * 0\n |
|
2146 | i> * 0\n | |
2145 | i> write(8) -> 8: |
|
2147 | i> write(8) -> 8: | |
2146 | i> cmds 61\n |
|
2148 | i> cmds 61\n | |
2147 | i> write(61) -> 61: heads ;listkeys namespace=bookmarks;listkeys namespace=phases |
|
2149 | i> write(61) -> 61: heads ;listkeys namespace=bookmarks;listkeys namespace=phases | |
2148 | i> flush() -> None |
|
2150 | i> flush() -> None | |
2149 | o> bufferedreadline() -> 4: |
|
2151 | o> bufferedreadline() -> 4: | |
2150 | o> 278\n |
|
2152 | o> 278\n | |
2151 | o> bufferedread(278) -> 278: |
|
2153 | o> bufferedread(278) -> 278: | |
2152 | o> bfebe6bd38eebc6f8202e419c1171268987ea6a6 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n |
|
2154 | o> bfebe6bd38eebc6f8202e419c1171268987ea6a6 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n | |
2153 | o> ;bookA\t4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n |
|
2155 | o> ;bookA\t4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n | |
2154 | o> bookB\tbfebe6bd38eebc6f8202e419c1171268987ea6a6;4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\t1\n |
|
2156 | o> bookB\tbfebe6bd38eebc6f8202e419c1171268987ea6a6;4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\t1\n | |
2155 | o> bfebe6bd38eebc6f8202e419c1171268987ea6a6\t1\n |
|
2157 | o> bfebe6bd38eebc6f8202e419c1171268987ea6a6\t1\n | |
2156 | o> publishing\tTrue |
|
2158 | o> publishing\tTrue | |
2157 | response #0: bfebe6bd38eebc6f8202e419c1171268987ea6a6 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n |
|
2159 | response #0: bfebe6bd38eebc6f8202e419c1171268987ea6a6 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n | |
2158 | response #1: bookA\t4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\nbookB\tbfebe6bd38eebc6f8202e419c1171268987ea6a6 |
|
2160 | response #1: bookA\t4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\nbookB\tbfebe6bd38eebc6f8202e419c1171268987ea6a6 | |
2159 | response #2: 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\t1\nbfebe6bd38eebc6f8202e419c1171268987ea6a6\t1\npublishing\tTrue |
|
2161 | response #2: 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\t1\nbfebe6bd38eebc6f8202e419c1171268987ea6a6\t1\npublishing\tTrue |
@@ -1,257 +1,259 b'' | |||||
|
1 | #require no-chg | |||
|
2 | ||||
1 | $ . $TESTDIR/wireprotohelpers.sh |
|
3 | $ . $TESTDIR/wireprotohelpers.sh | |
2 |
|
4 | |||
3 | $ hg init server |
|
5 | $ hg init server | |
4 |
|
6 | |||
5 | zstd isn't present in plain builds. Make tests easier by removing |
|
7 | zstd isn't present in plain builds. Make tests easier by removing | |
6 | zstd from the equation. |
|
8 | zstd from the equation. | |
7 |
|
9 | |||
8 | $ cat >> server/.hg/hgrc << EOF |
|
10 | $ cat >> server/.hg/hgrc << EOF | |
9 | > [server] |
|
11 | > [server] | |
10 | > compressionengines = zlib |
|
12 | > compressionengines = zlib | |
11 | > EOF |
|
13 | > EOF | |
12 |
|
14 | |||
13 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid -E error.log |
|
15 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid -E error.log | |
14 | $ cat hg.pid > $DAEMON_PIDS |
|
16 | $ cat hg.pid > $DAEMON_PIDS | |
15 |
|
17 | |||
16 | A normal capabilities request is serviced for version 1 |
|
18 | A normal capabilities request is serviced for version 1 | |
17 |
|
19 | |||
18 | $ sendhttpraw << EOF |
|
20 | $ sendhttpraw << EOF | |
19 | > httprequest GET ?cmd=capabilities |
|
21 | > httprequest GET ?cmd=capabilities | |
20 | > user-agent: test |
|
22 | > user-agent: test | |
21 | > EOF |
|
23 | > EOF | |
22 | using raw connection to peer |
|
24 | using raw connection to peer | |
23 | s> GET /?cmd=capabilities HTTP/1.1\r\n |
|
25 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
24 | s> Accept-Encoding: identity\r\n |
|
26 | s> Accept-Encoding: identity\r\n | |
25 | s> user-agent: test\r\n |
|
27 | s> user-agent: test\r\n | |
26 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
28 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
27 | s> \r\n |
|
29 | s> \r\n | |
28 | s> makefile('rb', None) |
|
30 | s> makefile('rb', None) | |
29 | s> HTTP/1.1 200 Script output follows\r\n |
|
31 | s> HTTP/1.1 200 Script output follows\r\n | |
30 | s> Server: testing stub value\r\n |
|
32 | s> Server: testing stub value\r\n | |
31 | s> Date: $HTTP_DATE$\r\n |
|
33 | s> Date: $HTTP_DATE$\r\n | |
32 | s> Content-Type: application/mercurial-0.1\r\n |
|
34 | s> Content-Type: application/mercurial-0.1\r\n | |
33 | s> Content-Length: *\r\n (glob) |
|
35 | s> Content-Length: *\r\n (glob) | |
34 | s> \r\n |
|
36 | s> \r\n | |
35 | s> batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
37 | s> batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
36 |
|
38 | |||
37 | A proper request without the API server enabled returns the legacy response |
|
39 | A proper request without the API server enabled returns the legacy response | |
38 |
|
40 | |||
39 | $ sendhttpraw << EOF |
|
41 | $ sendhttpraw << EOF | |
40 | > httprequest GET ?cmd=capabilities |
|
42 | > httprequest GET ?cmd=capabilities | |
41 | > user-agent: test |
|
43 | > user-agent: test | |
42 | > x-hgupgrade-1: foo |
|
44 | > x-hgupgrade-1: foo | |
43 | > x-hgproto-1: cbor |
|
45 | > x-hgproto-1: cbor | |
44 | > EOF |
|
46 | > EOF | |
45 | using raw connection to peer |
|
47 | using raw connection to peer | |
46 | s> GET /?cmd=capabilities HTTP/1.1\r\n |
|
48 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
47 | s> Accept-Encoding: identity\r\n |
|
49 | s> Accept-Encoding: identity\r\n | |
48 | s> user-agent: test\r\n |
|
50 | s> user-agent: test\r\n | |
49 | s> x-hgproto-1: cbor\r\n |
|
51 | s> x-hgproto-1: cbor\r\n | |
50 | s> x-hgupgrade-1: foo\r\n |
|
52 | s> x-hgupgrade-1: foo\r\n | |
51 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
53 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
52 | s> \r\n |
|
54 | s> \r\n | |
53 | s> makefile('rb', None) |
|
55 | s> makefile('rb', None) | |
54 | s> HTTP/1.1 200 Script output follows\r\n |
|
56 | s> HTTP/1.1 200 Script output follows\r\n | |
55 | s> Server: testing stub value\r\n |
|
57 | s> Server: testing stub value\r\n | |
56 | s> Date: $HTTP_DATE$\r\n |
|
58 | s> Date: $HTTP_DATE$\r\n | |
57 | s> Content-Type: application/mercurial-0.1\r\n |
|
59 | s> Content-Type: application/mercurial-0.1\r\n | |
58 | s> Content-Length: *\r\n (glob) |
|
60 | s> Content-Length: *\r\n (glob) | |
59 | s> \r\n |
|
61 | s> \r\n | |
60 | s> batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
62 | s> batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
61 |
|
63 | |||
62 | Restart with just API server enabled. This enables serving the new format. |
|
64 | Restart with just API server enabled. This enables serving the new format. | |
63 |
|
65 | |||
64 | $ killdaemons.py |
|
66 | $ killdaemons.py | |
65 | $ cat error.log |
|
67 | $ cat error.log | |
66 |
|
68 | |||
67 | $ cat >> server/.hg/hgrc << EOF |
|
69 | $ cat >> server/.hg/hgrc << EOF | |
68 | > [experimental] |
|
70 | > [experimental] | |
69 | > web.apiserver = true |
|
71 | > web.apiserver = true | |
70 | > EOF |
|
72 | > EOF | |
71 |
|
73 | |||
72 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid -E error.log |
|
74 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid -E error.log | |
73 | $ cat hg.pid > $DAEMON_PIDS |
|
75 | $ cat hg.pid > $DAEMON_PIDS | |
74 |
|
76 | |||
75 | X-HgUpgrade-<N> without CBOR advertisement uses legacy response |
|
77 | X-HgUpgrade-<N> without CBOR advertisement uses legacy response | |
76 |
|
78 | |||
77 | $ sendhttpraw << EOF |
|
79 | $ sendhttpraw << EOF | |
78 | > httprequest GET ?cmd=capabilities |
|
80 | > httprequest GET ?cmd=capabilities | |
79 | > user-agent: test |
|
81 | > user-agent: test | |
80 | > x-hgupgrade-1: foo bar |
|
82 | > x-hgupgrade-1: foo bar | |
81 | > EOF |
|
83 | > EOF | |
82 | using raw connection to peer |
|
84 | using raw connection to peer | |
83 | s> GET /?cmd=capabilities HTTP/1.1\r\n |
|
85 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
84 | s> Accept-Encoding: identity\r\n |
|
86 | s> Accept-Encoding: identity\r\n | |
85 | s> user-agent: test\r\n |
|
87 | s> user-agent: test\r\n | |
86 | s> x-hgupgrade-1: foo bar\r\n |
|
88 | s> x-hgupgrade-1: foo bar\r\n | |
87 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
89 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
88 | s> \r\n |
|
90 | s> \r\n | |
89 | s> makefile('rb', None) |
|
91 | s> makefile('rb', None) | |
90 | s> HTTP/1.1 200 Script output follows\r\n |
|
92 | s> HTTP/1.1 200 Script output follows\r\n | |
91 | s> Server: testing stub value\r\n |
|
93 | s> Server: testing stub value\r\n | |
92 | s> Date: $HTTP_DATE$\r\n |
|
94 | s> Date: $HTTP_DATE$\r\n | |
93 | s> Content-Type: application/mercurial-0.1\r\n |
|
95 | s> Content-Type: application/mercurial-0.1\r\n | |
94 | s> Content-Length: *\r\n (glob) |
|
96 | s> Content-Length: *\r\n (glob) | |
95 | s> \r\n |
|
97 | s> \r\n | |
96 | s> batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
98 | s> batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
97 |
|
99 | |||
98 | X-HgUpgrade-<N> without known serialization in X-HgProto-<N> uses legacy response |
|
100 | X-HgUpgrade-<N> without known serialization in X-HgProto-<N> uses legacy response | |
99 |
|
101 | |||
100 | $ sendhttpraw << EOF |
|
102 | $ sendhttpraw << EOF | |
101 | > httprequest GET ?cmd=capabilities |
|
103 | > httprequest GET ?cmd=capabilities | |
102 | > user-agent: test |
|
104 | > user-agent: test | |
103 | > x-hgupgrade-1: foo bar |
|
105 | > x-hgupgrade-1: foo bar | |
104 | > x-hgproto-1: some value |
|
106 | > x-hgproto-1: some value | |
105 | > EOF |
|
107 | > EOF | |
106 | using raw connection to peer |
|
108 | using raw connection to peer | |
107 | s> GET /?cmd=capabilities HTTP/1.1\r\n |
|
109 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
108 | s> Accept-Encoding: identity\r\n |
|
110 | s> Accept-Encoding: identity\r\n | |
109 | s> user-agent: test\r\n |
|
111 | s> user-agent: test\r\n | |
110 | s> x-hgproto-1: some value\r\n |
|
112 | s> x-hgproto-1: some value\r\n | |
111 | s> x-hgupgrade-1: foo bar\r\n |
|
113 | s> x-hgupgrade-1: foo bar\r\n | |
112 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
114 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
113 | s> \r\n |
|
115 | s> \r\n | |
114 | s> makefile('rb', None) |
|
116 | s> makefile('rb', None) | |
115 | s> HTTP/1.1 200 Script output follows\r\n |
|
117 | s> HTTP/1.1 200 Script output follows\r\n | |
116 | s> Server: testing stub value\r\n |
|
118 | s> Server: testing stub value\r\n | |
117 | s> Date: $HTTP_DATE$\r\n |
|
119 | s> Date: $HTTP_DATE$\r\n | |
118 | s> Content-Type: application/mercurial-0.1\r\n |
|
120 | s> Content-Type: application/mercurial-0.1\r\n | |
119 | s> Content-Length: *\r\n (glob) |
|
121 | s> Content-Length: *\r\n (glob) | |
120 | s> \r\n |
|
122 | s> \r\n | |
121 | s> batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
123 | s> batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
122 |
|
124 | |||
123 | X-HgUpgrade-<N> + X-HgProto-<N> headers trigger new response format |
|
125 | X-HgUpgrade-<N> + X-HgProto-<N> headers trigger new response format | |
124 |
|
126 | |||
125 | $ sendhttpraw << EOF |
|
127 | $ sendhttpraw << EOF | |
126 | > httprequest GET ?cmd=capabilities |
|
128 | > httprequest GET ?cmd=capabilities | |
127 | > user-agent: test |
|
129 | > user-agent: test | |
128 | > x-hgupgrade-1: foo bar |
|
130 | > x-hgupgrade-1: foo bar | |
129 | > x-hgproto-1: cbor |
|
131 | > x-hgproto-1: cbor | |
130 | > EOF |
|
132 | > EOF | |
131 | using raw connection to peer |
|
133 | using raw connection to peer | |
132 | s> GET /?cmd=capabilities HTTP/1.1\r\n |
|
134 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
133 | s> Accept-Encoding: identity\r\n |
|
135 | s> Accept-Encoding: identity\r\n | |
134 | s> user-agent: test\r\n |
|
136 | s> user-agent: test\r\n | |
135 | s> x-hgproto-1: cbor\r\n |
|
137 | s> x-hgproto-1: cbor\r\n | |
136 | s> x-hgupgrade-1: foo bar\r\n |
|
138 | s> x-hgupgrade-1: foo bar\r\n | |
137 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
139 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
138 | s> \r\n |
|
140 | s> \r\n | |
139 | s> makefile('rb', None) |
|
141 | s> makefile('rb', None) | |
140 | s> HTTP/1.1 200 OK\r\n |
|
142 | s> HTTP/1.1 200 OK\r\n | |
141 | s> Server: testing stub value\r\n |
|
143 | s> Server: testing stub value\r\n | |
142 | s> Date: $HTTP_DATE$\r\n |
|
144 | s> Date: $HTTP_DATE$\r\n | |
143 | s> Content-Type: application/mercurial-cbor\r\n |
|
145 | s> Content-Type: application/mercurial-cbor\r\n | |
144 | s> Content-Length: *\r\n (glob) |
|
146 | s> Content-Length: *\r\n (glob) | |
145 | s> \r\n |
|
147 | s> \r\n | |
146 | s> \xa3Dapis\xa0GapibaseDapi/Nv1capabilitiesY\x01\xc5batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
148 | s> \xa3Dapis\xa0GapibaseDapi/Nv1capabilitiesY\x01\xc5batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
147 | cbor> {b'apibase': b'api/', b'apis': {}, b'v1capabilities': b'batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash'} |
|
149 | cbor> {b'apibase': b'api/', b'apis': {}, b'v1capabilities': b'batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash'} | |
148 |
|
150 | |||
149 | Restart server to enable HTTPv2 |
|
151 | Restart server to enable HTTPv2 | |
150 |
|
152 | |||
151 | $ killdaemons.py |
|
153 | $ killdaemons.py | |
152 | $ enablehttpv2 server |
|
154 | $ enablehttpv2 server | |
153 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid -E error.log |
|
155 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid -E error.log | |
154 | $ cat hg.pid > $DAEMON_PIDS |
|
156 | $ cat hg.pid > $DAEMON_PIDS | |
155 |
|
157 | |||
156 | Only requested API services are returned |
|
158 | Only requested API services are returned | |
157 |
|
159 | |||
158 | $ sendhttpraw << EOF |
|
160 | $ sendhttpraw << EOF | |
159 | > httprequest GET ?cmd=capabilities |
|
161 | > httprequest GET ?cmd=capabilities | |
160 | > user-agent: test |
|
162 | > user-agent: test | |
161 | > x-hgupgrade-1: foo bar |
|
163 | > x-hgupgrade-1: foo bar | |
162 | > x-hgproto-1: cbor |
|
164 | > x-hgproto-1: cbor | |
163 | > EOF |
|
165 | > EOF | |
164 | using raw connection to peer |
|
166 | using raw connection to peer | |
165 | s> GET /?cmd=capabilities HTTP/1.1\r\n |
|
167 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
166 | s> Accept-Encoding: identity\r\n |
|
168 | s> Accept-Encoding: identity\r\n | |
167 | s> user-agent: test\r\n |
|
169 | s> user-agent: test\r\n | |
168 | s> x-hgproto-1: cbor\r\n |
|
170 | s> x-hgproto-1: cbor\r\n | |
169 | s> x-hgupgrade-1: foo bar\r\n |
|
171 | s> x-hgupgrade-1: foo bar\r\n | |
170 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
172 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
171 | s> \r\n |
|
173 | s> \r\n | |
172 | s> makefile('rb', None) |
|
174 | s> makefile('rb', None) | |
173 | s> HTTP/1.1 200 OK\r\n |
|
175 | s> HTTP/1.1 200 OK\r\n | |
174 | s> Server: testing stub value\r\n |
|
176 | s> Server: testing stub value\r\n | |
175 | s> Date: $HTTP_DATE$\r\n |
|
177 | s> Date: $HTTP_DATE$\r\n | |
176 | s> Content-Type: application/mercurial-cbor\r\n |
|
178 | s> Content-Type: application/mercurial-cbor\r\n | |
177 | s> Content-Length: *\r\n (glob) |
|
179 | s> Content-Length: *\r\n (glob) | |
178 | s> \r\n |
|
180 | s> \r\n | |
179 | s> \xa3Dapis\xa0GapibaseDapi/Nv1capabilitiesY\x01\xc5batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
181 | s> \xa3Dapis\xa0GapibaseDapi/Nv1capabilitiesY\x01\xc5batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
180 | cbor> {b'apibase': b'api/', b'apis': {}, b'v1capabilities': b'batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash'} |
|
182 | cbor> {b'apibase': b'api/', b'apis': {}, b'v1capabilities': b'batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash'} | |
181 |
|
183 | |||
182 | Request for HTTPv2 service returns information about it |
|
184 | Request for HTTPv2 service returns information about it | |
183 |
|
185 | |||
184 | $ sendhttpraw << EOF |
|
186 | $ sendhttpraw << EOF | |
185 | > httprequest GET ?cmd=capabilities |
|
187 | > httprequest GET ?cmd=capabilities | |
186 | > user-agent: test |
|
188 | > user-agent: test | |
187 | > x-hgupgrade-1: exp-http-v2-0001 foo bar |
|
189 | > x-hgupgrade-1: exp-http-v2-0001 foo bar | |
188 | > x-hgproto-1: cbor |
|
190 | > x-hgproto-1: cbor | |
189 | > EOF |
|
191 | > EOF | |
190 | using raw connection to peer |
|
192 | using raw connection to peer | |
191 | s> GET /?cmd=capabilities HTTP/1.1\r\n |
|
193 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
192 | s> Accept-Encoding: identity\r\n |
|
194 | s> Accept-Encoding: identity\r\n | |
193 | s> user-agent: test\r\n |
|
195 | s> user-agent: test\r\n | |
194 | s> x-hgproto-1: cbor\r\n |
|
196 | s> x-hgproto-1: cbor\r\n | |
195 | s> x-hgupgrade-1: exp-http-v2-0001 foo bar\r\n |
|
197 | s> x-hgupgrade-1: exp-http-v2-0001 foo bar\r\n | |
196 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
198 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
197 | s> \r\n |
|
199 | s> \r\n | |
198 | s> makefile('rb', None) |
|
200 | s> makefile('rb', None) | |
199 | s> HTTP/1.1 200 OK\r\n |
|
201 | s> HTTP/1.1 200 OK\r\n | |
200 | s> Server: testing stub value\r\n |
|
202 | s> Server: testing stub value\r\n | |
201 | s> Date: $HTTP_DATE$\r\n |
|
203 | s> Date: $HTTP_DATE$\r\n | |
202 | s> Content-Type: application/mercurial-cbor\r\n |
|
204 | s> Content-Type: application/mercurial-cbor\r\n | |
203 | s> Content-Length: *\r\n (glob) |
|
205 | s> Content-Length: *\r\n (glob) | |
204 | s> \r\n |
|
206 | s> \r\n | |
205 | s> \xa3Dapis\xa1Pexp-http-v2-0001\xa4Hcommands\xa7Eheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyCnewCnewColdColdInamespaceBnsKpermissions\x81DpushHlistkeys\xa2Dargs\xa1InamespaceBnsKpermissions\x81DpullIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullKcompression\x81\xa1DnameDzlibNrawrepoformats\x82LgeneraldeltaHrevlogv1Qframingmediatypes\x81X&application/mercurial-exp-framing-0005GapibaseDapi/Nv1capabilitiesY\x01\xc5batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
207 | s> \xa3Dapis\xa1Pexp-http-v2-0001\xa4Hcommands\xa7Eheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyCnewCnewColdColdInamespaceBnsKpermissions\x81DpushHlistkeys\xa2Dargs\xa1InamespaceBnsKpermissions\x81DpullIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullKcompression\x81\xa1DnameDzlibNrawrepoformats\x82LgeneraldeltaHrevlogv1Qframingmediatypes\x81X&application/mercurial-exp-framing-0005GapibaseDapi/Nv1capabilitiesY\x01\xc5batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
206 | cbor> {b'apibase': b'api/', b'apis': {b'exp-http-v2-0001': {b'commands': {b'branchmap': {b'args': {}, b'permissions': [b'pull']}, b'capabilities': {b'args': {}, b'permissions': [b'pull']}, b'heads': {b'args': {b'publiconly': False}, b'permissions': [b'pull']}, b'known': {b'args': {b'nodes': [b'deadbeef']}, b'permissions': [b'pull']}, b'listkeys': {b'args': {b'namespace': b'ns'}, b'permissions': [b'pull']}, b'lookup': {b'args': {b'key': b'foo'}, b'permissions': [b'pull']}, b'pushkey': {b'args': {b'key': b'key', b'namespace': b'ns', b'new': b'new', b'old': b'old'}, b'permissions': [b'push']}}, b'compression': [{b'name': b'zlib'}], b'framingmediatypes': [b'application/mercurial-exp-framing-0005'], b'rawrepoformats': [b'generaldelta', b'revlogv1']}}, b'v1capabilities': b'batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash'} |
|
208 | cbor> {b'apibase': b'api/', b'apis': {b'exp-http-v2-0001': {b'commands': {b'branchmap': {b'args': {}, b'permissions': [b'pull']}, b'capabilities': {b'args': {}, b'permissions': [b'pull']}, b'heads': {b'args': {b'publiconly': False}, b'permissions': [b'pull']}, b'known': {b'args': {b'nodes': [b'deadbeef']}, b'permissions': [b'pull']}, b'listkeys': {b'args': {b'namespace': b'ns'}, b'permissions': [b'pull']}, b'lookup': {b'args': {b'key': b'foo'}, b'permissions': [b'pull']}, b'pushkey': {b'args': {b'key': b'key', b'namespace': b'ns', b'new': b'new', b'old': b'old'}, b'permissions': [b'push']}}, b'compression': [{b'name': b'zlib'}], b'framingmediatypes': [b'application/mercurial-exp-framing-0005'], b'rawrepoformats': [b'generaldelta', b'revlogv1']}}, b'v1capabilities': b'batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash'} | |
207 |
|
209 | |||
208 | capabilities command returns expected info |
|
210 | capabilities command returns expected info | |
209 |
|
211 | |||
210 | $ sendhttpv2peerhandshake << EOF |
|
212 | $ sendhttpv2peerhandshake << EOF | |
211 | > command capabilities |
|
213 | > command capabilities | |
212 | > EOF |
|
214 | > EOF | |
213 | creating http peer for wire protocol version 2 |
|
215 | creating http peer for wire protocol version 2 | |
214 | s> GET /?cmd=capabilities HTTP/1.1\r\n |
|
216 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
215 | s> Accept-Encoding: identity\r\n |
|
217 | s> Accept-Encoding: identity\r\n | |
216 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n |
|
218 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n | |
217 | s> x-hgproto-1: cbor\r\n |
|
219 | s> x-hgproto-1: cbor\r\n | |
218 | s> x-hgupgrade-1: exp-http-v2-0001\r\n |
|
220 | s> x-hgupgrade-1: exp-http-v2-0001\r\n | |
219 | s> accept: application/mercurial-0.1\r\n |
|
221 | s> accept: application/mercurial-0.1\r\n | |
220 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
222 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
221 | s> user-agent: Mercurial debugwireproto\r\n |
|
223 | s> user-agent: Mercurial debugwireproto\r\n | |
222 | s> \r\n |
|
224 | s> \r\n | |
223 | s> makefile('rb', None) |
|
225 | s> makefile('rb', None) | |
224 | s> HTTP/1.1 200 OK\r\n |
|
226 | s> HTTP/1.1 200 OK\r\n | |
225 | s> Server: testing stub value\r\n |
|
227 | s> Server: testing stub value\r\n | |
226 | s> Date: $HTTP_DATE$\r\n |
|
228 | s> Date: $HTTP_DATE$\r\n | |
227 | s> Content-Type: application/mercurial-cbor\r\n |
|
229 | s> Content-Type: application/mercurial-cbor\r\n | |
228 | s> Content-Length: *\r\n (glob) |
|
230 | s> Content-Length: *\r\n (glob) | |
229 | s> \r\n |
|
231 | s> \r\n | |
230 | s> \xa3Dapis\xa1Pexp-http-v2-0001\xa4Hcommands\xa7Eheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyCnewCnewColdColdInamespaceBnsKpermissions\x81DpushHlistkeys\xa2Dargs\xa1InamespaceBnsKpermissions\x81DpullIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullKcompression\x81\xa1DnameDzlibNrawrepoformats\x82LgeneraldeltaHrevlogv1Qframingmediatypes\x81X&application/mercurial-exp-framing-0005GapibaseDapi/Nv1capabilitiesY\x01\xc5batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
232 | s> \xa3Dapis\xa1Pexp-http-v2-0001\xa4Hcommands\xa7Eheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyCnewCnewColdColdInamespaceBnsKpermissions\x81DpushHlistkeys\xa2Dargs\xa1InamespaceBnsKpermissions\x81DpullIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullKcompression\x81\xa1DnameDzlibNrawrepoformats\x82LgeneraldeltaHrevlogv1Qframingmediatypes\x81X&application/mercurial-exp-framing-0005GapibaseDapi/Nv1capabilitiesY\x01\xc5batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
231 | sending capabilities command |
|
233 | sending capabilities command | |
232 | s> POST /api/exp-http-v2-0001/ro/capabilities HTTP/1.1\r\n |
|
234 | s> POST /api/exp-http-v2-0001/ro/capabilities HTTP/1.1\r\n | |
233 | s> Accept-Encoding: identity\r\n |
|
235 | s> Accept-Encoding: identity\r\n | |
234 | s> *\r\n (glob) |
|
236 | s> *\r\n (glob) | |
235 | s> content-type: application/mercurial-exp-framing-0005\r\n |
|
237 | s> content-type: application/mercurial-exp-framing-0005\r\n | |
236 | s> content-length: 27\r\n |
|
238 | s> content-length: 27\r\n | |
237 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
239 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
238 | s> user-agent: Mercurial debugwireproto\r\n |
|
240 | s> user-agent: Mercurial debugwireproto\r\n | |
239 | s> \r\n |
|
241 | s> \r\n | |
240 | s> \x13\x00\x00\x01\x00\x01\x01\x11\xa1DnameLcapabilities |
|
242 | s> \x13\x00\x00\x01\x00\x01\x01\x11\xa1DnameLcapabilities | |
241 | s> makefile('rb', None) |
|
243 | s> makefile('rb', None) | |
242 | s> HTTP/1.1 200 OK\r\n |
|
244 | s> HTTP/1.1 200 OK\r\n | |
243 | s> Server: testing stub value\r\n |
|
245 | s> Server: testing stub value\r\n | |
244 | s> Date: $HTTP_DATE$\r\n |
|
246 | s> Date: $HTTP_DATE$\r\n | |
245 | s> Content-Type: application/mercurial-exp-framing-0005\r\n |
|
247 | s> Content-Type: application/mercurial-exp-framing-0005\r\n | |
246 | s> Transfer-Encoding: chunked\r\n |
|
248 | s> Transfer-Encoding: chunked\r\n | |
247 | s> \r\n |
|
249 | s> \r\n | |
248 | s> 1d7\r\n |
|
250 | s> 1d7\r\n | |
249 | s> \xcf\x01\x00\x01\x00\x02\x012 |
|
251 | s> \xcf\x01\x00\x01\x00\x02\x012 | |
250 | s> \xa1FstatusBok\xa4Hcommands\xa7Eheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyCnewCnewColdColdInamespaceBnsKpermissions\x81DpushHlistkeys\xa2Dargs\xa1InamespaceBnsKpermissions\x81DpullIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullKcompression\x81\xa1DnameDzlibNrawrepoformats\x82LgeneraldeltaHrevlogv1Qframingmediatypes\x81X&application/mercurial-exp-framing-0005 |
|
252 | s> \xa1FstatusBok\xa4Hcommands\xa7Eheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyCnewCnewColdColdInamespaceBnsKpermissions\x81DpushHlistkeys\xa2Dargs\xa1InamespaceBnsKpermissions\x81DpullIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullKcompression\x81\xa1DnameDzlibNrawrepoformats\x82LgeneraldeltaHrevlogv1Qframingmediatypes\x81X&application/mercurial-exp-framing-0005 | |
251 | s> \r\n |
|
253 | s> \r\n | |
252 | received frame(size=463; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=eos) |
|
254 | received frame(size=463; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=eos) | |
253 | s> 0\r\n |
|
255 | s> 0\r\n | |
254 | s> \r\n |
|
256 | s> \r\n | |
255 | response: [{b'status': b'ok'}, {b'commands': {b'branchmap': {b'args': {}, b'permissions': [b'pull']}, b'capabilities': {b'args': {}, b'permissions': [b'pull']}, b'heads': {b'args': {b'publiconly': False}, b'permissions': [b'pull']}, b'known': {b'args': {b'nodes': [b'deadbeef']}, b'permissions': [b'pull']}, b'listkeys': {b'args': {b'namespace': b'ns'}, b'permissions': [b'pull']}, b'lookup': {b'args': {b'key': b'foo'}, b'permissions': [b'pull']}, b'pushkey': {b'args': {b'key': b'key', b'namespace': b'ns', b'new': b'new', b'old': b'old'}, b'permissions': [b'push']}}, b'compression': [{b'name': b'zlib'}], b'framingmediatypes': [b'application/mercurial-exp-framing-0005'], b'rawrepoformats': [b'generaldelta', b'revlogv1']}] |
|
257 | response: [{b'status': b'ok'}, {b'commands': {b'branchmap': {b'args': {}, b'permissions': [b'pull']}, b'capabilities': {b'args': {}, b'permissions': [b'pull']}, b'heads': {b'args': {b'publiconly': False}, b'permissions': [b'pull']}, b'known': {b'args': {b'nodes': [b'deadbeef']}, b'permissions': [b'pull']}, b'listkeys': {b'args': {b'namespace': b'ns'}, b'permissions': [b'pull']}, b'lookup': {b'args': {b'key': b'foo'}, b'permissions': [b'pull']}, b'pushkey': {b'args': {b'key': b'key', b'namespace': b'ns', b'new': b'new', b'old': b'old'}, b'permissions': [b'push']}}, b'compression': [{b'name': b'zlib'}], b'framingmediatypes': [b'application/mercurial-exp-framing-0005'], b'rawrepoformats': [b'generaldelta', b'revlogv1']}] | |
256 |
|
258 | |||
257 | $ cat error.log |
|
259 | $ cat error.log |
General Comments 0
You need to be logged in to leave comments.
Login now