-
-
/trunk/reviewboard/reviews/views.py (Diff revision 1) Maybe do this if the filename is just "diff"? If someone uploads a diff, it will use that filename, and it may be more descriptive (including, say, a changeset number or date or something as an identifier). In that case, I'd hate to override it with something we generate.
Create filename using bug numbers when downloading the diff
Review Request #694 — Created Jan. 13, 2009 and submitted
Information | |
---|---|
onkarshinde | |
Review Board SVN (deprecated) | |
815 | |
Reviewers | |
reviewboard | |
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.
ON
Change Summary:
Added if block to use generated filename only when diffset.name is "diff".
Diff: |
Revision 2 (+4 -1) |
---|
-
-
/trunk/reviewboard/reviews/views.py (Diff revision 2) 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.