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

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-07-18 18:25:57 UTC
  • mfrom: (7047.2.1 encoding-no-extensions)
  • Revision ID: breezy.the.bot@gmail.com-20180718182557-b5ak1z4z6umj073a
Defer sorting paths until utf8 encoding has happened.

This fixes the testsuite when run without extensions built. The only tests that
fail without this change are under
breezy.tests.per_workingtree.test_workingtree.TestIllegalPaths

Merged from https://code.launchpad.net/~jelmer/brz/encoding-no-extensions/+merge/349776

Show diffs side-by-side

added added

removed removed

Lines of Context:
1900
1900
 
1901
1901
        dirblock = []
1902
1902
        append = dirblock.append
1903
 
        for name in sorted(_listdir(top)):
 
1903
        for name in _listdir(top):
1904
1904
            try:
1905
1905
                name_utf8 = _utf8_encode(name)[0]
1906
1906
            except UnicodeDecodeError:
1910
1910
            statvalue = _lstat(abspath)
1911
1911
            kind = _kind_from_mode(statvalue.st_mode)
1912
1912
            append((relprefix + name_utf8, name_utf8, kind, statvalue, abspath))
1913
 
        return dirblock
 
1913
        return sorted(dirblock)
1914
1914
 
1915
1915
 
1916
1916
def copy_tree(from_path, to_path, handlers={}):