Mercurial > hg
view tests/test-narrow-acl.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 | 5c2a4f37eace |
children | 5e6542143d40 |
line wrap: on
line source
Make a narrow clone then archive it $ . "$TESTDIR/narrow-library.sh" $ hg init master $ cd master $ for x in `$TESTDIR/seq.py 3`; do > echo $x > "f$x" > hg add "f$x" > hg commit -m "Add $x" > done $ cat >> .hg/hgrc << EOF > [narrowacl] > default.includes=f1 f2 > EOF $ hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid $ cat hg.pid >> "$DAEMON_PIDS" $ cd .. $ hg clone http://localhost:$HGPORT1 narrowclone1 requesting all changes adding changesets adding manifests adding file changes added 3 changesets with 2 changes to 2 files new changesets * (glob) updating to branch default 2 files updated, 0 files merged, 0 files removed, 0 files unresolved The clone directory should only contain f1 and f2 $ ls -A -1 narrowclone1 | sort .hg f1 f2 Requirements should contain narrowhg $ cat narrowclone1/.hg/requires | grep narrowhg narrowhg-experimental NarrowHG should track f1 and f2 $ hg -R narrowclone1 tracked I path:f1 I path:f2