~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/store.py

  • Committer: Robert Collins
  • Date: 2005-09-27 07:24:40 UTC
  • mfrom: (1185.1.41)
  • Revision ID: robertc@robertcollins.net-20050927072440-1bf4d99c3e1db5b3
pair programming worx... merge integration and weave

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
unique ID.
25
25
"""
26
26
 
27
 
import os, tempfile, types, osutils, gzip, errno
 
27
import errno
 
28
import gzip
 
29
import os
 
30
import tempfile
 
31
import types
28
32
from stat import ST_SIZE
29
33
from StringIO import StringIO
 
34
 
30
35
from bzrlib.errors import BzrError
31
36
from bzrlib.trace import mutter
32
37
import bzrlib.ui
 
38
import bzrlib.osutils as osutils
 
39
 
33
40
 
34
41
######################################################################
35
42
# stores
129
136
        pb.update('preparing to copy')
130
137
        to_copy = [id for id in ids if id not in self]
131
138
        if isinstance(other, ImmutableStore):
132
 
            return self.copy_multi_immutable(other, to_copy, pb)
 
139
            return self.copy_multi_immutable(other, to_copy, pb, 
 
140
                                             permit_failure=permit_failure)
133
141
        count = 0
134
142
        failed = set()
135
143
        for id in to_copy:
140
148
            else:
141
149
                try:
142
150
                    entry = other[id]
143
 
                except IndexError:
 
151
                except KeyError:
144
152
                    failed.add(id)
145
153
                    continue
146
154
                self.add(entry, id)
217
225
            if e.errno != errno.ENOENT:
218
226
                raise
219
227
 
220
 
        raise IndexError(fileid)
 
228
        raise KeyError(fileid)
221
229
 
222
230
 
223
231
    def total_size(self):