diff tests/test_fetch_command.py @ 938:f9014e28721b

editor: start separating svn copies from open files The separation is not complete as we still have to update the RevisionData deleted set when registering svn copies. This will be cleaned up once open files are themselves separated from RevisionData. Copied symlinks are also being prefixed with 'link '.
author Patrick Mezard <patrick@mezard.eu>
date Wed, 03 Oct 2012 21:27:02 +0200
parents e252f9355933
children a80b01ceb1fc
line wrap: on
line diff
--- a/tests/test_fetch_command.py
+++ b/tests/test_fetch_command.py
@@ -226,6 +226,14 @@ class TestStupidPull(test_util.TestBase)
         self.assertEqual(node.hex(repo['tip'].node()),
                          '1a6c3f30911d57abb67c257ec0df3e7bc44786f7')
 
+    def test_empty_repo(self, stupid=False):
+        # This used to crash HgEditor because it could be closed without
+        # having been initialized again.
+        self._load_fixture_and_fetch('emptyrepo2.svndump', stupid=stupid)
+
+    def test_empty_repo_stupid(self):
+        self.test_empty_repo(stupid=True)
+
 def suite():
     all_tests = [unittest.TestLoader().loadTestsFromTestCase(TestBasicRepoLayout),
            unittest.TestLoader().loadTestsFromTestCase(TestStupidPull),