Mercurial > hgsubversion
diff tests/test_utility_commands.py @ 746:174f03c288d4
svnmeta: abort when no UUID given and none is stored on disk.
Previously, not passing a UUID when instantiating an SVNMeta instance
would cause it to succeed even if no UUID was previously known. First
when the UUID was actually read would an exception be raised.
This slight refactoring of _set_uuid() makes it so an exception is
raised immediately. While at it, the exception message is changed to
be slightly more accurate and helpful.
author | Dan Villiom Podlaski Christiansen <danchr@gmail.com> |
---|---|
date | Thu, 11 Nov 2010 21:32:22 +0100 |
parents | 045120d3a110 |
children | caa527346a0f |
line wrap: on
line diff
--- a/tests/test_utility_commands.py +++ b/tests/test_utility_commands.py @@ -9,6 +9,7 @@ from mercurial import revlog from mercurial import context from mercurial import node from mercurial import commands +from mercurial import util as hgutil from hgsubversion import util from hgsubversion import svncommands @@ -81,6 +82,14 @@ class UtilityTests(test_util.TestBase): }) self.assertMultiLineEqual(expected, actual) + def test_info_missing_metadata(self): + repo = self._load_fixture_and_fetch('two_heads.svndump') + test_util.rmtree(repo.join('svn')) + self.assertRaises(hgutil.Abort, + repo.svnmeta) + self.assertRaises(hgutil.Abort, + svncommands.info, self.ui, self.repo) + def test_parent_output(self): self._load_fixture_and_fetch('two_heads.svndump') u = self.ui()