Mercurial > hgsubversion
comparison tests/test_utility_commands.py @ 918:761a87134501
rebuildmeta: accept unrelated svn repo with --unsafe-skip-uuid-check
This is useful when switching from an svnsync mirror to the real thing.
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Tue, 26 Jun 2012 09:23:37 +0200 |
parents | 7f90bb48c9de |
children | 8faa91951bb1 |
comparison
equal
deleted
inserted
replaced
917:6918f60d0e28 | 918:761a87134501 |
---|---|
306 self.assertEqual((FAILURE, expected), (code, actual)) | 306 self.assertEqual((FAILURE, expected), (code, actual)) |
307 | 307 |
308 def test_corruption_stupid(self): | 308 def test_corruption_stupid(self): |
309 self.test_corruption(True) | 309 self.test_corruption(True) |
310 | 310 |
311 def test_svnrebuildmeta(self): | |
312 otherpath = self.load_svndump('binaryfiles-broken.svndump') | |
313 otherurl = test_util.fileurl(otherpath) | |
314 self.load_and_fetch('replace_trunk_with_branch.svndump') | |
315 # rebuildmeta with original repo | |
316 svncommands.rebuildmeta(self.ui(), repo=self.repo, args=[]) | |
317 # rebuildmeta with unrelated repo | |
318 self.assertRaises(hgutil.Abort, | |
319 svncommands.rebuildmeta, | |
320 self.ui(), repo=self.repo, args=[otherurl]) | |
321 # rebuildmeta --unsafe-skip-uuid-check with unrelated repo | |
322 svncommands.rebuildmeta(self.ui(), repo=self.repo, args=[otherurl], | |
323 unsafe_skip_uuid_check=True) | |
324 | |
311 def suite(): | 325 def suite(): |
312 all_tests = [unittest.TestLoader().loadTestsFromTestCase(UtilityTests), | 326 all_tests = [unittest.TestLoader().loadTestsFromTestCase(UtilityTests), |
313 ] | 327 ] |
314 return unittest.TestSuite(all_tests) | 328 return unittest.TestSuite(all_tests) |