Show More
@@ -1,512 +1,512 | |||||
1 | #require serve |
|
1 | #require serve no-reposimplestore | |
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(str(i)) |
|
21 | ... fh.write(str(i)) | |
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,545 +1,547 | |||||
|
1 | #require no-reposimplestore | |||
|
2 | ||||
1 | Set up a server |
|
3 | Set up a server | |
2 |
|
4 | |||
3 | $ hg init server |
|
5 | $ hg init server | |
4 | $ cd server |
|
6 | $ cd server | |
5 | $ cat >> .hg/hgrc << EOF |
|
7 | $ cat >> .hg/hgrc << EOF | |
6 | > [extensions] |
|
8 | > [extensions] | |
7 | > clonebundles = |
|
9 | > clonebundles = | |
8 | > EOF |
|
10 | > EOF | |
9 |
|
11 | |||
10 | $ touch foo |
|
12 | $ touch foo | |
11 | $ hg -q commit -A -m 'add foo' |
|
13 | $ hg -q commit -A -m 'add foo' | |
12 | $ touch bar |
|
14 | $ touch bar | |
13 | $ hg -q commit -A -m 'add bar' |
|
15 | $ hg -q commit -A -m 'add bar' | |
14 |
|
16 | |||
15 | $ 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 | |
16 | $ cat hg.pid >> $DAEMON_PIDS |
|
18 | $ cat hg.pid >> $DAEMON_PIDS | |
17 | $ cd .. |
|
19 | $ cd .. | |
18 |
|
20 | |||
19 | Missing manifest should not result in server lookup |
|
21 | Missing manifest should not result in server lookup | |
20 |
|
22 | |||
21 | $ hg --verbose clone -U http://localhost:$HGPORT no-manifest |
|
23 | $ hg --verbose clone -U http://localhost:$HGPORT no-manifest | |
22 | requesting all changes |
|
24 | requesting all changes | |
23 | adding changesets |
|
25 | adding changesets | |
24 | adding manifests |
|
26 | adding manifests | |
25 | adding file changes |
|
27 | adding file changes | |
26 | added 2 changesets with 2 changes to 2 files |
|
28 | added 2 changesets with 2 changes to 2 files | |
27 | new changesets 53245c60e682:aaff8d2ffbbf |
|
29 | new changesets 53245c60e682:aaff8d2ffbbf | |
28 |
|
30 | |||
29 | $ cat server/access.log |
|
31 | $ cat server/access.log | |
30 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
32 | * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
31 | $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$ (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$ (glob) | |
32 | $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$ (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$ (glob) | |
33 |
|
35 | |||
34 | Empty manifest file results in retrieval |
|
36 | Empty manifest file results in retrieval | |
35 | (the extension only checks if the manifest file exists) |
|
37 | (the extension only checks if the manifest file exists) | |
36 |
|
38 | |||
37 | $ touch server/.hg/clonebundles.manifest |
|
39 | $ touch server/.hg/clonebundles.manifest | |
38 | $ hg --verbose clone -U http://localhost:$HGPORT empty-manifest |
|
40 | $ hg --verbose clone -U http://localhost:$HGPORT empty-manifest | |
39 | no clone bundles available on remote; falling back to regular clone |
|
41 | no clone bundles available on remote; falling back to regular clone | |
40 | requesting all changes |
|
42 | requesting all changes | |
41 | adding changesets |
|
43 | adding changesets | |
42 | adding manifests |
|
44 | adding manifests | |
43 | adding file changes |
|
45 | adding file changes | |
44 | added 2 changesets with 2 changes to 2 files |
|
46 | added 2 changesets with 2 changes to 2 files | |
45 | new changesets 53245c60e682:aaff8d2ffbbf |
|
47 | new changesets 53245c60e682:aaff8d2ffbbf | |
46 |
|
48 | |||
47 | Manifest file with invalid URL aborts |
|
49 | Manifest file with invalid URL aborts | |
48 |
|
50 | |||
49 | $ echo 'http://does.not.exist/bundle.hg' > server/.hg/clonebundles.manifest |
|
51 | $ echo 'http://does.not.exist/bundle.hg' > server/.hg/clonebundles.manifest | |
50 | $ hg clone http://localhost:$HGPORT 404-url |
|
52 | $ hg clone http://localhost:$HGPORT 404-url | |
51 | applying clone bundle from http://does.not.exist/bundle.hg |
|
53 | applying clone bundle from http://does.not.exist/bundle.hg | |
52 | 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 !) | |
53 | error fetching bundle: [Errno 11004] getaddrinfo failed (windows !) |
|
55 | error fetching bundle: [Errno 11004] getaddrinfo failed (windows !) | |
54 | abort: error applying bundle |
|
56 | abort: error applying bundle | |
55 | (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") | |
56 | [255] |
|
58 | [255] | |
57 |
|
59 | |||
58 | Server is not running aborts |
|
60 | Server is not running aborts | |
59 |
|
61 | |||
60 | $ echo "http://localhost:$HGPORT1/bundle.hg" > server/.hg/clonebundles.manifest |
|
62 | $ echo "http://localhost:$HGPORT1/bundle.hg" > server/.hg/clonebundles.manifest | |
61 | $ hg clone http://localhost:$HGPORT server-not-runner |
|
63 | $ hg clone http://localhost:$HGPORT server-not-runner | |
62 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg |
|
64 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg | |
63 | 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) | |
64 | abort: error applying bundle |
|
66 | abort: error applying bundle | |
65 | (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") | |
66 | [255] |
|
68 | [255] | |
67 |
|
69 | |||
68 | Server returns 404 |
|
70 | Server returns 404 | |
69 |
|
71 | |||
70 | $ "$PYTHON" $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid |
|
72 | $ "$PYTHON" $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid | |
71 | $ cat http.pid >> $DAEMON_PIDS |
|
73 | $ cat http.pid >> $DAEMON_PIDS | |
72 | $ hg clone http://localhost:$HGPORT running-404 |
|
74 | $ hg clone http://localhost:$HGPORT running-404 | |
73 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg |
|
75 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg | |
74 | HTTP error fetching bundle: HTTP Error 404: File not found |
|
76 | HTTP error fetching bundle: HTTP Error 404: File not found | |
75 | abort: error applying bundle |
|
77 | abort: error applying bundle | |
76 | (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") | |
77 | [255] |
|
79 | [255] | |
78 |
|
80 | |||
79 | We can override failure to fall back to regular clone |
|
81 | We can override failure to fall back to regular clone | |
80 |
|
82 | |||
81 | $ 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 | |
82 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg |
|
84 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg | |
83 | HTTP error fetching bundle: HTTP Error 404: File not found |
|
85 | HTTP error fetching bundle: HTTP Error 404: File not found | |
84 | falling back to normal clone |
|
86 | falling back to normal clone | |
85 | requesting all changes |
|
87 | requesting all changes | |
86 | adding changesets |
|
88 | adding changesets | |
87 | adding manifests |
|
89 | adding manifests | |
88 | adding file changes |
|
90 | adding file changes | |
89 | added 2 changesets with 2 changes to 2 files |
|
91 | added 2 changesets with 2 changes to 2 files | |
90 | new changesets 53245c60e682:aaff8d2ffbbf |
|
92 | new changesets 53245c60e682:aaff8d2ffbbf | |
91 |
|
93 | |||
92 | Bundle with partial content works |
|
94 | Bundle with partial content works | |
93 |
|
95 | |||
94 | $ 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 | |
95 | 1 changesets found |
|
97 | 1 changesets found | |
96 |
|
98 | |||
97 | 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 | |
98 | changes. If this output changes, we could break old clients. |
|
100 | changes. If this output changes, we could break old clients. | |
99 |
|
101 | |||
100 | $ f --size --hexdump partial.hg |
|
102 | $ f --size --hexdump partial.hg | |
101 | partial.hg: size=207 |
|
103 | partial.hg: size=207 | |
102 | 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``.....| | |
103 | 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!| | |
104 | 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%.$%.| | |
105 | 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| | |
106 | 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...| | |
107 | 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| | |
108 | 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...| | |
109 | 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| | |
110 | 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.| | |
111 | 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 |..&.......&....$| | |
112 | 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.| | |
113 | 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..| | |
114 | 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.^.| | |
115 |
|
117 | |||
116 | $ echo "http://localhost:$HGPORT1/partial.hg" > server/.hg/clonebundles.manifest |
|
118 | $ echo "http://localhost:$HGPORT1/partial.hg" > server/.hg/clonebundles.manifest | |
117 | $ hg clone -U http://localhost:$HGPORT partial-bundle |
|
119 | $ hg clone -U http://localhost:$HGPORT partial-bundle | |
118 | applying clone bundle from http://localhost:$HGPORT1/partial.hg |
|
120 | applying clone bundle from http://localhost:$HGPORT1/partial.hg | |
119 | adding changesets |
|
121 | adding changesets | |
120 | adding manifests |
|
122 | adding manifests | |
121 | adding file changes |
|
123 | adding file changes | |
122 | added 1 changesets with 1 changes to 1 files |
|
124 | added 1 changesets with 1 changes to 1 files | |
123 | finished applying clone bundle |
|
125 | finished applying clone bundle | |
124 | searching for changes |
|
126 | searching for changes | |
125 | adding changesets |
|
127 | adding changesets | |
126 | adding manifests |
|
128 | adding manifests | |
127 | adding file changes |
|
129 | adding file changes | |
128 | added 1 changesets with 1 changes to 1 files |
|
130 | added 1 changesets with 1 changes to 1 files | |
129 | new changesets aaff8d2ffbbf |
|
131 | new changesets aaff8d2ffbbf | |
130 |
|
132 | |||
131 | Incremental pull doesn't fetch bundle |
|
133 | Incremental pull doesn't fetch bundle | |
132 |
|
134 | |||
133 | $ hg clone -r 53245c60e682 -U http://localhost:$HGPORT partial-clone |
|
135 | $ hg clone -r 53245c60e682 -U http://localhost:$HGPORT partial-clone | |
134 | adding changesets |
|
136 | adding changesets | |
135 | adding manifests |
|
137 | adding manifests | |
136 | adding file changes |
|
138 | adding file changes | |
137 | added 1 changesets with 1 changes to 1 files |
|
139 | added 1 changesets with 1 changes to 1 files | |
138 | new changesets 53245c60e682 |
|
140 | new changesets 53245c60e682 | |
139 |
|
141 | |||
140 | $ cd partial-clone |
|
142 | $ cd partial-clone | |
141 | $ hg pull |
|
143 | $ hg pull | |
142 | pulling from http://localhost:$HGPORT/ |
|
144 | pulling from http://localhost:$HGPORT/ | |
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 1 changesets with 1 changes to 1 files |
|
149 | added 1 changesets with 1 changes to 1 files | |
148 | new changesets aaff8d2ffbbf |
|
150 | new changesets aaff8d2ffbbf | |
149 | (run 'hg update' to get a working copy) |
|
151 | (run 'hg update' to get a working copy) | |
150 | $ cd .. |
|
152 | $ cd .. | |
151 |
|
153 | |||
152 | Bundle with full content works |
|
154 | Bundle with full content works | |
153 |
|
155 | |||
154 | $ 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 | |
155 | 2 changesets found |
|
157 | 2 changesets found | |
156 |
|
158 | |||
157 | 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 | |
158 | 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 | |
159 | by old clients. |
|
161 | by old clients. | |
160 |
|
162 | |||
161 | $ f --size --hexdump full.hg |
|
163 | $ f --size --hexdump full.hg | |
162 | full.hg: size=442 |
|
164 | full.hg: size=442 | |
163 | 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| | |
164 | 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| | |
165 | 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| | |
166 | 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 |.......<........| | |
167 | 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..| | |
168 | 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.............| | |
169 | 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 |.......%.......[| | |
170 | 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| | |
171 | 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.| | |
172 | 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%..| | |
173 | 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 |(.. ......{?....| | |
174 | 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./...| | |
175 | 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| | |
176 | 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.| | |
177 | 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| | |
178 | 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.| | |
179 | 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| | |
180 | 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..)..).......&.| | |
181 | 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.| | |
182 | 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\ .>..#.| | |
183 | 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 |&...............| | |
184 | 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...| | |
185 | 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| | |
186 | 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%......| | |
187 | 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| | |
188 | 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| | |
189 | 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.}@......%...`| | |
190 | 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......| | |
191 |
|
193 | |||
192 | $ echo "http://localhost:$HGPORT1/full.hg" > server/.hg/clonebundles.manifest |
|
194 | $ echo "http://localhost:$HGPORT1/full.hg" > server/.hg/clonebundles.manifest | |
193 | $ hg clone -U http://localhost:$HGPORT full-bundle |
|
195 | $ hg clone -U http://localhost:$HGPORT full-bundle | |
194 | applying clone bundle from http://localhost:$HGPORT1/full.hg |
|
196 | applying clone bundle from http://localhost:$HGPORT1/full.hg | |
195 | adding changesets |
|
197 | adding changesets | |
196 | adding manifests |
|
198 | adding manifests | |
197 | adding file changes |
|
199 | adding file changes | |
198 | added 2 changesets with 2 changes to 2 files |
|
200 | added 2 changesets with 2 changes to 2 files | |
199 | finished applying clone bundle |
|
201 | finished applying clone bundle | |
200 | searching for changes |
|
202 | searching for changes | |
201 | no changes found |
|
203 | no changes found | |
202 |
|
204 | |||
203 | Feature works over SSH |
|
205 | Feature works over SSH | |
204 |
|
206 | |||
205 | $ 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 | |
206 | applying clone bundle from http://localhost:$HGPORT1/full.hg |
|
208 | applying clone bundle from http://localhost:$HGPORT1/full.hg | |
207 | adding changesets |
|
209 | adding changesets | |
208 | adding manifests |
|
210 | adding manifests | |
209 | adding file changes |
|
211 | adding file changes | |
210 | added 2 changesets with 2 changes to 2 files |
|
212 | added 2 changesets with 2 changes to 2 files | |
211 | finished applying clone bundle |
|
213 | finished applying clone bundle | |
212 | searching for changes |
|
214 | searching for changes | |
213 | no changes found |
|
215 | no changes found | |
214 |
|
216 | |||
215 | Entry with unknown BUNDLESPEC is filtered and not used |
|
217 | Entry with unknown BUNDLESPEC is filtered and not used | |
216 |
|
218 | |||
217 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
219 | $ cat > server/.hg/clonebundles.manifest << EOF | |
218 | > http://bad.entry1 BUNDLESPEC=UNKNOWN |
|
220 | > http://bad.entry1 BUNDLESPEC=UNKNOWN | |
219 | > http://bad.entry2 BUNDLESPEC=xz-v1 |
|
221 | > http://bad.entry2 BUNDLESPEC=xz-v1 | |
220 | > http://bad.entry3 BUNDLESPEC=none-v100 |
|
222 | > http://bad.entry3 BUNDLESPEC=none-v100 | |
221 | > http://localhost:$HGPORT1/full.hg BUNDLESPEC=gzip-v2 |
|
223 | > http://localhost:$HGPORT1/full.hg BUNDLESPEC=gzip-v2 | |
222 | > EOF |
|
224 | > EOF | |
223 |
|
225 | |||
224 | $ hg clone -U http://localhost:$HGPORT filter-unknown-type |
|
226 | $ hg clone -U http://localhost:$HGPORT filter-unknown-type | |
225 | applying clone bundle from http://localhost:$HGPORT1/full.hg |
|
227 | applying clone bundle from http://localhost:$HGPORT1/full.hg | |
226 | adding changesets |
|
228 | adding changesets | |
227 | adding manifests |
|
229 | adding manifests | |
228 | adding file changes |
|
230 | adding file changes | |
229 | added 2 changesets with 2 changes to 2 files |
|
231 | added 2 changesets with 2 changes to 2 files | |
230 | finished applying clone bundle |
|
232 | finished applying clone bundle | |
231 | searching for changes |
|
233 | searching for changes | |
232 | no changes found |
|
234 | no changes found | |
233 |
|
235 | |||
234 | Automatic fallback when all entries are filtered |
|
236 | Automatic fallback when all entries are filtered | |
235 |
|
237 | |||
236 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
238 | $ cat > server/.hg/clonebundles.manifest << EOF | |
237 | > http://bad.entry BUNDLESPEC=UNKNOWN |
|
239 | > http://bad.entry BUNDLESPEC=UNKNOWN | |
238 | > EOF |
|
240 | > EOF | |
239 |
|
241 | |||
240 | $ hg clone -U http://localhost:$HGPORT filter-all |
|
242 | $ hg clone -U http://localhost:$HGPORT filter-all | |
241 | 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 | |
242 | (you may want to report this to the server operator) |
|
244 | (you may want to report this to the server operator) | |
243 | requesting all changes |
|
245 | requesting all changes | |
244 | adding changesets |
|
246 | adding changesets | |
245 | adding manifests |
|
247 | adding manifests | |
246 | adding file changes |
|
248 | adding file changes | |
247 | added 2 changesets with 2 changes to 2 files |
|
249 | added 2 changesets with 2 changes to 2 files | |
248 | new changesets 53245c60e682:aaff8d2ffbbf |
|
250 | new changesets 53245c60e682:aaff8d2ffbbf | |
249 |
|
251 | |||
250 | URLs requiring SNI are filtered in Python <2.7.9 |
|
252 | URLs requiring SNI are filtered in Python <2.7.9 | |
251 |
|
253 | |||
252 | $ cp full.hg sni.hg |
|
254 | $ cp full.hg sni.hg | |
253 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
255 | $ cat > server/.hg/clonebundles.manifest << EOF | |
254 | > http://localhost:$HGPORT1/sni.hg REQUIRESNI=true |
|
256 | > http://localhost:$HGPORT1/sni.hg REQUIRESNI=true | |
255 | > http://localhost:$HGPORT1/full.hg |
|
257 | > http://localhost:$HGPORT1/full.hg | |
256 | > EOF |
|
258 | > EOF | |
257 |
|
259 | |||
258 | #if sslcontext |
|
260 | #if sslcontext | |
259 | Python 2.7.9+ support SNI |
|
261 | Python 2.7.9+ support SNI | |
260 |
|
262 | |||
261 | $ hg clone -U http://localhost:$HGPORT sni-supported |
|
263 | $ hg clone -U http://localhost:$HGPORT sni-supported | |
262 | applying clone bundle from http://localhost:$HGPORT1/sni.hg |
|
264 | applying clone bundle from http://localhost:$HGPORT1/sni.hg | |
263 | adding changesets |
|
265 | adding changesets | |
264 | adding manifests |
|
266 | adding manifests | |
265 | adding file changes |
|
267 | adding file changes | |
266 | added 2 changesets with 2 changes to 2 files |
|
268 | added 2 changesets with 2 changes to 2 files | |
267 | finished applying clone bundle |
|
269 | finished applying clone bundle | |
268 | searching for changes |
|
270 | searching for changes | |
269 | no changes found |
|
271 | no changes found | |
270 | #else |
|
272 | #else | |
271 | Python <2.7.9 will filter SNI URLs |
|
273 | Python <2.7.9 will filter SNI URLs | |
272 |
|
274 | |||
273 | $ hg clone -U http://localhost:$HGPORT sni-unsupported |
|
275 | $ hg clone -U http://localhost:$HGPORT sni-unsupported | |
274 | applying clone bundle from http://localhost:$HGPORT1/full.hg |
|
276 | applying clone bundle from http://localhost:$HGPORT1/full.hg | |
275 | adding changesets |
|
277 | adding changesets | |
276 | adding manifests |
|
278 | adding manifests | |
277 | adding file changes |
|
279 | adding file changes | |
278 | added 2 changesets with 2 changes to 2 files |
|
280 | added 2 changesets with 2 changes to 2 files | |
279 | finished applying clone bundle |
|
281 | finished applying clone bundle | |
280 | searching for changes |
|
282 | searching for changes | |
281 | no changes found |
|
283 | no changes found | |
282 | #endif |
|
284 | #endif | |
283 |
|
285 | |||
284 | Stream clone bundles are supported |
|
286 | Stream clone bundles are supported | |
285 |
|
287 | |||
286 | $ hg -R server debugcreatestreamclonebundle packed.hg |
|
288 | $ hg -R server debugcreatestreamclonebundle packed.hg | |
287 | writing 613 bytes for 4 files |
|
289 | writing 613 bytes for 4 files | |
288 | bundle requirements: generaldelta, revlogv1 |
|
290 | bundle requirements: generaldelta, revlogv1 | |
289 |
|
291 | |||
290 | No bundle spec should work |
|
292 | No bundle spec should work | |
291 |
|
293 | |||
292 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
294 | $ cat > server/.hg/clonebundles.manifest << EOF | |
293 | > http://localhost:$HGPORT1/packed.hg |
|
295 | > http://localhost:$HGPORT1/packed.hg | |
294 | > EOF |
|
296 | > EOF | |
295 |
|
297 | |||
296 | $ hg clone -U http://localhost:$HGPORT stream-clone-no-spec |
|
298 | $ hg clone -U http://localhost:$HGPORT stream-clone-no-spec | |
297 | applying clone bundle from http://localhost:$HGPORT1/packed.hg |
|
299 | applying clone bundle from http://localhost:$HGPORT1/packed.hg | |
298 | 4 files to transfer, 613 bytes of data |
|
300 | 4 files to transfer, 613 bytes of data | |
299 | transferred 613 bytes in *.* seconds (*) (glob) |
|
301 | transferred 613 bytes in *.* seconds (*) (glob) | |
300 | finished applying clone bundle |
|
302 | finished applying clone bundle | |
301 | searching for changes |
|
303 | searching for changes | |
302 | no changes found |
|
304 | no changes found | |
303 |
|
305 | |||
304 | Bundle spec without parameters should work |
|
306 | Bundle spec without parameters should work | |
305 |
|
307 | |||
306 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
308 | $ cat > server/.hg/clonebundles.manifest << EOF | |
307 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1 |
|
309 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1 | |
308 | > EOF |
|
310 | > EOF | |
309 |
|
311 | |||
310 | $ hg clone -U http://localhost:$HGPORT stream-clone-vanilla-spec |
|
312 | $ hg clone -U http://localhost:$HGPORT stream-clone-vanilla-spec | |
311 | applying clone bundle from http://localhost:$HGPORT1/packed.hg |
|
313 | applying clone bundle from http://localhost:$HGPORT1/packed.hg | |
312 | 4 files to transfer, 613 bytes of data |
|
314 | 4 files to transfer, 613 bytes of data | |
313 | transferred 613 bytes in *.* seconds (*) (glob) |
|
315 | transferred 613 bytes in *.* seconds (*) (glob) | |
314 | finished applying clone bundle |
|
316 | finished applying clone bundle | |
315 | searching for changes |
|
317 | searching for changes | |
316 | no changes found |
|
318 | no changes found | |
317 |
|
319 | |||
318 | Bundle spec with format requirements should work |
|
320 | Bundle spec with format requirements should work | |
319 |
|
321 | |||
320 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
322 | $ cat > server/.hg/clonebundles.manifest << EOF | |
321 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1 |
|
323 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1 | |
322 | > EOF |
|
324 | > EOF | |
323 |
|
325 | |||
324 | $ hg clone -U http://localhost:$HGPORT stream-clone-supported-requirements |
|
326 | $ hg clone -U http://localhost:$HGPORT stream-clone-supported-requirements | |
325 | applying clone bundle from http://localhost:$HGPORT1/packed.hg |
|
327 | applying clone bundle from http://localhost:$HGPORT1/packed.hg | |
326 | 4 files to transfer, 613 bytes of data |
|
328 | 4 files to transfer, 613 bytes of data | |
327 | transferred 613 bytes in *.* seconds (*) (glob) |
|
329 | transferred 613 bytes in *.* seconds (*) (glob) | |
328 | finished applying clone bundle |
|
330 | finished applying clone bundle | |
329 | searching for changes |
|
331 | searching for changes | |
330 | no changes found |
|
332 | no changes found | |
331 |
|
333 | |||
332 | Stream bundle spec with unknown requirements should be filtered out |
|
334 | Stream bundle spec with unknown requirements should be filtered out | |
333 |
|
335 | |||
334 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
336 | $ cat > server/.hg/clonebundles.manifest << EOF | |
335 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42 |
|
337 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42 | |
336 | > EOF |
|
338 | > EOF | |
337 |
|
339 | |||
338 | $ hg clone -U http://localhost:$HGPORT stream-clone-unsupported-requirements |
|
340 | $ hg clone -U http://localhost:$HGPORT stream-clone-unsupported-requirements | |
339 | 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 | |
340 | (you may want to report this to the server operator) |
|
342 | (you may want to report this to the server operator) | |
341 | requesting all changes |
|
343 | requesting all changes | |
342 | adding changesets |
|
344 | adding changesets | |
343 | adding manifests |
|
345 | adding manifests | |
344 | adding file changes |
|
346 | adding file changes | |
345 | added 2 changesets with 2 changes to 2 files |
|
347 | added 2 changesets with 2 changes to 2 files | |
346 | new changesets 53245c60e682:aaff8d2ffbbf |
|
348 | new changesets 53245c60e682:aaff8d2ffbbf | |
347 |
|
349 | |||
348 | Set up manifest for testing preferences |
|
350 | Set up manifest for testing preferences | |
349 | (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 | |
350 | important) |
|
352 | important) | |
351 |
|
353 | |||
352 | $ cp full.hg gz-a.hg |
|
354 | $ cp full.hg gz-a.hg | |
353 | $ cp full.hg gz-b.hg |
|
355 | $ cp full.hg gz-b.hg | |
354 | $ cp full.hg bz2-a.hg |
|
356 | $ cp full.hg bz2-a.hg | |
355 | $ cp full.hg bz2-b.hg |
|
357 | $ cp full.hg bz2-b.hg | |
356 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
358 | $ cat > server/.hg/clonebundles.manifest << EOF | |
357 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 extra=a |
|
359 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 extra=a | |
358 | > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 extra=a |
|
360 | > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 extra=a | |
359 | > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b |
|
361 | > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b | |
360 | > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b |
|
362 | > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b | |
361 | > EOF |
|
363 | > EOF | |
362 |
|
364 | |||
363 | Preferring an undefined attribute will take first entry |
|
365 | Preferring an undefined attribute will take first entry | |
364 |
|
366 | |||
365 | $ 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 | |
366 | applying clone bundle from http://localhost:$HGPORT1/gz-a.hg |
|
368 | applying clone bundle from http://localhost:$HGPORT1/gz-a.hg | |
367 | adding changesets |
|
369 | adding changesets | |
368 | adding manifests |
|
370 | adding manifests | |
369 | adding file changes |
|
371 | adding file changes | |
370 | added 2 changesets with 2 changes to 2 files |
|
372 | added 2 changesets with 2 changes to 2 files | |
371 | finished applying clone bundle |
|
373 | finished applying clone bundle | |
372 | searching for changes |
|
374 | searching for changes | |
373 | no changes found |
|
375 | no changes found | |
374 |
|
376 | |||
375 | Preferring bz2 type will download first entry of that type |
|
377 | Preferring bz2 type will download first entry of that type | |
376 |
|
378 | |||
377 | $ 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 | |
378 | applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg |
|
380 | applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg | |
379 | adding changesets |
|
381 | adding changesets | |
380 | adding manifests |
|
382 | adding manifests | |
381 | adding file changes |
|
383 | adding file changes | |
382 | added 2 changesets with 2 changes to 2 files |
|
384 | added 2 changesets with 2 changes to 2 files | |
383 | finished applying clone bundle |
|
385 | finished applying clone bundle | |
384 | searching for changes |
|
386 | searching for changes | |
385 | no changes found |
|
387 | no changes found | |
386 |
|
388 | |||
387 | Preferring multiple values of an option works |
|
389 | Preferring multiple values of an option works | |
388 |
|
390 | |||
389 | $ 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 | |
390 | applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg |
|
392 | applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg | |
391 | adding changesets |
|
393 | adding changesets | |
392 | adding manifests |
|
394 | adding manifests | |
393 | adding file changes |
|
395 | adding file changes | |
394 | added 2 changesets with 2 changes to 2 files |
|
396 | added 2 changesets with 2 changes to 2 files | |
395 | finished applying clone bundle |
|
397 | finished applying clone bundle | |
396 | searching for changes |
|
398 | searching for changes | |
397 | no changes found |
|
399 | no changes found | |
398 |
|
400 | |||
399 | Sorting multiple values should get us back to original first entry |
|
401 | Sorting multiple values should get us back to original first entry | |
400 |
|
402 | |||
401 | $ 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 | |
402 | applying clone bundle from http://localhost:$HGPORT1/gz-a.hg |
|
404 | applying clone bundle from http://localhost:$HGPORT1/gz-a.hg | |
403 | adding changesets |
|
405 | adding changesets | |
404 | adding manifests |
|
406 | adding manifests | |
405 | adding file changes |
|
407 | adding file changes | |
406 | added 2 changesets with 2 changes to 2 files |
|
408 | added 2 changesets with 2 changes to 2 files | |
407 | finished applying clone bundle |
|
409 | finished applying clone bundle | |
408 | searching for changes |
|
410 | searching for changes | |
409 | no changes found |
|
411 | no changes found | |
410 |
|
412 | |||
411 | Preferring multiple attributes has correct order |
|
413 | Preferring multiple attributes has correct order | |
412 |
|
414 | |||
413 | $ 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 | |
414 | applying clone bundle from http://localhost:$HGPORT1/bz2-b.hg |
|
416 | applying clone bundle from http://localhost:$HGPORT1/bz2-b.hg | |
415 | adding changesets |
|
417 | adding changesets | |
416 | adding manifests |
|
418 | adding manifests | |
417 | adding file changes |
|
419 | adding file changes | |
418 | added 2 changesets with 2 changes to 2 files |
|
420 | added 2 changesets with 2 changes to 2 files | |
419 | finished applying clone bundle |
|
421 | finished applying clone bundle | |
420 | searching for changes |
|
422 | searching for changes | |
421 | no changes found |
|
423 | no changes found | |
422 |
|
424 | |||
423 | Test where attribute is missing from some entries |
|
425 | Test where attribute is missing from some entries | |
424 |
|
426 | |||
425 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
427 | $ cat > server/.hg/clonebundles.manifest << EOF | |
426 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 |
|
428 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 | |
427 | > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 |
|
429 | > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 | |
428 | > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b |
|
430 | > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b | |
429 | > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b |
|
431 | > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b | |
430 | > EOF |
|
432 | > EOF | |
431 |
|
433 | |||
432 | $ 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 | |
433 | applying clone bundle from http://localhost:$HGPORT1/gz-b.hg |
|
435 | applying clone bundle from http://localhost:$HGPORT1/gz-b.hg | |
434 | adding changesets |
|
436 | adding changesets | |
435 | adding manifests |
|
437 | adding manifests | |
436 | adding file changes |
|
438 | adding file changes | |
437 | added 2 changesets with 2 changes to 2 files |
|
439 | added 2 changesets with 2 changes to 2 files | |
438 | finished applying clone bundle |
|
440 | finished applying clone bundle | |
439 | searching for changes |
|
441 | searching for changes | |
440 | no changes found |
|
442 | no changes found | |
441 |
|
443 | |||
442 | Test interaction between clone bundles and --stream |
|
444 | Test interaction between clone bundles and --stream | |
443 |
|
445 | |||
444 | A manifest with just a gzip bundle |
|
446 | A manifest with just a gzip bundle | |
445 |
|
447 | |||
446 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
448 | $ cat > server/.hg/clonebundles.manifest << EOF | |
447 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 |
|
449 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 | |
448 | > EOF |
|
450 | > EOF | |
449 |
|
451 | |||
450 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip |
|
452 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip | |
451 | 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 | |
452 | (you may want to report this to the server operator) |
|
454 | (you may want to report this to the server operator) | |
453 | streaming all changes |
|
455 | streaming all changes | |
454 | 4 files to transfer, 613 bytes of data |
|
456 | 4 files to transfer, 613 bytes of data | |
455 | transferred 613 bytes in * seconds (*) (glob) |
|
457 | transferred 613 bytes in * seconds (*) (glob) | |
456 | searching for changes |
|
458 | searching for changes | |
457 | no changes found |
|
459 | no changes found | |
458 |
|
460 | |||
459 | A manifest with a stream clone but no BUNDLESPEC |
|
461 | A manifest with a stream clone but no BUNDLESPEC | |
460 |
|
462 | |||
461 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
463 | $ cat > server/.hg/clonebundles.manifest << EOF | |
462 | > http://localhost:$HGPORT1/packed.hg |
|
464 | > http://localhost:$HGPORT1/packed.hg | |
463 | > EOF |
|
465 | > EOF | |
464 |
|
466 | |||
465 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-no-bundlespec |
|
467 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-no-bundlespec | |
466 | 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 | |
467 | (you may want to report this to the server operator) |
|
469 | (you may want to report this to the server operator) | |
468 | streaming all changes |
|
470 | streaming all changes | |
469 | 4 files to transfer, 613 bytes of data |
|
471 | 4 files to transfer, 613 bytes of data | |
470 | transferred 613 bytes in * seconds (*) (glob) |
|
472 | transferred 613 bytes in * seconds (*) (glob) | |
471 | searching for changes |
|
473 | searching for changes | |
472 | no changes found |
|
474 | no changes found | |
473 |
|
475 | |||
474 | A manifest with a gzip bundle and a stream clone |
|
476 | A manifest with a gzip bundle and a stream clone | |
475 |
|
477 | |||
476 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
478 | $ cat > server/.hg/clonebundles.manifest << EOF | |
477 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 |
|
479 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 | |
478 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1 |
|
480 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1 | |
479 | > EOF |
|
481 | > EOF | |
480 |
|
482 | |||
481 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed |
|
483 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed | |
482 | applying clone bundle from http://localhost:$HGPORT1/packed.hg |
|
484 | applying clone bundle from http://localhost:$HGPORT1/packed.hg | |
483 | 4 files to transfer, 613 bytes of data |
|
485 | 4 files to transfer, 613 bytes of data | |
484 | transferred 613 bytes in * seconds (*) (glob) |
|
486 | transferred 613 bytes in * seconds (*) (glob) | |
485 | finished applying clone bundle |
|
487 | finished applying clone bundle | |
486 | searching for changes |
|
488 | searching for changes | |
487 | no changes found |
|
489 | no changes found | |
488 |
|
490 | |||
489 | 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 | |
490 |
|
492 | |||
491 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
493 | $ cat > server/.hg/clonebundles.manifest << EOF | |
492 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 |
|
494 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 | |
493 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1 |
|
495 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1 | |
494 | > EOF |
|
496 | > EOF | |
495 |
|
497 | |||
496 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed-requirements |
|
498 | $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed-requirements | |
497 | applying clone bundle from http://localhost:$HGPORT1/packed.hg |
|
499 | applying clone bundle from http://localhost:$HGPORT1/packed.hg | |
498 | 4 files to transfer, 613 bytes of data |
|
500 | 4 files to transfer, 613 bytes of data | |
499 | transferred 613 bytes in * seconds (*) (glob) |
|
501 | transferred 613 bytes in * seconds (*) (glob) | |
500 | finished applying clone bundle |
|
502 | finished applying clone bundle | |
501 | searching for changes |
|
503 | searching for changes | |
502 | no changes found |
|
504 | no changes found | |
503 |
|
505 | |||
504 | 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 | |
505 |
|
507 | |||
506 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
508 | $ cat > server/.hg/clonebundles.manifest << EOF | |
507 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 |
|
509 | > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 | |
508 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42 |
|
510 | > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42 | |
509 | > EOF |
|
511 | > EOF | |
510 |
|
512 | |||
511 | $ 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 | |
512 | 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 | |
513 | (you may want to report this to the server operator) |
|
515 | (you may want to report this to the server operator) | |
514 | streaming all changes |
|
516 | streaming all changes | |
515 | 4 files to transfer, 613 bytes of data |
|
517 | 4 files to transfer, 613 bytes of data | |
516 | transferred 613 bytes in * seconds (*) (glob) |
|
518 | transferred 613 bytes in * seconds (*) (glob) | |
517 | searching for changes |
|
519 | searching for changes | |
518 | no changes found |
|
520 | no changes found | |
519 |
|
521 | |||
520 | Test clone bundle retrieved through bundle2 |
|
522 | Test clone bundle retrieved through bundle2 | |
521 |
|
523 | |||
522 | $ cat << EOF >> $HGRCPATH |
|
524 | $ cat << EOF >> $HGRCPATH | |
523 | > [extensions] |
|
525 | > [extensions] | |
524 | > largefiles= |
|
526 | > largefiles= | |
525 | > EOF |
|
527 | > EOF | |
526 | $ killdaemons.py |
|
528 | $ killdaemons.py | |
527 | $ 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 | |
528 | $ cat hg.pid >> $DAEMON_PIDS |
|
530 | $ cat hg.pid >> $DAEMON_PIDS | |
529 |
|
531 | |||
530 | $ hg -R server debuglfput gz-a.hg |
|
532 | $ hg -R server debuglfput gz-a.hg | |
531 | 14ee2f0b3f1d14aeeb2fe037e09fc295c3cf59f5 |
|
533 | 14ee2f0b3f1d14aeeb2fe037e09fc295c3cf59f5 | |
532 |
|
534 | |||
533 | $ cat > server/.hg/clonebundles.manifest << EOF |
|
535 | $ cat > server/.hg/clonebundles.manifest << EOF | |
534 | > largefile://14ee2f0b3f1d14aeeb2fe037e09fc295c3cf59f5 BUNDLESPEC=gzip-v2 |
|
536 | > largefile://14ee2f0b3f1d14aeeb2fe037e09fc295c3cf59f5 BUNDLESPEC=gzip-v2 | |
535 | > EOF |
|
537 | > EOF | |
536 |
|
538 | |||
537 | $ hg clone -U http://localhost:$HGPORT largefile-provided --traceback |
|
539 | $ hg clone -U http://localhost:$HGPORT largefile-provided --traceback | |
538 | applying clone bundle from largefile://14ee2f0b3f1d14aeeb2fe037e09fc295c3cf59f5 |
|
540 | applying clone bundle from largefile://14ee2f0b3f1d14aeeb2fe037e09fc295c3cf59f5 | |
539 | adding changesets |
|
541 | adding changesets | |
540 | adding manifests |
|
542 | adding manifests | |
541 | adding file changes |
|
543 | adding file changes | |
542 | added 2 changesets with 2 changes to 2 files |
|
544 | added 2 changesets with 2 changes to 2 files | |
543 | finished applying clone bundle |
|
545 | finished applying clone bundle | |
544 | searching for changes |
|
546 | searching for changes | |
545 | no changes found |
|
547 | no changes found |
@@ -1,404 +1,411 | |||||
1 | #require serve |
|
1 | #require serve | |
2 |
|
2 | |||
3 | This test is a duplicate of 'test-http.t', feel free to factor out |
|
3 | This test is a duplicate of 'test-http.t', feel free to factor out | |
4 | parts that are not bundle1/bundle2 specific. |
|
4 | parts that are not bundle1/bundle2 specific. | |
5 |
|
5 | |||
6 | $ cat << EOF >> $HGRCPATH |
|
6 | $ cat << EOF >> $HGRCPATH | |
7 | > [devel] |
|
7 | > [devel] | |
8 | > # This test is dedicated to interaction through old bundle |
|
8 | > # This test is dedicated to interaction through old bundle | |
9 | > legacy.exchange = bundle1 |
|
9 | > legacy.exchange = bundle1 | |
10 | > EOF |
|
10 | > EOF | |
11 |
|
11 | |||
12 | $ hg init test |
|
12 | $ hg init test | |
13 | $ cd test |
|
13 | $ cd test | |
14 | $ echo foo>foo |
|
14 | $ echo foo>foo | |
15 | $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg |
|
15 | $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg | |
16 | $ echo foo>foo.d/foo |
|
16 | $ echo foo>foo.d/foo | |
17 | $ echo bar>foo.d/bAr.hg.d/BaR |
|
17 | $ echo bar>foo.d/bAr.hg.d/BaR | |
18 | $ echo bar>foo.d/baR.d.hg/bAR |
|
18 | $ echo bar>foo.d/baR.d.hg/bAR | |
19 | $ hg commit -A -m 1 |
|
19 | $ hg commit -A -m 1 | |
20 | adding foo |
|
20 | adding foo | |
21 | adding foo.d/bAr.hg.d/BaR |
|
21 | adding foo.d/bAr.hg.d/BaR | |
22 | adding foo.d/baR.d.hg/bAR |
|
22 | adding foo.d/baR.d.hg/bAR | |
23 | adding foo.d/foo |
|
23 | adding foo.d/foo | |
24 | $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log |
|
24 | $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log | |
25 | $ hg serve --config server.uncompressed=False -p $HGPORT1 -d --pid-file=../hg2.pid |
|
25 | $ hg serve --config server.uncompressed=False -p $HGPORT1 -d --pid-file=../hg2.pid | |
26 |
|
26 | |||
27 | Test server address cannot be reused |
|
27 | Test server address cannot be reused | |
28 |
|
28 | |||
29 | $ hg serve -p $HGPORT1 2>&1 |
|
29 | $ hg serve -p $HGPORT1 2>&1 | |
30 | abort: cannot start server at 'localhost:$HGPORT1': $EADDRINUSE$ |
|
30 | abort: cannot start server at 'localhost:$HGPORT1': $EADDRINUSE$ | |
31 | [255] |
|
31 | [255] | |
32 |
|
32 | |||
33 | $ cd .. |
|
33 | $ cd .. | |
34 | $ cat hg1.pid hg2.pid >> $DAEMON_PIDS |
|
34 | $ cat hg1.pid hg2.pid >> $DAEMON_PIDS | |
35 |
|
35 | |||
36 | clone via stream |
|
36 | clone via stream | |
37 |
|
37 | |||
|
38 | #if no-reposimplestore | |||
38 | $ hg clone --stream http://localhost:$HGPORT/ copy 2>&1 |
|
39 | $ hg clone --stream http://localhost:$HGPORT/ copy 2>&1 | |
39 | streaming all changes |
|
40 | streaming all changes | |
40 | 6 files to transfer, 606 bytes of data |
|
41 | 6 files to transfer, 606 bytes of data | |
41 | transferred * bytes in * seconds (*/sec) (glob) |
|
42 | transferred * bytes in * seconds (*/sec) (glob) | |
42 | searching for changes |
|
43 | searching for changes | |
43 | no changes found |
|
44 | no changes found | |
44 | updating to branch default |
|
45 | updating to branch default | |
45 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
46 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
46 | $ hg verify -R copy |
|
47 | $ hg verify -R copy | |
47 | checking changesets |
|
48 | checking changesets | |
48 | checking manifests |
|
49 | checking manifests | |
49 | crosschecking files in changesets and manifests |
|
50 | crosschecking files in changesets and manifests | |
50 | checking files |
|
51 | checking files | |
51 | 4 files, 1 changesets, 4 total revisions |
|
52 | 4 files, 1 changesets, 4 total revisions | |
|
53 | #endif | |||
52 |
|
54 | |||
53 | try to clone via stream, should use pull instead |
|
55 | try to clone via stream, should use pull instead | |
54 |
|
56 | |||
55 | $ hg clone --stream http://localhost:$HGPORT1/ copy2 |
|
57 | $ hg clone --stream http://localhost:$HGPORT1/ copy2 | |
56 | warning: stream clone requested but server has them disabled |
|
58 | warning: stream clone requested but server has them disabled | |
57 | requesting all changes |
|
59 | requesting all changes | |
58 | adding changesets |
|
60 | adding changesets | |
59 | adding manifests |
|
61 | adding manifests | |
60 | adding file changes |
|
62 | adding file changes | |
61 | added 1 changesets with 4 changes to 4 files |
|
63 | added 1 changesets with 4 changes to 4 files | |
62 | new changesets 8b6053c928fe |
|
64 | new changesets 8b6053c928fe | |
63 | updating to branch default |
|
65 | updating to branch default | |
64 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
66 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
65 |
|
67 | |||
66 | try to clone via stream but missing requirements, so should use pull instead |
|
68 | try to clone via stream but missing requirements, so should use pull instead | |
67 |
|
69 | |||
68 | $ cat > $TESTTMP/removesupportedformat.py << EOF |
|
70 | $ cat > $TESTTMP/removesupportedformat.py << EOF | |
69 | > from mercurial import localrepo |
|
71 | > from mercurial import localrepo | |
70 | > def extsetup(ui): |
|
72 | > def extsetup(ui): | |
71 | > localrepo.localrepository.supportedformats.remove(b'generaldelta') |
|
73 | > localrepo.localrepository.supportedformats.remove(b'generaldelta') | |
72 | > EOF |
|
74 | > EOF | |
73 |
|
75 | |||
74 | $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --stream http://localhost:$HGPORT/ copy3 |
|
76 | $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --stream http://localhost:$HGPORT/ copy3 | |
75 | warning: stream clone requested but client is missing requirements: generaldelta |
|
77 | warning: stream clone requested but client is missing requirements: generaldelta | |
76 | (see https://www.mercurial-scm.org/wiki/MissingRequirement for more information) |
|
78 | (see https://www.mercurial-scm.org/wiki/MissingRequirement for more information) | |
77 | requesting all changes |
|
79 | requesting all changes | |
78 | adding changesets |
|
80 | adding changesets | |
79 | adding manifests |
|
81 | adding manifests | |
80 | adding file changes |
|
82 | adding file changes | |
81 | added 1 changesets with 4 changes to 4 files |
|
83 | added 1 changesets with 4 changes to 4 files | |
82 | new changesets 8b6053c928fe |
|
84 | new changesets 8b6053c928fe | |
83 | updating to branch default |
|
85 | updating to branch default | |
84 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
86 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
85 |
|
87 | |||
86 | clone via pull |
|
88 | clone via pull | |
87 |
|
89 | |||
88 | $ hg clone http://localhost:$HGPORT1/ copy-pull |
|
90 | $ hg clone http://localhost:$HGPORT1/ copy-pull | |
89 | requesting all changes |
|
91 | requesting all changes | |
90 | adding changesets |
|
92 | adding changesets | |
91 | adding manifests |
|
93 | adding manifests | |
92 | adding file changes |
|
94 | adding file changes | |
93 | added 1 changesets with 4 changes to 4 files |
|
95 | added 1 changesets with 4 changes to 4 files | |
94 | new changesets 8b6053c928fe |
|
96 | new changesets 8b6053c928fe | |
95 | updating to branch default |
|
97 | updating to branch default | |
96 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
98 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
97 | $ hg verify -R copy-pull |
|
99 | $ hg verify -R copy-pull | |
98 | checking changesets |
|
100 | checking changesets | |
99 | checking manifests |
|
101 | checking manifests | |
100 | crosschecking files in changesets and manifests |
|
102 | crosschecking files in changesets and manifests | |
101 | checking files |
|
103 | checking files | |
102 | 4 files, 1 changesets, 4 total revisions |
|
104 | 4 files, 1 changesets, 4 total revisions | |
103 | $ cd test |
|
105 | $ cd test | |
104 | $ echo bar > bar |
|
106 | $ echo bar > bar | |
105 | $ hg commit -A -d '1 0' -m 2 |
|
107 | $ hg commit -A -d '1 0' -m 2 | |
106 | adding bar |
|
108 | adding bar | |
107 | $ cd .. |
|
109 | $ cd .. | |
108 |
|
110 | |||
109 | clone over http with --update |
|
111 | clone over http with --update | |
110 |
|
112 | |||
111 | $ hg clone http://localhost:$HGPORT1/ updated --update 0 |
|
113 | $ hg clone http://localhost:$HGPORT1/ updated --update 0 | |
112 | requesting all changes |
|
114 | requesting all changes | |
113 | adding changesets |
|
115 | adding changesets | |
114 | adding manifests |
|
116 | adding manifests | |
115 | adding file changes |
|
117 | adding file changes | |
116 | added 2 changesets with 5 changes to 5 files |
|
118 | added 2 changesets with 5 changes to 5 files | |
117 | new changesets 8b6053c928fe:5fed3813f7f5 |
|
119 | new changesets 8b6053c928fe:5fed3813f7f5 | |
118 | updating to branch default |
|
120 | updating to branch default | |
119 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
121 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
120 | $ hg log -r . -R updated |
|
122 | $ hg log -r . -R updated | |
121 | changeset: 0:8b6053c928fe |
|
123 | changeset: 0:8b6053c928fe | |
122 | user: test |
|
124 | user: test | |
123 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
125 | date: Thu Jan 01 00:00:00 1970 +0000 | |
124 | summary: 1 |
|
126 | summary: 1 | |
125 |
|
127 | |||
126 | $ rm -rf updated |
|
128 | $ rm -rf updated | |
127 |
|
129 | |||
128 | incoming via HTTP |
|
130 | incoming via HTTP | |
129 |
|
131 | |||
130 | $ hg clone http://localhost:$HGPORT1/ --rev 0 partial |
|
132 | $ hg clone http://localhost:$HGPORT1/ --rev 0 partial | |
131 | adding changesets |
|
133 | adding changesets | |
132 | adding manifests |
|
134 | adding manifests | |
133 | adding file changes |
|
135 | adding file changes | |
134 | added 1 changesets with 4 changes to 4 files |
|
136 | added 1 changesets with 4 changes to 4 files | |
135 | new changesets 8b6053c928fe |
|
137 | new changesets 8b6053c928fe | |
136 | updating to branch default |
|
138 | updating to branch default | |
137 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
139 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
138 | $ cd partial |
|
140 | $ cd partial | |
139 | $ touch LOCAL |
|
141 | $ touch LOCAL | |
140 | $ hg ci -qAm LOCAL |
|
142 | $ hg ci -qAm LOCAL | |
141 | $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n' |
|
143 | $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n' | |
142 | comparing with http://localhost:$HGPORT1/ |
|
144 | comparing with http://localhost:$HGPORT1/ | |
143 | searching for changes |
|
145 | searching for changes | |
144 | 2 |
|
146 | 2 | |
145 | $ cd .. |
|
147 | $ cd .. | |
146 |
|
148 | |||
147 | pull |
|
149 | pull | |
148 |
|
150 | |||
149 | $ cd copy-pull |
|
151 | $ cd copy-pull | |
150 | $ cat >> .hg/hgrc <<EOF |
|
152 | $ cat >> .hg/hgrc <<EOF | |
151 | > [hooks] |
|
153 | > [hooks] | |
152 | > changegroup = sh -c "printenv.py changegroup" |
|
154 | > changegroup = sh -c "printenv.py changegroup" | |
153 | > EOF |
|
155 | > EOF | |
154 | $ hg pull |
|
156 | $ hg pull | |
155 | pulling from http://localhost:$HGPORT1/ |
|
157 | pulling from http://localhost:$HGPORT1/ | |
156 | searching for changes |
|
158 | searching for changes | |
157 | adding changesets |
|
159 | adding changesets | |
158 | adding manifests |
|
160 | adding manifests | |
159 | adding file changes |
|
161 | adding file changes | |
160 | added 1 changesets with 1 changes to 1 files |
|
162 | added 1 changesets with 1 changes to 1 files | |
161 | new changesets 5fed3813f7f5 |
|
163 | new changesets 5fed3813f7f5 | |
162 | changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_NODE_LAST=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=http://localhost:$HGPORT1/ |
|
164 | changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_NODE_LAST=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=http://localhost:$HGPORT1/ | |
163 | (run 'hg update' to get a working copy) |
|
165 | (run 'hg update' to get a working copy) | |
164 | $ cd .. |
|
166 | $ cd .. | |
165 |
|
167 | |||
166 | clone from invalid URL |
|
168 | clone from invalid URL | |
167 |
|
169 | |||
168 | $ hg clone http://localhost:$HGPORT/bad |
|
170 | $ hg clone http://localhost:$HGPORT/bad | |
169 | abort: HTTP Error 404: Not Found |
|
171 | abort: HTTP Error 404: Not Found | |
170 | [255] |
|
172 | [255] | |
171 |
|
173 | |||
172 | test http authentication |
|
174 | test http authentication | |
173 | + use the same server to test server side streaming preference |
|
175 | + use the same server to test server side streaming preference | |
174 |
|
176 | |||
175 | $ cd test |
|
177 | $ cd test | |
176 | $ cat << EOT > userpass.py |
|
178 | $ cat << EOT > userpass.py | |
177 | > import base64 |
|
179 | > import base64 | |
178 | > from mercurial.hgweb import common |
|
180 | > from mercurial.hgweb import common | |
179 | > def perform_authentication(hgweb, req, op): |
|
181 | > def perform_authentication(hgweb, req, op): | |
180 | > auth = req.headers.get('Authorization') |
|
182 | > auth = req.headers.get('Authorization') | |
181 | > if not auth: |
|
183 | > if not auth: | |
182 | > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who', |
|
184 | > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who', | |
183 | > [('WWW-Authenticate', 'Basic Realm="mercurial"')]) |
|
185 | > [('WWW-Authenticate', 'Basic Realm="mercurial"')]) | |
184 | > if base64.b64decode(auth.split()[1]).split(b':', 1) != [b'user', |
|
186 | > if base64.b64decode(auth.split()[1]).split(b':', 1) != [b'user', | |
185 | > b'pass']: |
|
187 | > b'pass']: | |
186 | > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no') |
|
188 | > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no') | |
187 | > def extsetup(): |
|
189 | > def extsetup(): | |
188 | > common.permhooks.insert(0, perform_authentication) |
|
190 | > common.permhooks.insert(0, perform_authentication) | |
189 | > EOT |
|
191 | > EOT | |
190 | $ hg serve --config extensions.x=userpass.py -p $HGPORT2 -d --pid-file=pid \ |
|
192 | $ hg serve --config extensions.x=userpass.py -p $HGPORT2 -d --pid-file=pid \ | |
191 | > --config server.preferuncompressed=True \ |
|
193 | > --config server.preferuncompressed=True \ | |
192 | > --config web.push_ssl=False --config web.allow_push=* -A ../access.log |
|
194 | > --config web.push_ssl=False --config web.allow_push=* -A ../access.log | |
193 | $ cat pid >> $DAEMON_PIDS |
|
195 | $ cat pid >> $DAEMON_PIDS | |
194 |
|
196 | |||
195 | $ cat << EOF > get_pass.py |
|
197 | $ cat << EOF > get_pass.py | |
196 | > import getpass |
|
198 | > import getpass | |
197 | > def newgetpass(arg): |
|
199 | > def newgetpass(arg): | |
198 | > return "pass" |
|
200 | > return "pass" | |
199 | > getpass.getpass = newgetpass |
|
201 | > getpass.getpass = newgetpass | |
200 | > EOF |
|
202 | > EOF | |
201 |
|
203 | |||
202 | $ hg id http://localhost:$HGPORT2/ |
|
204 | $ hg id http://localhost:$HGPORT2/ | |
203 | abort: http authorization required for http://localhost:$HGPORT2/ |
|
205 | abort: http authorization required for http://localhost:$HGPORT2/ | |
204 | [255] |
|
206 | [255] | |
205 | $ hg id http://localhost:$HGPORT2/ |
|
207 | $ hg id http://localhost:$HGPORT2/ | |
206 | abort: http authorization required for http://localhost:$HGPORT2/ |
|
208 | abort: http authorization required for http://localhost:$HGPORT2/ | |
207 | [255] |
|
209 | [255] | |
208 | $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/ |
|
210 | $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/ | |
209 | http authorization required for http://localhost:$HGPORT2/ |
|
211 | http authorization required for http://localhost:$HGPORT2/ | |
210 | realm: mercurial |
|
212 | realm: mercurial | |
211 | user: user |
|
213 | user: user | |
212 | password: 5fed3813f7f5 |
|
214 | password: 5fed3813f7f5 | |
213 | $ hg id http://user:pass@localhost:$HGPORT2/ |
|
215 | $ hg id http://user:pass@localhost:$HGPORT2/ | |
214 | 5fed3813f7f5 |
|
216 | 5fed3813f7f5 | |
215 | $ echo '[auth]' >> .hg/hgrc |
|
217 | $ echo '[auth]' >> .hg/hgrc | |
216 | $ echo 'l.schemes=http' >> .hg/hgrc |
|
218 | $ echo 'l.schemes=http' >> .hg/hgrc | |
217 | $ echo 'l.prefix=lo' >> .hg/hgrc |
|
219 | $ echo 'l.prefix=lo' >> .hg/hgrc | |
218 | $ echo 'l.username=user' >> .hg/hgrc |
|
220 | $ echo 'l.username=user' >> .hg/hgrc | |
219 | $ echo 'l.password=pass' >> .hg/hgrc |
|
221 | $ echo 'l.password=pass' >> .hg/hgrc | |
220 | $ hg id http://localhost:$HGPORT2/ |
|
222 | $ hg id http://localhost:$HGPORT2/ | |
221 | 5fed3813f7f5 |
|
223 | 5fed3813f7f5 | |
222 | $ hg id http://localhost:$HGPORT2/ |
|
224 | $ hg id http://localhost:$HGPORT2/ | |
223 | 5fed3813f7f5 |
|
225 | 5fed3813f7f5 | |
224 | $ hg id http://user@localhost:$HGPORT2/ |
|
226 | $ hg id http://user@localhost:$HGPORT2/ | |
225 | 5fed3813f7f5 |
|
227 | 5fed3813f7f5 | |
|
228 | ||||
|
229 | #if no-reposimplestore | |||
226 | $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1 |
|
230 | $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1 | |
227 | streaming all changes |
|
231 | streaming all changes | |
228 | 7 files to transfer, 916 bytes of data |
|
232 | 7 files to transfer, 916 bytes of data | |
229 | transferred * bytes in * seconds (*/sec) (glob) |
|
233 | transferred * bytes in * seconds (*/sec) (glob) | |
230 | searching for changes |
|
234 | searching for changes | |
231 | no changes found |
|
235 | no changes found | |
232 | updating to branch default |
|
236 | updating to branch default | |
233 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
237 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
238 | #endif | |||
|
239 | ||||
234 | --pull should override server's preferuncompressed |
|
240 | --pull should override server's preferuncompressed | |
|
241 | ||||
235 | $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1 |
|
242 | $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1 | |
236 | requesting all changes |
|
243 | requesting all changes | |
237 | adding changesets |
|
244 | adding changesets | |
238 | adding manifests |
|
245 | adding manifests | |
239 | adding file changes |
|
246 | adding file changes | |
240 | added 2 changesets with 5 changes to 5 files |
|
247 | added 2 changesets with 5 changes to 5 files | |
241 | new changesets 8b6053c928fe:5fed3813f7f5 |
|
248 | new changesets 8b6053c928fe:5fed3813f7f5 | |
242 | updating to branch default |
|
249 | updating to branch default | |
243 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
250 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
244 |
|
251 | |||
245 | $ hg id http://user2@localhost:$HGPORT2/ |
|
252 | $ hg id http://user2@localhost:$HGPORT2/ | |
246 | abort: http authorization required for http://localhost:$HGPORT2/ |
|
253 | abort: http authorization required for http://localhost:$HGPORT2/ | |
247 | [255] |
|
254 | [255] | |
248 | $ hg id http://user:pass2@localhost:$HGPORT2/ |
|
255 | $ hg id http://user:pass2@localhost:$HGPORT2/ | |
249 | abort: HTTP Error 403: no |
|
256 | abort: HTTP Error 403: no | |
250 | [255] |
|
257 | [255] | |
251 |
|
258 | |||
252 | $ hg -R dest tag -r tip top |
|
259 | $ hg -R dest-pull tag -r tip top | |
253 | $ hg -R dest push http://user:pass@localhost:$HGPORT2/ |
|
260 | $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/ | |
254 | pushing to http://user:***@localhost:$HGPORT2/ |
|
261 | pushing to http://user:***@localhost:$HGPORT2/ | |
255 | searching for changes |
|
262 | searching for changes | |
256 | remote: adding changesets |
|
263 | remote: adding changesets | |
257 | remote: adding manifests |
|
264 | remote: adding manifests | |
258 | remote: adding file changes |
|
265 | remote: adding file changes | |
259 | remote: added 1 changesets with 1 changes to 1 files |
|
266 | remote: added 1 changesets with 1 changes to 1 files | |
260 | $ hg rollback -q |
|
267 | $ hg rollback -q | |
261 |
|
268 | |||
262 | $ sed 's/.*] "/"/' < ../access.log |
|
269 | $ sed 's/.*] "/"/' < ../access.log | |
263 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
270 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
264 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
271 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
265 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
272 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
266 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
273 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
267 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
274 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
268 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
275 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
269 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
276 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
270 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
277 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
271 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
278 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
272 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
279 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
273 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
280 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
274 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
281 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
275 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
282 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
276 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
283 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
277 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
284 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
278 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
285 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
279 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
286 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
280 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
287 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
281 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
288 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
282 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
289 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
283 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
290 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
284 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
291 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
285 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
292 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
286 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
293 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
287 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
294 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
288 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
295 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
289 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
296 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
290 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
297 | "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !) | |
291 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
298 | "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !) | |
292 | "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
299 | "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (no-reposimplestore !) | |
293 | "GET /?cmd=stream_out HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
300 | "GET /?cmd=stream_out HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (no-reposimplestore !) | |
294 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
301 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (no-reposimplestore !) | |
295 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D5fed3813f7f5e1824344fdc9cf8f63bb662c292d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
302 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D5fed3813f7f5e1824344fdc9cf8f63bb662c292d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (no-reposimplestore !) | |
296 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
303 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (no-reposimplestore !) | |
297 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
304 | "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !) | |
298 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
305 | "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !) | |
299 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
306 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (no-reposimplestore !) | |
300 | "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$ |
|
307 | "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$ | |
301 | "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
308 | "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
302 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
309 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
303 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
310 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
304 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
311 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
305 | "GET /?cmd=capabilities HTTP/1.1" 403 - |
|
312 | "GET /?cmd=capabilities HTTP/1.1" 403 - | |
306 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
313 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
307 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
314 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
308 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
315 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
309 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
316 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
310 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
317 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
311 | "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
318 | "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
312 | "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
319 | "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
313 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
320 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
314 | "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+5eb5abfefeea63c80dd7553bcc3783f37e0c5524* (glob) |
|
321 | "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+5eb5abfefeea63c80dd7553bcc3783f37e0c5524* (glob) | |
315 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
322 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
316 |
|
323 | |||
317 | $ cd .. |
|
324 | $ cd .. | |
318 |
|
325 | |||
319 | clone of serve with repo in root and unserved subrepo (issue2970) |
|
326 | clone of serve with repo in root and unserved subrepo (issue2970) | |
320 |
|
327 | |||
321 | $ hg --cwd test init sub |
|
328 | $ hg --cwd test init sub | |
322 | $ echo empty > test/sub/empty |
|
329 | $ echo empty > test/sub/empty | |
323 | $ hg --cwd test/sub add empty |
|
330 | $ hg --cwd test/sub add empty | |
324 | $ hg --cwd test/sub commit -qm 'add empty' |
|
331 | $ hg --cwd test/sub commit -qm 'add empty' | |
325 | $ hg --cwd test/sub tag -r 0 something |
|
332 | $ hg --cwd test/sub tag -r 0 something | |
326 | $ echo sub = sub > test/.hgsub |
|
333 | $ echo sub = sub > test/.hgsub | |
327 | $ hg --cwd test add .hgsub |
|
334 | $ hg --cwd test add .hgsub | |
328 | $ hg --cwd test commit -qm 'add subrepo' |
|
335 | $ hg --cwd test commit -qm 'add subrepo' | |
329 | $ hg clone http://localhost:$HGPORT noslash-clone |
|
336 | $ hg clone http://localhost:$HGPORT noslash-clone | |
330 | requesting all changes |
|
337 | requesting all changes | |
331 | adding changesets |
|
338 | adding changesets | |
332 | adding manifests |
|
339 | adding manifests | |
333 | adding file changes |
|
340 | adding file changes | |
334 | added 3 changesets with 7 changes to 7 files |
|
341 | added 3 changesets with 7 changes to 7 files | |
335 | new changesets 8b6053c928fe:56f9bc90cce6 |
|
342 | new changesets 8b6053c928fe:56f9bc90cce6 | |
336 | updating to branch default |
|
343 | updating to branch default | |
337 | abort: HTTP Error 404: Not Found |
|
344 | abort: HTTP Error 404: Not Found | |
338 | [255] |
|
345 | [255] | |
339 | $ hg clone http://localhost:$HGPORT/ slash-clone |
|
346 | $ hg clone http://localhost:$HGPORT/ slash-clone | |
340 | requesting all changes |
|
347 | requesting all changes | |
341 | adding changesets |
|
348 | adding changesets | |
342 | adding manifests |
|
349 | adding manifests | |
343 | adding file changes |
|
350 | adding file changes | |
344 | added 3 changesets with 7 changes to 7 files |
|
351 | added 3 changesets with 7 changes to 7 files | |
345 | new changesets 8b6053c928fe:56f9bc90cce6 |
|
352 | new changesets 8b6053c928fe:56f9bc90cce6 | |
346 | updating to branch default |
|
353 | updating to branch default | |
347 | abort: HTTP Error 404: Not Found |
|
354 | abort: HTTP Error 404: Not Found | |
348 | [255] |
|
355 | [255] | |
349 |
|
356 | |||
350 | check error log |
|
357 | check error log | |
351 |
|
358 | |||
352 | $ cat error.log |
|
359 | $ cat error.log | |
353 |
|
360 | |||
354 | Check error reporting while pulling/cloning |
|
361 | Check error reporting while pulling/cloning | |
355 |
|
362 | |||
356 | $ $RUNTESTDIR/killdaemons.py |
|
363 | $ $RUNTESTDIR/killdaemons.py | |
357 | $ hg serve -R test -p $HGPORT -d --pid-file=hg3.pid -E error.log --config extensions.crash=${TESTDIR}/crashgetbundler.py |
|
364 | $ hg serve -R test -p $HGPORT -d --pid-file=hg3.pid -E error.log --config extensions.crash=${TESTDIR}/crashgetbundler.py | |
358 | $ cat hg3.pid >> $DAEMON_PIDS |
|
365 | $ cat hg3.pid >> $DAEMON_PIDS | |
359 | $ hg clone http://localhost:$HGPORT/ abort-clone |
|
366 | $ hg clone http://localhost:$HGPORT/ abort-clone | |
360 | requesting all changes |
|
367 | requesting all changes | |
361 | abort: remote error: |
|
368 | abort: remote error: | |
362 | this is an exercise |
|
369 | this is an exercise | |
363 | [255] |
|
370 | [255] | |
364 | $ cat error.log |
|
371 | $ cat error.log | |
365 |
|
372 | |||
366 | disable pull-based clones |
|
373 | disable pull-based clones | |
367 |
|
374 | |||
368 | $ hg serve -R test -p $HGPORT1 -d --pid-file=hg4.pid -E error.log --config server.disablefullbundle=True |
|
375 | $ hg serve -R test -p $HGPORT1 -d --pid-file=hg4.pid -E error.log --config server.disablefullbundle=True | |
369 | $ cat hg4.pid >> $DAEMON_PIDS |
|
376 | $ cat hg4.pid >> $DAEMON_PIDS | |
370 | $ hg clone http://localhost:$HGPORT1/ disable-pull-clone |
|
377 | $ hg clone http://localhost:$HGPORT1/ disable-pull-clone | |
371 | requesting all changes |
|
378 | requesting all changes | |
372 | abort: remote error: |
|
379 | abort: remote error: | |
373 | server has pull-based clones disabled |
|
380 | server has pull-based clones disabled | |
374 | [255] |
|
381 | [255] | |
375 |
|
382 | |||
376 | ... but keep stream clones working |
|
383 | ... but keep stream clones working | |
377 |
|
384 | |||
378 | $ hg clone --stream --noupdate http://localhost:$HGPORT1/ test-stream-clone |
|
385 | $ hg clone --stream --noupdate http://localhost:$HGPORT1/ test-stream-clone | |
379 | streaming all changes |
|
386 | streaming all changes | |
380 | * files to transfer, * of data (glob) |
|
387 | * files to transfer, * of data (glob) | |
381 | transferred * in * seconds (* KB/sec) (glob) |
|
388 | transferred * in * seconds (* KB/sec) (glob) | |
382 | searching for changes |
|
389 | searching for changes | |
383 | no changes found |
|
390 | no changes found | |
384 |
|
391 | |||
385 | ... and also keep partial clones and pulls working |
|
392 | ... and also keep partial clones and pulls working | |
386 | $ hg clone http://localhost:$HGPORT1 --rev 0 test-partial-clone |
|
393 | $ hg clone http://localhost:$HGPORT1 --rev 0 test-partial-clone | |
387 | adding changesets |
|
394 | adding changesets | |
388 | adding manifests |
|
395 | adding manifests | |
389 | adding file changes |
|
396 | adding file changes | |
390 | added 1 changesets with 4 changes to 4 files |
|
397 | added 1 changesets with 4 changes to 4 files | |
391 | new changesets 8b6053c928fe |
|
398 | new changesets 8b6053c928fe | |
392 | updating to branch default |
|
399 | updating to branch default | |
393 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
400 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
394 | $ hg pull -R test-partial-clone |
|
401 | $ hg pull -R test-partial-clone | |
395 | pulling from http://localhost:$HGPORT1/ |
|
402 | pulling from http://localhost:$HGPORT1/ | |
396 | searching for changes |
|
403 | searching for changes | |
397 | adding changesets |
|
404 | adding changesets | |
398 | adding manifests |
|
405 | adding manifests | |
399 | adding file changes |
|
406 | adding file changes | |
400 | added 2 changesets with 3 changes to 3 files |
|
407 | added 2 changesets with 3 changes to 3 files | |
401 | new changesets 5fed3813f7f5:56f9bc90cce6 |
|
408 | new changesets 5fed3813f7f5:56f9bc90cce6 | |
402 | (run 'hg update' to get a working copy) |
|
409 | (run 'hg update' to get a working copy) | |
403 |
|
410 | |||
404 | $ cat error.log |
|
411 | $ cat error.log |
@@ -1,555 +1,561 | |||||
1 | #require killdaemons serve |
|
1 | #require killdaemons serve | |
2 |
|
2 | |||
3 | $ hg init test |
|
3 | $ hg init test | |
4 | $ cd test |
|
4 | $ cd test | |
5 | $ echo foo>foo |
|
5 | $ echo foo>foo | |
6 | $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg |
|
6 | $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg | |
7 | $ echo foo>foo.d/foo |
|
7 | $ echo foo>foo.d/foo | |
8 | $ echo bar>foo.d/bAr.hg.d/BaR |
|
8 | $ echo bar>foo.d/bAr.hg.d/BaR | |
9 | $ echo bar>foo.d/baR.d.hg/bAR |
|
9 | $ echo bar>foo.d/baR.d.hg/bAR | |
10 | $ hg commit -A -m 1 |
|
10 | $ hg commit -A -m 1 | |
11 | adding foo |
|
11 | adding foo | |
12 | adding foo.d/bAr.hg.d/BaR |
|
12 | adding foo.d/bAr.hg.d/BaR | |
13 | adding foo.d/baR.d.hg/bAR |
|
13 | adding foo.d/baR.d.hg/bAR | |
14 | adding foo.d/foo |
|
14 | adding foo.d/foo | |
15 | $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log |
|
15 | $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log | |
16 | $ hg serve --config server.uncompressed=False -p $HGPORT1 -d --pid-file=../hg2.pid |
|
16 | $ hg serve --config server.uncompressed=False -p $HGPORT1 -d --pid-file=../hg2.pid | |
17 |
|
17 | |||
18 | Test server address cannot be reused |
|
18 | Test server address cannot be reused | |
19 |
|
19 | |||
20 | $ hg serve -p $HGPORT1 2>&1 |
|
20 | $ hg serve -p $HGPORT1 2>&1 | |
21 | abort: cannot start server at 'localhost:$HGPORT1': $EADDRINUSE$ |
|
21 | abort: cannot start server at 'localhost:$HGPORT1': $EADDRINUSE$ | |
22 | [255] |
|
22 | [255] | |
23 |
|
23 | |||
24 | $ cd .. |
|
24 | $ cd .. | |
25 | $ cat hg1.pid hg2.pid >> $DAEMON_PIDS |
|
25 | $ cat hg1.pid hg2.pid >> $DAEMON_PIDS | |
26 |
|
26 | |||
27 | clone via stream |
|
27 | clone via stream | |
28 |
|
28 | |||
|
29 | #if no-reposimplestore | |||
29 | $ hg clone --stream http://localhost:$HGPORT/ copy 2>&1 |
|
30 | $ hg clone --stream http://localhost:$HGPORT/ copy 2>&1 | |
30 | streaming all changes |
|
31 | streaming all changes | |
31 | 6 files to transfer, 606 bytes of data |
|
32 | 6 files to transfer, 606 bytes of data | |
32 | transferred * bytes in * seconds (*/sec) (glob) |
|
33 | transferred * bytes in * seconds (*/sec) (glob) | |
33 | searching for changes |
|
34 | searching for changes | |
34 | no changes found |
|
35 | no changes found | |
35 | updating to branch default |
|
36 | updating to branch default | |
36 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
37 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
37 | $ hg verify -R copy |
|
38 | $ hg verify -R copy | |
38 | checking changesets |
|
39 | checking changesets | |
39 | checking manifests |
|
40 | checking manifests | |
40 | crosschecking files in changesets and manifests |
|
41 | crosschecking files in changesets and manifests | |
41 | checking files |
|
42 | checking files | |
42 | 4 files, 1 changesets, 4 total revisions |
|
43 | 4 files, 1 changesets, 4 total revisions | |
|
44 | #endif | |||
43 |
|
45 | |||
44 | try to clone via stream, should use pull instead |
|
46 | try to clone via stream, should use pull instead | |
45 |
|
47 | |||
46 | $ hg clone --stream http://localhost:$HGPORT1/ copy2 |
|
48 | $ hg clone --stream http://localhost:$HGPORT1/ copy2 | |
47 | warning: stream clone requested but server has them disabled |
|
49 | warning: stream clone requested but server has them disabled | |
48 | requesting all changes |
|
50 | requesting all changes | |
49 | adding changesets |
|
51 | adding changesets | |
50 | adding manifests |
|
52 | adding manifests | |
51 | adding file changes |
|
53 | adding file changes | |
52 | added 1 changesets with 4 changes to 4 files |
|
54 | added 1 changesets with 4 changes to 4 files | |
53 | new changesets 8b6053c928fe |
|
55 | new changesets 8b6053c928fe | |
54 | updating to branch default |
|
56 | updating to branch default | |
55 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
57 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
56 |
|
58 | |||
57 | try to clone via stream but missing requirements, so should use pull instead |
|
59 | try to clone via stream but missing requirements, so should use pull instead | |
58 |
|
60 | |||
59 | $ cat > $TESTTMP/removesupportedformat.py << EOF |
|
61 | $ cat > $TESTTMP/removesupportedformat.py << EOF | |
60 | > from mercurial import localrepo |
|
62 | > from mercurial import localrepo | |
61 | > def extsetup(ui): |
|
63 | > def extsetup(ui): | |
62 | > localrepo.localrepository.supportedformats.remove('generaldelta') |
|
64 | > localrepo.localrepository.supportedformats.remove('generaldelta') | |
63 | > EOF |
|
65 | > EOF | |
64 |
|
66 | |||
65 | $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --stream http://localhost:$HGPORT/ copy3 |
|
67 | $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --stream http://localhost:$HGPORT/ copy3 | |
66 | warning: stream clone requested but client is missing requirements: generaldelta |
|
68 | warning: stream clone requested but client is missing requirements: generaldelta | |
67 | (see https://www.mercurial-scm.org/wiki/MissingRequirement for more information) |
|
69 | (see https://www.mercurial-scm.org/wiki/MissingRequirement for more information) | |
68 | requesting all changes |
|
70 | requesting all changes | |
69 | adding changesets |
|
71 | adding changesets | |
70 | adding manifests |
|
72 | adding manifests | |
71 | adding file changes |
|
73 | adding file changes | |
72 | added 1 changesets with 4 changes to 4 files |
|
74 | added 1 changesets with 4 changes to 4 files | |
73 | new changesets 8b6053c928fe |
|
75 | new changesets 8b6053c928fe | |
74 | updating to branch default |
|
76 | updating to branch default | |
75 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
77 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
76 |
|
78 | |||
77 | clone via pull |
|
79 | clone via pull | |
78 |
|
80 | |||
79 | $ hg clone http://localhost:$HGPORT1/ copy-pull |
|
81 | $ hg clone http://localhost:$HGPORT1/ copy-pull | |
80 | requesting all changes |
|
82 | requesting all changes | |
81 | adding changesets |
|
83 | adding changesets | |
82 | adding manifests |
|
84 | adding manifests | |
83 | adding file changes |
|
85 | adding file changes | |
84 | added 1 changesets with 4 changes to 4 files |
|
86 | added 1 changesets with 4 changes to 4 files | |
85 | new changesets 8b6053c928fe |
|
87 | new changesets 8b6053c928fe | |
86 | updating to branch default |
|
88 | updating to branch default | |
87 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
89 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
88 | $ hg verify -R copy-pull |
|
90 | $ hg verify -R copy-pull | |
89 | checking changesets |
|
91 | checking changesets | |
90 | checking manifests |
|
92 | checking manifests | |
91 | crosschecking files in changesets and manifests |
|
93 | crosschecking files in changesets and manifests | |
92 | checking files |
|
94 | checking files | |
93 | 4 files, 1 changesets, 4 total revisions |
|
95 | 4 files, 1 changesets, 4 total revisions | |
94 | $ cd test |
|
96 | $ cd test | |
95 | $ echo bar > bar |
|
97 | $ echo bar > bar | |
96 | $ hg commit -A -d '1 0' -m 2 |
|
98 | $ hg commit -A -d '1 0' -m 2 | |
97 | adding bar |
|
99 | adding bar | |
98 | $ cd .. |
|
100 | $ cd .. | |
99 |
|
101 | |||
100 | clone over http with --update |
|
102 | clone over http with --update | |
101 |
|
103 | |||
102 | $ hg clone http://localhost:$HGPORT1/ updated --update 0 |
|
104 | $ hg clone http://localhost:$HGPORT1/ updated --update 0 | |
103 | requesting all changes |
|
105 | requesting all changes | |
104 | adding changesets |
|
106 | adding changesets | |
105 | adding manifests |
|
107 | adding manifests | |
106 | adding file changes |
|
108 | adding file changes | |
107 | added 2 changesets with 5 changes to 5 files |
|
109 | added 2 changesets with 5 changes to 5 files | |
108 | new changesets 8b6053c928fe:5fed3813f7f5 |
|
110 | new changesets 8b6053c928fe:5fed3813f7f5 | |
109 | updating to branch default |
|
111 | updating to branch default | |
110 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
112 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
111 | $ hg log -r . -R updated |
|
113 | $ hg log -r . -R updated | |
112 | changeset: 0:8b6053c928fe |
|
114 | changeset: 0:8b6053c928fe | |
113 | user: test |
|
115 | user: test | |
114 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
116 | date: Thu Jan 01 00:00:00 1970 +0000 | |
115 | summary: 1 |
|
117 | summary: 1 | |
116 |
|
118 | |||
117 | $ rm -rf updated |
|
119 | $ rm -rf updated | |
118 |
|
120 | |||
119 | incoming via HTTP |
|
121 | incoming via HTTP | |
120 |
|
122 | |||
121 | $ hg clone http://localhost:$HGPORT1/ --rev 0 partial |
|
123 | $ hg clone http://localhost:$HGPORT1/ --rev 0 partial | |
122 | adding changesets |
|
124 | adding changesets | |
123 | adding manifests |
|
125 | adding manifests | |
124 | adding file changes |
|
126 | adding file changes | |
125 | added 1 changesets with 4 changes to 4 files |
|
127 | added 1 changesets with 4 changes to 4 files | |
126 | new changesets 8b6053c928fe |
|
128 | new changesets 8b6053c928fe | |
127 | updating to branch default |
|
129 | updating to branch default | |
128 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
130 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
129 | $ cd partial |
|
131 | $ cd partial | |
130 | $ touch LOCAL |
|
132 | $ touch LOCAL | |
131 | $ hg ci -qAm LOCAL |
|
133 | $ hg ci -qAm LOCAL | |
132 | $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n' |
|
134 | $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n' | |
133 | comparing with http://localhost:$HGPORT1/ |
|
135 | comparing with http://localhost:$HGPORT1/ | |
134 | searching for changes |
|
136 | searching for changes | |
135 | 2 |
|
137 | 2 | |
136 | $ cd .. |
|
138 | $ cd .. | |
137 |
|
139 | |||
138 | pull |
|
140 | pull | |
139 |
|
141 | |||
140 | $ cd copy-pull |
|
142 | $ cd copy-pull | |
141 | $ cat >> .hg/hgrc <<EOF |
|
143 | $ cat >> .hg/hgrc <<EOF | |
142 | > [hooks] |
|
144 | > [hooks] | |
143 | > changegroup = sh -c "printenv.py changegroup" |
|
145 | > changegroup = sh -c "printenv.py changegroup" | |
144 | > EOF |
|
146 | > EOF | |
145 | $ hg pull |
|
147 | $ hg pull | |
146 | pulling from http://localhost:$HGPORT1/ |
|
148 | pulling from http://localhost:$HGPORT1/ | |
147 | searching for changes |
|
149 | searching for changes | |
148 | adding changesets |
|
150 | adding changesets | |
149 | adding manifests |
|
151 | adding manifests | |
150 | adding file changes |
|
152 | adding file changes | |
151 | added 1 changesets with 1 changes to 1 files |
|
153 | added 1 changesets with 1 changes to 1 files | |
152 | new changesets 5fed3813f7f5 |
|
154 | new changesets 5fed3813f7f5 | |
153 | changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_NODE_LAST=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=http://localhost:$HGPORT1/ |
|
155 | changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_NODE_LAST=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=http://localhost:$HGPORT1/ | |
154 | (run 'hg update' to get a working copy) |
|
156 | (run 'hg update' to get a working copy) | |
155 | $ cd .. |
|
157 | $ cd .. | |
156 |
|
158 | |||
157 | clone from invalid URL |
|
159 | clone from invalid URL | |
158 |
|
160 | |||
159 | $ hg clone http://localhost:$HGPORT/bad |
|
161 | $ hg clone http://localhost:$HGPORT/bad | |
160 | abort: HTTP Error 404: Not Found |
|
162 | abort: HTTP Error 404: Not Found | |
161 | [255] |
|
163 | [255] | |
162 |
|
164 | |||
163 | test http authentication |
|
165 | test http authentication | |
164 | + use the same server to test server side streaming preference |
|
166 | + use the same server to test server side streaming preference | |
165 |
|
167 | |||
166 | $ cd test |
|
168 | $ cd test | |
167 | $ cat << EOT > userpass.py |
|
169 | $ cat << EOT > userpass.py | |
168 | > import base64 |
|
170 | > import base64 | |
169 | > from mercurial.hgweb import common |
|
171 | > from mercurial.hgweb import common | |
170 | > def perform_authentication(hgweb, req, op): |
|
172 | > def perform_authentication(hgweb, req, op): | |
171 | > auth = req.headers.get('Authorization') |
|
173 | > auth = req.headers.get('Authorization') | |
172 | > if not auth: |
|
174 | > if not auth: | |
173 | > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who', |
|
175 | > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who', | |
174 | > [('WWW-Authenticate', 'Basic Realm="mercurial"')]) |
|
176 | > [('WWW-Authenticate', 'Basic Realm="mercurial"')]) | |
175 | > if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']: |
|
177 | > if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']: | |
176 | > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no') |
|
178 | > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no') | |
177 | > def extsetup(): |
|
179 | > def extsetup(): | |
178 | > common.permhooks.insert(0, perform_authentication) |
|
180 | > common.permhooks.insert(0, perform_authentication) | |
179 | > EOT |
|
181 | > EOT | |
180 | $ hg serve --config extensions.x=userpass.py -p $HGPORT2 -d --pid-file=pid \ |
|
182 | $ hg serve --config extensions.x=userpass.py -p $HGPORT2 -d --pid-file=pid \ | |
181 | > --config server.preferuncompressed=True \ |
|
183 | > --config server.preferuncompressed=True \ | |
182 | > --config web.push_ssl=False --config web.allow_push=* -A ../access.log |
|
184 | > --config web.push_ssl=False --config web.allow_push=* -A ../access.log | |
183 | $ cat pid >> $DAEMON_PIDS |
|
185 | $ cat pid >> $DAEMON_PIDS | |
184 |
|
186 | |||
185 | $ cat << EOF > get_pass.py |
|
187 | $ cat << EOF > get_pass.py | |
186 | > import getpass |
|
188 | > import getpass | |
187 | > def newgetpass(arg): |
|
189 | > def newgetpass(arg): | |
188 | > return "pass" |
|
190 | > return "pass" | |
189 | > getpass.getpass = newgetpass |
|
191 | > getpass.getpass = newgetpass | |
190 | > EOF |
|
192 | > EOF | |
191 |
|
193 | |||
192 | $ hg id http://localhost:$HGPORT2/ |
|
194 | $ hg id http://localhost:$HGPORT2/ | |
193 | abort: http authorization required for http://localhost:$HGPORT2/ |
|
195 | abort: http authorization required for http://localhost:$HGPORT2/ | |
194 | [255] |
|
196 | [255] | |
195 | $ hg id http://localhost:$HGPORT2/ |
|
197 | $ hg id http://localhost:$HGPORT2/ | |
196 | abort: http authorization required for http://localhost:$HGPORT2/ |
|
198 | abort: http authorization required for http://localhost:$HGPORT2/ | |
197 | [255] |
|
199 | [255] | |
198 | $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/ |
|
200 | $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/ | |
199 | http authorization required for http://localhost:$HGPORT2/ |
|
201 | http authorization required for http://localhost:$HGPORT2/ | |
200 | realm: mercurial |
|
202 | realm: mercurial | |
201 | user: user |
|
203 | user: user | |
202 | password: 5fed3813f7f5 |
|
204 | password: 5fed3813f7f5 | |
203 | $ hg id http://user:pass@localhost:$HGPORT2/ |
|
205 | $ hg id http://user:pass@localhost:$HGPORT2/ | |
204 | 5fed3813f7f5 |
|
206 | 5fed3813f7f5 | |
205 | $ echo '[auth]' >> .hg/hgrc |
|
207 | $ echo '[auth]' >> .hg/hgrc | |
206 | $ echo 'l.schemes=http' >> .hg/hgrc |
|
208 | $ echo 'l.schemes=http' >> .hg/hgrc | |
207 | $ echo 'l.prefix=lo' >> .hg/hgrc |
|
209 | $ echo 'l.prefix=lo' >> .hg/hgrc | |
208 | $ echo 'l.username=user' >> .hg/hgrc |
|
210 | $ echo 'l.username=user' >> .hg/hgrc | |
209 | $ echo 'l.password=pass' >> .hg/hgrc |
|
211 | $ echo 'l.password=pass' >> .hg/hgrc | |
210 | $ hg id http://localhost:$HGPORT2/ |
|
212 | $ hg id http://localhost:$HGPORT2/ | |
211 | 5fed3813f7f5 |
|
213 | 5fed3813f7f5 | |
212 | $ hg id http://localhost:$HGPORT2/ |
|
214 | $ hg id http://localhost:$HGPORT2/ | |
213 | 5fed3813f7f5 |
|
215 | 5fed3813f7f5 | |
214 | $ hg id http://user@localhost:$HGPORT2/ |
|
216 | $ hg id http://user@localhost:$HGPORT2/ | |
215 | 5fed3813f7f5 |
|
217 | 5fed3813f7f5 | |
|
218 | ||||
|
219 | #if no-reposimplestore | |||
216 | $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1 |
|
220 | $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1 | |
217 | streaming all changes |
|
221 | streaming all changes | |
218 | 7 files to transfer, 916 bytes of data |
|
222 | 7 files to transfer, 916 bytes of data | |
219 | transferred * bytes in * seconds (*/sec) (glob) |
|
223 | transferred * bytes in * seconds (*/sec) (glob) | |
220 | searching for changes |
|
224 | searching for changes | |
221 | no changes found |
|
225 | no changes found | |
222 | updating to branch default |
|
226 | updating to branch default | |
223 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
227 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
228 | #endif | |||
|
229 | ||||
224 | --pull should override server's preferuncompressed |
|
230 | --pull should override server's preferuncompressed | |
225 | $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1 |
|
231 | $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1 | |
226 | requesting all changes |
|
232 | requesting all changes | |
227 | adding changesets |
|
233 | adding changesets | |
228 | adding manifests |
|
234 | adding manifests | |
229 | adding file changes |
|
235 | adding file changes | |
230 | added 2 changesets with 5 changes to 5 files |
|
236 | added 2 changesets with 5 changes to 5 files | |
231 | new changesets 8b6053c928fe:5fed3813f7f5 |
|
237 | new changesets 8b6053c928fe:5fed3813f7f5 | |
232 | updating to branch default |
|
238 | updating to branch default | |
233 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
239 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
234 |
|
240 | |||
235 | $ hg id http://user2@localhost:$HGPORT2/ |
|
241 | $ hg id http://user2@localhost:$HGPORT2/ | |
236 | abort: http authorization required for http://localhost:$HGPORT2/ |
|
242 | abort: http authorization required for http://localhost:$HGPORT2/ | |
237 | [255] |
|
243 | [255] | |
238 | $ hg id http://user:pass2@localhost:$HGPORT2/ |
|
244 | $ hg id http://user:pass2@localhost:$HGPORT2/ | |
239 | abort: HTTP Error 403: no |
|
245 | abort: HTTP Error 403: no | |
240 | [255] |
|
246 | [255] | |
241 |
|
247 | |||
242 | $ hg -R dest tag -r tip top |
|
248 | $ hg -R dest-pull tag -r tip top | |
243 | $ hg -R dest push http://user:pass@localhost:$HGPORT2/ |
|
249 | $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/ | |
244 | pushing to http://user:***@localhost:$HGPORT2/ |
|
250 | pushing to http://user:***@localhost:$HGPORT2/ | |
245 | searching for changes |
|
251 | searching for changes | |
246 | remote: adding changesets |
|
252 | remote: adding changesets | |
247 | remote: adding manifests |
|
253 | remote: adding manifests | |
248 | remote: adding file changes |
|
254 | remote: adding file changes | |
249 | remote: added 1 changesets with 1 changes to 1 files |
|
255 | remote: added 1 changesets with 1 changes to 1 files | |
250 | $ hg rollback -q |
|
256 | $ hg rollback -q | |
251 | $ hg -R dest push http://user:pass@localhost:$HGPORT2/ --debug --config devel.debug.peer-request=yes |
|
257 | $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/ --debug --config devel.debug.peer-request=yes | |
252 | pushing to http://user:***@localhost:$HGPORT2/ |
|
258 | pushing to http://user:***@localhost:$HGPORT2/ | |
253 | using http://localhost:$HGPORT2/ |
|
259 | using http://localhost:$HGPORT2/ | |
254 | http auth: user user, password **** |
|
260 | http auth: user user, password **** | |
255 | sending capabilities command |
|
261 | sending capabilities command | |
256 | devel-peer-request: GET http://localhost:$HGPORT2/?cmd=capabilities |
|
262 | devel-peer-request: GET http://localhost:$HGPORT2/?cmd=capabilities | |
257 | http auth: user user, password **** |
|
263 | http auth: user user, password **** | |
258 | devel-peer-request: finished in *.???? seconds (200) (glob) |
|
264 | devel-peer-request: finished in *.???? seconds (200) (glob) | |
259 | query 1; heads |
|
265 | query 1; heads | |
260 | devel-peer-request: batched-content |
|
266 | devel-peer-request: batched-content | |
261 | devel-peer-request: - heads (0 arguments) |
|
267 | devel-peer-request: - heads (0 arguments) | |
262 | devel-peer-request: - known (1 arguments) |
|
268 | devel-peer-request: - known (1 arguments) | |
263 | sending batch command |
|
269 | sending batch command | |
264 | devel-peer-request: GET http://localhost:$HGPORT2/?cmd=batch |
|
270 | devel-peer-request: GET http://localhost:$HGPORT2/?cmd=batch | |
265 | devel-peer-request: Vary X-HgArg-1,X-HgProto-1 |
|
271 | devel-peer-request: Vary X-HgArg-1,X-HgProto-1 | |
266 | devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
272 | devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
267 | devel-peer-request: 68 bytes of commands arguments in headers |
|
273 | devel-peer-request: 68 bytes of commands arguments in headers | |
268 | devel-peer-request: finished in *.???? seconds (200) (glob) |
|
274 | devel-peer-request: finished in *.???? seconds (200) (glob) | |
269 | searching for changes |
|
275 | searching for changes | |
270 | all remote heads known locally |
|
276 | all remote heads known locally | |
271 | preparing listkeys for "phases" |
|
277 | preparing listkeys for "phases" | |
272 | sending listkeys command |
|
278 | sending listkeys command | |
273 | devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys |
|
279 | devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys | |
274 | devel-peer-request: Vary X-HgArg-1,X-HgProto-1 |
|
280 | devel-peer-request: Vary X-HgArg-1,X-HgProto-1 | |
275 | devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
281 | devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
276 | devel-peer-request: 16 bytes of commands arguments in headers |
|
282 | devel-peer-request: 16 bytes of commands arguments in headers | |
277 | devel-peer-request: finished in *.???? seconds (200) (glob) |
|
283 | devel-peer-request: finished in *.???? seconds (200) (glob) | |
278 | received listkey for "phases": 58 bytes |
|
284 | received listkey for "phases": 58 bytes | |
279 | checking for updated bookmarks |
|
285 | checking for updated bookmarks | |
280 | preparing listkeys for "bookmarks" |
|
286 | preparing listkeys for "bookmarks" | |
281 | sending listkeys command |
|
287 | sending listkeys command | |
282 | devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys |
|
288 | devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys | |
283 | devel-peer-request: Vary X-HgArg-1,X-HgProto-1 |
|
289 | devel-peer-request: Vary X-HgArg-1,X-HgProto-1 | |
284 | devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
290 | devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
285 | devel-peer-request: 19 bytes of commands arguments in headers |
|
291 | devel-peer-request: 19 bytes of commands arguments in headers | |
286 | devel-peer-request: finished in *.???? seconds (200) (glob) |
|
292 | devel-peer-request: finished in *.???? seconds (200) (glob) | |
287 | received listkey for "bookmarks": 0 bytes |
|
293 | received listkey for "bookmarks": 0 bytes | |
288 | sending branchmap command |
|
294 | sending branchmap command | |
289 | devel-peer-request: GET http://localhost:$HGPORT2/?cmd=branchmap |
|
295 | devel-peer-request: GET http://localhost:$HGPORT2/?cmd=branchmap | |
290 | devel-peer-request: Vary X-HgProto-1 |
|
296 | devel-peer-request: Vary X-HgProto-1 | |
291 | devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
297 | devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
292 | devel-peer-request: finished in *.???? seconds (200) (glob) |
|
298 | devel-peer-request: finished in *.???? seconds (200) (glob) | |
293 | sending branchmap command |
|
299 | sending branchmap command | |
294 | devel-peer-request: GET http://localhost:$HGPORT2/?cmd=branchmap |
|
300 | devel-peer-request: GET http://localhost:$HGPORT2/?cmd=branchmap | |
295 | devel-peer-request: Vary X-HgProto-1 |
|
301 | devel-peer-request: Vary X-HgProto-1 | |
296 | devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
302 | devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
297 | devel-peer-request: finished in *.???? seconds (200) (glob) |
|
303 | devel-peer-request: finished in *.???? seconds (200) (glob) | |
298 | preparing listkeys for "bookmarks" |
|
304 | preparing listkeys for "bookmarks" | |
299 | sending listkeys command |
|
305 | sending listkeys command | |
300 | devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys |
|
306 | devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys | |
301 | devel-peer-request: Vary X-HgArg-1,X-HgProto-1 |
|
307 | devel-peer-request: Vary X-HgArg-1,X-HgProto-1 | |
302 | devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
308 | devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
303 | devel-peer-request: 19 bytes of commands arguments in headers |
|
309 | devel-peer-request: 19 bytes of commands arguments in headers | |
304 | devel-peer-request: finished in *.???? seconds (200) (glob) |
|
310 | devel-peer-request: finished in *.???? seconds (200) (glob) | |
305 | received listkey for "bookmarks": 0 bytes |
|
311 | received listkey for "bookmarks": 0 bytes | |
306 | 1 changesets found |
|
312 | 1 changesets found | |
307 | list of changesets: |
|
313 | list of changesets: | |
308 | 7f4e523d01f2cc3765ac8934da3d14db775ff872 |
|
314 | 7f4e523d01f2cc3765ac8934da3d14db775ff872 | |
309 | bundle2-output-bundle: "HG20", 5 parts total |
|
315 | bundle2-output-bundle: "HG20", 5 parts total | |
310 | bundle2-output-part: "replycaps" 205 bytes payload |
|
316 | bundle2-output-part: "replycaps" 205 bytes payload | |
311 | bundle2-output-part: "check:phases" 24 bytes payload |
|
317 | bundle2-output-part: "check:phases" 24 bytes payload | |
312 | bundle2-output-part: "check:heads" streamed payload |
|
318 | bundle2-output-part: "check:heads" streamed payload | |
313 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
319 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
314 | bundle2-output-part: "phase-heads" 24 bytes payload |
|
320 | bundle2-output-part: "phase-heads" 24 bytes payload | |
315 | sending unbundle command |
|
321 | sending unbundle command | |
316 | sending 1013 bytes |
|
322 | sending 1013 bytes | |
317 | devel-peer-request: POST http://localhost:$HGPORT2/?cmd=unbundle |
|
323 | devel-peer-request: POST http://localhost:$HGPORT2/?cmd=unbundle | |
318 | devel-peer-request: Content-length 1013 |
|
324 | devel-peer-request: Content-length 1013 | |
319 | devel-peer-request: Content-type application/mercurial-0.1 |
|
325 | devel-peer-request: Content-type application/mercurial-0.1 | |
320 | devel-peer-request: Vary X-HgArg-1,X-HgProto-1 |
|
326 | devel-peer-request: Vary X-HgArg-1,X-HgProto-1 | |
321 | devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
327 | devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
322 | devel-peer-request: 16 bytes of commands arguments in headers |
|
328 | devel-peer-request: 16 bytes of commands arguments in headers | |
323 | devel-peer-request: 1013 bytes of data |
|
329 | devel-peer-request: 1013 bytes of data | |
324 | devel-peer-request: finished in *.???? seconds (200) (glob) |
|
330 | devel-peer-request: finished in *.???? seconds (200) (glob) | |
325 | bundle2-input-bundle: no-transaction |
|
331 | bundle2-input-bundle: no-transaction | |
326 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
332 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | |
327 | bundle2-input-part: "output" (advisory) (params: 0 advisory) supported |
|
333 | bundle2-input-part: "output" (advisory) (params: 0 advisory) supported | |
328 | bundle2-input-part: total payload size 100 |
|
334 | bundle2-input-part: total payload size 100 | |
329 | remote: adding changesets |
|
335 | remote: adding changesets | |
330 | remote: adding manifests |
|
336 | remote: adding manifests | |
331 | remote: adding file changes |
|
337 | remote: adding file changes | |
332 | remote: added 1 changesets with 1 changes to 1 files |
|
338 | remote: added 1 changesets with 1 changes to 1 files | |
333 | bundle2-input-part: "output" (advisory) supported |
|
339 | bundle2-input-part: "output" (advisory) supported | |
334 | bundle2-input-bundle: 2 parts total |
|
340 | bundle2-input-bundle: 2 parts total | |
335 | preparing listkeys for "phases" |
|
341 | preparing listkeys for "phases" | |
336 | sending listkeys command |
|
342 | sending listkeys command | |
337 | devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys |
|
343 | devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys | |
338 | devel-peer-request: Vary X-HgArg-1,X-HgProto-1 |
|
344 | devel-peer-request: Vary X-HgArg-1,X-HgProto-1 | |
339 | devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
345 | devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
340 | devel-peer-request: 16 bytes of commands arguments in headers |
|
346 | devel-peer-request: 16 bytes of commands arguments in headers | |
341 | devel-peer-request: finished in *.???? seconds (200) (glob) |
|
347 | devel-peer-request: finished in *.???? seconds (200) (glob) | |
342 | received listkey for "phases": 15 bytes |
|
348 | received listkey for "phases": 15 bytes | |
343 | $ hg rollback -q |
|
349 | $ hg rollback -q | |
344 |
|
350 | |||
345 | $ sed 's/.*] "/"/' < ../access.log |
|
351 | $ sed 's/.*] "/"/' < ../access.log | |
346 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
352 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
347 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
353 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
348 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
354 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
349 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
355 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
350 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
356 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
351 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
357 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
352 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
358 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
353 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
359 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
354 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
360 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
355 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
361 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
356 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
362 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
357 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
363 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
358 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
364 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
359 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
365 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
360 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
366 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
361 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
367 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
362 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
368 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
363 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
369 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
364 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
370 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
365 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
371 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
366 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
372 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
367 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
373 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
368 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
374 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
369 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
375 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
370 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
376 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
371 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
377 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
372 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
378 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
373 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
379 | "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !) | |
374 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
380 | "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !) | |
375 | "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
381 | "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (no-reposimplestore !) | |
376 | "GET /?cmd=stream_out HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
382 | "GET /?cmd=stream_out HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (no-reposimplestore !) | |
377 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D5fed3813f7f5e1824344fdc9cf8f63bb662c292d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
383 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D5fed3813f7f5e1824344fdc9cf8f63bb662c292d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (no-reposimplestore !) | |
378 | "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
384 | "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (no-reposimplestore !) | |
379 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
385 | "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !) | |
380 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
386 | "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !) | |
381 | "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$ |
|
387 | "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$ | |
382 | "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
388 | "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
383 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
389 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
384 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
390 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
385 | "GET /?cmd=capabilities HTTP/1.1" 403 - |
|
391 | "GET /?cmd=capabilities HTTP/1.1" 403 - | |
386 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
392 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
387 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
393 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
388 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
394 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
389 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
395 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
390 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
396 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
391 | "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
397 | "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
392 | "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
398 | "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
393 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
399 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
394 | "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365* (glob) |
|
400 | "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365* (glob) | |
395 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
401 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
396 | "GET /?cmd=capabilities HTTP/1.1" 401 - |
|
402 | "GET /?cmd=capabilities HTTP/1.1" 401 - | |
397 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
403 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
398 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
404 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
399 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
405 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
400 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
406 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
401 | "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
407 | "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
402 | "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
408 | "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
403 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
409 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
404 | "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
410 | "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
405 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
411 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ | |
406 |
|
412 | |||
407 | $ cd .. |
|
413 | $ cd .. | |
408 |
|
414 | |||
409 | clone of serve with repo in root and unserved subrepo (issue2970) |
|
415 | clone of serve with repo in root and unserved subrepo (issue2970) | |
410 |
|
416 | |||
411 | $ hg --cwd test init sub |
|
417 | $ hg --cwd test init sub | |
412 | $ echo empty > test/sub/empty |
|
418 | $ echo empty > test/sub/empty | |
413 | $ hg --cwd test/sub add empty |
|
419 | $ hg --cwd test/sub add empty | |
414 | $ hg --cwd test/sub commit -qm 'add empty' |
|
420 | $ hg --cwd test/sub commit -qm 'add empty' | |
415 | $ hg --cwd test/sub tag -r 0 something |
|
421 | $ hg --cwd test/sub tag -r 0 something | |
416 | $ echo sub = sub > test/.hgsub |
|
422 | $ echo sub = sub > test/.hgsub | |
417 | $ hg --cwd test add .hgsub |
|
423 | $ hg --cwd test add .hgsub | |
418 | $ hg --cwd test commit -qm 'add subrepo' |
|
424 | $ hg --cwd test commit -qm 'add subrepo' | |
419 | $ hg clone http://localhost:$HGPORT noslash-clone |
|
425 | $ hg clone http://localhost:$HGPORT noslash-clone | |
420 | requesting all changes |
|
426 | requesting all changes | |
421 | adding changesets |
|
427 | adding changesets | |
422 | adding manifests |
|
428 | adding manifests | |
423 | adding file changes |
|
429 | adding file changes | |
424 | added 3 changesets with 7 changes to 7 files |
|
430 | added 3 changesets with 7 changes to 7 files | |
425 | new changesets 8b6053c928fe:56f9bc90cce6 |
|
431 | new changesets 8b6053c928fe:56f9bc90cce6 | |
426 | updating to branch default |
|
432 | updating to branch default | |
427 | abort: HTTP Error 404: Not Found |
|
433 | abort: HTTP Error 404: Not Found | |
428 | [255] |
|
434 | [255] | |
429 | $ hg clone http://localhost:$HGPORT/ slash-clone |
|
435 | $ hg clone http://localhost:$HGPORT/ slash-clone | |
430 | requesting all changes |
|
436 | requesting all changes | |
431 | adding changesets |
|
437 | adding changesets | |
432 | adding manifests |
|
438 | adding manifests | |
433 | adding file changes |
|
439 | adding file changes | |
434 | added 3 changesets with 7 changes to 7 files |
|
440 | added 3 changesets with 7 changes to 7 files | |
435 | new changesets 8b6053c928fe:56f9bc90cce6 |
|
441 | new changesets 8b6053c928fe:56f9bc90cce6 | |
436 | updating to branch default |
|
442 | updating to branch default | |
437 | abort: HTTP Error 404: Not Found |
|
443 | abort: HTTP Error 404: Not Found | |
438 | [255] |
|
444 | [255] | |
439 |
|
445 | |||
440 | check error log |
|
446 | check error log | |
441 |
|
447 | |||
442 | $ cat error.log |
|
448 | $ cat error.log | |
443 |
|
449 | |||
444 | check abort error reporting while pulling/cloning |
|
450 | check abort error reporting while pulling/cloning | |
445 |
|
451 | |||
446 | $ $RUNTESTDIR/killdaemons.py |
|
452 | $ $RUNTESTDIR/killdaemons.py | |
447 | $ hg serve -R test -p $HGPORT -d --pid-file=hg3.pid -E error.log --config extensions.crash=${TESTDIR}/crashgetbundler.py |
|
453 | $ hg serve -R test -p $HGPORT -d --pid-file=hg3.pid -E error.log --config extensions.crash=${TESTDIR}/crashgetbundler.py | |
448 | $ cat hg3.pid >> $DAEMON_PIDS |
|
454 | $ cat hg3.pid >> $DAEMON_PIDS | |
449 | $ hg clone http://localhost:$HGPORT/ abort-clone |
|
455 | $ hg clone http://localhost:$HGPORT/ abort-clone | |
450 | requesting all changes |
|
456 | requesting all changes | |
451 | remote: abort: this is an exercise |
|
457 | remote: abort: this is an exercise | |
452 | abort: pull failed on remote |
|
458 | abort: pull failed on remote | |
453 | [255] |
|
459 | [255] | |
454 | $ cat error.log |
|
460 | $ cat error.log | |
455 |
|
461 | |||
456 | disable pull-based clones |
|
462 | disable pull-based clones | |
457 |
|
463 | |||
458 | $ hg serve -R test -p $HGPORT1 -d --pid-file=hg4.pid -E error.log --config server.disablefullbundle=True |
|
464 | $ hg serve -R test -p $HGPORT1 -d --pid-file=hg4.pid -E error.log --config server.disablefullbundle=True | |
459 | $ cat hg4.pid >> $DAEMON_PIDS |
|
465 | $ cat hg4.pid >> $DAEMON_PIDS | |
460 | $ hg clone http://localhost:$HGPORT1/ disable-pull-clone |
|
466 | $ hg clone http://localhost:$HGPORT1/ disable-pull-clone | |
461 | requesting all changes |
|
467 | requesting all changes | |
462 | remote: abort: server has pull-based clones disabled |
|
468 | remote: abort: server has pull-based clones disabled | |
463 | abort: pull failed on remote |
|
469 | abort: pull failed on remote | |
464 | (remove --pull if specified or upgrade Mercurial) |
|
470 | (remove --pull if specified or upgrade Mercurial) | |
465 | [255] |
|
471 | [255] | |
466 |
|
472 | |||
467 | ... but keep stream clones working |
|
473 | ... but keep stream clones working | |
468 |
|
474 | |||
469 | $ hg clone --stream --noupdate http://localhost:$HGPORT1/ test-stream-clone |
|
475 | $ hg clone --stream --noupdate http://localhost:$HGPORT1/ test-stream-clone | |
470 | streaming all changes |
|
476 | streaming all changes | |
471 | * files to transfer, * of data (glob) |
|
477 | * files to transfer, * of data (glob) | |
472 | transferred * in * seconds (*/sec) (glob) |
|
478 | transferred * in * seconds (*/sec) (glob) | |
473 | searching for changes |
|
479 | searching for changes | |
474 | no changes found |
|
480 | no changes found | |
475 | $ cat error.log |
|
481 | $ cat error.log | |
476 |
|
482 | |||
477 | ... and also keep partial clones and pulls working |
|
483 | ... and also keep partial clones and pulls working | |
478 | $ hg clone http://localhost:$HGPORT1 --rev 0 test-partial-clone |
|
484 | $ hg clone http://localhost:$HGPORT1 --rev 0 test-partial-clone | |
479 | adding changesets |
|
485 | adding changesets | |
480 | adding manifests |
|
486 | adding manifests | |
481 | adding file changes |
|
487 | adding file changes | |
482 | added 1 changesets with 4 changes to 4 files |
|
488 | added 1 changesets with 4 changes to 4 files | |
483 | new changesets 8b6053c928fe |
|
489 | new changesets 8b6053c928fe | |
484 | updating to branch default |
|
490 | updating to branch default | |
485 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
491 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
486 | $ hg pull -R test-partial-clone |
|
492 | $ hg pull -R test-partial-clone | |
487 | pulling from http://localhost:$HGPORT1/ |
|
493 | pulling from http://localhost:$HGPORT1/ | |
488 | searching for changes |
|
494 | searching for changes | |
489 | adding changesets |
|
495 | adding changesets | |
490 | adding manifests |
|
496 | adding manifests | |
491 | adding file changes |
|
497 | adding file changes | |
492 | added 2 changesets with 3 changes to 3 files |
|
498 | added 2 changesets with 3 changes to 3 files | |
493 | new changesets 5fed3813f7f5:56f9bc90cce6 |
|
499 | new changesets 5fed3813f7f5:56f9bc90cce6 | |
494 | (run 'hg update' to get a working copy) |
|
500 | (run 'hg update' to get a working copy) | |
495 |
|
501 | |||
496 | corrupt cookies file should yield a warning |
|
502 | corrupt cookies file should yield a warning | |
497 |
|
503 | |||
498 | $ cat > $TESTTMP/cookies.txt << EOF |
|
504 | $ cat > $TESTTMP/cookies.txt << EOF | |
499 | > bad format |
|
505 | > bad format | |
500 | > EOF |
|
506 | > EOF | |
501 |
|
507 | |||
502 | $ hg --config auth.cookiefile=$TESTTMP/cookies.txt id http://localhost:$HGPORT/ |
|
508 | $ hg --config auth.cookiefile=$TESTTMP/cookies.txt id http://localhost:$HGPORT/ | |
503 | (error loading cookie file $TESTTMP/cookies.txt: '*/cookies.txt' does not look like a Netscape format cookies file; continuing without cookies) (glob) |
|
509 | (error loading cookie file $TESTTMP/cookies.txt: '*/cookies.txt' does not look like a Netscape format cookies file; continuing without cookies) (glob) | |
504 | 56f9bc90cce6 |
|
510 | 56f9bc90cce6 | |
505 |
|
511 | |||
506 | $ killdaemons.py |
|
512 | $ killdaemons.py | |
507 |
|
513 | |||
508 | Create dummy authentication handler that looks for cookies. It doesn't do anything |
|
514 | Create dummy authentication handler that looks for cookies. It doesn't do anything | |
509 | useful. It just raises an HTTP 500 with details about the Cookie request header. |
|
515 | useful. It just raises an HTTP 500 with details about the Cookie request header. | |
510 | We raise HTTP 500 because its message is printed in the abort message. |
|
516 | We raise HTTP 500 because its message is printed in the abort message. | |
511 |
|
517 | |||
512 | $ cat > cookieauth.py << EOF |
|
518 | $ cat > cookieauth.py << EOF | |
513 | > from mercurial import util |
|
519 | > from mercurial import util | |
514 | > from mercurial.hgweb import common |
|
520 | > from mercurial.hgweb import common | |
515 | > def perform_authentication(hgweb, req, op): |
|
521 | > def perform_authentication(hgweb, req, op): | |
516 | > cookie = req.headers.get('Cookie') |
|
522 | > cookie = req.headers.get('Cookie') | |
517 | > if not cookie: |
|
523 | > if not cookie: | |
518 | > raise common.ErrorResponse(common.HTTP_SERVER_ERROR, 'no-cookie') |
|
524 | > raise common.ErrorResponse(common.HTTP_SERVER_ERROR, 'no-cookie') | |
519 | > raise common.ErrorResponse(common.HTTP_SERVER_ERROR, 'Cookie: %s' % cookie) |
|
525 | > raise common.ErrorResponse(common.HTTP_SERVER_ERROR, 'Cookie: %s' % cookie) | |
520 | > def extsetup(): |
|
526 | > def extsetup(): | |
521 | > common.permhooks.insert(0, perform_authentication) |
|
527 | > common.permhooks.insert(0, perform_authentication) | |
522 | > EOF |
|
528 | > EOF | |
523 |
|
529 | |||
524 | $ hg serve --config extensions.cookieauth=cookieauth.py -R test -p $HGPORT -d --pid-file=pid |
|
530 | $ hg serve --config extensions.cookieauth=cookieauth.py -R test -p $HGPORT -d --pid-file=pid | |
525 | $ cat pid > $DAEMON_PIDS |
|
531 | $ cat pid > $DAEMON_PIDS | |
526 |
|
532 | |||
527 | Request without cookie sent should fail due to lack of cookie |
|
533 | Request without cookie sent should fail due to lack of cookie | |
528 |
|
534 | |||
529 | $ hg id http://localhost:$HGPORT |
|
535 | $ hg id http://localhost:$HGPORT | |
530 | abort: HTTP Error 500: no-cookie |
|
536 | abort: HTTP Error 500: no-cookie | |
531 | [255] |
|
537 | [255] | |
532 |
|
538 | |||
533 | Populate a cookies file |
|
539 | Populate a cookies file | |
534 |
|
540 | |||
535 | $ cat > cookies.txt << EOF |
|
541 | $ cat > cookies.txt << EOF | |
536 | > # HTTP Cookie File |
|
542 | > # HTTP Cookie File | |
537 | > # Expiration is 2030-01-01 at midnight |
|
543 | > # Expiration is 2030-01-01 at midnight | |
538 | > .example.com TRUE / FALSE 1893456000 hgkey examplevalue |
|
544 | > .example.com TRUE / FALSE 1893456000 hgkey examplevalue | |
539 | > EOF |
|
545 | > EOF | |
540 |
|
546 | |||
541 | Should not send a cookie for another domain |
|
547 | Should not send a cookie for another domain | |
542 |
|
548 | |||
543 | $ hg --config auth.cookiefile=cookies.txt id http://localhost:$HGPORT/ |
|
549 | $ hg --config auth.cookiefile=cookies.txt id http://localhost:$HGPORT/ | |
544 | abort: HTTP Error 500: no-cookie |
|
550 | abort: HTTP Error 500: no-cookie | |
545 | [255] |
|
551 | [255] | |
546 |
|
552 | |||
547 | Add a cookie entry for our test server and verify it is sent |
|
553 | Add a cookie entry for our test server and verify it is sent | |
548 |
|
554 | |||
549 | $ cat >> cookies.txt << EOF |
|
555 | $ cat >> cookies.txt << EOF | |
550 | > localhost.local FALSE / FALSE 1893456000 hgkey localhostvalue |
|
556 | > localhost.local FALSE / FALSE 1893456000 hgkey localhostvalue | |
551 | > EOF |
|
557 | > EOF | |
552 |
|
558 | |||
553 | $ hg --config auth.cookiefile=cookies.txt id http://localhost:$HGPORT/ |
|
559 | $ hg --config auth.cookiefile=cookies.txt id http://localhost:$HGPORT/ | |
554 | abort: HTTP Error 500: Cookie: hgkey=localhostvalue |
|
560 | abort: HTTP Error 500: Cookie: hgkey=localhostvalue | |
555 | [255] |
|
561 | [255] |
@@ -1,575 +1,579 | |||||
1 | This test is a duplicate of 'test-http.t' feel free to factor out |
|
1 | This test is a duplicate of 'test-http.t' feel free to factor out | |
2 | parts that are not bundle1/bundle2 specific. |
|
2 | parts that are not bundle1/bundle2 specific. | |
3 |
|
3 | |||
4 | #testcases sshv1 sshv2 |
|
4 | #testcases sshv1 sshv2 | |
5 |
|
5 | |||
6 | #if sshv2 |
|
6 | #if sshv2 | |
7 | $ cat >> $HGRCPATH << EOF |
|
7 | $ cat >> $HGRCPATH << EOF | |
8 | > [experimental] |
|
8 | > [experimental] | |
9 | > sshpeer.advertise-v2 = true |
|
9 | > sshpeer.advertise-v2 = true | |
10 | > sshserver.support-v2 = true |
|
10 | > sshserver.support-v2 = true | |
11 | > EOF |
|
11 | > EOF | |
12 | #endif |
|
12 | #endif | |
13 |
|
13 | |||
14 | $ cat << EOF >> $HGRCPATH |
|
14 | $ cat << EOF >> $HGRCPATH | |
15 | > [devel] |
|
15 | > [devel] | |
16 | > # This test is dedicated to interaction through old bundle |
|
16 | > # This test is dedicated to interaction through old bundle | |
17 | > legacy.exchange = bundle1 |
|
17 | > legacy.exchange = bundle1 | |
18 | > EOF |
|
18 | > EOF | |
19 |
|
19 | |||
20 |
|
20 | |||
21 | This test tries to exercise the ssh functionality with a dummy script |
|
21 | This test tries to exercise the ssh functionality with a dummy script | |
22 |
|
22 | |||
23 | creating 'remote' repo |
|
23 | creating 'remote' repo | |
24 |
|
24 | |||
25 | $ hg init remote |
|
25 | $ hg init remote | |
26 | $ cd remote |
|
26 | $ cd remote | |
27 | $ echo this > foo |
|
27 | $ echo this > foo | |
28 | $ echo this > fooO |
|
28 | $ echo this > fooO | |
29 | $ hg ci -A -m "init" foo fooO |
|
29 | $ hg ci -A -m "init" foo fooO | |
30 |
|
30 | |||
31 | insert a closed branch (issue4428) |
|
31 | insert a closed branch (issue4428) | |
32 |
|
32 | |||
33 | $ hg up null |
|
33 | $ hg up null | |
34 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
34 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
35 | $ hg branch closed |
|
35 | $ hg branch closed | |
36 | marked working directory as branch closed |
|
36 | marked working directory as branch closed | |
37 | (branches are permanent and global, did you want a bookmark?) |
|
37 | (branches are permanent and global, did you want a bookmark?) | |
38 | $ hg ci -mc0 |
|
38 | $ hg ci -mc0 | |
39 | $ hg ci --close-branch -mc1 |
|
39 | $ hg ci --close-branch -mc1 | |
40 | $ hg up -q default |
|
40 | $ hg up -q default | |
41 |
|
41 | |||
42 | configure for serving |
|
42 | configure for serving | |
43 |
|
43 | |||
44 | $ cat <<EOF > .hg/hgrc |
|
44 | $ cat <<EOF > .hg/hgrc | |
45 | > [server] |
|
45 | > [server] | |
46 | > uncompressed = True |
|
46 | > uncompressed = True | |
47 | > |
|
47 | > | |
48 | > [hooks] |
|
48 | > [hooks] | |
49 | > changegroup = sh -c "printenv.py changegroup-in-remote 0 ../dummylog" |
|
49 | > changegroup = sh -c "printenv.py changegroup-in-remote 0 ../dummylog" | |
50 | > EOF |
|
50 | > EOF | |
51 | $ cd .. |
|
51 | $ cd .. | |
52 |
|
52 | |||
53 | repo not found error |
|
53 | repo not found error | |
54 |
|
54 | |||
55 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local |
|
55 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local | |
56 | remote: abort: repository nonexistent not found! |
|
56 | remote: abort: repository nonexistent not found! | |
57 | abort: no suitable response from remote hg! |
|
57 | abort: no suitable response from remote hg! | |
58 | [255] |
|
58 | [255] | |
59 |
|
59 | |||
60 | non-existent absolute path |
|
60 | non-existent absolute path | |
61 |
|
61 | |||
62 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy//`pwd`/nonexistent local |
|
62 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy//`pwd`/nonexistent local | |
63 | remote: abort: repository /$TESTTMP/nonexistent not found! |
|
63 | remote: abort: repository /$TESTTMP/nonexistent not found! | |
64 | abort: no suitable response from remote hg! |
|
64 | abort: no suitable response from remote hg! | |
65 | [255] |
|
65 | [255] | |
66 |
|
66 | |||
67 | clone remote via stream |
|
67 | clone remote via stream | |
68 |
|
68 | |||
|
69 | #if no-reposimplestore | |||
|
70 | ||||
69 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/remote local-stream |
|
71 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/remote local-stream | |
70 | streaming all changes |
|
72 | streaming all changes | |
71 | 4 files to transfer, 602 bytes of data |
|
73 | 4 files to transfer, 602 bytes of data | |
72 | transferred 602 bytes in * seconds (*) (glob) |
|
74 | transferred 602 bytes in * seconds (*) (glob) | |
73 | searching for changes |
|
75 | searching for changes | |
74 | no changes found |
|
76 | no changes found | |
75 | updating to branch default |
|
77 | updating to branch default | |
76 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
78 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
77 | $ cd local-stream |
|
79 | $ cd local-stream | |
78 | $ hg verify |
|
80 | $ hg verify | |
79 | checking changesets |
|
81 | checking changesets | |
80 | checking manifests |
|
82 | checking manifests | |
81 | crosschecking files in changesets and manifests |
|
83 | crosschecking files in changesets and manifests | |
82 | checking files |
|
84 | checking files | |
83 | 2 files, 3 changesets, 2 total revisions |
|
85 | 2 files, 3 changesets, 2 total revisions | |
84 | $ hg branches |
|
86 | $ hg branches | |
85 | default 0:1160648e36ce |
|
87 | default 0:1160648e36ce | |
86 | $ cd .. |
|
88 | $ cd .. | |
87 |
|
89 | |||
88 | clone bookmarks via stream |
|
90 | clone bookmarks via stream | |
89 |
|
91 | |||
90 | $ hg -R local-stream book mybook |
|
92 | $ hg -R local-stream book mybook | |
91 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/local-stream stream2 |
|
93 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/local-stream stream2 | |
92 | streaming all changes |
|
94 | streaming all changes | |
93 | 4 files to transfer, 602 bytes of data |
|
95 | 4 files to transfer, 602 bytes of data | |
94 | transferred 602 bytes in * seconds (*) (glob) |
|
96 | transferred 602 bytes in * seconds (*) (glob) | |
95 | searching for changes |
|
97 | searching for changes | |
96 | no changes found |
|
98 | no changes found | |
97 | updating to branch default |
|
99 | updating to branch default | |
98 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
100 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
99 | $ cd stream2 |
|
101 | $ cd stream2 | |
100 | $ hg book |
|
102 | $ hg book | |
101 | mybook 0:1160648e36ce |
|
103 | mybook 0:1160648e36ce | |
102 | $ cd .. |
|
104 | $ cd .. | |
103 | $ rm -rf local-stream stream2 |
|
105 | $ rm -rf local-stream stream2 | |
104 |
|
106 | |||
|
107 | #endif | |||
|
108 | ||||
105 | clone remote via pull |
|
109 | clone remote via pull | |
106 |
|
110 | |||
107 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local |
|
111 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local | |
108 | requesting all changes |
|
112 | requesting all changes | |
109 | adding changesets |
|
113 | adding changesets | |
110 | adding manifests |
|
114 | adding manifests | |
111 | adding file changes |
|
115 | adding file changes | |
112 | added 3 changesets with 2 changes to 2 files |
|
116 | added 3 changesets with 2 changes to 2 files | |
113 | new changesets 1160648e36ce:ad076bfb429d |
|
117 | new changesets 1160648e36ce:ad076bfb429d | |
114 | updating to branch default |
|
118 | updating to branch default | |
115 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
119 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
116 |
|
120 | |||
117 | verify |
|
121 | verify | |
118 |
|
122 | |||
119 | $ cd local |
|
123 | $ cd local | |
120 | $ hg verify |
|
124 | $ hg verify | |
121 | checking changesets |
|
125 | checking changesets | |
122 | checking manifests |
|
126 | checking manifests | |
123 | crosschecking files in changesets and manifests |
|
127 | crosschecking files in changesets and manifests | |
124 | checking files |
|
128 | checking files | |
125 | 2 files, 3 changesets, 2 total revisions |
|
129 | 2 files, 3 changesets, 2 total revisions | |
126 | $ cat >> .hg/hgrc <<EOF |
|
130 | $ cat >> .hg/hgrc <<EOF | |
127 | > [hooks] |
|
131 | > [hooks] | |
128 | > changegroup = sh -c "printenv.py changegroup-in-local 0 ../dummylog" |
|
132 | > changegroup = sh -c "printenv.py changegroup-in-local 0 ../dummylog" | |
129 | > EOF |
|
133 | > EOF | |
130 |
|
134 | |||
131 | empty default pull |
|
135 | empty default pull | |
132 |
|
136 | |||
133 | $ hg paths |
|
137 | $ hg paths | |
134 | default = ssh://user@dummy/remote |
|
138 | default = ssh://user@dummy/remote | |
135 | $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" |
|
139 | $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" | |
136 | pulling from ssh://user@dummy/remote |
|
140 | pulling from ssh://user@dummy/remote | |
137 | searching for changes |
|
141 | searching for changes | |
138 | no changes found |
|
142 | no changes found | |
139 |
|
143 | |||
140 | pull from wrong ssh URL |
|
144 | pull from wrong ssh URL | |
141 |
|
145 | |||
142 | $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/doesnotexist |
|
146 | $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/doesnotexist | |
143 | pulling from ssh://user@dummy/doesnotexist |
|
147 | pulling from ssh://user@dummy/doesnotexist | |
144 | remote: abort: repository doesnotexist not found! |
|
148 | remote: abort: repository doesnotexist not found! | |
145 | abort: no suitable response from remote hg! |
|
149 | abort: no suitable response from remote hg! | |
146 | [255] |
|
150 | [255] | |
147 |
|
151 | |||
148 | local change |
|
152 | local change | |
149 |
|
153 | |||
150 | $ echo bleah > foo |
|
154 | $ echo bleah > foo | |
151 | $ hg ci -m "add" |
|
155 | $ hg ci -m "add" | |
152 |
|
156 | |||
153 | updating rc |
|
157 | updating rc | |
154 |
|
158 | |||
155 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc |
|
159 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc | |
156 | $ echo "[ui]" >> .hg/hgrc |
|
160 | $ echo "[ui]" >> .hg/hgrc | |
157 | $ echo "ssh = \"$PYTHON\" \"$TESTDIR/dummyssh\"" >> .hg/hgrc |
|
161 | $ echo "ssh = \"$PYTHON\" \"$TESTDIR/dummyssh\"" >> .hg/hgrc | |
158 |
|
162 | |||
159 | find outgoing |
|
163 | find outgoing | |
160 |
|
164 | |||
161 | $ hg out ssh://user@dummy/remote |
|
165 | $ hg out ssh://user@dummy/remote | |
162 | comparing with ssh://user@dummy/remote |
|
166 | comparing with ssh://user@dummy/remote | |
163 | searching for changes |
|
167 | searching for changes | |
164 | changeset: 3:a28a9d1a809c |
|
168 | changeset: 3:a28a9d1a809c | |
165 | tag: tip |
|
169 | tag: tip | |
166 | parent: 0:1160648e36ce |
|
170 | parent: 0:1160648e36ce | |
167 | user: test |
|
171 | user: test | |
168 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
172 | date: Thu Jan 01 00:00:00 1970 +0000 | |
169 | summary: add |
|
173 | summary: add | |
170 |
|
174 | |||
171 |
|
175 | |||
172 | find incoming on the remote side |
|
176 | find incoming on the remote side | |
173 |
|
177 | |||
174 | $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/local |
|
178 | $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/local | |
175 | comparing with ssh://user@dummy/local |
|
179 | comparing with ssh://user@dummy/local | |
176 | searching for changes |
|
180 | searching for changes | |
177 | changeset: 3:a28a9d1a809c |
|
181 | changeset: 3:a28a9d1a809c | |
178 | tag: tip |
|
182 | tag: tip | |
179 | parent: 0:1160648e36ce |
|
183 | parent: 0:1160648e36ce | |
180 | user: test |
|
184 | user: test | |
181 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
185 | date: Thu Jan 01 00:00:00 1970 +0000 | |
182 | summary: add |
|
186 | summary: add | |
183 |
|
187 | |||
184 |
|
188 | |||
185 | find incoming on the remote side (using absolute path) |
|
189 | find incoming on the remote side (using absolute path) | |
186 |
|
190 | |||
187 | $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/`pwd`" |
|
191 | $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/`pwd`" | |
188 | comparing with ssh://user@dummy/$TESTTMP/local |
|
192 | comparing with ssh://user@dummy/$TESTTMP/local | |
189 | searching for changes |
|
193 | searching for changes | |
190 | changeset: 3:a28a9d1a809c |
|
194 | changeset: 3:a28a9d1a809c | |
191 | tag: tip |
|
195 | tag: tip | |
192 | parent: 0:1160648e36ce |
|
196 | parent: 0:1160648e36ce | |
193 | user: test |
|
197 | user: test | |
194 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
198 | date: Thu Jan 01 00:00:00 1970 +0000 | |
195 | summary: add |
|
199 | summary: add | |
196 |
|
200 | |||
197 |
|
201 | |||
198 | push |
|
202 | push | |
199 |
|
203 | |||
200 | $ hg push |
|
204 | $ hg push | |
201 | pushing to ssh://user@dummy/remote |
|
205 | pushing to ssh://user@dummy/remote | |
202 | searching for changes |
|
206 | searching for changes | |
203 | remote: adding changesets |
|
207 | remote: adding changesets | |
204 | remote: adding manifests |
|
208 | remote: adding manifests | |
205 | remote: adding file changes |
|
209 | remote: adding file changes | |
206 | remote: added 1 changesets with 1 changes to 1 files |
|
210 | remote: added 1 changesets with 1 changes to 1 files | |
207 | $ cd ../remote |
|
211 | $ cd ../remote | |
208 |
|
212 | |||
209 | check remote tip |
|
213 | check remote tip | |
210 |
|
214 | |||
211 | $ hg tip |
|
215 | $ hg tip | |
212 | changeset: 3:a28a9d1a809c |
|
216 | changeset: 3:a28a9d1a809c | |
213 | tag: tip |
|
217 | tag: tip | |
214 | parent: 0:1160648e36ce |
|
218 | parent: 0:1160648e36ce | |
215 | user: test |
|
219 | user: test | |
216 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
220 | date: Thu Jan 01 00:00:00 1970 +0000 | |
217 | summary: add |
|
221 | summary: add | |
218 |
|
222 | |||
219 | $ hg verify |
|
223 | $ hg verify | |
220 | checking changesets |
|
224 | checking changesets | |
221 | checking manifests |
|
225 | checking manifests | |
222 | crosschecking files in changesets and manifests |
|
226 | crosschecking files in changesets and manifests | |
223 | checking files |
|
227 | checking files | |
224 | 2 files, 4 changesets, 3 total revisions |
|
228 | 2 files, 4 changesets, 3 total revisions | |
225 | $ hg cat -r tip foo |
|
229 | $ hg cat -r tip foo | |
226 | bleah |
|
230 | bleah | |
227 | $ echo z > z |
|
231 | $ echo z > z | |
228 | $ hg ci -A -m z z |
|
232 | $ hg ci -A -m z z | |
229 | created new head |
|
233 | created new head | |
230 |
|
234 | |||
231 | test pushkeys and bookmarks |
|
235 | test pushkeys and bookmarks | |
232 |
|
236 | |||
233 | $ cd ../local |
|
237 | $ cd ../local | |
234 | $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote namespaces |
|
238 | $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote namespaces | |
235 | bookmarks |
|
239 | bookmarks | |
236 | namespaces |
|
240 | namespaces | |
237 | phases |
|
241 | phases | |
238 | $ hg book foo -r 0 |
|
242 | $ hg book foo -r 0 | |
239 | $ hg out -B |
|
243 | $ hg out -B | |
240 | comparing with ssh://user@dummy/remote |
|
244 | comparing with ssh://user@dummy/remote | |
241 | searching for changed bookmarks |
|
245 | searching for changed bookmarks | |
242 | foo 1160648e36ce |
|
246 | foo 1160648e36ce | |
243 | $ hg push -B foo |
|
247 | $ hg push -B foo | |
244 | pushing to ssh://user@dummy/remote |
|
248 | pushing to ssh://user@dummy/remote | |
245 | searching for changes |
|
249 | searching for changes | |
246 | no changes found |
|
250 | no changes found | |
247 | exporting bookmark foo |
|
251 | exporting bookmark foo | |
248 | [1] |
|
252 | [1] | |
249 | $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote bookmarks |
|
253 | $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote bookmarks | |
250 | foo 1160648e36cec0054048a7edc4110c6f84fde594 |
|
254 | foo 1160648e36cec0054048a7edc4110c6f84fde594 | |
251 | $ hg book -f foo |
|
255 | $ hg book -f foo | |
252 | $ hg push --traceback |
|
256 | $ hg push --traceback | |
253 | pushing to ssh://user@dummy/remote |
|
257 | pushing to ssh://user@dummy/remote | |
254 | searching for changes |
|
258 | searching for changes | |
255 | no changes found |
|
259 | no changes found | |
256 | updating bookmark foo |
|
260 | updating bookmark foo | |
257 | [1] |
|
261 | [1] | |
258 | $ hg book -d foo |
|
262 | $ hg book -d foo | |
259 | $ hg in -B |
|
263 | $ hg in -B | |
260 | comparing with ssh://user@dummy/remote |
|
264 | comparing with ssh://user@dummy/remote | |
261 | searching for changed bookmarks |
|
265 | searching for changed bookmarks | |
262 | foo a28a9d1a809c |
|
266 | foo a28a9d1a809c | |
263 | $ hg book -f -r 0 foo |
|
267 | $ hg book -f -r 0 foo | |
264 | $ hg pull -B foo |
|
268 | $ hg pull -B foo | |
265 | pulling from ssh://user@dummy/remote |
|
269 | pulling from ssh://user@dummy/remote | |
266 | no changes found |
|
270 | no changes found | |
267 | updating bookmark foo |
|
271 | updating bookmark foo | |
268 | $ hg book -d foo |
|
272 | $ hg book -d foo | |
269 | $ hg push -B foo |
|
273 | $ hg push -B foo | |
270 | pushing to ssh://user@dummy/remote |
|
274 | pushing to ssh://user@dummy/remote | |
271 | searching for changes |
|
275 | searching for changes | |
272 | no changes found |
|
276 | no changes found | |
273 | deleting remote bookmark foo |
|
277 | deleting remote bookmark foo | |
274 | [1] |
|
278 | [1] | |
275 |
|
279 | |||
276 | a bad, evil hook that prints to stdout |
|
280 | a bad, evil hook that prints to stdout | |
277 |
|
281 | |||
278 | $ cat <<EOF > $TESTTMP/badhook |
|
282 | $ cat <<EOF > $TESTTMP/badhook | |
279 | > import sys |
|
283 | > import sys | |
280 | > sys.stdout.write("KABOOM\n") |
|
284 | > sys.stdout.write("KABOOM\n") | |
281 | > EOF |
|
285 | > EOF | |
282 |
|
286 | |||
283 | $ echo '[hooks]' >> ../remote/.hg/hgrc |
|
287 | $ echo '[hooks]' >> ../remote/.hg/hgrc | |
284 | $ echo "changegroup.stdout = \"$PYTHON\" $TESTTMP/badhook" >> ../remote/.hg/hgrc |
|
288 | $ echo "changegroup.stdout = \"$PYTHON\" $TESTTMP/badhook" >> ../remote/.hg/hgrc | |
285 | $ echo r > r |
|
289 | $ echo r > r | |
286 | $ hg ci -A -m z r |
|
290 | $ hg ci -A -m z r | |
287 |
|
291 | |||
288 | push should succeed even though it has an unexpected response |
|
292 | push should succeed even though it has an unexpected response | |
289 |
|
293 | |||
290 | $ hg push |
|
294 | $ hg push | |
291 | pushing to ssh://user@dummy/remote |
|
295 | pushing to ssh://user@dummy/remote | |
292 | searching for changes |
|
296 | searching for changes | |
293 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 |
|
297 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 | |
294 | remote: adding changesets |
|
298 | remote: adding changesets | |
295 | remote: adding manifests |
|
299 | remote: adding manifests | |
296 | remote: adding file changes |
|
300 | remote: adding file changes | |
297 | remote: added 1 changesets with 1 changes to 1 files |
|
301 | remote: added 1 changesets with 1 changes to 1 files | |
298 | remote: KABOOM |
|
302 | remote: KABOOM | |
299 | $ hg -R ../remote heads |
|
303 | $ hg -R ../remote heads | |
300 | changeset: 5:1383141674ec |
|
304 | changeset: 5:1383141674ec | |
301 | tag: tip |
|
305 | tag: tip | |
302 | parent: 3:a28a9d1a809c |
|
306 | parent: 3:a28a9d1a809c | |
303 | user: test |
|
307 | user: test | |
304 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
308 | date: Thu Jan 01 00:00:00 1970 +0000 | |
305 | summary: z |
|
309 | summary: z | |
306 |
|
310 | |||
307 | changeset: 4:6c0482d977a3 |
|
311 | changeset: 4:6c0482d977a3 | |
308 | parent: 0:1160648e36ce |
|
312 | parent: 0:1160648e36ce | |
309 | user: test |
|
313 | user: test | |
310 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
314 | date: Thu Jan 01 00:00:00 1970 +0000 | |
311 | summary: z |
|
315 | summary: z | |
312 |
|
316 | |||
313 |
|
317 | |||
314 | clone bookmarks |
|
318 | clone bookmarks | |
315 |
|
319 | |||
316 | $ hg -R ../remote bookmark test |
|
320 | $ hg -R ../remote bookmark test | |
317 | $ hg -R ../remote bookmarks |
|
321 | $ hg -R ../remote bookmarks | |
318 | * test 4:6c0482d977a3 |
|
322 | * test 4:6c0482d977a3 | |
319 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local-bookmarks |
|
323 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local-bookmarks | |
320 | requesting all changes |
|
324 | requesting all changes | |
321 | adding changesets |
|
325 | adding changesets | |
322 | adding manifests |
|
326 | adding manifests | |
323 | adding file changes |
|
327 | adding file changes | |
324 | added 6 changesets with 5 changes to 4 files (+1 heads) |
|
328 | added 6 changesets with 5 changes to 4 files (+1 heads) | |
325 | new changesets 1160648e36ce:1383141674ec |
|
329 | new changesets 1160648e36ce:1383141674ec | |
326 | updating to branch default |
|
330 | updating to branch default | |
327 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
331 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
328 | $ hg -R local-bookmarks bookmarks |
|
332 | $ hg -R local-bookmarks bookmarks | |
329 | test 4:6c0482d977a3 |
|
333 | test 4:6c0482d977a3 | |
330 |
|
334 | |||
331 | passwords in ssh urls are not supported |
|
335 | passwords in ssh urls are not supported | |
332 | (we use a glob here because different Python versions give different |
|
336 | (we use a glob here because different Python versions give different | |
333 | results here) |
|
337 | results here) | |
334 |
|
338 | |||
335 | $ hg push ssh://user:erroneouspwd@dummy/remote |
|
339 | $ hg push ssh://user:erroneouspwd@dummy/remote | |
336 | pushing to ssh://user:*@dummy/remote (glob) |
|
340 | pushing to ssh://user:*@dummy/remote (glob) | |
337 | abort: password in URL not supported! |
|
341 | abort: password in URL not supported! | |
338 | [255] |
|
342 | [255] | |
339 |
|
343 | |||
340 | $ cd .. |
|
344 | $ cd .. | |
341 |
|
345 | |||
342 | hide outer repo |
|
346 | hide outer repo | |
343 | $ hg init |
|
347 | $ hg init | |
344 |
|
348 | |||
345 | Test remote paths with spaces (issue2983): |
|
349 | Test remote paths with spaces (issue2983): | |
346 |
|
350 | |||
347 | $ hg init --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" |
|
351 | $ hg init --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" | |
348 | $ touch "$TESTTMP/a repo/test" |
|
352 | $ touch "$TESTTMP/a repo/test" | |
349 | $ hg -R 'a repo' commit -A -m "test" |
|
353 | $ hg -R 'a repo' commit -A -m "test" | |
350 | adding test |
|
354 | adding test | |
351 | $ hg -R 'a repo' tag tag |
|
355 | $ hg -R 'a repo' tag tag | |
352 | $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" |
|
356 | $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" | |
353 | 73649e48688a |
|
357 | 73649e48688a | |
354 |
|
358 | |||
355 | $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo#noNoNO" |
|
359 | $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo#noNoNO" | |
356 | abort: unknown revision 'noNoNO'! |
|
360 | abort: unknown revision 'noNoNO'! | |
357 | [255] |
|
361 | [255] | |
358 |
|
362 | |||
359 | Test (non-)escaping of remote paths with spaces when cloning (issue3145): |
|
363 | Test (non-)escaping of remote paths with spaces when cloning (issue3145): | |
360 |
|
364 | |||
361 | $ hg clone --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" |
|
365 | $ hg clone --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" | |
362 | destination directory: a repo |
|
366 | destination directory: a repo | |
363 | abort: destination 'a repo' is not empty |
|
367 | abort: destination 'a repo' is not empty | |
364 | [255] |
|
368 | [255] | |
365 |
|
369 | |||
366 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might |
|
370 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might | |
367 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right |
|
371 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right | |
368 | parameters: |
|
372 | parameters: | |
369 |
|
373 | |||
370 | $ cat > ssh.sh << EOF |
|
374 | $ cat > ssh.sh << EOF | |
371 | > userhost="\$1" |
|
375 | > userhost="\$1" | |
372 | > SSH_ORIGINAL_COMMAND="\$2" |
|
376 | > SSH_ORIGINAL_COMMAND="\$2" | |
373 | > export SSH_ORIGINAL_COMMAND |
|
377 | > export SSH_ORIGINAL_COMMAND | |
374 | > PYTHONPATH="$PYTHONPATH" |
|
378 | > PYTHONPATH="$PYTHONPATH" | |
375 | > export PYTHONPATH |
|
379 | > export PYTHONPATH | |
376 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" |
|
380 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" | |
377 | > EOF |
|
381 | > EOF | |
378 |
|
382 | |||
379 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" |
|
383 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" | |
380 | 73649e48688a |
|
384 | 73649e48688a | |
381 |
|
385 | |||
382 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" |
|
386 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" | |
383 | remote: Illegal repository "$TESTTMP/a'repo" |
|
387 | remote: Illegal repository "$TESTTMP/a'repo" | |
384 | abort: no suitable response from remote hg! |
|
388 | abort: no suitable response from remote hg! | |
385 | [255] |
|
389 | [255] | |
386 |
|
390 | |||
387 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" |
|
391 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" | |
388 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" |
|
392 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" | |
389 | abort: no suitable response from remote hg! |
|
393 | abort: no suitable response from remote hg! | |
390 | [255] |
|
394 | [255] | |
391 |
|
395 | |||
392 | $ SSH_ORIGINAL_COMMAND="'hg' serve -R 'a'repo' --stdio" $PYTHON "$TESTDIR/../contrib/hg-ssh" |
|
396 | $ SSH_ORIGINAL_COMMAND="'hg' serve -R 'a'repo' --stdio" $PYTHON "$TESTDIR/../contrib/hg-ssh" | |
393 | Illegal command "'hg' serve -R 'a'repo' --stdio": No closing quotation |
|
397 | Illegal command "'hg' serve -R 'a'repo' --stdio": No closing quotation | |
394 | [255] |
|
398 | [255] | |
395 |
|
399 | |||
396 | Test hg-ssh in read-only mode: |
|
400 | Test hg-ssh in read-only mode: | |
397 |
|
401 | |||
398 | $ cat > ssh.sh << EOF |
|
402 | $ cat > ssh.sh << EOF | |
399 | > userhost="\$1" |
|
403 | > userhost="\$1" | |
400 | > SSH_ORIGINAL_COMMAND="\$2" |
|
404 | > SSH_ORIGINAL_COMMAND="\$2" | |
401 | > export SSH_ORIGINAL_COMMAND |
|
405 | > export SSH_ORIGINAL_COMMAND | |
402 | > PYTHONPATH="$PYTHONPATH" |
|
406 | > PYTHONPATH="$PYTHONPATH" | |
403 | > export PYTHONPATH |
|
407 | > export PYTHONPATH | |
404 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" |
|
408 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" | |
405 | > EOF |
|
409 | > EOF | |
406 |
|
410 | |||
407 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local |
|
411 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local | |
408 | requesting all changes |
|
412 | requesting all changes | |
409 | adding changesets |
|
413 | adding changesets | |
410 | adding manifests |
|
414 | adding manifests | |
411 | adding file changes |
|
415 | adding file changes | |
412 | added 6 changesets with 5 changes to 4 files (+1 heads) |
|
416 | added 6 changesets with 5 changes to 4 files (+1 heads) | |
413 | new changesets 1160648e36ce:1383141674ec |
|
417 | new changesets 1160648e36ce:1383141674ec | |
414 | updating to branch default |
|
418 | updating to branch default | |
415 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
419 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
416 |
|
420 | |||
417 | $ cd read-only-local |
|
421 | $ cd read-only-local | |
418 | $ echo "baz" > bar |
|
422 | $ echo "baz" > bar | |
419 | $ hg ci -A -m "unpushable commit" bar |
|
423 | $ hg ci -A -m "unpushable commit" bar | |
420 | $ hg push --ssh "sh ../ssh.sh" |
|
424 | $ hg push --ssh "sh ../ssh.sh" | |
421 | pushing to ssh://user@dummy/*/remote (glob) |
|
425 | pushing to ssh://user@dummy/*/remote (glob) | |
422 | searching for changes |
|
426 | searching for changes | |
423 | remote: Permission denied |
|
427 | remote: Permission denied | |
424 | remote: abort: pretxnopen.hg-ssh hook failed |
|
428 | remote: abort: pretxnopen.hg-ssh hook failed | |
425 | remote: Permission denied |
|
429 | remote: Permission denied | |
426 | remote: pushkey-abort: prepushkey.hg-ssh hook failed |
|
430 | remote: pushkey-abort: prepushkey.hg-ssh hook failed | |
427 | updating 6c0482d977a3 to public failed! |
|
431 | updating 6c0482d977a3 to public failed! | |
428 | [1] |
|
432 | [1] | |
429 |
|
433 | |||
430 | $ cd .. |
|
434 | $ cd .. | |
431 |
|
435 | |||
432 | stderr from remote commands should be printed before stdout from local code (issue4336) |
|
436 | stderr from remote commands should be printed before stdout from local code (issue4336) | |
433 |
|
437 | |||
434 | $ hg clone remote stderr-ordering |
|
438 | $ hg clone remote stderr-ordering | |
435 | updating to branch default |
|
439 | updating to branch default | |
436 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
440 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
437 | $ cd stderr-ordering |
|
441 | $ cd stderr-ordering | |
438 | $ cat >> localwrite.py << EOF |
|
442 | $ cat >> localwrite.py << EOF | |
439 | > from mercurial import exchange, extensions |
|
443 | > from mercurial import exchange, extensions | |
440 | > |
|
444 | > | |
441 | > def wrappedpush(orig, repo, *args, **kwargs): |
|
445 | > def wrappedpush(orig, repo, *args, **kwargs): | |
442 | > res = orig(repo, *args, **kwargs) |
|
446 | > res = orig(repo, *args, **kwargs) | |
443 | > repo.ui.write('local stdout\n') |
|
447 | > repo.ui.write('local stdout\n') | |
444 | > return res |
|
448 | > return res | |
445 | > |
|
449 | > | |
446 | > def extsetup(ui): |
|
450 | > def extsetup(ui): | |
447 | > extensions.wrapfunction(exchange, 'push', wrappedpush) |
|
451 | > extensions.wrapfunction(exchange, 'push', wrappedpush) | |
448 | > EOF |
|
452 | > EOF | |
449 |
|
453 | |||
450 | $ cat >> .hg/hgrc << EOF |
|
454 | $ cat >> .hg/hgrc << EOF | |
451 | > [paths] |
|
455 | > [paths] | |
452 | > default-push = ssh://user@dummy/remote |
|
456 | > default-push = ssh://user@dummy/remote | |
453 | > [ui] |
|
457 | > [ui] | |
454 | > ssh = "$PYTHON" "$TESTDIR/dummyssh" |
|
458 | > ssh = "$PYTHON" "$TESTDIR/dummyssh" | |
455 | > [extensions] |
|
459 | > [extensions] | |
456 | > localwrite = localwrite.py |
|
460 | > localwrite = localwrite.py | |
457 | > EOF |
|
461 | > EOF | |
458 |
|
462 | |||
459 | $ echo localwrite > foo |
|
463 | $ echo localwrite > foo | |
460 | $ hg commit -m 'testing localwrite' |
|
464 | $ hg commit -m 'testing localwrite' | |
461 | $ hg push |
|
465 | $ hg push | |
462 | pushing to ssh://user@dummy/remote |
|
466 | pushing to ssh://user@dummy/remote | |
463 | searching for changes |
|
467 | searching for changes | |
464 | remote: adding changesets |
|
468 | remote: adding changesets | |
465 | remote: adding manifests |
|
469 | remote: adding manifests | |
466 | remote: adding file changes |
|
470 | remote: adding file changes | |
467 | remote: added 1 changesets with 1 changes to 1 files |
|
471 | remote: added 1 changesets with 1 changes to 1 files | |
468 | remote: KABOOM |
|
472 | remote: KABOOM | |
469 | local stdout |
|
473 | local stdout | |
470 |
|
474 | |||
471 | debug output |
|
475 | debug output | |
472 |
|
476 | |||
473 | $ hg pull --debug ssh://user@dummy/remote |
|
477 | $ hg pull --debug ssh://user@dummy/remote | |
474 | pulling from ssh://user@dummy/remote |
|
478 | pulling from ssh://user@dummy/remote | |
475 | running .* ".*/dummyssh" ['"]user@dummy['"] ('|")hg -R remote serve --stdio('|") (re) |
|
479 | running .* ".*/dummyssh" ['"]user@dummy['"] ('|")hg -R remote serve --stdio('|") (re) | |
476 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) |
|
480 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) | |
477 | sending hello command |
|
481 | sending hello command | |
478 | sending between command |
|
482 | sending between command | |
479 | remote: 403 (sshv1 !) |
|
483 | remote: 403 (sshv1 !) | |
480 | protocol upgraded to exp-ssh-v2-0001 (sshv2 !) |
|
484 | protocol upgraded to exp-ssh-v2-0001 (sshv2 !) | |
481 | remote: capabilities: lookup branchmap pushkey known getbundle unbundlehash changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN batch |
|
485 | remote: capabilities: lookup branchmap pushkey known getbundle unbundlehash changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN batch | |
482 | remote: 1 (sshv1 !) |
|
486 | remote: 1 (sshv1 !) | |
483 | preparing listkeys for "bookmarks" |
|
487 | preparing listkeys for "bookmarks" | |
484 | sending listkeys command |
|
488 | sending listkeys command | |
485 | received listkey for "bookmarks": 45 bytes |
|
489 | received listkey for "bookmarks": 45 bytes | |
486 | query 1; heads |
|
490 | query 1; heads | |
487 | sending batch command |
|
491 | sending batch command | |
488 | searching for changes |
|
492 | searching for changes | |
489 | all remote heads known locally |
|
493 | all remote heads known locally | |
490 | no changes found |
|
494 | no changes found | |
491 | preparing listkeys for "phases" |
|
495 | preparing listkeys for "phases" | |
492 | sending listkeys command |
|
496 | sending listkeys command | |
493 | received listkey for "phases": 15 bytes |
|
497 | received listkey for "phases": 15 bytes | |
494 | checking for updated bookmarks |
|
498 | checking for updated bookmarks | |
495 |
|
499 | |||
496 | $ cd .. |
|
500 | $ cd .. | |
497 |
|
501 | |||
498 | $ cat dummylog |
|
502 | $ cat dummylog | |
499 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio |
|
503 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio | |
500 | Got arguments 1:user@dummy 2:hg -R /$TESTTMP/nonexistent serve --stdio |
|
504 | Got arguments 1:user@dummy 2:hg -R /$TESTTMP/nonexistent serve --stdio | |
501 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
505 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
502 | Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio |
|
506 | Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio (no-reposimplestore !) | |
503 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
507 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio (no-reposimplestore !) | |
504 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
508 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio (no-reposimplestore !) | |
505 | Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio |
|
509 | Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio | |
506 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
510 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
507 | Got arguments 1:user@dummy 2:hg -R local serve --stdio |
|
511 | Got arguments 1:user@dummy 2:hg -R local serve --stdio | |
508 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio |
|
512 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio | |
509 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
513 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
510 | changegroup-in-remote hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_NODE_LAST=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP |
|
514 | changegroup-in-remote hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_NODE_LAST=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP | |
511 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
515 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
512 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
516 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
513 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
517 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
514 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
518 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
515 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
519 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
516 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
520 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
517 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
521 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
518 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
522 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
519 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
523 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
520 | changegroup-in-remote hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP |
|
524 | changegroup-in-remote hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP | |
521 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
525 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
522 | Got arguments 1:user@dummy 2:hg init 'a repo' |
|
526 | Got arguments 1:user@dummy 2:hg init 'a repo' | |
523 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
527 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
524 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
528 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
525 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
529 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
526 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
530 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
527 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
531 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
528 | changegroup-in-remote hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_NODE_LAST=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP |
|
532 | changegroup-in-remote hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_NODE_LAST=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP | |
529 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
533 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
530 |
|
534 | |||
531 | remote hook failure is attributed to remote |
|
535 | remote hook failure is attributed to remote | |
532 |
|
536 | |||
533 | $ cat > $TESTTMP/failhook << EOF |
|
537 | $ cat > $TESTTMP/failhook << EOF | |
534 | > def hook(ui, repo, **kwargs): |
|
538 | > def hook(ui, repo, **kwargs): | |
535 | > ui.write('hook failure!\n') |
|
539 | > ui.write('hook failure!\n') | |
536 | > ui.flush() |
|
540 | > ui.flush() | |
537 | > return 1 |
|
541 | > return 1 | |
538 | > EOF |
|
542 | > EOF | |
539 |
|
543 | |||
540 | $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc |
|
544 | $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc | |
541 |
|
545 | |||
542 | $ hg -q --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" clone ssh://user@dummy/remote hookout |
|
546 | $ hg -q --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" clone ssh://user@dummy/remote hookout | |
543 | $ cd hookout |
|
547 | $ cd hookout | |
544 | $ touch hookfailure |
|
548 | $ touch hookfailure | |
545 | $ hg -q commit -A -m 'remote hook failure' |
|
549 | $ hg -q commit -A -m 'remote hook failure' | |
546 | $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" push |
|
550 | $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" push | |
547 | pushing to ssh://user@dummy/remote |
|
551 | pushing to ssh://user@dummy/remote | |
548 | searching for changes |
|
552 | searching for changes | |
549 | remote: adding changesets |
|
553 | remote: adding changesets | |
550 | remote: adding manifests |
|
554 | remote: adding manifests | |
551 | remote: adding file changes |
|
555 | remote: adding file changes | |
552 | remote: added 1 changesets with 1 changes to 1 files |
|
556 | remote: added 1 changesets with 1 changes to 1 files | |
553 | remote: hook failure! |
|
557 | remote: hook failure! | |
554 | remote: transaction abort! |
|
558 | remote: transaction abort! | |
555 | remote: rollback completed |
|
559 | remote: rollback completed | |
556 | remote: abort: pretxnchangegroup.fail hook failed |
|
560 | remote: abort: pretxnchangegroup.fail hook failed | |
557 | [1] |
|
561 | [1] | |
558 |
|
562 | |||
559 | abort during pull is properly reported as such |
|
563 | abort during pull is properly reported as such | |
560 |
|
564 | |||
561 | $ echo morefoo >> ../remote/foo |
|
565 | $ echo morefoo >> ../remote/foo | |
562 | $ hg -R ../remote commit --message "more foo to be pulled" |
|
566 | $ hg -R ../remote commit --message "more foo to be pulled" | |
563 | $ cat >> ../remote/.hg/hgrc << EOF |
|
567 | $ cat >> ../remote/.hg/hgrc << EOF | |
564 | > [extensions] |
|
568 | > [extensions] | |
565 | > crash = ${TESTDIR}/crashgetbundler.py |
|
569 | > crash = ${TESTDIR}/crashgetbundler.py | |
566 | > EOF |
|
570 | > EOF | |
567 | $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" pull |
|
571 | $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" pull | |
568 | pulling from ssh://user@dummy/remote |
|
572 | pulling from ssh://user@dummy/remote | |
569 | searching for changes |
|
573 | searching for changes | |
570 | adding changesets |
|
574 | adding changesets | |
571 | remote: abort: this is an exercise |
|
575 | remote: abort: this is an exercise | |
572 | transaction abort! |
|
576 | transaction abort! | |
573 | rollback completed |
|
577 | rollback completed | |
574 | abort: stream ended unexpectedly (got 0 bytes, expected 4) |
|
578 | abort: stream ended unexpectedly (got 0 bytes, expected 4) | |
575 | [255] |
|
579 | [255] |
@@ -1,638 +1,642 | |||||
1 | #testcases sshv1 sshv2 |
|
1 | #testcases sshv1 sshv2 | |
2 |
|
2 | |||
3 | #if sshv2 |
|
3 | #if sshv2 | |
4 | $ cat >> $HGRCPATH << EOF |
|
4 | $ cat >> $HGRCPATH << EOF | |
5 | > [experimental] |
|
5 | > [experimental] | |
6 | > sshpeer.advertise-v2 = true |
|
6 | > sshpeer.advertise-v2 = true | |
7 | > sshserver.support-v2 = true |
|
7 | > sshserver.support-v2 = true | |
8 | > EOF |
|
8 | > EOF | |
9 | #endif |
|
9 | #endif | |
10 |
|
10 | |||
11 | This test tries to exercise the ssh functionality with a dummy script |
|
11 | This test tries to exercise the ssh functionality with a dummy script | |
12 |
|
12 | |||
13 | creating 'remote' repo |
|
13 | creating 'remote' repo | |
14 |
|
14 | |||
15 | $ hg init remote |
|
15 | $ hg init remote | |
16 | $ cd remote |
|
16 | $ cd remote | |
17 | $ echo this > foo |
|
17 | $ echo this > foo | |
18 | $ echo this > fooO |
|
18 | $ echo this > fooO | |
19 | $ hg ci -A -m "init" foo fooO |
|
19 | $ hg ci -A -m "init" foo fooO | |
20 |
|
20 | |||
21 | insert a closed branch (issue4428) |
|
21 | insert a closed branch (issue4428) | |
22 |
|
22 | |||
23 | $ hg up null |
|
23 | $ hg up null | |
24 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
24 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
25 | $ hg branch closed |
|
25 | $ hg branch closed | |
26 | marked working directory as branch closed |
|
26 | marked working directory as branch closed | |
27 | (branches are permanent and global, did you want a bookmark?) |
|
27 | (branches are permanent and global, did you want a bookmark?) | |
28 | $ hg ci -mc0 |
|
28 | $ hg ci -mc0 | |
29 | $ hg ci --close-branch -mc1 |
|
29 | $ hg ci --close-branch -mc1 | |
30 | $ hg up -q default |
|
30 | $ hg up -q default | |
31 |
|
31 | |||
32 | configure for serving |
|
32 | configure for serving | |
33 |
|
33 | |||
34 | $ cat <<EOF > .hg/hgrc |
|
34 | $ cat <<EOF > .hg/hgrc | |
35 | > [server] |
|
35 | > [server] | |
36 | > uncompressed = True |
|
36 | > uncompressed = True | |
37 | > |
|
37 | > | |
38 | > [hooks] |
|
38 | > [hooks] | |
39 | > changegroup = sh -c "printenv.py changegroup-in-remote 0 ../dummylog" |
|
39 | > changegroup = sh -c "printenv.py changegroup-in-remote 0 ../dummylog" | |
40 | > EOF |
|
40 | > EOF | |
41 | $ cd .. |
|
41 | $ cd .. | |
42 |
|
42 | |||
43 | repo not found error |
|
43 | repo not found error | |
44 |
|
44 | |||
45 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local |
|
45 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local | |
46 | remote: abort: repository nonexistent not found! |
|
46 | remote: abort: repository nonexistent not found! | |
47 | abort: no suitable response from remote hg! |
|
47 | abort: no suitable response from remote hg! | |
48 | [255] |
|
48 | [255] | |
49 |
|
49 | |||
50 | non-existent absolute path |
|
50 | non-existent absolute path | |
51 |
|
51 | |||
52 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/`pwd`/nonexistent local |
|
52 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/`pwd`/nonexistent local | |
53 | remote: abort: repository $TESTTMP/nonexistent not found! |
|
53 | remote: abort: repository $TESTTMP/nonexistent not found! | |
54 | abort: no suitable response from remote hg! |
|
54 | abort: no suitable response from remote hg! | |
55 | [255] |
|
55 | [255] | |
56 |
|
56 | |||
57 | clone remote via stream |
|
57 | clone remote via stream | |
58 |
|
58 | |||
|
59 | #if no-reposimplestore | |||
|
60 | ||||
59 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/remote local-stream |
|
61 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/remote local-stream | |
60 | streaming all changes |
|
62 | streaming all changes | |
61 | 4 files to transfer, 602 bytes of data |
|
63 | 4 files to transfer, 602 bytes of data | |
62 | transferred 602 bytes in * seconds (*) (glob) |
|
64 | transferred 602 bytes in * seconds (*) (glob) | |
63 | searching for changes |
|
65 | searching for changes | |
64 | no changes found |
|
66 | no changes found | |
65 | updating to branch default |
|
67 | updating to branch default | |
66 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
68 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
67 | $ cd local-stream |
|
69 | $ cd local-stream | |
68 | $ hg verify |
|
70 | $ hg verify | |
69 | checking changesets |
|
71 | checking changesets | |
70 | checking manifests |
|
72 | checking manifests | |
71 | crosschecking files in changesets and manifests |
|
73 | crosschecking files in changesets and manifests | |
72 | checking files |
|
74 | checking files | |
73 | 2 files, 3 changesets, 2 total revisions |
|
75 | 2 files, 3 changesets, 2 total revisions | |
74 | $ hg branches |
|
76 | $ hg branches | |
75 | default 0:1160648e36ce |
|
77 | default 0:1160648e36ce | |
76 | $ cd .. |
|
78 | $ cd .. | |
77 |
|
79 | |||
78 | clone bookmarks via stream |
|
80 | clone bookmarks via stream | |
79 |
|
81 | |||
80 | $ hg -R local-stream book mybook |
|
82 | $ hg -R local-stream book mybook | |
81 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/local-stream stream2 |
|
83 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/local-stream stream2 | |
82 | streaming all changes |
|
84 | streaming all changes | |
83 | 4 files to transfer, 602 bytes of data |
|
85 | 4 files to transfer, 602 bytes of data | |
84 | transferred 602 bytes in * seconds (*) (glob) |
|
86 | transferred 602 bytes in * seconds (*) (glob) | |
85 | searching for changes |
|
87 | searching for changes | |
86 | no changes found |
|
88 | no changes found | |
87 | updating to branch default |
|
89 | updating to branch default | |
88 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
90 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
89 | $ cd stream2 |
|
91 | $ cd stream2 | |
90 | $ hg book |
|
92 | $ hg book | |
91 | mybook 0:1160648e36ce |
|
93 | mybook 0:1160648e36ce | |
92 | $ cd .. |
|
94 | $ cd .. | |
93 | $ rm -rf local-stream stream2 |
|
95 | $ rm -rf local-stream stream2 | |
94 |
|
96 | |||
|
97 | #endif | |||
|
98 | ||||
95 | clone remote via pull |
|
99 | clone remote via pull | |
96 |
|
100 | |||
97 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local |
|
101 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local | |
98 | requesting all changes |
|
102 | requesting all changes | |
99 | adding changesets |
|
103 | adding changesets | |
100 | adding manifests |
|
104 | adding manifests | |
101 | adding file changes |
|
105 | adding file changes | |
102 | added 3 changesets with 2 changes to 2 files |
|
106 | added 3 changesets with 2 changes to 2 files | |
103 | new changesets 1160648e36ce:ad076bfb429d |
|
107 | new changesets 1160648e36ce:ad076bfb429d | |
104 | updating to branch default |
|
108 | updating to branch default | |
105 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
109 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
106 |
|
110 | |||
107 | verify |
|
111 | verify | |
108 |
|
112 | |||
109 | $ cd local |
|
113 | $ cd local | |
110 | $ hg verify |
|
114 | $ hg verify | |
111 | checking changesets |
|
115 | checking changesets | |
112 | checking manifests |
|
116 | checking manifests | |
113 | crosschecking files in changesets and manifests |
|
117 | crosschecking files in changesets and manifests | |
114 | checking files |
|
118 | checking files | |
115 | 2 files, 3 changesets, 2 total revisions |
|
119 | 2 files, 3 changesets, 2 total revisions | |
116 | $ cat >> .hg/hgrc <<EOF |
|
120 | $ cat >> .hg/hgrc <<EOF | |
117 | > [hooks] |
|
121 | > [hooks] | |
118 | > changegroup = sh -c "printenv.py changegroup-in-local 0 ../dummylog" |
|
122 | > changegroup = sh -c "printenv.py changegroup-in-local 0 ../dummylog" | |
119 | > EOF |
|
123 | > EOF | |
120 |
|
124 | |||
121 | empty default pull |
|
125 | empty default pull | |
122 |
|
126 | |||
123 | $ hg paths |
|
127 | $ hg paths | |
124 | default = ssh://user@dummy/remote |
|
128 | default = ssh://user@dummy/remote | |
125 | $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" |
|
129 | $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" | |
126 | pulling from ssh://user@dummy/remote |
|
130 | pulling from ssh://user@dummy/remote | |
127 | searching for changes |
|
131 | searching for changes | |
128 | no changes found |
|
132 | no changes found | |
129 |
|
133 | |||
130 | pull from wrong ssh URL |
|
134 | pull from wrong ssh URL | |
131 |
|
135 | |||
132 | $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/doesnotexist |
|
136 | $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/doesnotexist | |
133 | pulling from ssh://user@dummy/doesnotexist |
|
137 | pulling from ssh://user@dummy/doesnotexist | |
134 | remote: abort: repository doesnotexist not found! |
|
138 | remote: abort: repository doesnotexist not found! | |
135 | abort: no suitable response from remote hg! |
|
139 | abort: no suitable response from remote hg! | |
136 | [255] |
|
140 | [255] | |
137 |
|
141 | |||
138 | local change |
|
142 | local change | |
139 |
|
143 | |||
140 | $ echo bleah > foo |
|
144 | $ echo bleah > foo | |
141 | $ hg ci -m "add" |
|
145 | $ hg ci -m "add" | |
142 |
|
146 | |||
143 | updating rc |
|
147 | updating rc | |
144 |
|
148 | |||
145 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc |
|
149 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc | |
146 | $ echo "[ui]" >> .hg/hgrc |
|
150 | $ echo "[ui]" >> .hg/hgrc | |
147 | $ echo "ssh = \"$PYTHON\" \"$TESTDIR/dummyssh\"" >> .hg/hgrc |
|
151 | $ echo "ssh = \"$PYTHON\" \"$TESTDIR/dummyssh\"" >> .hg/hgrc | |
148 |
|
152 | |||
149 | find outgoing |
|
153 | find outgoing | |
150 |
|
154 | |||
151 | $ hg out ssh://user@dummy/remote |
|
155 | $ hg out ssh://user@dummy/remote | |
152 | comparing with ssh://user@dummy/remote |
|
156 | comparing with ssh://user@dummy/remote | |
153 | searching for changes |
|
157 | searching for changes | |
154 | changeset: 3:a28a9d1a809c |
|
158 | changeset: 3:a28a9d1a809c | |
155 | tag: tip |
|
159 | tag: tip | |
156 | parent: 0:1160648e36ce |
|
160 | parent: 0:1160648e36ce | |
157 | user: test |
|
161 | user: test | |
158 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
162 | date: Thu Jan 01 00:00:00 1970 +0000 | |
159 | summary: add |
|
163 | summary: add | |
160 |
|
164 | |||
161 |
|
165 | |||
162 | find incoming on the remote side |
|
166 | find incoming on the remote side | |
163 |
|
167 | |||
164 | $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/local |
|
168 | $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/local | |
165 | comparing with ssh://user@dummy/local |
|
169 | comparing with ssh://user@dummy/local | |
166 | searching for changes |
|
170 | searching for changes | |
167 | changeset: 3:a28a9d1a809c |
|
171 | changeset: 3:a28a9d1a809c | |
168 | tag: tip |
|
172 | tag: tip | |
169 | parent: 0:1160648e36ce |
|
173 | parent: 0:1160648e36ce | |
170 | user: test |
|
174 | user: test | |
171 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
175 | date: Thu Jan 01 00:00:00 1970 +0000 | |
172 | summary: add |
|
176 | summary: add | |
173 |
|
177 | |||
174 |
|
178 | |||
175 | find incoming on the remote side (using absolute path) |
|
179 | find incoming on the remote side (using absolute path) | |
176 |
|
180 | |||
177 | $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/`pwd`" |
|
181 | $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/`pwd`" | |
178 | comparing with ssh://user@dummy/$TESTTMP/local |
|
182 | comparing with ssh://user@dummy/$TESTTMP/local | |
179 | searching for changes |
|
183 | searching for changes | |
180 | changeset: 3:a28a9d1a809c |
|
184 | changeset: 3:a28a9d1a809c | |
181 | tag: tip |
|
185 | tag: tip | |
182 | parent: 0:1160648e36ce |
|
186 | parent: 0:1160648e36ce | |
183 | user: test |
|
187 | user: test | |
184 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
188 | date: Thu Jan 01 00:00:00 1970 +0000 | |
185 | summary: add |
|
189 | summary: add | |
186 |
|
190 | |||
187 |
|
191 | |||
188 | push |
|
192 | push | |
189 |
|
193 | |||
190 | $ hg push |
|
194 | $ hg push | |
191 | pushing to ssh://user@dummy/remote |
|
195 | pushing to ssh://user@dummy/remote | |
192 | searching for changes |
|
196 | searching for changes | |
193 | remote: adding changesets |
|
197 | remote: adding changesets | |
194 | remote: adding manifests |
|
198 | remote: adding manifests | |
195 | remote: adding file changes |
|
199 | remote: adding file changes | |
196 | remote: added 1 changesets with 1 changes to 1 files |
|
200 | remote: added 1 changesets with 1 changes to 1 files | |
197 | $ cd ../remote |
|
201 | $ cd ../remote | |
198 |
|
202 | |||
199 | check remote tip |
|
203 | check remote tip | |
200 |
|
204 | |||
201 | $ hg tip |
|
205 | $ hg tip | |
202 | changeset: 3:a28a9d1a809c |
|
206 | changeset: 3:a28a9d1a809c | |
203 | tag: tip |
|
207 | tag: tip | |
204 | parent: 0:1160648e36ce |
|
208 | parent: 0:1160648e36ce | |
205 | user: test |
|
209 | user: test | |
206 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
210 | date: Thu Jan 01 00:00:00 1970 +0000 | |
207 | summary: add |
|
211 | summary: add | |
208 |
|
212 | |||
209 | $ hg verify |
|
213 | $ hg verify | |
210 | checking changesets |
|
214 | checking changesets | |
211 | checking manifests |
|
215 | checking manifests | |
212 | crosschecking files in changesets and manifests |
|
216 | crosschecking files in changesets and manifests | |
213 | checking files |
|
217 | checking files | |
214 | 2 files, 4 changesets, 3 total revisions |
|
218 | 2 files, 4 changesets, 3 total revisions | |
215 | $ hg cat -r tip foo |
|
219 | $ hg cat -r tip foo | |
216 | bleah |
|
220 | bleah | |
217 | $ echo z > z |
|
221 | $ echo z > z | |
218 | $ hg ci -A -m z z |
|
222 | $ hg ci -A -m z z | |
219 | created new head |
|
223 | created new head | |
220 |
|
224 | |||
221 | test pushkeys and bookmarks |
|
225 | test pushkeys and bookmarks | |
222 |
|
226 | |||
223 | $ cd ../local |
|
227 | $ cd ../local | |
224 | $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote namespaces |
|
228 | $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote namespaces | |
225 | bookmarks |
|
229 | bookmarks | |
226 | namespaces |
|
230 | namespaces | |
227 | phases |
|
231 | phases | |
228 | $ hg book foo -r 0 |
|
232 | $ hg book foo -r 0 | |
229 | $ hg out -B |
|
233 | $ hg out -B | |
230 | comparing with ssh://user@dummy/remote |
|
234 | comparing with ssh://user@dummy/remote | |
231 | searching for changed bookmarks |
|
235 | searching for changed bookmarks | |
232 | foo 1160648e36ce |
|
236 | foo 1160648e36ce | |
233 | $ hg push -B foo |
|
237 | $ hg push -B foo | |
234 | pushing to ssh://user@dummy/remote |
|
238 | pushing to ssh://user@dummy/remote | |
235 | searching for changes |
|
239 | searching for changes | |
236 | no changes found |
|
240 | no changes found | |
237 | exporting bookmark foo |
|
241 | exporting bookmark foo | |
238 | [1] |
|
242 | [1] | |
239 | $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote bookmarks |
|
243 | $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote bookmarks | |
240 | foo 1160648e36cec0054048a7edc4110c6f84fde594 |
|
244 | foo 1160648e36cec0054048a7edc4110c6f84fde594 | |
241 | $ hg book -f foo |
|
245 | $ hg book -f foo | |
242 | $ hg push --traceback |
|
246 | $ hg push --traceback | |
243 | pushing to ssh://user@dummy/remote |
|
247 | pushing to ssh://user@dummy/remote | |
244 | searching for changes |
|
248 | searching for changes | |
245 | no changes found |
|
249 | no changes found | |
246 | updating bookmark foo |
|
250 | updating bookmark foo | |
247 | [1] |
|
251 | [1] | |
248 | $ hg book -d foo |
|
252 | $ hg book -d foo | |
249 | $ hg in -B |
|
253 | $ hg in -B | |
250 | comparing with ssh://user@dummy/remote |
|
254 | comparing with ssh://user@dummy/remote | |
251 | searching for changed bookmarks |
|
255 | searching for changed bookmarks | |
252 | foo a28a9d1a809c |
|
256 | foo a28a9d1a809c | |
253 | $ hg book -f -r 0 foo |
|
257 | $ hg book -f -r 0 foo | |
254 | $ hg pull -B foo |
|
258 | $ hg pull -B foo | |
255 | pulling from ssh://user@dummy/remote |
|
259 | pulling from ssh://user@dummy/remote | |
256 | no changes found |
|
260 | no changes found | |
257 | updating bookmark foo |
|
261 | updating bookmark foo | |
258 | $ hg book -d foo |
|
262 | $ hg book -d foo | |
259 | $ hg push -B foo |
|
263 | $ hg push -B foo | |
260 | pushing to ssh://user@dummy/remote |
|
264 | pushing to ssh://user@dummy/remote | |
261 | searching for changes |
|
265 | searching for changes | |
262 | no changes found |
|
266 | no changes found | |
263 | deleting remote bookmark foo |
|
267 | deleting remote bookmark foo | |
264 | [1] |
|
268 | [1] | |
265 |
|
269 | |||
266 | a bad, evil hook that prints to stdout |
|
270 | a bad, evil hook that prints to stdout | |
267 |
|
271 | |||
268 | $ cat <<EOF > $TESTTMP/badhook |
|
272 | $ cat <<EOF > $TESTTMP/badhook | |
269 | > import sys |
|
273 | > import sys | |
270 | > sys.stdout.write("KABOOM\n") |
|
274 | > sys.stdout.write("KABOOM\n") | |
271 | > EOF |
|
275 | > EOF | |
272 |
|
276 | |||
273 | $ cat <<EOF > $TESTTMP/badpyhook.py |
|
277 | $ cat <<EOF > $TESTTMP/badpyhook.py | |
274 | > import sys |
|
278 | > import sys | |
275 | > def hook(ui, repo, hooktype, **kwargs): |
|
279 | > def hook(ui, repo, hooktype, **kwargs): | |
276 | > sys.stdout.write("KABOOM IN PROCESS\n") |
|
280 | > sys.stdout.write("KABOOM IN PROCESS\n") | |
277 | > EOF |
|
281 | > EOF | |
278 |
|
282 | |||
279 | $ cat <<EOF >> ../remote/.hg/hgrc |
|
283 | $ cat <<EOF >> ../remote/.hg/hgrc | |
280 | > [hooks] |
|
284 | > [hooks] | |
281 | > changegroup.stdout = $PYTHON $TESTTMP/badhook |
|
285 | > changegroup.stdout = $PYTHON $TESTTMP/badhook | |
282 | > changegroup.pystdout = python:$TESTTMP/badpyhook.py:hook |
|
286 | > changegroup.pystdout = python:$TESTTMP/badpyhook.py:hook | |
283 | > EOF |
|
287 | > EOF | |
284 | $ echo r > r |
|
288 | $ echo r > r | |
285 | $ hg ci -A -m z r |
|
289 | $ hg ci -A -m z r | |
286 |
|
290 | |||
287 | push should succeed even though it has an unexpected response |
|
291 | push should succeed even though it has an unexpected response | |
288 |
|
292 | |||
289 | $ hg push |
|
293 | $ hg push | |
290 | pushing to ssh://user@dummy/remote |
|
294 | pushing to ssh://user@dummy/remote | |
291 | searching for changes |
|
295 | searching for changes | |
292 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 |
|
296 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 | |
293 | remote: adding changesets |
|
297 | remote: adding changesets | |
294 | remote: adding manifests |
|
298 | remote: adding manifests | |
295 | remote: adding file changes |
|
299 | remote: adding file changes | |
296 | remote: added 1 changesets with 1 changes to 1 files |
|
300 | remote: added 1 changesets with 1 changes to 1 files | |
297 | remote: KABOOM |
|
301 | remote: KABOOM | |
298 | remote: KABOOM IN PROCESS |
|
302 | remote: KABOOM IN PROCESS | |
299 | $ hg -R ../remote heads |
|
303 | $ hg -R ../remote heads | |
300 | changeset: 5:1383141674ec |
|
304 | changeset: 5:1383141674ec | |
301 | tag: tip |
|
305 | tag: tip | |
302 | parent: 3:a28a9d1a809c |
|
306 | parent: 3:a28a9d1a809c | |
303 | user: test |
|
307 | user: test | |
304 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
308 | date: Thu Jan 01 00:00:00 1970 +0000 | |
305 | summary: z |
|
309 | summary: z | |
306 |
|
310 | |||
307 | changeset: 4:6c0482d977a3 |
|
311 | changeset: 4:6c0482d977a3 | |
308 | parent: 0:1160648e36ce |
|
312 | parent: 0:1160648e36ce | |
309 | user: test |
|
313 | user: test | |
310 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
314 | date: Thu Jan 01 00:00:00 1970 +0000 | |
311 | summary: z |
|
315 | summary: z | |
312 |
|
316 | |||
313 |
|
317 | |||
314 | clone bookmarks |
|
318 | clone bookmarks | |
315 |
|
319 | |||
316 | $ hg -R ../remote bookmark test |
|
320 | $ hg -R ../remote bookmark test | |
317 | $ hg -R ../remote bookmarks |
|
321 | $ hg -R ../remote bookmarks | |
318 | * test 4:6c0482d977a3 |
|
322 | * test 4:6c0482d977a3 | |
319 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local-bookmarks |
|
323 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local-bookmarks | |
320 | requesting all changes |
|
324 | requesting all changes | |
321 | adding changesets |
|
325 | adding changesets | |
322 | adding manifests |
|
326 | adding manifests | |
323 | adding file changes |
|
327 | adding file changes | |
324 | added 6 changesets with 5 changes to 4 files (+1 heads) |
|
328 | added 6 changesets with 5 changes to 4 files (+1 heads) | |
325 | new changesets 1160648e36ce:1383141674ec |
|
329 | new changesets 1160648e36ce:1383141674ec | |
326 | updating to branch default |
|
330 | updating to branch default | |
327 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
331 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
328 | $ hg -R local-bookmarks bookmarks |
|
332 | $ hg -R local-bookmarks bookmarks | |
329 | test 4:6c0482d977a3 |
|
333 | test 4:6c0482d977a3 | |
330 |
|
334 | |||
331 | passwords in ssh urls are not supported |
|
335 | passwords in ssh urls are not supported | |
332 | (we use a glob here because different Python versions give different |
|
336 | (we use a glob here because different Python versions give different | |
333 | results here) |
|
337 | results here) | |
334 |
|
338 | |||
335 | $ hg push ssh://user:erroneouspwd@dummy/remote |
|
339 | $ hg push ssh://user:erroneouspwd@dummy/remote | |
336 | pushing to ssh://user:*@dummy/remote (glob) |
|
340 | pushing to ssh://user:*@dummy/remote (glob) | |
337 | abort: password in URL not supported! |
|
341 | abort: password in URL not supported! | |
338 | [255] |
|
342 | [255] | |
339 |
|
343 | |||
340 | $ cd .. |
|
344 | $ cd .. | |
341 |
|
345 | |||
342 | hide outer repo |
|
346 | hide outer repo | |
343 | $ hg init |
|
347 | $ hg init | |
344 |
|
348 | |||
345 | Test remote paths with spaces (issue2983): |
|
349 | Test remote paths with spaces (issue2983): | |
346 |
|
350 | |||
347 | $ hg init --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" |
|
351 | $ hg init --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" | |
348 | $ touch "$TESTTMP/a repo/test" |
|
352 | $ touch "$TESTTMP/a repo/test" | |
349 | $ hg -R 'a repo' commit -A -m "test" |
|
353 | $ hg -R 'a repo' commit -A -m "test" | |
350 | adding test |
|
354 | adding test | |
351 | $ hg -R 'a repo' tag tag |
|
355 | $ hg -R 'a repo' tag tag | |
352 | $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" |
|
356 | $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" | |
353 | 73649e48688a |
|
357 | 73649e48688a | |
354 |
|
358 | |||
355 | $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo#noNoNO" |
|
359 | $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo#noNoNO" | |
356 | abort: unknown revision 'noNoNO'! |
|
360 | abort: unknown revision 'noNoNO'! | |
357 | [255] |
|
361 | [255] | |
358 |
|
362 | |||
359 | Test (non-)escaping of remote paths with spaces when cloning (issue3145): |
|
363 | Test (non-)escaping of remote paths with spaces when cloning (issue3145): | |
360 |
|
364 | |||
361 | $ hg clone --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" |
|
365 | $ hg clone --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" | |
362 | destination directory: a repo |
|
366 | destination directory: a repo | |
363 | abort: destination 'a repo' is not empty |
|
367 | abort: destination 'a repo' is not empty | |
364 | [255] |
|
368 | [255] | |
365 |
|
369 | |||
366 | Make sure hg is really paranoid in serve --stdio mode. It used to be |
|
370 | Make sure hg is really paranoid in serve --stdio mode. It used to be | |
367 | possible to get a debugger REPL by specifying a repo named --debugger. |
|
371 | possible to get a debugger REPL by specifying a repo named --debugger. | |
368 | $ hg -R --debugger serve --stdio |
|
372 | $ hg -R --debugger serve --stdio | |
369 | abort: potentially unsafe serve --stdio invocation: ['-R', '--debugger', 'serve', '--stdio'] |
|
373 | abort: potentially unsafe serve --stdio invocation: ['-R', '--debugger', 'serve', '--stdio'] | |
370 | [255] |
|
374 | [255] | |
371 | $ hg -R --config=ui.debugger=yes serve --stdio |
|
375 | $ hg -R --config=ui.debugger=yes serve --stdio | |
372 | abort: potentially unsafe serve --stdio invocation: ['-R', '--config=ui.debugger=yes', 'serve', '--stdio'] |
|
376 | abort: potentially unsafe serve --stdio invocation: ['-R', '--config=ui.debugger=yes', 'serve', '--stdio'] | |
373 | [255] |
|
377 | [255] | |
374 | Abbreviations of 'serve' also don't work, to avoid shenanigans. |
|
378 | Abbreviations of 'serve' also don't work, to avoid shenanigans. | |
375 | $ hg -R narf serv --stdio |
|
379 | $ hg -R narf serv --stdio | |
376 | abort: potentially unsafe serve --stdio invocation: ['-R', 'narf', 'serv', '--stdio'] |
|
380 | abort: potentially unsafe serve --stdio invocation: ['-R', 'narf', 'serv', '--stdio'] | |
377 | [255] |
|
381 | [255] | |
378 |
|
382 | |||
379 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might |
|
383 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might | |
380 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right |
|
384 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right | |
381 | parameters: |
|
385 | parameters: | |
382 |
|
386 | |||
383 | $ cat > ssh.sh << EOF |
|
387 | $ cat > ssh.sh << EOF | |
384 | > userhost="\$1" |
|
388 | > userhost="\$1" | |
385 | > SSH_ORIGINAL_COMMAND="\$2" |
|
389 | > SSH_ORIGINAL_COMMAND="\$2" | |
386 | > export SSH_ORIGINAL_COMMAND |
|
390 | > export SSH_ORIGINAL_COMMAND | |
387 | > PYTHONPATH="$PYTHONPATH" |
|
391 | > PYTHONPATH="$PYTHONPATH" | |
388 | > export PYTHONPATH |
|
392 | > export PYTHONPATH | |
389 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" |
|
393 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" | |
390 | > EOF |
|
394 | > EOF | |
391 |
|
395 | |||
392 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" |
|
396 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" | |
393 | 73649e48688a |
|
397 | 73649e48688a | |
394 |
|
398 | |||
395 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" |
|
399 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" | |
396 | remote: Illegal repository "$TESTTMP/a'repo" |
|
400 | remote: Illegal repository "$TESTTMP/a'repo" | |
397 | abort: no suitable response from remote hg! |
|
401 | abort: no suitable response from remote hg! | |
398 | [255] |
|
402 | [255] | |
399 |
|
403 | |||
400 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" |
|
404 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" | |
401 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" |
|
405 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" | |
402 | abort: no suitable response from remote hg! |
|
406 | abort: no suitable response from remote hg! | |
403 | [255] |
|
407 | [255] | |
404 |
|
408 | |||
405 | $ SSH_ORIGINAL_COMMAND="'hg' -R 'a'repo' serve --stdio" $PYTHON "$TESTDIR/../contrib/hg-ssh" |
|
409 | $ SSH_ORIGINAL_COMMAND="'hg' -R 'a'repo' serve --stdio" $PYTHON "$TESTDIR/../contrib/hg-ssh" | |
406 | Illegal command "'hg' -R 'a'repo' serve --stdio": No closing quotation |
|
410 | Illegal command "'hg' -R 'a'repo' serve --stdio": No closing quotation | |
407 | [255] |
|
411 | [255] | |
408 |
|
412 | |||
409 | Test hg-ssh in read-only mode: |
|
413 | Test hg-ssh in read-only mode: | |
410 |
|
414 | |||
411 | $ cat > ssh.sh << EOF |
|
415 | $ cat > ssh.sh << EOF | |
412 | > userhost="\$1" |
|
416 | > userhost="\$1" | |
413 | > SSH_ORIGINAL_COMMAND="\$2" |
|
417 | > SSH_ORIGINAL_COMMAND="\$2" | |
414 | > export SSH_ORIGINAL_COMMAND |
|
418 | > export SSH_ORIGINAL_COMMAND | |
415 | > PYTHONPATH="$PYTHONPATH" |
|
419 | > PYTHONPATH="$PYTHONPATH" | |
416 | > export PYTHONPATH |
|
420 | > export PYTHONPATH | |
417 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" |
|
421 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" | |
418 | > EOF |
|
422 | > EOF | |
419 |
|
423 | |||
420 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local |
|
424 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local | |
421 | requesting all changes |
|
425 | requesting all changes | |
422 | adding changesets |
|
426 | adding changesets | |
423 | adding manifests |
|
427 | adding manifests | |
424 | adding file changes |
|
428 | adding file changes | |
425 | added 6 changesets with 5 changes to 4 files (+1 heads) |
|
429 | added 6 changesets with 5 changes to 4 files (+1 heads) | |
426 | new changesets 1160648e36ce:1383141674ec |
|
430 | new changesets 1160648e36ce:1383141674ec | |
427 | updating to branch default |
|
431 | updating to branch default | |
428 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
432 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
429 |
|
433 | |||
430 | $ cd read-only-local |
|
434 | $ cd read-only-local | |
431 | $ echo "baz" > bar |
|
435 | $ echo "baz" > bar | |
432 | $ hg ci -A -m "unpushable commit" bar |
|
436 | $ hg ci -A -m "unpushable commit" bar | |
433 | $ hg push --ssh "sh ../ssh.sh" |
|
437 | $ hg push --ssh "sh ../ssh.sh" | |
434 | pushing to ssh://user@dummy/*/remote (glob) |
|
438 | pushing to ssh://user@dummy/*/remote (glob) | |
435 | searching for changes |
|
439 | searching for changes | |
436 | remote: Permission denied |
|
440 | remote: Permission denied | |
437 | remote: pretxnopen.hg-ssh hook failed |
|
441 | remote: pretxnopen.hg-ssh hook failed | |
438 | abort: push failed on remote |
|
442 | abort: push failed on remote | |
439 | [255] |
|
443 | [255] | |
440 |
|
444 | |||
441 | $ cd .. |
|
445 | $ cd .. | |
442 |
|
446 | |||
443 | stderr from remote commands should be printed before stdout from local code (issue4336) |
|
447 | stderr from remote commands should be printed before stdout from local code (issue4336) | |
444 |
|
448 | |||
445 | $ hg clone remote stderr-ordering |
|
449 | $ hg clone remote stderr-ordering | |
446 | updating to branch default |
|
450 | updating to branch default | |
447 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
451 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
448 | $ cd stderr-ordering |
|
452 | $ cd stderr-ordering | |
449 | $ cat >> localwrite.py << EOF |
|
453 | $ cat >> localwrite.py << EOF | |
450 | > from mercurial import exchange, extensions |
|
454 | > from mercurial import exchange, extensions | |
451 | > |
|
455 | > | |
452 | > def wrappedpush(orig, repo, *args, **kwargs): |
|
456 | > def wrappedpush(orig, repo, *args, **kwargs): | |
453 | > res = orig(repo, *args, **kwargs) |
|
457 | > res = orig(repo, *args, **kwargs) | |
454 | > repo.ui.write('local stdout\n') |
|
458 | > repo.ui.write('local stdout\n') | |
455 | > return res |
|
459 | > return res | |
456 | > |
|
460 | > | |
457 | > def extsetup(ui): |
|
461 | > def extsetup(ui): | |
458 | > extensions.wrapfunction(exchange, 'push', wrappedpush) |
|
462 | > extensions.wrapfunction(exchange, 'push', wrappedpush) | |
459 | > EOF |
|
463 | > EOF | |
460 |
|
464 | |||
461 | $ cat >> .hg/hgrc << EOF |
|
465 | $ cat >> .hg/hgrc << EOF | |
462 | > [paths] |
|
466 | > [paths] | |
463 | > default-push = ssh://user@dummy/remote |
|
467 | > default-push = ssh://user@dummy/remote | |
464 | > [ui] |
|
468 | > [ui] | |
465 | > ssh = "$PYTHON" "$TESTDIR/dummyssh" |
|
469 | > ssh = "$PYTHON" "$TESTDIR/dummyssh" | |
466 | > [extensions] |
|
470 | > [extensions] | |
467 | > localwrite = localwrite.py |
|
471 | > localwrite = localwrite.py | |
468 | > EOF |
|
472 | > EOF | |
469 |
|
473 | |||
470 | $ echo localwrite > foo |
|
474 | $ echo localwrite > foo | |
471 | $ hg commit -m 'testing localwrite' |
|
475 | $ hg commit -m 'testing localwrite' | |
472 | $ hg push |
|
476 | $ hg push | |
473 | pushing to ssh://user@dummy/remote |
|
477 | pushing to ssh://user@dummy/remote | |
474 | searching for changes |
|
478 | searching for changes | |
475 | remote: adding changesets |
|
479 | remote: adding changesets | |
476 | remote: adding manifests |
|
480 | remote: adding manifests | |
477 | remote: adding file changes |
|
481 | remote: adding file changes | |
478 | remote: added 1 changesets with 1 changes to 1 files |
|
482 | remote: added 1 changesets with 1 changes to 1 files | |
479 | remote: KABOOM |
|
483 | remote: KABOOM | |
480 | remote: KABOOM IN PROCESS |
|
484 | remote: KABOOM IN PROCESS | |
481 | local stdout |
|
485 | local stdout | |
482 |
|
486 | |||
483 | debug output |
|
487 | debug output | |
484 |
|
488 | |||
485 | $ hg pull --debug ssh://user@dummy/remote --config devel.debug.peer-request=yes |
|
489 | $ hg pull --debug ssh://user@dummy/remote --config devel.debug.peer-request=yes | |
486 | pulling from ssh://user@dummy/remote |
|
490 | pulling from ssh://user@dummy/remote | |
487 | running .* ".*/dummyssh" ['"]user@dummy['"] ('|")hg -R remote serve --stdio('|") (re) |
|
491 | running .* ".*/dummyssh" ['"]user@dummy['"] ('|")hg -R remote serve --stdio('|") (re) | |
488 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) |
|
492 | sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) | |
489 | devel-peer-request: hello |
|
493 | devel-peer-request: hello | |
490 | sending hello command |
|
494 | sending hello command | |
491 | devel-peer-request: between |
|
495 | devel-peer-request: between | |
492 | devel-peer-request: pairs: 81 bytes |
|
496 | devel-peer-request: pairs: 81 bytes | |
493 | sending between command |
|
497 | sending between command | |
494 | remote: 403 (sshv1 !) |
|
498 | remote: 403 (sshv1 !) | |
495 | protocol upgraded to exp-ssh-v2-0001 (sshv2 !) |
|
499 | protocol upgraded to exp-ssh-v2-0001 (sshv2 !) | |
496 | remote: capabilities: lookup branchmap pushkey known getbundle unbundlehash changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN batch |
|
500 | remote: capabilities: lookup branchmap pushkey known getbundle unbundlehash changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN batch | |
497 | remote: 1 (sshv1 !) |
|
501 | remote: 1 (sshv1 !) | |
498 | query 1; heads |
|
502 | query 1; heads | |
499 | devel-peer-request: batched-content |
|
503 | devel-peer-request: batched-content | |
500 | devel-peer-request: - heads (0 arguments) |
|
504 | devel-peer-request: - heads (0 arguments) | |
501 | devel-peer-request: - known (1 arguments) |
|
505 | devel-peer-request: - known (1 arguments) | |
502 | devel-peer-request: batch |
|
506 | devel-peer-request: batch | |
503 | devel-peer-request: cmds: 141 bytes |
|
507 | devel-peer-request: cmds: 141 bytes | |
504 | sending batch command |
|
508 | sending batch command | |
505 | searching for changes |
|
509 | searching for changes | |
506 | all remote heads known locally |
|
510 | all remote heads known locally | |
507 | no changes found |
|
511 | no changes found | |
508 | devel-peer-request: getbundle |
|
512 | devel-peer-request: getbundle | |
509 | devel-peer-request: bookmarks: 1 bytes |
|
513 | devel-peer-request: bookmarks: 1 bytes | |
510 | devel-peer-request: bundlecaps: 266 bytes |
|
514 | devel-peer-request: bundlecaps: 266 bytes | |
511 | devel-peer-request: cg: 1 bytes |
|
515 | devel-peer-request: cg: 1 bytes | |
512 | devel-peer-request: common: 122 bytes |
|
516 | devel-peer-request: common: 122 bytes | |
513 | devel-peer-request: heads: 122 bytes |
|
517 | devel-peer-request: heads: 122 bytes | |
514 | devel-peer-request: listkeys: 9 bytes |
|
518 | devel-peer-request: listkeys: 9 bytes | |
515 | devel-peer-request: phases: 1 bytes |
|
519 | devel-peer-request: phases: 1 bytes | |
516 | sending getbundle command |
|
520 | sending getbundle command | |
517 | bundle2-input-bundle: with-transaction |
|
521 | bundle2-input-bundle: with-transaction | |
518 | bundle2-input-part: "bookmarks" supported |
|
522 | bundle2-input-part: "bookmarks" supported | |
519 | bundle2-input-part: total payload size 26 |
|
523 | bundle2-input-part: total payload size 26 | |
520 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported |
|
524 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported | |
521 | bundle2-input-part: total payload size 45 |
|
525 | bundle2-input-part: total payload size 45 | |
522 | bundle2-input-part: "phase-heads" supported |
|
526 | bundle2-input-part: "phase-heads" supported | |
523 | bundle2-input-part: total payload size 72 |
|
527 | bundle2-input-part: total payload size 72 | |
524 | bundle2-input-bundle: 2 parts total |
|
528 | bundle2-input-bundle: 2 parts total | |
525 | checking for updated bookmarks |
|
529 | checking for updated bookmarks | |
526 |
|
530 | |||
527 | $ cd .. |
|
531 | $ cd .. | |
528 |
|
532 | |||
529 | $ cat dummylog |
|
533 | $ cat dummylog | |
530 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio |
|
534 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio | |
531 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/nonexistent serve --stdio |
|
535 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/nonexistent serve --stdio | |
532 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
536 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
533 | Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio |
|
537 | Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio (no-reposimplestore !) | |
534 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
538 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio (no-reposimplestore !) | |
535 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
539 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio (no-reposimplestore !) | |
536 | Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio |
|
540 | Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio | |
537 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
541 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
538 | Got arguments 1:user@dummy 2:hg -R local serve --stdio |
|
542 | Got arguments 1:user@dummy 2:hg -R local serve --stdio | |
539 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio |
|
543 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio | |
540 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
544 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
541 | changegroup-in-remote hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_NODE_LAST=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP |
|
545 | changegroup-in-remote hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_NODE_LAST=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP | |
542 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
546 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
543 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
547 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
544 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
548 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
545 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
549 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
546 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
550 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
547 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
551 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
548 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
552 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
549 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
553 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
550 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
554 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
551 | changegroup-in-remote hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP |
|
555 | changegroup-in-remote hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP | |
552 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
556 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
553 | Got arguments 1:user@dummy 2:hg init 'a repo' |
|
557 | Got arguments 1:user@dummy 2:hg init 'a repo' | |
554 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
558 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
555 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
559 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
556 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
560 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
557 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
561 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
558 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
562 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
559 | changegroup-in-remote hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_NODE_LAST=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP |
|
563 | changegroup-in-remote hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_NODE_LAST=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP | |
560 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
564 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
561 |
|
565 | |||
562 | remote hook failure is attributed to remote |
|
566 | remote hook failure is attributed to remote | |
563 |
|
567 | |||
564 | $ cat > $TESTTMP/failhook << EOF |
|
568 | $ cat > $TESTTMP/failhook << EOF | |
565 | > def hook(ui, repo, **kwargs): |
|
569 | > def hook(ui, repo, **kwargs): | |
566 | > ui.write('hook failure!\n') |
|
570 | > ui.write('hook failure!\n') | |
567 | > ui.flush() |
|
571 | > ui.flush() | |
568 | > return 1 |
|
572 | > return 1 | |
569 | > EOF |
|
573 | > EOF | |
570 |
|
574 | |||
571 | $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc |
|
575 | $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc | |
572 |
|
576 | |||
573 | $ hg -q --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" clone ssh://user@dummy/remote hookout |
|
577 | $ hg -q --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" clone ssh://user@dummy/remote hookout | |
574 | $ cd hookout |
|
578 | $ cd hookout | |
575 | $ touch hookfailure |
|
579 | $ touch hookfailure | |
576 | $ hg -q commit -A -m 'remote hook failure' |
|
580 | $ hg -q commit -A -m 'remote hook failure' | |
577 | $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" push |
|
581 | $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" push | |
578 | pushing to ssh://user@dummy/remote |
|
582 | pushing to ssh://user@dummy/remote | |
579 | searching for changes |
|
583 | searching for changes | |
580 | remote: adding changesets |
|
584 | remote: adding changesets | |
581 | remote: adding manifests |
|
585 | remote: adding manifests | |
582 | remote: adding file changes |
|
586 | remote: adding file changes | |
583 | remote: added 1 changesets with 1 changes to 1 files |
|
587 | remote: added 1 changesets with 1 changes to 1 files | |
584 | remote: hook failure! |
|
588 | remote: hook failure! | |
585 | remote: transaction abort! |
|
589 | remote: transaction abort! | |
586 | remote: rollback completed |
|
590 | remote: rollback completed | |
587 | remote: pretxnchangegroup.fail hook failed |
|
591 | remote: pretxnchangegroup.fail hook failed | |
588 | abort: push failed on remote |
|
592 | abort: push failed on remote | |
589 | [255] |
|
593 | [255] | |
590 |
|
594 | |||
591 | abort during pull is properly reported as such |
|
595 | abort during pull is properly reported as such | |
592 |
|
596 | |||
593 | $ echo morefoo >> ../remote/foo |
|
597 | $ echo morefoo >> ../remote/foo | |
594 | $ hg -R ../remote commit --message "more foo to be pulled" |
|
598 | $ hg -R ../remote commit --message "more foo to be pulled" | |
595 | $ cat >> ../remote/.hg/hgrc << EOF |
|
599 | $ cat >> ../remote/.hg/hgrc << EOF | |
596 | > [extensions] |
|
600 | > [extensions] | |
597 | > crash = ${TESTDIR}/crashgetbundler.py |
|
601 | > crash = ${TESTDIR}/crashgetbundler.py | |
598 | > EOF |
|
602 | > EOF | |
599 | $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" pull |
|
603 | $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" pull | |
600 | pulling from ssh://user@dummy/remote |
|
604 | pulling from ssh://user@dummy/remote | |
601 | searching for changes |
|
605 | searching for changes | |
602 | remote: abort: this is an exercise |
|
606 | remote: abort: this is an exercise | |
603 | abort: pull failed on remote |
|
607 | abort: pull failed on remote | |
604 | [255] |
|
608 | [255] | |
605 |
|
609 | |||
606 | abort with no error hint when there is a ssh problem when pulling |
|
610 | abort with no error hint when there is a ssh problem when pulling | |
607 |
|
611 | |||
608 | $ hg pull ssh://brokenrepository -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" |
|
612 | $ hg pull ssh://brokenrepository -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" | |
609 | pulling from ssh://brokenrepository/ |
|
613 | pulling from ssh://brokenrepository/ | |
610 | abort: no suitable response from remote hg! |
|
614 | abort: no suitable response from remote hg! | |
611 | [255] |
|
615 | [255] | |
612 |
|
616 | |||
613 | abort with configured error hint when there is a ssh problem when pulling |
|
617 | abort with configured error hint when there is a ssh problem when pulling | |
614 |
|
618 | |||
615 | $ hg pull ssh://brokenrepository -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" \ |
|
619 | $ hg pull ssh://brokenrepository -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" \ | |
616 | > --config ui.ssherrorhint="Please see http://company/internalwiki/ssh.html" |
|
620 | > --config ui.ssherrorhint="Please see http://company/internalwiki/ssh.html" | |
617 | pulling from ssh://brokenrepository/ |
|
621 | pulling from ssh://brokenrepository/ | |
618 | abort: no suitable response from remote hg! |
|
622 | abort: no suitable response from remote hg! | |
619 | (Please see http://company/internalwiki/ssh.html) |
|
623 | (Please see http://company/internalwiki/ssh.html) | |
620 | [255] |
|
624 | [255] | |
621 |
|
625 | |||
622 | test that custom environment is passed down to ssh executable |
|
626 | test that custom environment is passed down to ssh executable | |
623 | $ cat >>dumpenv <<EOF |
|
627 | $ cat >>dumpenv <<EOF | |
624 | > #! /bin/sh |
|
628 | > #! /bin/sh | |
625 | > echo \$VAR >&2 |
|
629 | > echo \$VAR >&2 | |
626 | > EOF |
|
630 | > EOF | |
627 | $ chmod +x dumpenv |
|
631 | $ chmod +x dumpenv | |
628 | $ hg pull ssh://something --config ui.ssh="sh dumpenv" |
|
632 | $ hg pull ssh://something --config ui.ssh="sh dumpenv" | |
629 | pulling from ssh://something/ |
|
633 | pulling from ssh://something/ | |
630 | remote: |
|
634 | remote: | |
631 | abort: no suitable response from remote hg! |
|
635 | abort: no suitable response from remote hg! | |
632 | [255] |
|
636 | [255] | |
633 | $ hg pull ssh://something --config ui.ssh="sh dumpenv" --config sshenv.VAR=17 |
|
637 | $ hg pull ssh://something --config ui.ssh="sh dumpenv" --config sshenv.VAR=17 | |
634 | pulling from ssh://something/ |
|
638 | pulling from ssh://something/ | |
635 | remote: 17 |
|
639 | remote: 17 | |
636 | abort: no suitable response from remote hg! |
|
640 | abort: no suitable response from remote hg! | |
637 | [255] |
|
641 | [255] | |
638 |
|
642 |
@@ -1,170 +1,172 | |||||
|
1 | #require no-reposimplestore | |||
|
2 | ||||
1 | Test creating a consuming stream bundle v2 |
|
3 | Test creating a consuming stream bundle v2 | |
2 |
|
4 | |||
3 | $ getmainid() { |
|
5 | $ getmainid() { | |
4 | > hg -R main log --template '{node}\n' --rev "$1" |
|
6 | > hg -R main log --template '{node}\n' --rev "$1" | |
5 | > } |
|
7 | > } | |
6 |
|
8 | |||
7 | $ cp $HGRCPATH $TESTTMP/hgrc.orig |
|
9 | $ cp $HGRCPATH $TESTTMP/hgrc.orig | |
8 |
|
10 | |||
9 | $ cat >> $HGRCPATH << EOF |
|
11 | $ cat >> $HGRCPATH << EOF | |
10 | > [experimental] |
|
12 | > [experimental] | |
11 | > evolution.createmarkers=True |
|
13 | > evolution.createmarkers=True | |
12 | > evolution.exchange=True |
|
14 | > evolution.exchange=True | |
13 | > bundle2-output-capture=True |
|
15 | > bundle2-output-capture=True | |
14 | > [ui] |
|
16 | > [ui] | |
15 | > ssh="$PYTHON" "$TESTDIR/dummyssh" |
|
17 | > ssh="$PYTHON" "$TESTDIR/dummyssh" | |
16 | > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline} |
|
18 | > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline} | |
17 | > [web] |
|
19 | > [web] | |
18 | > push_ssl = false |
|
20 | > push_ssl = false | |
19 | > allow_push = * |
|
21 | > allow_push = * | |
20 | > [phases] |
|
22 | > [phases] | |
21 | > publish=False |
|
23 | > publish=False | |
22 | > [extensions] |
|
24 | > [extensions] | |
23 | > drawdag=$TESTDIR/drawdag.py |
|
25 | > drawdag=$TESTDIR/drawdag.py | |
24 | > clonebundles= |
|
26 | > clonebundles= | |
25 | > EOF |
|
27 | > EOF | |
26 |
|
28 | |||
27 | The extension requires a repo (currently unused) |
|
29 | The extension requires a repo (currently unused) | |
28 |
|
30 | |||
29 | $ hg init main |
|
31 | $ hg init main | |
30 | $ cd main |
|
32 | $ cd main | |
31 |
|
33 | |||
32 | $ hg debugdrawdag <<'EOF' |
|
34 | $ hg debugdrawdag <<'EOF' | |
33 | > E |
|
35 | > E | |
34 | > | |
|
36 | > | | |
35 | > D |
|
37 | > D | |
36 | > | |
|
38 | > | | |
37 | > C |
|
39 | > C | |
38 | > | |
|
40 | > | | |
39 | > B |
|
41 | > B | |
40 | > | |
|
42 | > | | |
41 | > A |
|
43 | > A | |
42 | > EOF |
|
44 | > EOF | |
43 |
|
45 | |||
44 | $ hg bundle -a --type="none-v2;stream=v2" bundle.hg |
|
46 | $ hg bundle -a --type="none-v2;stream=v2" bundle.hg | |
45 | $ hg debugbundle bundle.hg |
|
47 | $ hg debugbundle bundle.hg | |
46 | Stream params: {} |
|
48 | Stream params: {} | |
47 | stream2 -- {bytecount: 1693, filecount: 11, requirements: dotencode%2Cfncache%2Cgeneraldelta%2Crevlogv1%2Cstore} |
|
49 | stream2 -- {bytecount: 1693, filecount: 11, requirements: dotencode%2Cfncache%2Cgeneraldelta%2Crevlogv1%2Cstore} | |
48 | $ hg debugbundle --spec bundle.hg |
|
50 | $ hg debugbundle --spec bundle.hg | |
49 | none-v2;stream=v2;requirements%3Ddotencode%2Cfncache%2Cgeneraldelta%2Crevlogv1%2Cstore |
|
51 | none-v2;stream=v2;requirements%3Ddotencode%2Cfncache%2Cgeneraldelta%2Crevlogv1%2Cstore | |
50 |
|
52 | |||
51 | Test that we can apply the bundle as a stream clone bundle |
|
53 | Test that we can apply the bundle as a stream clone bundle | |
52 |
|
54 | |||
53 | $ cat > .hg/clonebundles.manifest << EOF |
|
55 | $ cat > .hg/clonebundles.manifest << EOF | |
54 | > http://localhost:$HGPORT1/bundle.hg BUNDLESPEC=`hg debugbundle --spec bundle.hg` |
|
56 | > http://localhost:$HGPORT1/bundle.hg BUNDLESPEC=`hg debugbundle --spec bundle.hg` | |
55 | > EOF |
|
57 | > EOF | |
56 |
|
58 | |||
57 | $ hg serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log |
|
59 | $ hg serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log | |
58 | $ cat hg.pid >> $DAEMON_PIDS |
|
60 | $ cat hg.pid >> $DAEMON_PIDS | |
59 |
|
61 | |||
60 | $ "$PYTHON" $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid |
|
62 | $ "$PYTHON" $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid | |
61 | $ cat http.pid >> $DAEMON_PIDS |
|
63 | $ cat http.pid >> $DAEMON_PIDS | |
62 |
|
64 | |||
63 | $ cd .. |
|
65 | $ cd .. | |
64 | $ hg clone http://localhost:$HGPORT streamv2-clone-implicit --debug |
|
66 | $ hg clone http://localhost:$HGPORT streamv2-clone-implicit --debug | |
65 | using http://localhost:$HGPORT/ |
|
67 | using http://localhost:$HGPORT/ | |
66 | sending capabilities command |
|
68 | sending capabilities command | |
67 | sending clonebundles command |
|
69 | sending clonebundles command | |
68 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg |
|
70 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg | |
69 | bundle2-input-bundle: with-transaction |
|
71 | bundle2-input-bundle: with-transaction | |
70 | bundle2-input-part: "stream2" (params: 3 mandatory) supported |
|
72 | bundle2-input-part: "stream2" (params: 3 mandatory) supported | |
71 | applying stream bundle |
|
73 | applying stream bundle | |
72 | 11 files to transfer, 1.65 KB of data |
|
74 | 11 files to transfer, 1.65 KB of data | |
73 | starting 4 threads for background file closing (?) |
|
75 | starting 4 threads for background file closing (?) | |
74 | starting 4 threads for background file closing (?) |
|
76 | starting 4 threads for background file closing (?) | |
75 | adding [s] data/A.i (66 bytes) |
|
77 | adding [s] data/A.i (66 bytes) | |
76 | adding [s] data/B.i (66 bytes) |
|
78 | adding [s] data/B.i (66 bytes) | |
77 | adding [s] data/C.i (66 bytes) |
|
79 | adding [s] data/C.i (66 bytes) | |
78 | adding [s] data/D.i (66 bytes) |
|
80 | adding [s] data/D.i (66 bytes) | |
79 | adding [s] data/E.i (66 bytes) |
|
81 | adding [s] data/E.i (66 bytes) | |
80 | adding [s] 00manifest.i (584 bytes) |
|
82 | adding [s] 00manifest.i (584 bytes) | |
81 | adding [s] 00changelog.i (595 bytes) |
|
83 | adding [s] 00changelog.i (595 bytes) | |
82 | adding [s] phaseroots (43 bytes) |
|
84 | adding [s] phaseroots (43 bytes) | |
83 | adding [c] branch2-served (94 bytes) |
|
85 | adding [c] branch2-served (94 bytes) | |
84 | adding [c] rbc-names-v1 (7 bytes) |
|
86 | adding [c] rbc-names-v1 (7 bytes) | |
85 | adding [c] rbc-revs-v1 (40 bytes) |
|
87 | adding [c] rbc-revs-v1 (40 bytes) | |
86 | transferred 1.65 KB in \d\.\d seconds \(.*/sec\) (re) |
|
88 | transferred 1.65 KB in \d\.\d seconds \(.*/sec\) (re) | |
87 | bundle2-input-part: total payload size 1840 |
|
89 | bundle2-input-part: total payload size 1840 | |
88 | bundle2-input-bundle: 0 parts total |
|
90 | bundle2-input-bundle: 0 parts total | |
89 | finished applying clone bundle |
|
91 | finished applying clone bundle | |
90 | query 1; heads |
|
92 | query 1; heads | |
91 | sending batch command |
|
93 | sending batch command | |
92 | searching for changes |
|
94 | searching for changes | |
93 | all remote heads known locally |
|
95 | all remote heads known locally | |
94 | no changes found |
|
96 | no changes found | |
95 | sending getbundle command |
|
97 | sending getbundle command | |
96 | bundle2-input-bundle: with-transaction |
|
98 | bundle2-input-bundle: with-transaction | |
97 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported |
|
99 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported | |
98 | bundle2-input-part: "phase-heads" supported |
|
100 | bundle2-input-part: "phase-heads" supported | |
99 | bundle2-input-part: total payload size 24 |
|
101 | bundle2-input-part: total payload size 24 | |
100 | bundle2-input-bundle: 1 parts total |
|
102 | bundle2-input-bundle: 1 parts total | |
101 | checking for updated bookmarks |
|
103 | checking for updated bookmarks | |
102 | updating to branch default |
|
104 | updating to branch default | |
103 | resolving manifests |
|
105 | resolving manifests | |
104 | branchmerge: False, force: False, partial: False |
|
106 | branchmerge: False, force: False, partial: False | |
105 | ancestor: 000000000000, local: 000000000000+, remote: 9bc730a19041 |
|
107 | ancestor: 000000000000, local: 000000000000+, remote: 9bc730a19041 | |
106 | A: remote created -> g |
|
108 | A: remote created -> g | |
107 | getting A |
|
109 | getting A | |
108 | B: remote created -> g |
|
110 | B: remote created -> g | |
109 | getting B |
|
111 | getting B | |
110 | C: remote created -> g |
|
112 | C: remote created -> g | |
111 | getting C |
|
113 | getting C | |
112 | D: remote created -> g |
|
114 | D: remote created -> g | |
113 | getting D |
|
115 | getting D | |
114 | E: remote created -> g |
|
116 | E: remote created -> g | |
115 | getting E |
|
117 | getting E | |
116 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
118 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
117 |
|
119 | |||
118 | $ hg clone --stream http://localhost:$HGPORT streamv2-clone-explicit --debug |
|
120 | $ hg clone --stream http://localhost:$HGPORT streamv2-clone-explicit --debug | |
119 | using http://localhost:$HGPORT/ |
|
121 | using http://localhost:$HGPORT/ | |
120 | sending capabilities command |
|
122 | sending capabilities command | |
121 | sending clonebundles command |
|
123 | sending clonebundles command | |
122 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg |
|
124 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg | |
123 | bundle2-input-bundle: with-transaction |
|
125 | bundle2-input-bundle: with-transaction | |
124 | bundle2-input-part: "stream2" (params: 3 mandatory) supported |
|
126 | bundle2-input-part: "stream2" (params: 3 mandatory) supported | |
125 | applying stream bundle |
|
127 | applying stream bundle | |
126 | 11 files to transfer, 1.65 KB of data |
|
128 | 11 files to transfer, 1.65 KB of data | |
127 | starting 4 threads for background file closing (?) |
|
129 | starting 4 threads for background file closing (?) | |
128 | starting 4 threads for background file closing (?) |
|
130 | starting 4 threads for background file closing (?) | |
129 | adding [s] data/A.i (66 bytes) |
|
131 | adding [s] data/A.i (66 bytes) | |
130 | adding [s] data/B.i (66 bytes) |
|
132 | adding [s] data/B.i (66 bytes) | |
131 | adding [s] data/C.i (66 bytes) |
|
133 | adding [s] data/C.i (66 bytes) | |
132 | adding [s] data/D.i (66 bytes) |
|
134 | adding [s] data/D.i (66 bytes) | |
133 | adding [s] data/E.i (66 bytes) |
|
135 | adding [s] data/E.i (66 bytes) | |
134 | adding [s] 00manifest.i (584 bytes) |
|
136 | adding [s] 00manifest.i (584 bytes) | |
135 | adding [s] 00changelog.i (595 bytes) |
|
137 | adding [s] 00changelog.i (595 bytes) | |
136 | adding [s] phaseroots (43 bytes) |
|
138 | adding [s] phaseroots (43 bytes) | |
137 | adding [c] branch2-served (94 bytes) |
|
139 | adding [c] branch2-served (94 bytes) | |
138 | adding [c] rbc-names-v1 (7 bytes) |
|
140 | adding [c] rbc-names-v1 (7 bytes) | |
139 | adding [c] rbc-revs-v1 (40 bytes) |
|
141 | adding [c] rbc-revs-v1 (40 bytes) | |
140 | transferred 1.65 KB in *.* seconds (*/sec) (glob) |
|
142 | transferred 1.65 KB in *.* seconds (*/sec) (glob) | |
141 | bundle2-input-part: total payload size 1840 |
|
143 | bundle2-input-part: total payload size 1840 | |
142 | bundle2-input-bundle: 0 parts total |
|
144 | bundle2-input-bundle: 0 parts total | |
143 | finished applying clone bundle |
|
145 | finished applying clone bundle | |
144 | query 1; heads |
|
146 | query 1; heads | |
145 | sending batch command |
|
147 | sending batch command | |
146 | searching for changes |
|
148 | searching for changes | |
147 | all remote heads known locally |
|
149 | all remote heads known locally | |
148 | no changes found |
|
150 | no changes found | |
149 | sending getbundle command |
|
151 | sending getbundle command | |
150 | bundle2-input-bundle: with-transaction |
|
152 | bundle2-input-bundle: with-transaction | |
151 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported |
|
153 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported | |
152 | bundle2-input-part: "phase-heads" supported |
|
154 | bundle2-input-part: "phase-heads" supported | |
153 | bundle2-input-part: total payload size 24 |
|
155 | bundle2-input-part: total payload size 24 | |
154 | bundle2-input-bundle: 1 parts total |
|
156 | bundle2-input-bundle: 1 parts total | |
155 | checking for updated bookmarks |
|
157 | checking for updated bookmarks | |
156 | updating to branch default |
|
158 | updating to branch default | |
157 | resolving manifests |
|
159 | resolving manifests | |
158 | branchmerge: False, force: False, partial: False |
|
160 | branchmerge: False, force: False, partial: False | |
159 | ancestor: 000000000000, local: 000000000000+, remote: 9bc730a19041 |
|
161 | ancestor: 000000000000, local: 000000000000+, remote: 9bc730a19041 | |
160 | A: remote created -> g |
|
162 | A: remote created -> g | |
161 | getting A |
|
163 | getting A | |
162 | B: remote created -> g |
|
164 | B: remote created -> g | |
163 | getting B |
|
165 | getting B | |
164 | C: remote created -> g |
|
166 | C: remote created -> g | |
165 | getting C |
|
167 | getting C | |
166 | D: remote created -> g |
|
168 | D: remote created -> g | |
167 | getting D |
|
169 | getting D | |
168 | E: remote created -> g |
|
170 | E: remote created -> g | |
169 | getting E |
|
171 | getting E | |
170 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
172 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
General Comments 0
You need to be logged in to leave comments.
Login now