209 |
209 |
210 $ get-with-headers.py localhost:$HGPORT1 'log?style=raw&access-hidden=1' | grep revision: |
210 $ get-with-headers.py localhost:$HGPORT1 'log?style=raw&access-hidden=1' | grep revision: |
211 revision: 2 |
211 revision: 2 |
212 revision: 0 |
212 revision: 0 |
213 |
213 |
|
214 Test --remote-hidden for http peer |
|
215 ---------------------------------- |
|
216 |
|
217 $ hg clone --pull http://localhost:$HGPORT client-http |
|
218 requesting all changes |
|
219 adding changesets |
|
220 adding manifests |
|
221 adding file changes |
|
222 added 2 changesets with 2 changes to 1 files |
|
223 2 new obsolescence markers |
|
224 new changesets 5f354f46e585:c33affeb3f6b (1 drafts) |
|
225 updating to branch default |
|
226 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
227 $ hg -R client-http log -G --hidden -v |
|
228 @ 1:c33affeb3f6b c_Amend_New [draft] |
|
229 | |
|
230 o 0:5f354f46e585 c_Public [public] |
|
231 |
|
232 |
|
233 pulling an hidden changeset should fail: |
|
234 |
|
235 $ hg -R client-http pull -r be215fbb8c50 |
|
236 pulling from http://localhost:$HGPORT/ |
|
237 abort: filtered revision 'be215fbb8c50' (not in 'served' subset) |
|
238 [255] |
|
239 |
|
240 pulling an hidden changeset with --remote-hidden should succeed: |
|
241 |
|
242 $ hg -R client-http pull --remote-hidden -r be215fbb8c50 |
|
243 pulling from http://localhost:$HGPORT/ |
|
244 searching for changes |
|
245 adding changesets |
|
246 adding manifests |
|
247 adding file changes |
|
248 added 1 changesets with 1 changes to 1 files (+1 heads) |
|
249 (1 other changesets obsolete on arrival) |
|
250 (run 'hg heads' to see heads) |
|
251 $ hg -R client-http log -G --hidden -v |
|
252 x 2:be215fbb8c50 c_Amend_Old [draft] |
|
253 | |
|
254 | @ 1:c33affeb3f6b c_Amend_New [draft] |
|
255 |/ |
|
256 o 0:5f354f46e585 c_Public [public] |
|
257 |
|
258 |
|
259 Pulling a secret changeset is still forbidden: |
|
260 |
|
261 secret visible: |
|
262 |
|
263 $ hg -R client-http pull --remote-hidden -r 8d28cbe335f3 |
|
264 pulling from http://localhost:$HGPORT/ |
|
265 abort: filtered revision '8d28cbe335f3' (not in 'served.hidden' subset) |
|
266 [255] |
|
267 |
|
268 secret hidden: |
|
269 |
|
270 $ hg -R client-http pull --remote-hidden -r 1c6afd79eb66 |
|
271 pulling from http://localhost:$HGPORT/ |
|
272 abort: filtered revision '1c6afd79eb66' (not in 'served.hidden' subset) |
|
273 [255] |
|
274 |
|
275 Same check on a server that do not allow hidden access: |
|
276 ``````````````````````````````````````````````````````` |
|
277 |
|
278 $ hg clone --pull http://localhost:$HGPORT1 client-http2 |
|
279 requesting all changes |
|
280 adding changesets |
|
281 adding manifests |
|
282 adding file changes |
|
283 added 2 changesets with 2 changes to 1 files |
|
284 2 new obsolescence markers |
|
285 new changesets 5f354f46e585:c33affeb3f6b (1 drafts) |
|
286 updating to branch default |
|
287 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
288 $ hg -R client-http2 log -G --hidden -v |
|
289 @ 1:c33affeb3f6b c_Amend_New [draft] |
|
290 | |
|
291 o 0:5f354f46e585 c_Public [public] |
|
292 |
|
293 |
|
294 pulling an hidden changeset should fail: |
|
295 |
|
296 $ hg -R client-http2 pull -r be215fbb8c50 |
|
297 pulling from http://localhost:$HGPORT1/ |
|
298 abort: filtered revision 'be215fbb8c50' (not in 'served' subset) |
|
299 [255] |
|
300 |
|
301 pulling an hidden changeset with --remote-hidden should fail too: |
|
302 |
|
303 $ hg -R client-http2 pull --remote-hidden -r be215fbb8c50 |
|
304 pulling from http://localhost:$HGPORT1/ |
|
305 abort: filtered revision 'be215fbb8c50' (not in 'served' subset) |
|
306 [255] |
|
307 |
214 ============= |
308 ============= |
215 Final cleanup |
309 Final cleanup |
216 ============= |
310 ============= |
217 |
311 |
218 $ killdaemons.py |
312 $ killdaemons.py |