147
147
"+contents of branch1/file\n"
148
148
"\n", subst_dates(out))
149
out, ett = self.run_bzr_captured(['diff', 'branch2', 'branch1'],
149
out, err = self.run_bzr_captured(['diff', 'branch2', 'branch1'],
151
151
self.assertEquals('', err)
152
152
self.assertEqualDiff("=== modified file 'file'\n"
160
160
def test_diff_revno_branches(self):
161
161
self.example_branches()
162
162
print >> open('branch2/file', 'wb'), 'even newer content'
163
self.run_bzr_captured(['commit', '-m', 'update file once more', 'branch2'])
163
self.run_bzr_captured(['commit', '-m',
164
'update file once more', 'branch2'])
165
out, err = self.run_bzr_captured(['diff', '-r', 'revno:1:branch2..revno:1:branch1'],
166
out, err = self.run_bzr_captured(['diff', '-r',
167
'revno:1:branch2..revno:1:branch1'],
167
169
self.assertEquals('', err)
168
170
self.assertEquals('', out)
169
out, ett = self.run_bzr_captured(['diff', '-r', 'revno:2:branch2..revno:1:branch1'],
171
out, err = self.run_bzr_captured(['diff', '-r',
172
'revno:2:branch2..revno:1:branch1'],
171
174
self.assertEquals('', err)
172
175
self.assertEqualDiff("=== modified file 'file'\n"
191
194
self.example_branch2()
193
196
print >> open('branch1/file1', 'wb'), 'new line'
194
output = self.run_bzr_captured(['diff', '-r', '1..', 'branch1'], retcode=1)
197
output = self.run_bzr_captured(['diff', '-r', '1..', 'branch1'],
195
199
self.assertTrue('\n-original line\n+new line\n' in output[0])
197
201
def test_diff_across_rename(self):