~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/upgrade.py

Remove the only-used-once put_controlfiles, and change put_controlfile to put and put_utf8.

Show diffs side-by-side

added added

removed removed

Lines of Context:
194
194
        return True
195
195
 
196
196
    def _set_new_format(self, format):
197
 
        self.branch.control_files.put_controlfile('branch-format', format)
 
197
        self.branch.control_files.put_utf8('branch-format', format)
198
198
 
199
199
    def _cleanup_spare_files(self):
200
200
        for n in 'merged-patches', 'pending-merged-patches':
215
215
        note('if conversion fails, you can move this directory back to .bzr')
216
216
        note('if it succeeds, you can remove this directory if you wish')
217
217
 
218
 
 
219
218
    def _convert_working_inv(self):
220
219
        branch = self.branch
221
220
        inv = serializer_v4.read_inventory(branch.control_files.controlfile('inventory', 'rb'))
222
221
        new_inv_xml = serializer_v5.write_inventory_to_string(inv)
223
 
        branch.control_files.put_controlfile('inventory', new_inv_xml)
224
 
 
225
 
 
 
222
        branch.control_files.put_utf8('inventory', new_inv_xml)
226
223
 
227
224
    def _write_all_weaves(self):
228
225
        write_a_weave(self.inv_weave, self.base + '/.bzr/inventory.weave')