Mercurial > hg
view tests/wireprotohelpers.sh @ 49193:566066826e7c
upgrade: split some logic from UpgradeOperation
The logic for automatic-upgrade and the upgrade-repo should be able to use the
same code. However that code often need an UpgradeOperation object to function.
So we start spliting the Operation into a minimal component that we will be
able to reuse outside of the "classic" upgrade path.
We will put the base-class to use in the next changeset.
Differential Revision: https://phab.mercurial-scm.org/D12612
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 04 Apr 2022 19:30:32 +0200 |
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 }