/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/annotate.py

  • Committer: Jelmer Vernooij
  • Date: 2020-02-18 01:57:45 UTC
  • mto: This revision was merged to the branch mainline in revision 7493.
  • Revision ID: jelmer@jelmer.uk-20200218015745-q2ss9tsk74h4nh61
drop use of future.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
    )
22
22
 
23
23
from .. import osutils
24
 
from ..bzr.versionedfile import UnavailableRepresentation
25
24
from ..errors import (
26
25
    NoSuchRevision,
 
26
    UnavailableRepresentation,
27
27
    )
28
28
from ..graph import Graph
29
29
from ..revision import (
30
30
    NULL_REVISION,
31
31
    )
32
32
 
33
 
from .mapping import (
34
 
    decode_git_path,
35
 
    encode_git_path,
36
 
    )
37
 
 
38
33
 
39
34
class GitBlobContentFactory(object):
40
35
    """Static data content factory.
119
114
            self.change_scanner.repository.lookup_bzr_revision_id(
120
115
                text_revision))
121
116
        text_parents = []
122
 
        path = encode_git_path(path)
 
117
        path = path.encode('utf-8')
123
118
        for commit_parent in self.store[commit_id].parents:
124
119
            try:
125
120
                (path, text_parent) = (
130
125
            if text_parent not in text_parents:
131
126
                text_parents.append(text_parent)
132
127
        return tuple([
133
 
            (decode_git_path(path),
 
128
            (path.decode('utf-8'),
134
129
                self.change_scanner.repository.lookup_foreign_revision_id(p))
135
130
            for p in text_parents])
136
131
 
168
163
                continue
169
164
            try:
170
165
                (mode, blob_sha) = tree_lookup_path(
171
 
                    store.__getitem__, tree_id, encode_git_path(path))
 
166
                    store.__getitem__, tree_id, path.encode('utf-8'))
172
167
            except KeyError:
173
168
                yield GitAbsentContentFactory(store, path, text_revision)
174
169
            else: