Ejemplo n.º 1
0
 def test_upgrade_standalone_branch(self):
     control = self.make_standalone_branch()
     tried, worked, issues = upgrade.smart_upgrade([control],
                                                   format=self.to_format)
     self.assertLength(1, tried)
     self.assertEqual(tried[0], control)
     self.assertLength(1, worked)
     self.assertEqual(worked[0], control)
     self.assertLength(0, issues)
     self.assertPathExists('branch1/backup.bzr.~1~')
     self.assertEqual(control.open_repository()._format,
                      self.to_format._repository_format)
Ejemplo n.º 2
0
 def test_upgrade_standalone_branch(self):
     control = self.make_standalone_branch()
     tried, worked, issues = upgrade.smart_upgrade(
         [control], format=self.to_format)
     self.assertLength(1, tried)
     self.assertEqual(tried[0], control)
     self.assertLength(1, worked)
     self.assertEqual(worked[0], control)
     self.assertLength(0, issues)
     self.assertPathExists('branch1/backup.bzr.~1~')
     self.assertEqual(control.open_repository()._format,
                      self.to_format._repository_format)
Ejemplo n.º 3
0
 def test_upgrade_repo_with_branches(self):
     control = self.make_repo_with_branches()
     tried, worked, issues = upgrade.smart_upgrade([control],
                                                   format=self.to_format)
     self.assertLength(3, tried)
     self.assertEqual(tried[0], control)
     self.assertLength(3, worked)
     self.assertEqual(worked[0], control)
     self.assertLength(0, issues)
     self.assertPathExists('repo/backup.bzr.~1~')
     self.assertPathExists('repo/branch1/backup.bzr.~1~')
     self.assertPathExists('repo/branch2/backup.bzr.~1~')
     self.assertEqual(control.open_repository()._format,
                      self.to_format._repository_format)
     b1 = branch.Branch.open('repo/branch1')
     self.assertEqual(b1._format, self.to_format._branch_format)
Ejemplo n.º 4
0
 def test_upgrade_repo_with_branches(self):
     control = self.make_repo_with_branches()
     tried, worked, issues = upgrade.smart_upgrade(
         [control], format=self.to_format)
     self.assertLength(3, tried)
     self.assertEqual(tried[0], control)
     self.assertLength(3, worked)
     self.assertEqual(worked[0], control)
     self.assertLength(0, issues)
     self.assertPathExists('repo/backup.bzr.~1~')
     self.assertPathExists('repo/branch1/backup.bzr.~1~')
     self.assertPathExists('repo/branch2/backup.bzr.~1~')
     self.assertEqual(control.open_repository()._format,
                      self.to_format._repository_format)
     b1 = branch.Branch.open('repo/branch1')
     self.assertEqual(b1._format, self.to_format._branch_format)