~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/store/__init__.py

  • Committer: Robert Collins
  • Date: 2005-10-09 23:42:12 UTC
  • Revision ID: robertc@robertcollins.net-20051009234212-7973344d900afb0b
merge in niemeyers prefixed-store patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
"""
26
26
 
27
27
from cStringIO import StringIO
 
28
from zlib import adler32
28
29
 
29
30
from bzrlib.errors import BzrError, UnlistableStore, TransportNotPossible
30
31
from bzrlib.trace import mutter
307
308
    ids = [f for f in store_from]
308
309
    store_to.copy_multi(store_from, ids)
309
310
 
 
311
def hash_prefix(file_id):
 
312
    return "%02x/" % (adler32(file_id) & 0xff)
 
313