/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 breezy/git/memorytree.py

  • Committer: Gustav Hartvigsson
  • Date: 2021-01-11 20:19:38 UTC
  • mfrom: (7526.3.2 work)
  • Revision ID: gustav.hartvigsson@gmail.com-20210111201938-omr9wjz3qdgyxe8k
MergedĀ lp:brz

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
    )
40
40
from breezy.transport.memory import MemoryTransport
41
41
 
 
42
from .mapping import (
 
43
    decode_git_path,
 
44
    encode_git_path,
 
45
    )
42
46
from .tree import MutableGitIndexTree
43
47
 
44
48
 
94
98
        while trees:
95
99
            (path, tree) = trees.pop()
96
100
            for name, mode, sha in tree.iteritems():
97
 
                subpath = posixpath.join(path, name.decode('utf-8'))
 
101
                subpath = posixpath.join(path, decode_git_path(name))
98
102
                if stat.S_ISDIR(mode):
99
103
                    self._file_transport.mkdir(subpath)
100
104
                    trees.append((subpath, self.store[sha]))
181
185
            return None
182
186
        elif stat.S_ISLNK(stat_val.st_mode):
183
187
            blob = Blob.from_string(
184
 
                self._file_transport.readlink(path).encode('utf-8'))
 
188
                encode_git_path(self._file_transport.readlink(path)))
185
189
        elif stat.S_ISREG(stat_val.st_mode):
186
190
            blob = Blob.from_string(self._file_transport.get_bytes(path))
187
191
        else: