/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: Gustav Hartvigsson
  • Date: 2021-01-09 21:36:27 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20210109213627-h1xwcutzy9m7a99b
Added 'Case Preserving Working Tree Use Cases' from Canonical Wiki

* Addod a page from the Canonical Bazaar wiki
  with information on the scmeatics of case
  perserving filesystems an a case insensitive
  filesystem works.
  
  * Needs re-work, but this will do as it is the
    same inforamoton as what was on the linked
    page in the currint documentation.

Show diffs side-by-side

added added

removed removed

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