~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Aaron Bentley
  • Date: 2007-09-17 12:46:56 UTC
  • mfrom: (2825 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2826.
  • Revision ID: abentley@panoramicfeedback.com-20070917124656-j3hhxhx9igy11mfc
merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1817
1817
    def _convert_working_inv(self):
1818
1818
        inv = xml4.serializer_v4.read_inventory(
1819
1819
                    self.branch.control_files.get('inventory'))
1820
 
        new_inv_xml = xml5.serializer_v5.write_inventory_to_string(inv)
 
1820
        new_inv_xml = xml5.serializer_v5.write_inventory_to_string(inv, working=True)
1821
1821
        # FIXME inventory is a working tree change.
1822
1822
        self.branch.control_files.put('inventory', StringIO(new_inv_xml))
1823
1823
 
1902
1902
        present_parents = [p for p in rev.parent_ids
1903
1903
                           if p not in self.absent_revisions]
1904
1904
        self._convert_revision_contents(rev, inv, present_parents)
1905
 
        self._store_new_weave(rev, inv, present_parents)
 
1905
        self._store_new_inv(rev, inv, present_parents)
1906
1906
        self.converted_revs.add(rev_id)
1907
1907
 
1908
 
    def _store_new_weave(self, rev, inv, present_parents):
 
1908
    def _store_new_inv(self, rev, inv, present_parents):
1909
1909
        # the XML is now updated with text versions
1910
1910
        if __debug__:
1911
1911
            entries = inv.iter_entries()
1916
1916
                    (file_id, rev.revision_id)
1917
1917
        new_inv_xml = xml5.serializer_v5.write_inventory_to_string(inv)
1918
1918
        new_inv_sha1 = sha_string(new_inv_xml)
1919
 
        self.inv_weave.add_lines(rev.revision_id, 
 
1919
        self.inv_weave.add_lines(rev.revision_id,
1920
1920
                                 present_parents,
1921
1921
                                 new_inv_xml.splitlines(True))
1922
1922
        rev.inventory_sha1 = new_inv_sha1