Git Merge Request #25: Fix for #7899: downloading files with spaces in names (merged)



Something went wrong. Please, merge manually

Checking if merge is possible...

Something went wrong. Please, merge manually

LXj wants to merge 1 commit from /u/lxj/allura/ to master, 2015-07-06

Commit Date  
[f2cb2e] (42cc_7899lxj/42cc_7899) by Aleksey 'LXj' Alekseyev Aleksey 'LXj' Alekseyev

[#7899] ticket:808 Fixed downloading repo files with spaces

2015-06-28 10:18:02 Tree


  • Dave Brondsema

    Dave Brondsema - 2015-06-29

    This looks like it's on the right track, but unicode filenames present a problem. If I have a file with unicode chars in it, I get an exception: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 8: ordinal not in range(128). If you look up several lines in the code you can see that the filename is already encoded with utf-8.

    It seems like we don't have any tests around the 'raw' format code. Could you add one? See test_file in ForgeGit/forgegit/tests/functional/ as an example of fetching the whole page for a file. You can add format=raw in the URL there and change the assertions. Even better would be to use the "weird-chars.git" test repo which has a unicode named file in it. But that would require changing the underlying git repo for the test and I'm not sure how easy that is, so maybe just stick with the default test git repo.

  • Dave Brondsema

    Dave Brondsema - 2015-07-06

    Merged as part of [#7899] ib/7899 branch.



    Tickets: #7899

  • Dave Brondsema

    Dave Brondsema - 2015-07-06
    • Status: open --> merged

Log in to post a comment.