Debian Codegraph @

tests/test-known.t

raw
1 = Test the known() protocol function =
2
3 Create a test repository:
4
5 $ hg init repo
6 $ cd repo
7 $ touch a ; hg add a ; hg ci -ma
8 $ touch b ; hg add b ; hg ci -mb
9 $ touch c ; hg add c ; hg ci -mc
10 $ hg log --template '{node}\n'
11 991a3460af53952d10ec8a295d3d2cc2e5fa9690
12 0e067c57feba1a5694ca4844f05588bb1bf82342
13 3903775176ed42b1458a6281db4a0ccf4d9f287a
14 $ cd ..
15
16 Test locally:
17
18 $ hg debugknown repo 991a3460af53952d10ec8a295d3d2cc2e5fa9690 0e067c57feba1a5694ca4844f05588bb1bf82342 3903775176ed42b1458a6281db4a0ccf4d9f287a
19 111
20 $ hg debugknown repo 000a3460af53952d10ec8a295d3d2cc2e5fa9690 0e067c57feba1a5694ca4844f05588bb1bf82342 0003775176ed42b1458a6281db4a0ccf4d9f287a
21 010
22 $ hg debugknown repo
23
24
25 Test via HTTP:
26
27 $ hg serve -R repo -p $HGPORT -d --pid-file=hg.pid -E error.log -A access.log
28 $ cat hg.pid >> $DAEMON_PIDS
29 $ hg debugknown http://localhost:$HGPORT/ 991a3460af53952d10ec8a295d3d2cc2e5fa9690 0e067c57feba1a5694ca4844f05588bb1bf82342 3903775176ed42b1458a6281db4a0ccf4d9f287a
30 111
31 $ hg debugknown http://localhost:$HGPORT/ 000a3460af53952d10ec8a295d3d2cc2e5fa9690 0e067c57feba1a5694ca4844f05588bb1bf82342 0003775176ed42b1458a6281db4a0ccf4d9f287a
32 010
33 $ hg debugknown http://localhost:$HGPORT/
34
35 $ cat error.log
36 $ killdaemons.py
37