~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: John Arbash Meinel
  • Date: 2006-05-28 03:56:21 UTC
  • mto: (1711.2.26 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1734.
  • Revision ID: john@arbash-meinel.com-20060528035621-3460c764281b032f
Switch to using bzrlib.xml5.serializer_v5 so that a plugin can override it if we want

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
from bzrlib.transport.local import LocalTransport
48
48
from bzrlib.weave import Weave
49
49
from bzrlib.xml4 import serializer_v4
50
 
from bzrlib.xml5 import serializer_v5
 
50
import bzrlib.xml5
51
51
 
52
52
 
53
53
class BzrDir(object):
1464
1464
 
1465
1465
    def _convert_working_inv(self):
1466
1466
        inv = serializer_v4.read_inventory(self.branch.control_files.get('inventory'))
1467
 
        new_inv_xml = serializer_v5.write_inventory_to_string(inv)
 
1467
        new_inv_xml = bzrlib.xml5.serializer_v5.write_inventory_to_string(inv)
1468
1468
        # FIXME inventory is a working tree change.
1469
1469
        self.branch.control_files.put('inventory', new_inv_xml)
1470
1470
 
1538
1538
    def _load_updated_inventory(self, rev_id):
1539
1539
        assert rev_id in self.converted_revs
1540
1540
        inv_xml = self.inv_weave.get_text(rev_id)
1541
 
        inv = serializer_v5.read_inventory_from_string(inv_xml)
 
1541
        inv = bzrlib.xml5.serializer_v5.read_inventory_from_string(inv_xml)
1542
1542
        return inv
1543
1543
 
1544
1544
    def _convert_one_rev(self, rev_id):
1561
1561
                assert hasattr(ie, 'revision'), \
1562
1562
                    'no revision on {%s} in {%s}' % \
1563
1563
                    (file_id, rev.revision_id)
1564
 
        new_inv_xml = serializer_v5.write_inventory_to_string(inv)
 
1564
        new_inv_xml = bzrlib.xml5.serializer_v5.write_inventory_to_string(inv)
1565
1565
        new_inv_sha1 = sha_string(new_inv_xml)
1566
1566
        self.inv_weave.add_lines(rev.revision_id, 
1567
1567
                                 present_parents,