{"thread":{"id":"19861","subject":"[StGit PATCH] fix stg mail %(shortlog)s order","startedAt":"2009-06-19T05:30:40Z","lastAt":"2009-06-19T05:30:40Z","messageCount":1,"participants":["Alex Chiang"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"116611","messageId":"20090619053040.GE21764@ldl.fc.hp.com","threadId":"19861","inReplyTo":null,"subject":"[StGit PATCH] fix stg mail %(shortlog)s order","fromName":"Alex Chiang","fromEmail":"achiang@hp.com","sentAt":"2009-06-19T05:30:40Z","receivedAt":"2009-06-19T05:30:40Z","isPatch":true,"sender":{"key":"achiang@hp.com","avatar":null},"body":"When using the %(shortlog)s variable, the patches are listed in\nthe cover letter in the reverse order of the actual patch series.\n\nWe should list them in the actual order of the patch series instead.\n\nSigned-off-by: Alex Chiang <achiang@hp.com>\n---\ndiff --git a/stgit/commands/mail.py b/stgit/commands/mail.py\nindex 69b19fa..abd42e4 100644\n--- a/stgit/commands/mail.py\n+++ b/stgit/commands/mail.py\n@@ -399,7 +399,7 @@ def __build_cover(tmpl, patches, msg_id, options):\n                  'totalnr':      total_nr_str,\n                  'number':       number_str,\n                  'shortlog':     stack.shortlog(crt_series.get_patch(p)\n-                                                for p in patches),\n+                                                for p in reversed(patches)),\n                  'diffstat':     gitlib.diffstat(git.diff(\n                      rev1 = git_id(crt_series, '%s^' % patches[0]),\n                      rev2 = git_id(crt_series, '%s' % patches[-1]),\n"}]}