/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/_annotator_py.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
"""Functionality for doing annotations in the 'optimal' way"""
18
18
 
19
 
from __future__ import absolute_import
20
 
 
21
19
from .lazy_import import lazy_import
22
20
lazy_import(globals(), """
 
21
 
 
22
import patiencediff
 
23
 
23
24
from breezy import (
24
25
    annotate, # Must be lazy to avoid circular importing
25
26
    graph as _mod_graph,
26
 
    patiencediff,
27
27
    )
28
28
""")
29
29
from . import (
31
31
    osutils,
32
32
    ui,
33
33
    )
34
 
from .sixish import (
35
 
    range,
36
 
    viewitems,
37
 
    )
38
34
 
39
35
 
40
36
class Annotator(object):
93
89
                    vf_keys_needed.add(key)
94
90
            needed_keys = set()
95
91
            next_parent_map.update(self._vf.get_parent_map(parent_lookup))
96
 
            for key, parent_keys in viewitems(next_parent_map):
 
92
            for key, parent_keys in next_parent_map.items():
97
93
                if parent_keys is None:  # No graph versionedfile
98
94
                    parent_keys = ()
99
95
                    next_parent_map[key] = ()
125
121
            if record.storage_kind == 'absent':
126
122
                raise errors.RevisionNotPresent(record.key, self._vf)
127
123
            this_key = record.key
128
 
            lines = osutils.chunks_to_lines(record.get_bytes_as('chunked'))
 
124
            lines = record.get_bytes_as('lines')
129
125
            num_lines = len(lines)
130
126
            self._text_cache[this_key] = lines
131
127
            yield this_key, lines, num_lines