35
35
tree.commit(message='1')
36
36
self.build_tree_contents([('branch/a', 'baz\n')])
38
self.assertEquals('foo\n',
38
self.assertEqual('foo\n',
39
39
self.run_bzr(['cat', 'a'], working_dir='branch')[0])
41
41
# On Windows, we used to have a bug where newlines got changed into
42
42
# crlf, whereas cat ought to write out the file exactly as it's
43
43
# recorded (by default.) That problem can't be reproduced in-process,
44
44
# so we need just one test here that
45
self.assertEquals('foo\n',
45
self.assertEqual('foo\n',
46
46
self.run_bzr_subprocess(['cat', 'a'],
47
47
working_dir='branch')[0])
49
49
tree.commit(message='2')
51
51
'baz\n', self.run_bzr(['cat', 'a'], working_dir='branch')[0])
53
53
'foo\n', self.run_bzr(['cat', 'a', '-r', '1'],
54
54
working_dir='branch')[0])
56
56
'baz\n', self.run_bzr(['cat', 'a', '-r', '-1'],
57
57
working_dir='branch')[0])
59
59
rev_id = tree.branch.last_revision()
62
62
'baz\n', self.run_bzr(['cat', 'a', '-r', 'revid:%s' % rev_id],
63
63
working_dir='branch')[0])
65
self.assertEquals('foo\n',
65
self.assertEqual('foo\n',
66
66
self.run_bzr(['cat', 'branch/a',
67
67
'-r', 'revno:1:branch'])[0])
68
68
self.run_bzr(['cat', 'a'], retcode=3)