Mercurial > public > mercurial-scm > hg
diff tests/test-parseindex.t @ 26016:c8d41c9c23c7
reachableroots: unify bail cases to raise exception correctly
Before this patch, release_seen_and_tovisit did not return NULL, so the
exception was not raised immediately. As Py_XDECREF() and free() are safe
for NULL, we can simply bail in any case.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 13 Aug 2015 18:29:38 +0900 |
parents | 1619563959b3 |
children | 44705659da94 |
line wrap: on
line diff
--- a/tests/test-parseindex.t Thu Aug 13 17:58:33 2015 +0900 +++ b/tests/test-parseindex.t Thu Aug 13 18:29:38 2015 +0900 @@ -94,6 +94,8 @@ > cl = changelog.changelog(scmutil.vfs(sys.argv[1])) > n0, n1 = cl.node(0), cl.node(1) > ops = [ + > ('reachableroots', + > lambda: cl.index.reachableroots(0, [1], set([0]), False)), > ('compute_phases_map_sets', lambda: cl.computephases([[0], []])), > ('index_headrevs', lambda: cl.headrevs()), > ('find_gca_candidates', lambda: cl.commonancestorsheads(n0, n1)), @@ -109,11 +111,13 @@ > EOF $ python test.py limit/.hg/store + reachableroots: parent out of range compute_phases_map_sets: parent out of range index_headrevs: parent out of range find_gca_candidates: parent out of range find_deepest: parent out of range $ python test.py segv/.hg/store + reachableroots: parent out of range compute_phases_map_sets: parent out of range index_headrevs: parent out of range find_gca_candidates: parent out of range