Skip to content

Commit 6269305

Browse files
committed
OTWO-1177 Fixes non-ascii filename handling in BzrlibAdapter."
Also adds an example file to test/repositories/bzr repository and a test.
1 parent 98133f1 commit 6269305

12 files changed

+33
-2
lines changed

lib/scm/adapters/bzrlib/bzrlib_pipe_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def __init__(self, repository_url):
1212
def get_file_content(self, filename, revision):
1313
rev_spec = RevisionSpec.from_string(revision)
1414
tree = rev_spec.as_tree(self.branch)
15-
file_id = tree.path2id(filename)
15+
file_id = tree.path2id(unicode(filename, 'utf8'))
1616
if file_id == None:
1717
return None
1818
content = tree.get_file_text(file_id)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6 obnox@samba.org-20090204004942-73rnw0izen42f154
1+
7 test@example.com-20111222183733-y91if5npo3pe8ifs
320 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Bazaar Graph Index 1
2+
node_ref_lists=0
3+
key_elements=1
4+
len=0
5+
Binary file not shown.
50 Bytes
Binary file not shown.
Binary file not shown.

test/repositories/bzr/Cédric.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
first file
2+
second line

0 commit comments

Comments
 (0)