view tests/wireprotohelpers.sh @ 52005:028bac79cf34

upgrade: disable using the parallel workers optimization on macOS It crashes `test-copies-chain-merge.t` for some reason[1]. It's only experimental, and already hard-disabled on Windows. [1] https://foss.heptapod.net/mercurial/mercurial-devel/-/jobs/2591045#L108
author Matt Harbison <matt_harbison@yahoo.com>
date Wed, 09 Oct 2024 13:55:04 -0400
parents 04688c51f81f
children
line wrap: on
line source

MEDIATYPE=application/mercurial-exp-framing-0006

sendhttpraw() {
  hg --verbose debugwireproto --peer raw http://$LOCALIP:$HGPORT/
}

cat > dummycommands.py << EOF
from mercurial import (
    wireprototypes,
    wireprotov1server,
)

@wireprotov1server.wireprotocommand(b'customreadonly', permission=b'pull')
def customreadonlyv1(repo, proto):
    return wireprototypes.bytesresponse(b'customreadonly bytes response')

@wireprotov1server.wireprotocommand(b'customreadwrite', permission=b'push')
def customreadwrite(repo, proto):
    return wireprototypes.bytesresponse(b'customreadwrite bytes response')

EOF

cat >> $HGRCPATH << EOF
[extensions]
drawdag = $TESTDIR/drawdag.py
EOF

enabledummycommands() {
  cat >> $HGRCPATH << EOF
[extensions]
dummycommands = $TESTTMP/dummycommands.py
EOF
}