79
79
tree.remove(['d-rev'])
80
80
tree.rename_one('a-rev-tree', 'b-tree')
81
81
tree.rename_one('c-rev', 'a-rev-tree')
83
# 'b-tree' is not present in the old tree.
84
self.run_bzr_error([], 'cat', 'b-tree', '--name-from-revision')
86
# get to the old file automatically
87
out, err = self.run_bzr('cat', 'd-rev')
88
self.assertEqual('bar\n', out)
89
self.assertEqual('', err)
91
out, err = self.run_bzr('cat', 'a-rev-tree',
92
'--name-from-revision')
93
self.assertEqual('foo\n', out)
94
self.assertEqual('', err)
96
out, err = self.run_bzr('cat', 'a-rev-tree')
97
self.assertEqual('baz\n', out)
98
self.assertEqual('', err)
83
# calling bzr as another process require free lock on win32
86
# 'b-tree' is not present in the old tree.
87
self.run_bzr_error(["^bzr: ERROR: u?'b-tree' "
88
"is not present in revision .+$"],
89
'cat', 'b-tree', '--name-from-revision')
91
# get to the old file automatically
92
out, err = self.run_bzr('cat', 'd-rev')
93
self.assertEqual('bar\n', out)
94
self.assertEqual('', err)
96
out, err = self.run_bzr('cat', 'a-rev-tree',
97
'--name-from-revision')
98
self.assertEqual('foo\n', out)
99
self.assertEqual('', err)
101
out, err = self.run_bzr('cat', 'a-rev-tree')
102
self.assertEqual('baz\n', out)
103
self.assertEqual('', err)
102
105
def test_remote_cat(self):
103
106
wt = self.make_branch_and_tree('.')
104
107
self.build_tree(['README'])