Merge lp:~jelmer/brz/encoding-no-extensions into lp:brz

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/encoding-no-extensions
Merge into: lp:brz
Diff against target: 21 lines (+2/-2)
1 file modified
breezy/osutils.py (+2/-2)
To merge this branch: bzr merge lp:~jelmer/brz/encoding-no-extensions
Reviewer Review Type Date Requested Status
Martin Packman Approve
Review via email: mp+349776@code.launchpad.net

Description of the change

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

To post a comment you must log in.
Revision history for this message
Martin Packman (gz) wrote :

Thanks!

review: Approve
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :

Running landing tests failed
https://ci.breezy-vcs.org/job/land-brz/340/

Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :

Running landing tests failed
https://ci.breezy-vcs.org/job/land-brz/342/

Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :

Running landing tests failed
https://ci.breezy-vcs.org/job/land-brz/343/

Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :

Running landing tests failed
https://ci.breezy-vcs.org/job/land-brz/344/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'breezy/osutils.py'
--- breezy/osutils.py 2018-07-13 00:21:51 +0000
+++ breezy/osutils.py 2018-07-17 18:24:46 +0000
@@ -1900,7 +1900,7 @@
19001900
1901 dirblock = []1901 dirblock = []
1902 append = dirblock.append1902 append = dirblock.append
1903 for name in sorted(_listdir(top)):1903 for name in _listdir(top):
1904 try:1904 try:
1905 name_utf8 = _utf8_encode(name)[0]1905 name_utf8 = _utf8_encode(name)[0]
1906 except UnicodeDecodeError:1906 except UnicodeDecodeError:
@@ -1910,7 +1910,7 @@
1910 statvalue = _lstat(abspath)1910 statvalue = _lstat(abspath)
1911 kind = _kind_from_mode(statvalue.st_mode)1911 kind = _kind_from_mode(statvalue.st_mode)
1912 append((relprefix + name_utf8, name_utf8, kind, statvalue, abspath))1912 append((relprefix + name_utf8, name_utf8, kind, statvalue, abspath))
1913 return dirblock1913 return sorted(dirblock)
19141914
19151915
1916def copy_tree(from_path, to_path, handlers={}):1916def copy_tree(from_path, to_path, handlers={}):

Subscribers

People subscribed via source and target branches