{"thread":{"id":"14799","subject":"extracting to/cc addresses for stg mail","startedAt":"2008-08-01T22:50:45Z","lastAt":"2008-08-05T17:43:19Z","messageCount":3,"participants":["Bjorn Helgaas","Karl Hasselström"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"85952","messageId":"200808011650.45915.bjorn.helgaas@hp.com","threadId":"14799","inReplyTo":null,"subject":"extracting to/cc addresses for stg mail","fromName":"Bjorn Helgaas","fromEmail":"bjorn.helgaas@hp.com","sentAt":"2008-08-01T22:50:45Z","receivedAt":"2008-08-01T22:50:45Z","isPatch":false,"sender":{"key":"bjorn.helgaas@hp.com","avatar":null},"body":"I'm new to stg, so maybe I'm missing the easy way to do this.\nThat said, I'd like to maintain \"To:\" fields in the patch\ndescription, like this:\n\n  Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>\n  To: Andi Kleen <andi@firstfloor.org>\n  Cc: Andrew Morton <akpm@linux-foundation.org>\n\n\"stg mail --auto\" takes care of adding Andrew to the Cc list,\nbut I have to manually deal with Andi.\n\nI've been doing that by using \"stg mail --auto -E\" and manually\nmoving the To: line to the top, but that's a hassle.  I don't\nreally want to use \"stg mail --to=\", because then I have to dig\nout the To: line contents first.  I don't really want to use\ndifferent template files, because I often have one-off self-\ncontained patches that go different places.\n\nIs there a way to make stg pay attention to my \"To:\" lines in\nthe patch description?  Or another way to accomplish this?\n\nBjorn\n"},{"id":"86272","messageId":"20080805133922.GB29499@diana.vm.bytemark.co.uk","threadId":"14799","inReplyTo":"200808011650.45915.bjorn.helgaas@hp.com","subject":"Re: extracting to/cc addresses for stg mail","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2008-08-05T13:39:22Z","receivedAt":"2008-08-05T13:39:22Z","isPatch":false,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"On 2008-08-01 16:50:45 -0600, Bjorn Helgaas wrote:\n\n> Is there a way to make stg pay attention to my \"To:\" lines in the\n> patch description? Or another way to accomplish this?\n\nIt can't do it at the moment, but it should be easy to fix. In\nstgit/commands/mail.py, the following lines\n\n    if options.auto:\n        extra_cc = __get_signers_list(descr)\n    else:\n        extra_cc = []\n\nadd the extra CC addresses. You could augment __get_signers_list to\nreturn a tuple of to and cc addresses instead of just cc addresses,\npass those addesses to the same place extra_cc is fed now, and that's\nit.\n\nIf you really hate Python, don't have time, etc., I can do it for you\n(as long as you agree to test it) -- just ask -- but I try to take\nevery opportunity to get people to contribute patches. :-)\n\n-- \nKarl Hasselström, kha@treskal.com\n      www.treskal.com/kalle\n"},{"id":"86281","messageId":"200808051143.19683.bjorn.helgaas@hp.com","threadId":"14799","inReplyTo":"20080805133922.GB29499@diana.vm.bytemark.co.uk","subject":"Re: extracting to/cc addresses for stg mail","fromName":"Bjorn Helgaas","fromEmail":"bjorn.helgaas@hp.com","sentAt":"2008-08-05T17:43:19Z","receivedAt":"2008-08-05T17:43:19Z","isPatch":false,"sender":{"key":"bjorn.helgaas@hp.com","avatar":null},"body":"On Tuesday 05 August 2008 07:39:22 am Karl Hasselström wrote:\n> On 2008-08-01 16:50:45 -0600, Bjorn Helgaas wrote:\n> \n> > Is there a way to make stg pay attention to my \"To:\" lines in the\n> > patch description? Or another way to accomplish this?\n> \n> It can't do it at the moment, but it should be easy to fix. In\n> stgit/commands/mail.py, the following lines\n> \n>     if options.auto:\n>         extra_cc = __get_signers_list(descr)\n>     else:\n>         extra_cc = []\n> \n> add the extra CC addresses. You could augment __get_signers_list to\n> return a tuple of to and cc addresses instead of just cc addresses,\n> pass those addesses to the same place extra_cc is fed now, and that's\n> it.\n> \n> If you really hate Python, don't have time, etc., I can do it for you\n> (as long as you agree to test it) -- just ask -- but I try to take\n> every opportunity to get people to contribute patches. :-)\n\nThanks for the hints.  I'll take a look at it.  It'll take me a while,\nbut it's a good excuse to try to learn a little Python.\n\nBjorn\n"}]}