/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

  • Committer: Vincent Ladeuil
  • Date: 2007-11-04 15:29:17 UTC
  • mfrom: (2961 +trunk)
  • mto: (2961.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 2962.
  • Revision ID: v.ladeuil+lp@free.fr-20071104152917-nrsumxpk3dikso2c
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
948
948
    def copy(self):
949
949
        # TODO: jam 20051218 Should copy also copy the revision_id?
950
950
        entries = self.iter_entries()
 
951
        if self.root is None:
 
952
            return Inventory(root_id=None)
951
953
        other = Inventory(entries.next()[1].file_id)
952
954
        # copy recursively so we know directories will be added before
953
955
        # their children.  There are more efficient ways than this...
954
 
        for path, entry in entries():
 
956
        for path, entry in entries:
955
957
            other.add(entry.copy())
956
958
        return other
957
959