Issue410

Title More useful filenames for patches generated from hg
Priority wish Status chatting
Superseder Nosy List eric.araujo, ezio.melotti, loewis, pitrou
Assigned To Topics

Created on 2011-07-20.15:14:57 by eric.araujo, last changed 2011-07-22.00:04:12 by eric.araujo.

Messages
msg2128 (view) Author: eric.araujo Date: 2011-07-20.15:14:56
The filenames generated by the “Create Patch” button are hashes, which are not sortable or particularly useful.  I’d suggest something like this: issue-{number}-{sequential patch number}.diff

If it’s not possible to generate sequential patch numbers, then a timestamp could do.
msg2130 (view) Author: pitrou Date: 2011-07-20.15:16:36
+1 from me :)
msg2136 (view) Author: loewis Date: 2011-07-21.20:52:52
As a consequence of that change, if somebody presses the "create patch" button again and again, it would create a new patch each time. Currently, it finds that it already has a patch for a given revision, and aborts.
msg2138 (view) Author: ezio.melotti Date: 2011-07-21.21:23:39
Adding the first few chars of the revision to the filename might solve that problem.
Even 3-4 chars should be enough if we want to keep the name short.
msg2140 (view) Author: eric.araujo Date: 2011-07-22.00:04:12
I’m okay for issue-{number}-{sequential patch number}-{first 6 chars of changeset id}.diff (the sequential number for human sorting, the 6 hex chars as unique identifier (the number 6 comes from a chat with Mercurial devs)).
History
Date User Action Args
2011-07-22 00:04:12eric.araujosetmessages: + msg2140
2011-07-21 21:23:39ezio.melottisetnosy: + ezio.melotti
messages: + msg2138
2011-07-21 20:52:52loewissetmessages: + msg2136
2011-07-20 15:16:36pitrousetstatus: unread -> chatting
messages: + msg2130
2011-07-20 15:14:57eric.araujocreate