# HG changeset patch # User Augie Fackler # Date 1267486740 21600 # Node ID 880ef2ac1e0d782f8205a444c91f682b4555e238 # Parent 95eca255739eda7b229c4d0f461bb2f3f52360a2# Parent f74c8e98e3d228e7081873b792dd0f6cf4e2b767 Merge change from Felix Schwarz diff --git a/hgsubversion/svnwrap/svn_swig_wrapper.py b/hgsubversion/svnwrap/svn_swig_wrapper.py --- a/hgsubversion/svnwrap/svn_swig_wrapper.py +++ b/hgsubversion/svnwrap/svn_swig_wrapper.py @@ -22,10 +22,14 @@ from svn import ra from mercurial import util as hgutil def version(): - return '%d.%d.%d' % (core.SVN_VER_MAJOR, core.SVN_VER_MINOR, core.SVN_VER_MICRO) - -if (core.SVN_VER_MAJOR, core.SVN_VER_MINOR, core.SVN_VER_MICRO) < (1, 5, 0): #pragma: no cover - raise ImportError, 'You must have Subversion 1.5.0 or newer and matching SWIG bindings.' + return '%d.%d.%d' % (core.SVN_VER_MAJOR, core.SVN_VER_MINOR, + core.SVN_VER_MICRO) + +if (core.SVN_VER_MAJOR, core.SVN_VER_MINOR, + core.SVN_VER_MICRO) < (1, 5, 0): #pragma: no cover + raise ImportError, ('You must have Subversion 1.5.0 or newer and ' + 'matching SWIG bindings. You appear to' + ' have %s' % version()) class SubversionRepoCanNotReplay(Exception): """Exception raised when the svn server is too old to have replay. diff --git a/tests/test_fetch_command.py b/tests/test_fetch_command.py --- a/tests/test_fetch_command.py +++ b/tests/test_fetch_command.py @@ -69,10 +69,13 @@ class TestBasicRepoLayout(test_util.Test self._many_special_cases_checks(repo) def _many_special_cases_checks(self, repo): - self.assertEqual(node.hex(repo[0].node()), + self.assertEquals(node.hex(repo[0].node()), '434ed487136c1b47c1e8f952edb4dc5a8e6328df') - self.assertEqual(node.hex(repo['tip'].node()), - 'b7bdc73041b1852563deb1ef3f4153c2fe4484f2') + # two possible hashes for bw compat to hg < 1.5, since hg 1.5 + # sorts entries in extra() + self.assertTrue(node.hex(repo['tip'].node()) in + ('e92012d8c170a0236c84166167f149c2e28548c6', + 'b7bdc73041b1852563deb1ef3f4153c2fe4484f2')) self.assertEqual(node.hex(repo['the_branch'].node()), '4e256962fc5df545e2e0a51d0d1dc61c469127e6') self.assertEqual(node.hex(repo['the_branch'].parents()[0].node()),