File tree Expand file tree Collapse file tree 2 files changed +27
-2
lines changed
Expand file tree Collapse file tree 2 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -223,7 +223,7 @@ def export_files(tree, files):
223223 # is the blog already exported?
224224 if h in filenodes :
225225 mark = filenodes [h ]
226- final .append ((mode , mark , path ))
226+ final .append ((mode , mark , path . encode ( 'utf-8' ) ))
227227 continue
228228
229229 d = tree .get_file_text (fid )
@@ -240,7 +240,7 @@ def export_files(tree, files):
240240 print "data %d" % len (d )
241241 print d
242242
243- final .append ((mode , mark , path ))
243+ final .append ((mode , mark , path . encode ( 'utf-8' ) ))
244244
245245 return final
246246
Original file line number Diff line number Diff line change @@ -179,4 +179,29 @@ test_expect_success 'different authors' '
179179 test_cmp expected actual
180180'
181181
182+ test_expect_success ' fetch utf-8 filenames' '
183+ mkdir -p tmp && cd tmp &&
184+ test_when_finished "cd .. && rm -rf tmp && LC_ALL=C" &&
185+
186+ export LC_ALL=en_US.UTF-8
187+
188+ (
189+ bzr init bzrrepo &&
190+ cd bzrrepo &&
191+
192+ echo test >> "áéíóú" &&
193+ bzr add "áéíóú" &&
194+ bzr commit -m utf-8
195+ ) &&
196+
197+ (
198+ git clone "bzr::$PWD/bzrrepo" gitrepo &&
199+ cd gitrepo &&
200+ git ls-files > ../actual
201+ ) &&
202+
203+ echo "\"\\303\\241\\303\\251\\303\\255\\303\\263\\303\\272\"" > expected &&
204+ test_cmp expected actual
205+ '
206+
182207test_done
You can’t perform that action at this time.
0 commit comments