Exemplo n.º 1
0
 def test_retire_bzrdir(self):
     bd = self.make_bzrdir('.')
     transport = bd.root_transport
     # must not overwrite existing directories
     self.build_tree(['.bzr.retired.0/', '.bzr.retired.0/junk',],
         transport=transport)
     self.assertTrue(transport.has('.bzr'))
     bd.retire_bzrdir()
     self.assertFalse(transport.has('.bzr'))
     self.assertTrue(transport.has('.bzr.retired.1'))
Exemplo n.º 2
0
 def test_retire_bzrdir(self):
     bd = self.make_bzrdir('.')
     transport = bd.root_transport
     # must not overwrite existing directories
     self.build_tree(['.bzr.retired.0/', '.bzr.retired.0/junk',],
         transport=transport)
     self.assertTrue(transport.has('.bzr'))
     bd.retire_bzrdir()
     self.assertFalse(transport.has('.bzr'))
     self.assertTrue(transport.has('.bzr.retired.1'))
Exemplo n.º 3
0
 def test_retire_bzrdir_limited(self):
     bd = self.make_bzrdir('.')
     transport = bd.root_transport
     # must not overwrite existing directories
     self.build_tree(['.bzr.retired.0/', '.bzr.retired.0/junk',],
         transport=transport)
     self.assertTrue(transport.has('.bzr'))
     self.assertRaises((errors.FileExists, errors.DirectoryNotEmpty),
         bd.retire_bzrdir, limit=0)
Exemplo n.º 4
0
 def test_retire_bzrdir_limited(self):
     bd = self.make_bzrdir('.')
     transport = bd.root_transport
     # must not overwrite existing directories
     self.build_tree(['.bzr.retired.0/', '.bzr.retired.0/junk',],
         transport=transport)
     self.assertTrue(transport.has('.bzr'))
     self.assertRaises((errors.FileExists, errors.DirectoryNotEmpty),
         bd.retire_bzrdir, limit=0)