~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/store/compressed_text.py

  • Committer: John Arbash Meinel
  • Date: 2005-09-17 21:57:11 UTC
  • mto: (1393.2.1)
  • mto: This revision was merged to the branch mainline in revision 1396.
  • Revision ID: john@arbash-meinel.com-20050917215711-9fa31e650a1f2fd8
Got HttpTransport tests to pass. Check for EAGAIN, pass permit_failure around, etc

Show diffs side-by-side

added added

removed removed

Lines of Context:
124
124
                else:
125
125
                    failed.add(fileid)
126
126
            to_copy = new_to_copy
 
127
            #mutter('_copy_multi_text copying %s, failed %s' % (to_copy, failed))
127
128
 
128
129
        paths = [self._relpath(fileid) for fileid in to_copy]
129
130
        count = other._transport.copy_to(paths, self._transport, pb=pb)
144
145
        relpaths = (self._relpath(fid) for fid in fileids)
145
146
        return self._transport.has_multi(relpaths, pb=pb)
146
147
 
147
 
    def get(self, fileids, ignore_missing=False, pb=None):
 
148
    def get(self, fileids, permit_failure=False, pb=None):
148
149
        """Return a set of files, one for each requested entry.
149
150
        
150
 
        TODO: Write some tests to make sure that ignore_missing is
 
151
        TODO: Write some tests to make sure that permit_failure is
151
152
              handled correctly.
152
153
 
153
154
        TODO: What should the exception be for a missing file?
161
162
        rel_paths = [self._relpath(fid) for fid in fileids]
162
163
        is_requested = []
163
164
 
164
 
        if ignore_missing:
 
165
        #mutter('CompressedTextStore.get(permit_failure=%s)' % permit_failure)
 
166
        if permit_failure:
165
167
            existing_paths = []
166
168
            for path, has in zip(rel_paths,
167
169
                    self._transport.has_multi(rel_paths)):
170
172
                    is_requested.append(True)
171
173
                else:
172
174
                    is_requested.append(False)
 
175
            #mutter('Retrieving %s out of %s' % (existing_paths, rel_paths))
173
176
        else:
 
177
            #mutter('Retrieving all %s' % (rel_paths, ))
174
178
            existing_paths = rel_paths
175
179
            is_requested = [True for x in rel_paths]
176
180