/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: Jelmer Vernooij
  • Date: 2018-07-17 18:22:15 UTC
  • mto: This revision was merged to the branch mainline in revision 7049.
  • Revision ID: jelmer@jelmer.uk-20180717182215-8w62af7e4r8hsnd9
Defer sorting paths until utf8 encoding has happened.

This fixes the testsuite when run without extensions built.

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={}):