/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: Jelmer Vernooij
  • Date: 2020-03-22 20:02:36 UTC
  • mto: (7490.7.7 work)
  • mto: This revision was merged to the branch mainline in revision 7501.
  • Revision ID: jelmer@jelmer.uk-20200322200236-fsbl91ktcn6fcbdd
Fix tests.

Show diffs side-by-side

added added

removed removed

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