Mercurial > hg
view tests/test-server-view.t @ 45903:64faa55716f4
tests: make test-worker.t pass on py2
I broke the py2 version in https://phab.mercurial-scm.org/D9287
because the `WorkerError.__bytes__()` (or `.__str__()`?) output was
different in py2 compared to py3. Part of the problem was that I
didn't propagate the status code that was passed in to the superclass
so it could get printed. This patch fixes that. I don't know how it
worked on py3 before this patch...
I also added the usual `__bytes__ = _tobytes` override for good
measure. It doesn't seem to be needed for tests to pass, though.
Differential Revision: https://phab.mercurial-scm.org/D9377
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 23 Nov 2020 11:56:10 -0800 |
parents | cdf0e9523de1 |
children | d24573181003 |
line wrap: on
line source
$ hg init test $ cd test $ hg debugbuilddag '+2' $ hg phase --public 0 $ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log $ cat hg.pid >> $DAEMON_PIDS $ cd .. $ hg init test2 $ cd test2 $ hg incoming http://foo:xyzzy@localhost:$HGPORT/ comparing with http://foo:***@localhost:$HGPORT/ changeset: 0:1ea73414a91b user: debugbuilddag date: Thu Jan 01 00:00:00 1970 +0000 summary: r0 changeset: 1:66f7d451a68b tag: tip user: debugbuilddag date: Thu Jan 01 00:00:01 1970 +0000 summary: r1 $ killdaemons.py $ cd .. $ hg -R test --config server.view=immutable serve -p $HGPORT -d --pid-file=hg.pid -E errors.log $ cat hg.pid >> $DAEMON_PIDS $ hg -R test2 incoming http://foo:xyzzy@localhost:$HGPORT/ comparing with http://foo:***@localhost:$HGPORT/ changeset: 0:1ea73414a91b tag: tip user: debugbuilddag date: Thu Jan 01 00:00:00 1970 +0000 summary: r0 Check same result using `experimental.extra-filter-revs` $ hg -R test --config experimental.extra-filter-revs='not public()' serve -p $HGPORT1 -d --pid-file=hg2.pid -E errors.log $ cat hg2.pid >> $DAEMON_PIDS $ hg -R test2 incoming http://foo:xyzzy@localhost:$HGPORT1/ comparing with http://foo:***@localhost:$HGPORT1/ changeset: 0:1ea73414a91b tag: tip user: debugbuilddag date: Thu Jan 01 00:00:00 1970 +0000 summary: r0 $ hg -R test --config experimental.extra-filter-revs='not public()' debugupdatecache $ ls -1 test/.hg/cache/ branch2-base%89c45d2fa07e branch2-immutable%89c45d2fa07e branch2-served branch2-served%89c45d2fa07e branch2-served.hidden%89c45d2fa07e branch2-visible%89c45d2fa07e branch2-visible-hidden%89c45d2fa07e hgtagsfnodes1 rbc-names-v1 rbc-revs-v1 tags2 tags2-served%89c45d2fa07e cleanup $ cat errors.log $ killdaemons.py