| 1 |
MEDIATYPE=application/mercurial-exp-framing-0006 |
| 2 |
|
| 3 |
sendhttpraw() { |
| 4 |
hg --verbose debugwireproto --peer raw http://$LOCALIP:$HGPORT/ |
| 5 |
} |
| 6 |
|
| 7 |
cat > dummycommands.py << EOF |
| 8 |
from mercurial import ( |
| 9 |
wireprototypes, |
| 10 |
wireprotov1server, |
| 11 |
) |
| 12 |
|
| 13 |
@wireprotov1server.wireprotocommand(b'customreadonly', permission=b'pull') |
| 14 |
def customreadonlyv1(repo, proto): |
| 15 |
return wireprototypes.bytesresponse(b'customreadonly bytes response') |
| 16 |
|
| 17 |
@wireprotov1server.wireprotocommand(b'customreadwrite', permission=b'push') |
| 18 |
def customreadwrite(repo, proto): |
| 19 |
return wireprototypes.bytesresponse(b'customreadwrite bytes response') |
| 20 |
|
| 21 |
EOF |
| 22 |
|
| 23 |
cat >> $HGRCPATH << EOF |
| 24 |
[extensions] |
| 25 |
drawdag = $TESTDIR/drawdag.py |
| 26 |
EOF |
| 27 |
|
| 28 |
enabledummycommands() { |
| 29 |
cat >> $HGRCPATH << EOF |
| 30 |
[extensions] |
| 31 |
dummycommands = $TESTTMP/dummycommands.py |
| 32 |
EOF |
| 33 |
} |
| 34 |
|