~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/upgrade.py

  • Committer: Martin Pool
  • Date: 2005-09-30 05:56:05 UTC
  • mto: (1185.14.2)
  • mto: This revision was merged to the branch mainline in revision 1396.
  • Revision ID: mbp@sourcefrog.net-20050930055605-a2c534529b392a7d
- fix upgrade for transport changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
160
160
 
161
161
 
162
162
    def _set_new_format(self):
163
 
        f = self.branch.controlfile('branch-format', 'wb')
164
 
        try:
165
 
            f.write(BZR_BRANCH_FORMAT_5)
166
 
        finally:
167
 
            f.close()
 
163
        self.branch.put_controlfile('branch-format', BZR_BRANCH_FORMAT_5)
168
164
 
169
165
 
170
166
    def _cleanup_spare_files(self):
191
187
    def _convert_working_inv(self):
192
188
        branch = self.branch
193
189
        inv = serializer_v4.read_inventory(branch.controlfile('inventory', 'rb'))
194
 
        serializer_v5.write_inventory(inv, branch.controlfile('inventory', 'wb'))
 
190
        new_inv_xml = serializer_v5.write_inventory_to_string(inv)
 
191
        branch.put_controlfile('inventory', new_inv_xml)
195
192
 
196
193
 
197
194