/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/multiwalker.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:
17
17
"""Walk multiple trees simultaneously.
18
18
"""
19
19
 
20
 
from __future__ import absolute_import
21
 
 
22
20
from . import (
23
21
    errors,
24
22
    osutils,
25
23
    )
26
24
 
27
 
from .sixish import (
28
 
    text_type,
29
 
    viewvalues,
30
 
    )
31
 
 
32
25
 
33
26
class MultiWalker(object):
34
27
    """Walk multiple trees simultaneously, getting combined results."""
94
87
        # This is stolen from _dirstate_helpers_py.py, only switching it to
95
88
        # Unicode objects. Consider using encode_utf8() and then using the
96
89
        # optimized versions, or maybe writing optimized unicode versions.
97
 
        if not isinstance(path1, text_type):
 
90
        if not isinstance(path1, str):
98
91
            raise TypeError("'path1' must be a unicode string, not %s: %r"
99
92
                            % (type(path1), path1))
100
 
        if not isinstance(path2, text_type):
 
93
        if not isinstance(path2, str):
101
94
            raise TypeError("'path2' must be a unicode string, not %s: %r"
102
95
                            % (type(path2), path2))
103
96
        return (MultiWalker._path_to_key(path1) <
247
240
        #       might ensure better ordering, in case a caller strictly
248
241
        #       requires parents before children.
249
242
        for idx, other_extra in enumerate(self._others_extra):
250
 
            others = sorted(viewvalues(other_extra),
 
243
            others = sorted(other_extra.values(),
251
244
                            key=lambda x: self._path_to_key(x[0]))
252
245
            for other_path, other_ie in others:
253
246
                file_id = other_ie.file_id