Create filename using bug numbers when downloading the diff
Review Request #694 — Created Jan. 13, 2009 and submitted
|Review Board SVN (deprecated)|
The filename used while downloading the diff should be created using the bugs closed. This makes the file name unique for every diff and save the trouble of changing the name every time the diff is downloaded.
It'd be nicer to store the generated filename in a 'filename' variable, and then set the 'Context-Disposition' to this after you've figured out what the filename is. A couple issues: 1) bugs_closed may contain bugs separated by ", " instead of just ",". Whitespace should be taken into account. You should use review_request.get_bug_list(), which does all this. 2) If there's no bugs listed, this will be "bug.diff", which isn't very helpful. We'd need a better default. 3) Space after the comma in replace(). 4) Make sure this is wrapped to less than 80 lines.