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

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 18:10:28 UTC
  • mto: This revision was merged to the branch mainline in revision 6623.
  • Revision ID: jelmer@jelmer.uk-20170521181028-zn04pdfw0od9hfj3
Rename brzlib => breezy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
import re
32
32
import sys
33
33
 
34
 
from brzlib.lazy_import import lazy_import
 
34
from breezy.lazy_import import lazy_import
35
35
lazy_import(globals(), """
36
 
from brzlib import (
 
36
from breezy import (
37
37
    bisect_multi,
38
38
    revision as _mod_revision,
39
39
    trace,
40
40
    )
41
41
""")
42
 
from brzlib import (
 
42
from breezy import (
43
43
    debug,
44
44
    errors,
45
45
    )
46
 
from brzlib.static_tuple import StaticTuple
 
46
from breezy.static_tuple import StaticTuple
47
47
 
48
48
_HEADER_READV = (0, 200)
49
49
_OPTION_KEY_ELEMENTS = "key_elements="
394
394
    def __init__(self, transport, name, size, unlimited_cache=False, offset=0):
395
395
        """Open an index called name on transport.
396
396
 
397
 
        :param transport: A brzlib.transport.Transport.
 
397
        :param transport: A breezy.transport.Transport.
398
398
        :param name: A path to provide to transport API calls.
399
399
        :param size: The size of the index in bytes. This is used for bisection
400
400
            logic to perform partial index reads. While the size could be
798
798
 
799
799
        :param location_keys: A list of location(byte offset), key tuples.
800
800
        :return: A list of (location_key, result) tuples as expected by
801
 
            brzlib.bisect_multi.bisect_multi_bytes.
 
801
            breezy.bisect_multi.bisect_multi_bytes.
802
802
        """
803
803
        # Possible improvements:
804
804
        #  - only bisect lookup each key once