~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/groupcompress.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-08-06 02:23:37 UTC
  • mfrom: (4332.3.36 check)
  • Revision ID: pqm@pqm.ubuntu.com-20090806022337-7c2oni07fsjq6gun
(robertc) Partial overhaul of check to do less duplicate work.
        (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1075
1075
    def get_annotator(self):
1076
1076
        return annotate.Annotator(self)
1077
1077
 
1078
 
    def check(self, progress_bar=None):
 
1078
    def check(self, progress_bar=None, keys=None):
1079
1079
        """See VersionedFiles.check()."""
1080
 
        keys = self.keys()
1081
 
        for record in self.get_record_stream(keys, 'unordered', True):
1082
 
            record.get_bytes_as('fulltext')
 
1080
        if keys is None:
 
1081
            keys = self.keys()
 
1082
            for record in self.get_record_stream(keys, 'unordered', True):
 
1083
                record.get_bytes_as('fulltext')
 
1084
        else:
 
1085
            return self.get_record_stream(keys, 'unordered', True)
1083
1086
 
1084
1087
    def _check_add(self, key, lines, random_id, check_content):
1085
1088
        """check that version_id and lines are safe to add."""