45
45
def test_diff_ouside_tree(self):
46
46
os.chdir(tempfile.mkdtemp())
47
self.run_bzr(['init', 'branch1'])
48
self.run_bzr(['commit', '-m', 'nothing',
49
'--unchanged', 'branch1'])
50
self.run_bzr(['commit', '-m', 'nothing',
51
'--unchanged', 'branch1'])
47
self.run_bzr('init', 'branch1')
48
self.run_bzr(['commit', '-m', 'nothing', '--unchanged', 'branch1'])
49
self.run_bzr(['commit', '-m', 'nothing', '--unchanged', 'branch1'])
53
out, err = self.run_bzr(['diff',
54
'-r', 'revno:2:branch2..revno:1'],
51
out, err = self.run_bzr('diff -r revno:2:branch2..revno:1', retcode=3)
56
52
self.assertEquals('', out)
57
53
self.assertEqual(u'bzr: ERROR: Not a branch: %s/\n' % (getcwd(),),
60
out, err = self.run_bzr(['diff', '-r', 'revno:2:branch2'],
56
out, err = self.run_bzr('diff -r revno:2:branch2', retcode=3)
62
57
self.assertEquals('', out)
63
58
self.assertEqual(u'bzr: ERROR: Not a branch: %s/\n' % (getcwd(),),
66
out, err = self.run_bzr(['diff', '-r', 'revno:2:branch2..'],
61
out, err = self.run_bzr('diff -r revno:2:branch2..', retcode=3)
68
62
self.assertEquals('', out)
69
63
self.assertEqual(u'bzr: ERROR: Not a branch: %s/\n' % (getcwd(),),
72
out, err = self.run_bzr(['diff'],
66
out, err = self.run_bzr('diff', retcode=3)
74
67
self.assertEquals('', out)
75
68
self.assertEqual(u'bzr: ERROR: Not a branch: %s/\n' % (getcwd(),),