543
543
self.assertRaises(RevisionNotPresent,
544
544
f.annotate, 'foo')
547
# tests that walk returns all the inclusions for the requested
548
# revisions as well as the revisions changes themselves.
549
f = self.get_file('1')
550
f.add_lines('r0', [], ['a\n', 'b\n'])
551
f.add_lines('r1', ['r0'], ['c\n', 'b\n'])
552
f.add_lines('rX', ['r1'], ['d\n', 'b\n'])
553
f.add_lines('rY', ['r1'], ['c\n', 'e\n'])
556
for lineno, insert, dset, text in f.walk(['rX', 'rY']):
557
lines[text] = (insert, dset)
559
self.assertTrue(lines['a\n'], ('r0', set(['r1'])))
560
self.assertTrue(lines['b\n'], ('r0', set(['rY'])))
561
self.assertTrue(lines['c\n'], ('r1', set(['rX'])))
562
self.assertTrue(lines['d\n'], ('rX', set([])))
563
self.assertTrue(lines['e\n'], ('rY', set([])))
565
546
def test_detection(self):
566
547
# Test weaves detect corruption.