~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/store/weave.py

  • Committer: Robert Collins
  • Date: 2005-10-20 01:05:07 UTC
  • Revision ID: robertc@robertcollins.net-20051020010507-5b7356be0f80930e
Bugfix to previous url escaping patch - include weave stores

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
# files whose id differs only in case.  That should probably be forbidden.
21
21
 
22
22
 
 
23
import errno
 
24
import os
23
25
from cStringIO import StringIO
24
 
import os
25
 
import errno
 
26
import urllib
26
27
 
27
28
from bzrlib.weavefile import read_weave, write_weave_v5
28
29
from bzrlib.weave import Weave
47
48
    def filename(self, file_id):
48
49
        """Return the path relative to the transport root."""
49
50
        if self._prefixed:
50
 
            return hash_prefix(file_id) + file_id + WeaveStore.FILE_SUFFIX
 
51
            return hash_prefix(file_id) + urllib.quote(file_id) + WeaveStore.FILE_SUFFIX
51
52
        else:
52
 
            return file_id + WeaveStore.FILE_SUFFIX
 
53
            return urllib.quote(file_id) + WeaveStore.FILE_SUFFIX
53
54
 
54
55
    def __iter__(self):
55
56
        l = len(WeaveStore.FILE_SUFFIX)