/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/bundle/bundle_data.py

merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006 Canonical Ltd
 
1
# Copyright (C) 2005-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
289
289
    def _validate_revision(self, inventory, revision_id):
290
290
        """Make sure all revision entries match their checksum."""
291
291
 
292
 
        # This is a mapping from each revision id to it's sha hash
 
292
        # This is a mapping from each revision id to its sha hash
293
293
        rev_to_sha1 = {}
294
294
 
295
295
        rev = self.get_revision(revision_id)
331
331
                try:
332
332
                    name, value = info_item.split(':', 1)
333
333
                except ValueError:
334
 
                    raise 'Value %r has no colon' % info_item
 
334
                    raise ValueError('Value %r has no colon' % info_item)
335
335
                if name == 'last-changed':
336
336
                    last_changed = value
337
337
                elif name == 'executable':
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()