33
33
super(TestLog, self).setUp()
34
34
self.timezone = 0 # UTC
35
self.timestamp =1132617600 # Mon 2005-11-22 00:00:00 +0000
35
self.timestamp = 1132617600 # Mon 2005-11-22 00:00:00 +0000
37
37
def make_minimal_branch(self, path='.', format=None):
38
38
tree = self.make_branch_and_tree(path, format=format)
104
103
def test_log_zero_revspec(self):
105
104
self.make_minimal_branch()
106
self.run_bzr_error('bzr: ERROR: Logging revision 0 is invalid.',
105
self.run_bzr_error(['bzr: ERROR: Logging revision 0 is invalid.'],
109
108
def test_log_zero_begin_revspec(self):
110
109
self.make_linear_branch()
111
self.run_bzr_error('bzr: ERROR: Logging revision 0 is invalid.',
110
self.run_bzr_error(['bzr: ERROR: Logging revision 0 is invalid.'],
112
111
['log', '-r0..2'])
114
113
def test_log_zero_end_revspec(self):
115
114
self.make_linear_branch()
116
self.run_bzr_error('bzr: ERROR: Logging revision 0 is invalid.',
115
self.run_bzr_error(['bzr: ERROR: Logging revision 0 is invalid.'],
117
116
['log', '-r-2..0'])
119
118
def test_log_negative_begin_revspec_full_log(self):
172
171
def test_log_nonexistent_revno(self):
173
172
self.make_minimal_branch()
174
(out, err) = self.run_bzr_error(args="log -r 1234",
175
error_regexes=["bzr: ERROR: Requested revision: '1234' "
176
"does not exist in branch:"])
173
(out, err) = self.run_bzr_error(
174
["bzr: ERROR: Requested revision: '1234' "
175
"does not exist in branch:"],
178
178
def test_log_nonexistent_dotted_revno(self):
179
179
self.make_minimal_branch()
180
(out, err) = self.run_bzr_error(args="log -r 123.123",
181
error_regexes=["bzr: ERROR: Requested revision: '123.123' "
182
"does not exist in branch:"])
180
(out, err) = self.run_bzr_error(
181
["bzr: ERROR: Requested revision: '123.123' "
182
"does not exist in branch:"],
183
['log', '-r123.123'])
184
185
def test_log_change_revno(self):
185
186
self.make_linear_branch()
190
191
def test_log_change_nonexistent_revno(self):
191
192
self.make_minimal_branch()
192
(out, err) = self.run_bzr_error(args="log -c 1234",
193
error_regexes=["bzr: ERROR: Requested revision: '1234' "
194
"does not exist in branch:"])
193
(out, err) = self.run_bzr_error(
194
["bzr: ERROR: Requested revision: '1234' "
195
"does not exist in branch:"],
196
198
def test_log_change_nonexistent_dotted_revno(self):
197
199
self.make_minimal_branch()
198
(out, err) = self.run_bzr_error(args="log -c 123.123",
199
error_regexes=["bzr: ERROR: Requested revision: '123.123' "
200
"does not exist in branch:"])
200
(out, err) = self.run_bzr_error(
201
["bzr: ERROR: Requested revision: '123.123' "
202
"does not exist in branch:"],
203
['log', '-c123.123'])
202
205
def test_log_change_single_revno_only(self):
203
206
self.make_minimal_branch()
204
self.run_bzr_error('bzr: ERROR: Option --change does not'
205
' accept revision ranges',
207
self.run_bzr_error(['bzr: ERROR: Option --change does not'
208
' accept revision ranges'],
206
209
['log', '--change', '2..3'])
208
211
def test_log_change_incompatible_with_revision(self):
209
self.run_bzr_error('bzr: ERROR: --revision and --change'
210
' are mutually exclusive',
212
self.run_bzr_error(['bzr: ERROR: --revision and --change'
213
' are mutually exclusive'],
211
214
['log', '--change', '2', '--revision', '3'])
213
216
def test_log_nonexistent_file(self):
292
295
def test_log_unsupported_timezone(self):
293
296
self.make_linear_branch()
294
self.run_bzr_error('bzr: ERROR: Unsupported timezone format "foo", '
295
'options are "utc", "original", "local".',
297
self.run_bzr_error(['bzr: ERROR: Unsupported timezone format "foo", '
298
'options are "utc", "original", "local".'],
296
299
['log', '--timezone', 'foo'])
537
540
merge branch level1
539
542
=== modified file 'file2'
540
--- file2 2005-11-22 00:00:01 +0000
541
+++ file2 2005-11-22 00:00:02 +0000
543
--- file2\t2005-11-22 00:00:01 +0000
544
+++ file2\t2005-11-22 00:00:02 +0000
543
546
-contents of level0/file2
553
556
=== modified file 'file2'
554
--- file2 2005-11-22 00:00:01 +0000
555
+++ file2 2005-11-22 00:00:02 +0000
557
--- file2\t2005-11-22 00:00:01 +0000
558
+++ file2\t2005-11-22 00:00:02 +0000
557
560
-contents of level0/file2
567
570
=== added file 'file1'
568
--- file1 1970-01-01 00:00:00 +0000
569
+++ file1 2005-11-22 00:00:01 +0000
571
--- file1\t1970-01-01 00:00:00 +0000
572
+++ file1\t2005-11-22 00:00:01 +0000
571
574
+contents of level0/file1
573
576
=== added file 'file2'
574
--- file2 1970-01-01 00:00:00 +0000
575
+++ file2 2005-11-22 00:00:01 +0000
577
--- file2\t1970-01-01 00:00:00 +0000
578
+++ file2\t2005-11-22 00:00:01 +0000
577
580
+contents of level0/file2
583
586
2 Lorem Ipsum\t2005-11-22 [merge]
584
587
merge branch level1
585
588
=== modified file 'file2'
586
--- file2 2005-11-22 00:00:01 +0000
587
+++ file2 2005-11-22 00:00:02 +0000
589
--- file2\t2005-11-22 00:00:01 +0000
590
+++ file2\t2005-11-22 00:00:02 +0000
589
592
-contents of level0/file2
592
595
1 Lorem Ipsum\t2005-11-22
594
597
=== added file 'file1'
595
--- file1 1970-01-01 00:00:00 +0000
596
+++ file1 2005-11-22 00:00:01 +0000
598
--- file1\t1970-01-01 00:00:00 +0000
599
+++ file1\t2005-11-22 00:00:01 +0000
598
601
+contents of level0/file1
599
602
\x20\x20\x20\x20\x20\x20
600
603
=== added file 'file2'
601
--- file2 1970-01-01 00:00:00 +0000
602
+++ file2 2005-11-22 00:00:01 +0000
604
--- file2\t1970-01-01 00:00:00 +0000
605
+++ file2\t2005-11-22 00:00:01 +0000
604
607
+contents of level0/file2
621
624
1 Lorem Ipsum\t2005-11-22
623
626
=== added file 'file1'
624
--- file1 1970-01-01 00:00:00 +0000
625
+++ file1 2005-11-22 00:00:01 +0000
627
--- file1\t1970-01-01 00:00:00 +0000
628
+++ file1\t2005-11-22 00:00:01 +0000
627
630
+contents of level0/file1
635
638
2 Lorem Ipsum\t2005-11-22 [merge]
636
639
merge branch level1
637
640
=== modified file 'file2'
638
--- file2 2005-11-22 00:00:01 +0000
639
+++ file2 2005-11-22 00:00:02 +0000
641
--- file2\t2005-11-22 00:00:01 +0000
642
+++ file2\t2005-11-22 00:00:02 +0000
641
644
-contents of level0/file2
644
647
1 Lorem Ipsum\t2005-11-22
646
649
=== added file 'file2'
647
--- file2 1970-01-01 00:00:00 +0000
648
+++ file2 2005-11-22 00:00:01 +0000
650
--- file2\t1970-01-01 00:00:00 +0000
651
+++ file2\t2005-11-22 00:00:01 +0000
650
653
+contents of level0/file2