Mercurial > hgsubversion
diff tests/test_util.py @ 1365:89997a5fc181 stable 1.8.4
stupid: self-disable if svn bindings are too new to work with stupid mode
Subversion 1.9 enhanced the diff format slightly in a way that we
can't parse. We're collectively weary in hgsubversion of parsing diffs
to emulate replay given that ra_replay was new in Subversion 1.5,
which is now 7.5 years old. Rather than try to adapt to the diff
format changes, we'll disable stupid mode for 1.9 bindings and see if
anyone actually bothers to email the list and tell us they saw the
message. I figure if we don't see anything by mid 2016 or so we can
rip out stupid mode entirely.
Disable all tests that use stupid mode when 1.9 is in play. This
should actually be a nice runtime win on the testsuite since we'll be
running many hundreds fewer tests overall.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Thu, 31 Dec 2015 12:06:58 -0500 |
parents | 3c213ca49f7e |
children | 019c3e194fba bac709b5ff6c |
line wrap: on
line diff
--- a/tests/test_util.py +++ b/tests/test_util.py @@ -28,6 +28,7 @@ from mercurial import util as hgutil from mercurial import extensions from hgsubversion import compathacks +from hgsubversion import svnwrap try: from mercurial import obsolete @@ -435,7 +436,7 @@ class TestMeta(type): for origname in dir(cls): _obsolete_wrap(cls, origname) - if cls.stupid_mode_tests: + if cls.stupid_mode_tests and svnwrap.subversion_version < (1, 9, 0): for origname in dir(cls): _stupid_wrap(cls, origname) @@ -765,7 +766,11 @@ files: {files} """ _ui.pushbuffer() - graphlog.graphlog(_ui, repo, rev=None, template=templ) + try: + graphlog.graphlog(_ui, repo, rev=None, template=templ) + except AttributeError: + from mercurial import commands + commands.log(_ui, repo, rev=None, template=templ, graph=True) return _ui.popbuffer() def draw(self, repo):