Merge lp:~maxb/bzr-fastimport/trivial-duplicate-removal into lp:bzr-fastimport

Proposed by Max Bowsher
Status: Merged
Approved by: Martin Pool
Approved revision: no longer in the source branch.
Merged at revision: 301
Proposed branch: lp:~maxb/bzr-fastimport/trivial-duplicate-removal
Merge into: lp:bzr-fastimport
Diff against target: 37 lines (+0/-27)
1 file modified
cache_manager.py (+0/-27)
To merge this branch: bzr merge lp:~maxb/bzr-fastimport/trivial-duplicate-removal
Reviewer Review Type Date Requested Status
Bazaar Developers Pending
Review via email: mp+44423@code.launchpad.net

Description of the change

A bad merge has introduced two copies of the definition of a class. Remove one of them.

To post a comment you must log in.
301. By Max Bowsher

[r=mbp] Remove duplicate definition of cache_manager._Cleanup.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cache_manager.py'
2--- cache_manager.py 2010-11-06 16:06:21 +0000
3+++ cache_manager.py 2010-12-22 03:40:46 +0000
4@@ -61,33 +61,6 @@
5 shutil.rmtree(self.tempdir)
6
7
8-class _Cleanup(object):
9- """This class makes sure we clean up when CacheManager goes away.
10-
11- We use a helper class to ensure that we are never in a refcycle.
12- """
13-
14- def __init__(self, disk_blobs):
15- self.disk_blobs = disk_blobs
16- self.tempdir = None
17- self.small_blobs = None
18-
19- def __del__(self):
20- self.finalize()
21-
22- def finalize(self):
23- if self.disk_blobs is not None:
24- for info in self.disk_blobs.itervalues():
25- if info[-1] is not None:
26- os.unlink(info[-1])
27- self.disk_blobs = None
28- if self.small_blobs is not None:
29- self.small_blobs.close()
30- self.small_blobs = None
31- if self.tempdir is not None:
32- shutil.rmtree(self.tempdir)
33-
34-
35 class CacheManager(object):
36
37 _small_blob_threshold = 25*1024

Subscribers

People subscribed via source and target branches