/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/transform.py

Simplify create_file now that finalize will always take care of cleaning up its limbo file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1270
1270
        name = self._limbo_name(trans_id)
1271
1271
        f = open(name, 'wb')
1272
1272
        try:
1273
 
            try:
1274
 
                unique_add(self._new_contents, trans_id, 'file')
1275
 
            except:
1276
 
                # Clean up the file, it never got registered so
1277
 
                # TreeTransform.finalize() won't clean it up.
1278
 
                f.close()
1279
 
                os.unlink(name)
1280
 
                raise
 
1273
            unique_add(self._new_contents, trans_id, 'file')
1281
1274
            f.writelines(contents)
1282
1275
        finally:
1283
1276
            f.close()