diff tests/test_util.py @ 1367:5ddb35c31097

Merge with stable. This includes the force-disabling of stupid mode on Subversion 1.9 and later.
author Augie Fackler <raf@durin42.com>
date Thu, 31 Dec 2015 12:52:49 -0500
parents 89997a5fc181
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
@@ -358,8 +359,12 @@ def svnpropget(repo_path, path, prop, re
                          stdout=subprocess.PIPE,
                          stderr=subprocess.STDOUT)
     stdout, stderr = p.communicate()
-    if p.returncode:
+    if p.returncode and stderr:
         raise Exception('svn ls failed on %s: %r' % (path, stderr))
+    if 'W200017' in stdout:
+        # subversion >= 1.9 changed 'no properties' to be an error, so let's
+        # avoid that
+        return ''
     return stdout.strip()
 
 
@@ -431,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)
 
@@ -761,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):