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
1=== modified file 'breezy/osutils.py'
2--- breezy/osutils.py 2018-07-13 00:21:51 +0000
3+++ breezy/osutils.py 2018-07-17 18:24:46 +0000
4@@ -1900,7 +1900,7 @@
5
6 dirblock = []
7 append = dirblock.append
8- for name in sorted(_listdir(top)):
9+ for name in _listdir(top):
10 try:
11 name_utf8 = _utf8_encode(name)[0]
12 except UnicodeDecodeError:
13@@ -1910,7 +1910,7 @@
14 statvalue = _lstat(abspath)
15 kind = _kind_from_mode(statvalue.st_mode)
16 append((relprefix + name_utf8, name_utf8, kind, statvalue, abspath))
17- return dirblock
18+ return sorted(dirblock)
19
20
21 def copy_tree(from_path, to_path, handlers={}):

Subscribers

People subscribed via source and target branches