140
140
self.assertTrue('branch nick: branch2\n' in log)
141
141
self.assertTrue('branch nick: branch1\n' not in log)
143
def test_log_nonexistent_revno(self):
145
(out, err) = self.run_bzr_error(args="log -r 1234",
146
error_regexes=["bzr: ERROR: Requested revision: '1234' "
147
"does not exist in branch:"])
149
def test_log_nonexistent_dotted_revno(self):
151
(out, err) = self.run_bzr_error(args="log -r 123.123",
152
error_regexes=["bzr: ERROR: Requested revision: '123.123' "
153
"does not exist in branch:"])
143
155
def test_log_change_revno(self):
145
157
expected_log = self.run_bzr("log -r 1")[0]
146
158
log = self.run_bzr("log -c 1")[0]
147
159
self.assertEqualDiff(expected_log, log)
161
def test_log_change_nonexistent_revno(self):
163
(out, err) = self.run_bzr_error(args="log -c 1234",
164
error_regexes=["bzr: ERROR: Requested revision: '1234' "
165
"does not exist in branch:"])
167
def test_log_change_nonexistent_dotted_revno(self):
169
(out, err) = self.run_bzr_error(args="log -c 123.123",
170
error_regexes=["bzr: ERROR: Requested revision: '123.123' "
171
"does not exist in branch:"])
149
173
def test_log_change_single_revno(self):
151
175
self.run_bzr_error('bzr: ERROR: Option --change does not'
220
244
self.assertContainsRe(log, r'revno: 3\n')
247
class TestLogVerbose(TestCaseWithTransport):
250
super(TestLogVerbose, self).setUp()
251
tree = self.make_branch_and_tree('.')
252
self.build_tree(['hello.txt'])
253
tree.add('hello.txt')
254
tree.commit(message='message1')
256
def assertUseShortDeltaFormat(self, cmd):
257
log = self.run_bzr(cmd)[0]
258
# Check that we use the short status format
259
self.assertContainsRe(log, '(?m)^A hello.txt$')
260
self.assertNotContainsRe(log, '(?m)^added:$')
262
def assertUseLongDeltaFormat(self, cmd):
263
log = self.run_bzr(cmd)[0]
264
# Check that we use the long status format
265
self.assertNotContainsRe(log, '(?m)^A hello.txt$')
266
self.assertContainsRe(log, '(?m)^added:$')
268
def test_log_short_verbose(self):
269
self.assertUseShortDeltaFormat(['log', '--short', '-v'])
271
def test_log_short_verbose_verbose(self):
272
self.assertUseLongDeltaFormat(['log', '--short', '-vv'])
274
def test_log_long_verbose(self):
275
# Check that we use the long status format, ignoring the verbosity
277
self.assertUseLongDeltaFormat(['log', '--long', '-v'])
279
def test_log_long_verbose_verbose(self):
280
# Check that we use the long status format, ignoring the verbosity
282
self.assertUseLongDeltaFormat(['log', '--long', '-vv'])
223
285
class TestLogMerges(TestCaseWithoutPropsHandler):
225
287
def _prepare(self):