573
576
self.assertNotContainsRe(log, 'revno: 3\n')
574
577
self.assertNotContainsRe(log, 'revno: 3.1.1\n')
575
578
self.assertNotContainsRe(log, 'revno: 4\n')
580
def test_line_log_file(self):
581
"""The line log for a file should only list relevant mainline revs"""
582
# Note: this also implicitly covers the short logging case.
583
# We test using --line in preference to --short because matching
584
# revnos in the output of --line is more reliable.
587
# full history of file1
588
log = self.run_bzr('log --line file1')[0]
589
self.assertContainsRe(log, '^1:', re.MULTILINE)
590
self.assertNotContainsRe(log, '^2:', re.MULTILINE)
591
self.assertNotContainsRe(log, '^3:', re.MULTILINE)
592
self.assertNotContainsRe(log, '^3.1.1:', re.MULTILINE)
593
self.assertNotContainsRe(log, '^4:', re.MULTILINE)
595
# full history of file2
596
log = self.run_bzr('log --line file2')[0]
597
self.assertNotContainsRe(log, '^1:', re.MULTILINE)
598
self.assertContainsRe(log, '^2:', re.MULTILINE)
599
self.assertNotContainsRe(log, '^3:', re.MULTILINE)
600
self.assertNotContainsRe(log, '^3.1.1:', re.MULTILINE)
601
self.assertContainsRe(log, '^4:', re.MULTILINE)
603
# full history of file3
604
log = self.run_bzr('log --line file3')[0]
605
self.assertNotContainsRe(log, '^1:', re.MULTILINE)
606
self.assertNotContainsRe(log, '^2:', re.MULTILINE)
607
self.assertContainsRe(log, '^3:', re.MULTILINE)
608
self.assertNotContainsRe(log, '^3.1.1:', re.MULTILINE)
609
self.assertNotContainsRe(log, '^4:', re.MULTILINE)
611
# file in a merge revision
612
log = self.run_bzr('log --line -r3.1.1 file2')[0]
613
self.assertNotContainsRe(log, '^1:', re.MULTILINE)
614
self.assertNotContainsRe(log, '^2:', re.MULTILINE)
615
self.assertNotContainsRe(log, '^3:', re.MULTILINE)
616
self.assertContainsRe(log, '^3.1.1:', re.MULTILINE)
617
self.assertNotContainsRe(log, '^4:', re.MULTILINE)
619
# file in a mainline revision
620
log = self.run_bzr('log --line -r4 file2')[0]
621
self.assertNotContainsRe(log, '^1:', re.MULTILINE)
622
self.assertNotContainsRe(log, '^2:', re.MULTILINE)
623
self.assertNotContainsRe(log, '^3:', re.MULTILINE)
624
self.assertNotContainsRe(log, '^3.1.1:', re.MULTILINE)
625
self.assertContainsRe(log, '^4:', re.MULTILINE)
627
# file since a revision
628
log = self.run_bzr('log --line -r3.. file2')[0]
629
self.assertNotContainsRe(log, '^1:', re.MULTILINE)
630
self.assertNotContainsRe(log, '^2:', re.MULTILINE)
631
self.assertNotContainsRe(log, '^3:', re.MULTILINE)
632
self.assertNotContainsRe(log, '^3.1.1:', re.MULTILINE)
633
self.assertContainsRe(log, '^4:', re.MULTILINE)
635
# file up to a revision
636
log = self.run_bzr('log --line -r..3 file2')[0]
637
self.assertNotContainsRe(log, '^1:', re.MULTILINE)
638
self.assertContainsRe(log, '^2:', re.MULTILINE)
639
self.assertNotContainsRe(log, '^3:', re.MULTILINE)
640
self.assertNotContainsRe(log, '^3.1.1:', re.MULTILINE)
641
self.assertNotContainsRe(log, '^4:', re.MULTILINE)