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
Just exercise debugindexdot
Create a short file history including a merge.
$ hg init t
$ cd t
$ echo a > a
$ hg ci -qAm t1 -d '0 0'
$ echo a >> a
$ hg ci -m t2 -d '1 0'
$ hg up -qC 0
$ echo b >> a
$ hg ci -m t3 -d '2 0'
created new head
$ HGMERGE=true hg merge -q
$ hg ci -m merge -d '3 0'
$ hg debugindexdot -c
digraph G {
-1 -> 0
0 -> 1
0 -> 2
2 -> 3
1 -> 3
}
$ hg debugindexdot -m
digraph G {
-1 -> 0
0 -> 1
0 -> 2
2 -> 3
1 -> 3
}
$ hg debugindexdot a
digraph G {
-1 -> 0
0 -> 1
0 -> 2
2 -> 3
1 -> 3
}
$ cd ..