/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/inventory.py

merge bzr.dev r3564

Show diffs side-by-side

added added

removed removed

Lines of Context:
472
472
 
473
473
    def _check(self, checker, tree_revision_id, tree):
474
474
        """See InventoryEntry._check"""
475
 
        t = (self.file_id, self.revision)
476
 
        if t in checker.checked_texts:
477
 
            prev_sha = checker.checked_texts[t]
 
475
        key = (self.file_id, self.revision)
 
476
        if key in checker.checked_texts:
 
477
            prev_sha = checker.checked_texts[key]
478
478
            if prev_sha != self.text_sha1:
479
479
                raise BzrCheckError(
480
480
                    'mismatched sha1 on {%s} in {%s} (%s != %s) %r' %
484
484
                checker.repeated_text_cnt += 1
485
485
                return
486
486
 
487
 
        if self.file_id not in checker.checked_weaves:
488
 
            mutter('check weave {%s}', self.file_id)
489
 
            w = tree._get_weave(self.file_id)
490
 
            # Not passing a progress bar, because it creates a new
491
 
            # progress, which overwrites the current progress,
492
 
            # and doesn't look nice
493
 
            w.check()
494
 
            checker.checked_weaves[self.file_id] = True
495
 
        else:
496
 
            w = tree._get_weave(self.file_id)
497
 
 
498
487
        mutter('check version {%s} of {%s}', tree_revision_id, self.file_id)
499
488
        checker.checked_text_cnt += 1
500
489
        # We can't check the length, because Weave doesn't store that
501
490
        # information, and the whole point of looking at the weave's
502
491
        # sha1sum is that we don't have to extract the text.
503
 
        if self.text_sha1 != w.get_sha1s([self.revision])[0]:
504
 
            raise BzrCheckError('text {%s} version {%s} wrong sha1' 
505
 
                                % (self.file_id, self.revision))
506
 
        checker.checked_texts[t] = self.text_sha1
 
492
        if (self.text_sha1 != tree._repository.texts.get_sha1s([key])[key]):
 
493
            raise BzrCheckError('text {%s} version {%s} wrong sha1' % key)
 
494
        checker.checked_texts[key] = self.text_sha1
507
495
 
508
496
    def copy(self):
509
497
        other = InventoryFile(self.file_id, self.name, self.parent_id)