~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-08-08 00:24:38 UTC
  • mfrom: (1907.1.9 no-special-root)
  • Revision ID: pqm@pqm.ubuntu.com-20060808002438-4b8baf2d9282e154
Represent root entries using InventoryDirectory, not RootEntry

Show diffs side-by-side

added added

removed removed

Lines of Context:
1557
1557
    def _store_new_weave(self, rev, inv, present_parents):
1558
1558
        # the XML is now updated with text versions
1559
1559
        if __debug__:
1560
 
            for file_id in inv:
1561
 
                ie = inv[file_id]
1562
 
                if ie.kind == 'root_directory':
1563
 
                    continue
 
1560
            entries = inv.iter_entries()
 
1561
            entries.next()
 
1562
            for path, ie in entries:
1564
1563
                assert hasattr(ie, 'revision'), \
1565
1564
                    'no revision on {%s} in {%s}' % \
1566
1565
                    (file_id, rev.revision_id)
1579
1578
        mutter('converting texts of revision {%s}',
1580
1579
               rev_id)
1581
1580
        parent_invs = map(self._load_updated_inventory, present_parents)
1582
 
        for file_id in inv:
1583
 
            ie = inv[file_id]
 
1581
        entries = inv.iter_entries()
 
1582
        entries.next()
 
1583
        for path, ie in entries:
1584
1584
            self._convert_file_version(rev, ie, parent_invs)
1585
1585
 
1586
1586
    def _convert_file_version(self, rev, ie, parent_invs):
1589
1589
        The file needs to be added into the weave if it is a merge
1590
1590
        of >=2 parents or if it's changed from its parent.
1591
1591
        """
1592
 
        if ie.kind == 'root_directory':
1593
 
            return
1594
1592
        file_id = ie.file_id
1595
1593
        rev_id = rev.revision_id
1596
1594
        w = self.text_weaves.get(file_id)