/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 bzrlib/store/__init__.py

  • Committer: Robert Collins
  • Date: 2006-06-09 09:18:56 UTC
  • mfrom: (1725.2.9 commit)
  • mto: This revision was merged to the branch mainline in revision 1757.
  • Revision ID: robertc@robertcollins.net-20060609091856-2f9fc48998d655a9
(robertc, ab)Merge some commit and fetch tuning steps.

Show diffs side-by-side

added added

removed removed

Lines of Context:
295
295
                self._check_fileid(suffix)
296
296
        else:
297
297
            suffixes = []
 
298
        fileid = self._escape_file_id(fileid)
298
299
        if self._prefixed:
299
300
            # hash_prefix adds the '/' separator
300
 
            prefix = self.hash_prefix(fileid)
 
301
            prefix = self.hash_prefix(fileid, escaped=True)
301
302
        else:
302
303
            prefix = ''
303
 
        fileid = self._escape_file_id(fileid)
304
304
        path = prefix + fileid
305
305
        full_path = u'.'.join([path] + suffixes)
306
306
        return urlutils.escape(full_path)
324
324
             for c in file_id]
325
325
        return ''.join(r)
326
326
 
327
 
    def hash_prefix(self, fileid):
 
327
    def hash_prefix(self, fileid, escaped=False):
328
328
        # fileid should be unescaped
329
 
        if self._escaped:
 
329
        if not escaped and self._escaped:
330
330
            fileid = self._escape_file_id(fileid)
331
331
        return "%02x/" % (adler32(fileid) & 0xff)
332
332