~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/store/text.py

[merge] Storage filename escaping

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
 
"""
18
 
A store that keeps the full text of every version.
 
17
"""A store that keeps the full text of every version.
19
18
 
20
19
This store keeps uncompressed versions of the full text. It does not
21
20
do any sort of delta compression.
23
22
 
24
23
import os
25
24
import bzrlib.store
26
 
from bzrlib.store import hash_prefix
27
25
from bzrlib.trace import mutter
28
26
from bzrlib.errors import BzrError, NoSuchFile, FileExists
29
27
 
95
93
            raise KeyError(fileid + '-' + str(suffix))
96
94
 
97
95
        try:
98
 
            result = other._transport.copy_to([path], self._transport, 
 
96
            result = other._transport.copy_to([path], self._transport,
99
97
                                              mode=self._file_mode)
100
98
        except NoSuchFile:
101
99
            if not self._prefixed:
102
100
                raise
103
101
            try:
104
 
                self._transport.mkdir(hash_prefix(fileid)[:-1], mode=self._dir_mode)
 
102
                self._transport.mkdir(self.hash_prefix(fileid)[:-1], mode=self._dir_mode)
105
103
            except FileExists:
106
104
                pass
107
105
            result = other._transport.copy_to([path], self._transport,