/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 remote.py

Avoid reading everything into memory when accessing objects.

Show diffs side-by-side

added added

removed removed

Lines of Context:
116
116
        p.create_index_v2(self.path_idx)
117
117
        self.pack = Pack(basename)
118
118
        self._iter = self.pack.iterobjects()
 
119
        self.iterobjects = self.pack.iterobjects
 
120
 
 
121
    def __getitem__(self, key):
 
122
        return self.pack[key]
 
123
 
 
124
    def __contains__(self, key):
 
125
        return key in self.pack
119
126
 
120
127
    def __del__(self):
121
128
        os.remove(self.path_data)