/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: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-07-20 02:17:05 UTC
  • mfrom: (7518.1.2 merge-3.1)
  • Revision ID: breezy.the.bot@gmail.com-20200720021705-5f11tmo1hdqjxm6x
Merge lp:brz/3.1.

Merged from https://code.launchpad.net/~jelmer/brz/merge-3.1/+merge/387628

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
24
25
from ..errors import (
25
26
    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
 
33
38
 
34
39
class GitBlobContentFactory(object):
35
40
    """Static data content factory.
114
119
            self.change_scanner.repository.lookup_bzr_revision_id(
115
120
                text_revision))
116
121
        text_parents = []
117
 
        path = path.encode('utf-8')
 
122
        path = encode_git_path(path)
118
123
        for commit_parent in self.store[commit_id].parents:
119
124
            try:
120
125
                (path, text_parent) = (
125
130
            if text_parent not in text_parents:
126
131
                text_parents.append(text_parent)
127
132
        return tuple([
128
 
            (path.decode('utf-8'),
 
133
            (decode_git_path(path),
129
134
                self.change_scanner.repository.lookup_foreign_revision_id(p))
130
135
            for p in text_parents])
131
136
 
163
168
                continue
164
169
            try:
165
170
                (mode, blob_sha) = tree_lookup_path(
166
 
                    store.__getitem__, tree_id, path.encode('utf-8'))
 
171
                    store.__getitem__, tree_id, encode_git_path(path))
167
172
            except KeyError:
168
173
                yield GitAbsentContentFactory(store, path, text_revision)
169
174
            else: