1533: File Names Cut off in Diff Viewer
- Fixed
- Review Board
mda***@efficienc********* (Google Code) (Is this you? Claim this profile.) | |
david | |
Feb. 19, 2014 | |
1695 |
What version are you running? 1.0.5.1 What's the URL of the page containing the problem? What steps will reproduce the problem? 1.Create a Diff which has a path with a space in a folder name. 2.Change a binary file 3.Change a non binary file. What is the expected output? What do you see instead? The file name of the binary file is cut off after the space in the folder The file name of the non binary file is not effected. This applies to the file list and to the name directly above the file. What operating system are you using? What browser? Windows XP/Fedora 12 Opera 10.5/IE8/Firefox3.6 Please provide any additional information below.
I used post-review with GnuWin32 Diff tools. The diff is against a SVN 1.6.9 repository. The diff does show the complete path when I use the download the diff function.
Not just tied to binaries and effects other text-based files. Using Git with RB 1.5.4 Repository with a python (.py) file changed but the directory path has a space. Diff is generated via automated scripting via the following command: git diff --full-index --cached The resulting .diff file that I push to RB via rbtools contains the following lines: diff --git a/test/Python scripts/ourfile.py b/test/Python scripts/ourfile.py index <snip>..<snip> --- a/test/Python scripts/senderData.py +++ b/test/Python scripts/senderData.py Diff being added to RB succeeds. It displays the diff for a file named "test/Python". Diff displays properly, but the name is just not presented correctly. My guess is there is a regex parse on whitespace. Might be able to regex on /a and /b tokens instead?
Just a hint on where you can look at: Check the "def parse_special_header(self, linenum, info)" in reviewboard/diffviewer/parser.py Assume that you have the following in diff file: Index: /Directory One/Dir Two/File.txt I'm not sure why it does the following: >> info['index'] = self.lines[linenum].split(None, 2)[1] '/Directory' When in fact I'd expect it to behave like this: >> info['index'] = self.lines[linenum].split(None, 1)[1] '/Directory One/Dir Two/File.txt' Then in svn.py the value of info['index'] is used as file name for binary files. Similar split is in git.py but I'm not familiar with their diff format at all.