/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/groupcompress.py

  • Committer: John Arbash Meinel
  • Date: 2009-06-22 15:37:06 UTC
  • mto: This revision was merged to the branch mainline in revision 4469.
  • Revision ID: john@arbash-meinel.com-20090622153706-55n968lsh3v3dht7
Respond to Andrew's review comments.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1547
1547
 
1548
1548
        :return: An iterator over (line, key).
1549
1549
        """
1550
 
        if pb is None:
1551
 
            pb = progress.DummyProgress()
1552
1550
        keys = set(keys)
1553
1551
        total = len(keys)
1554
1552
        # we don't care about inclusions, the caller cares.
1558
1556
            'unordered', True)):
1559
1557
            # XXX: todo - optimise to use less than full texts.
1560
1558
            key = record.key
1561
 
            pb.update('Walking content', key_idx, total)
 
1559
            if pb is not None:
 
1560
                pb.update('Walking content', key_idx, total)
1562
1561
            if record.storage_kind == 'absent':
1563
1562
                raise errors.RevisionNotPresent(key, self)
1564
1563
            lines = osutils.split_lines(record.get_bytes_as('fulltext'))
1565
1564
            for line in lines:
1566
1565
                yield line, key
1567
 
        pb.update('Walking content', total, total)
 
1566
        if pb is not None:
 
1567
            pb.update('Walking content', total, total)
1568
1568
 
1569
1569
    def keys(self):
1570
1570
        """See VersionedFiles.keys."""
1694
1694
        if check_present:
1695
1695
            missing_keys = keys.difference(found_keys)
1696
1696
            if missing_keys:
1697
 
                raise RevisionNotPresent(missing_keys.pop(), self)
 
1697
                raise errors.RevisionNotPresent(missing_keys.pop(), self)
1698
1698
 
1699
1699
    def get_parent_map(self, keys):
1700
1700
        """Get a map of the parents of keys.