Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It's really helpful to know the context of a patch or file, so you can go back to the issue to look and see how a patch came to be and what was said about it.
One easy way to do this would be to automatically alter the file name from:
big-project-thingy.patch
to:
big-project-thing-13234.patch
where 13234 is the node ID of the issue to which it is attached.
If I uploaded another big-project-thingy.patch, it would be called:
big-project-thing-13234_0.patch
and so on.
Obviously, not a huge priority; releases as nodes stuff takes precedence, so marking as postponed. It would be nice though. :)
Comments
Comment #1
hunmonk CreditAttribution: hunmonk commentedgiven that issue followups will soon be real comments, and this will be our method of attaching files, moving this over.
Comment #2
hunmonk CreditAttribution: hunmonk commentedComment #3
mr.baileysI'm new to Drupal, so I don't know how the issue queue used to work before the entire IFAC thingy, but I'm thinking that this is no longer an issue since context for a patch/file is now provided by the comment it is attached to, right? Or am I missing something?
Comment #4
webchickSummary of bike-shed in #drupal:
[project-short-name]-[issue node id]-[issue reply number]-[name of patch].patch
like:
comment_upload-88911-4-webchick-loves-you.patch
;)
Comment #5
webchickAnd @mr.baileys: It's still an issue if you want to have a sensible management strategy for patches, ala http://www.lullabot.com/articles/strategies_for_patch_management. Otherwise you end up with patches like t_0.patch, mw_58.patch, etc. Auto-appending this data to patch filenames would make it much more obvious where they came from, when, and why.
Comment #6
dwwnetaustin accidentally committed code for this to comment_upload.module when trying to fix #379470: Change in the issue description is discarded after clicking on the attach button. However, that bug is still broken, so that code is not being deployed yet. I'm tempted to remove those parts of the revision, since we should really be handling this feature here via a separate (and reviewed) patch, instead of doing multiple things in the same commit.
Also, I'm a little worried about how the accidental code is written -- on very brief inspection, it appears to always prepend the nid and comment id. I'm in the habit of posting patches with:
[nid]-[comment_id].[description].[version].patch
(version is optional, but for stuff like "d6" or "d5" or "head", etc).
I do this both so that folks downloading the patches know what it is, but also so my own local copies are all well-named and sane so I know what's what. It'd be annoying if d.o renamed my patches to
[nid]-[comment_id]-[nid]-[comment_id]...
all the time... Probably the code should check to make sure the filename doesn't already include the data it's trying to prepend or something.
Comment #7
xjmjthorson suggests we keep in mind: #1092232: Bot needs to handle patches named for all core versions -D[678]