42
42
super(TestCheckout, self).setUp()
43
43
tree = controldir.ControlDir.create_standalone_workingtree('branch')
44
tree.commit('1', rev_id='1', allow_pointless=True)
44
tree.commit('1', rev_id=b'1', allow_pointless=True)
45
45
self.build_tree(['branch/added_in_2'])
46
46
tree.add('added_in_2')
47
tree.commit('2', rev_id='2')
47
tree.commit('2', rev_id=b'2')
49
49
def test_checkout_makes_bound_branch(self):
50
50
self.run_bzr('checkout branch checkout')
119
119
def _test_checkout_existing_dir(self, lightweight):
120
120
source = self.make_branch_and_tree('source')
121
self.build_tree_contents([('source/file1', 'content1'),
122
('source/file2', 'content2'),])
121
self.build_tree_contents([('source/file1', b'content1'),
122
('source/file2', b'content2'),])
123
123
source.add(['file1', 'file2'])
124
124
source.commit('added files')
125
self.build_tree_contents([('target/', ''),
126
('target/file1', 'content1'),
127
('target/file2', 'content3'),])
125
self.build_tree_contents([('target/', b''),
126
('target/file1', b'content1'),
127
('target/file2', b'content3'),])
128
128
cmd = ['checkout', 'source', 'target']
130
130
cmd.append('--lightweight')