Mercurial > hg
view tests/test-push-validation.t @ 28284:0fe00bdb2f4f
run-tests: fix Python 3 incompatibilities
At one point run-tests.py and test-run-tests.t worked and passed
under Python 3.5. Various changes to run-tests.py over the past
several months appear to have broken Python 3.5 compatibility.
This patch implements various fixes (all related to str/bytes type
coercion) to make run-tests.py and test-run-tests.t mostly work
again. There are still a few failures in test-run-tests.t due to
issues importing mercurial.* modules. But at least run-tests.py
seems to work under 3.5 again.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 27 Feb 2016 21:29:42 -0800 |
parents | 2a03a365f645 |
children |
line wrap: on
line source
$ hg init test $ cd test $ cat > .hg/hgrc <<EOF > [server] > validate=1 > EOF $ echo alpha > alpha $ echo beta > beta $ hg addr adding alpha adding beta $ hg ci -m 1 $ cd .. $ hg clone test test-clone updating to branch default 2 files updated, 0 files merged, 0 files removed, 0 files unresolved Test spurious filelog entries: $ cd test-clone $ echo blah >> beta $ cp .hg/store/data/beta.i tmp1 $ hg ci -m 2 $ cp .hg/store/data/beta.i tmp2 $ hg -q rollback $ mv tmp2 .hg/store/data/beta.i $ echo blah >> beta $ hg ci -m '2 (corrupt)' Expected to fail: $ hg verify checking changesets checking manifests crosschecking files in changesets and manifests checking files beta@1: dddc47b3ba30 not in manifests 2 files, 2 changesets, 4 total revisions 1 integrity errors encountered! (first damaged changeset appears to be 1) [1] $ hg push pushing to $TESTTMP/test (glob) searching for changes adding changesets adding manifests adding file changes transaction abort! rollback completed abort: received spurious file revlog entry [255] $ hg -q rollback $ mv tmp1 .hg/store/data/beta.i $ echo beta > beta Test missing filelog entries: $ cp .hg/store/data/beta.i tmp $ echo blah >> beta $ hg ci -m '2 (corrupt)' $ mv tmp .hg/store/data/beta.i Expected to fail: $ hg verify checking changesets checking manifests crosschecking files in changesets and manifests checking files beta@1: manifest refers to unknown revision dddc47b3ba30 2 files, 2 changesets, 2 total revisions 1 integrity errors encountered! (first damaged changeset appears to be 1) [1] $ hg push pushing to $TESTTMP/test (glob) searching for changes adding changesets adding manifests adding file changes transaction abort! rollback completed abort: missing file data for beta:dddc47b3ba30e54484720ce0f4f768a0f4b6efb9 - run hg verify [255] $ cd ..