~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/store/__init__.py

  • Committer: Brad Crittenden
  • Date: 2007-02-26 20:56:10 UTC
  • mfrom: (2300 +trunk)
  • mto: (2293.1.5 bzr.dev)
  • mto: This revision was merged to the branch mainline in revision 2311.
  • Revision ID: brad.crittenden@canonical.com-20070226205610-44oatbxrjjz3ajwy
merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
import bzrlib
33
33
from bzrlib import (
34
34
    errors,
 
35
    osutils,
35
36
    symbol_versioning,
36
37
    urlutils,
37
38
    )
128
129
            pb.update('preparing to copy')
129
130
        failed = set()
130
131
        count = 0
131
 
        ids = list(ids) # get the list for showing a length.
 
132
        ids = [osutils.safe_file_id(i) for i in ids] # get the list for showing a length.
132
133
        for fileid in ids:
133
134
            count += 1
134
135
            if self.has_id(fileid):
173
174
 
174
175
        f -- A file-like object
175
176
        """
 
177
        fileid = osutils.safe_file_id(fileid)
176
178
        mutter("add store entry %r", fileid)
177
179
        if isinstance(f, str):
178
180
            symbol_versioning.warn(zero_eleven % 'Passing a string to Store.add',
217
219
 
218
220
    def has_id(self, fileid, suffix=None):
219
221
        """See Store.has_id."""
 
222
        fileid = osutils.safe_file_id(fileid)
220
223
        return self._transport.has_any(self._id_to_names(fileid, suffix))
221
224
 
222
225
    def _get_name(self, fileid, suffix=None):
240
243
 
241
244
    def get(self, fileid, suffix=None):
242
245
        """See Store.get()."""
 
246
        fileid = osutils.safe_file_id(fileid)
243
247
        names = self._id_to_names(fileid, suffix)
244
248
        for name in names:
245
249
            try: