~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/upgrade.py

  • Committer: Robert Collins
  • Date: 2006-01-25 01:43:34 UTC
  • mto: (1534.1.15 integration)
  • mto: This revision was merged to the branch mainline in revision 1550.
  • Revision ID: robertc@robertcollins.net-20060125014334-8dd9ed73c26c5956
Implement final review suggestions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
import sys
72
72
import shutil
73
73
 
74
 
from bzrlib.branch import Branch, find_branch
 
74
from bzrlib.branch import Branch
75
75
from bzrlib.branch import BZR_BRANCH_FORMAT_5, BZR_BRANCH_FORMAT_6
76
76
import bzrlib.hashcache as hashcache
77
77
from bzrlib.weave import Weave
210
210
 
211
211
    def _convert_working_inv(self):
212
212
        branch = self.branch
213
 
        inv = serializer_v4.read_inventory(branch.control_files.controlfile('inventory', 'rb'))
 
213
        inv = serializer_v4.read_inventory(branch.control_files.get('inventory'))
214
214
        new_inv_xml = serializer_v5.write_inventory_to_string(inv)
215
 
        branch.control_files.put_utf8('inventory', new_inv_xml)
 
215
        branch.control_files.put('inventory', new_inv_xml)
216
216
 
217
217
    def _write_all_weaves(self):
218
218
        write_a_weave(self.inv_weave, self.base + '/.bzr/inventory.weave')