~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/upgrade.py

  • Committer: Aaron Bentley
  • Date: 2005-10-01 05:57:36 UTC
  • mfrom: (1393.1.23)
  • mto: (1185.12.13)
  • mto: This revision was merged to the branch mainline in revision 1419.
  • Revision ID: aaron.bentley@utoronto.ca-20051001055736-a1bb0acdce40852a
Merge from mpool

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