~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bundle/bundle_data.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-09-01 08:02:42 UTC
  • mfrom: (5390.3.3 faster-revert-593560)
  • Revision ID: pqm@pqm.ubuntu.com-20100901080242-esg62ody4frwmy66
(spiv) Avoid repeatedly calling self.target.all_file_ids() in
 InterTree.iter_changes. (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
715
715
                ie.symlink_target = self.get_symlink_target(file_id)
716
716
            ie.revision = revision_id
717
717
 
718
 
            if kind in ('directory', 'symlink'):
719
 
                ie.text_size, ie.text_sha1 = None, None
720
 
            else:
 
718
            if kind == 'file':
721
719
                ie.text_size, ie.text_sha1 = self.get_size_and_sha1(file_id)
722
 
            if (ie.text_size is None) and (kind == 'file'):
723
 
                raise BzrError('Got a text_size of None for file_id %r' % file_id)
 
720
                if ie.text_size is None:
 
721
                    raise BzrError(
 
722
                        'Got a text_size of None for file_id %r' % file_id)
724
723
            inv.add(ie)
725
724
 
726
725
        sorted_entries = self.sorted_path_id()