From c7d4427c4e3c1c9294e06d3bdfef0d40eda1ac01 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 14 Jul 2009 17:10:51 -0400 Subject: Added be-handle-mail and some example emails. So far, it parses the emails and executes the specified task. Todo: email the sender back with the output/errors/exit-status/etc. --- interfaces/email/interactive/examples/blank | 0 interfaces/email/interactive/examples/comment | 9 +++++++++ interfaces/email/interactive/examples/invalid_command | 9 +++++++++ interfaces/email/interactive/examples/invalid_subject | 9 +++++++++ interfaces/email/interactive/examples/list | 9 +++++++++ interfaces/email/interactive/examples/missing_command | 9 +++++++++ interfaces/email/interactive/examples/new | 9 +++++++++ interfaces/email/interactive/examples/show | 9 +++++++++ 8 files changed, 63 insertions(+) create mode 100644 interfaces/email/interactive/examples/blank create mode 100644 interfaces/email/interactive/examples/comment create mode 100644 interfaces/email/interactive/examples/invalid_command create mode 100644 interfaces/email/interactive/examples/invalid_subject create mode 100644 interfaces/email/interactive/examples/list create mode 100644 interfaces/email/interactive/examples/missing_command create mode 100644 interfaces/email/interactive/examples/new create mode 100644 interfaces/email/interactive/examples/show (limited to 'interfaces/email/interactive/examples') diff --git a/interfaces/email/interactive/examples/blank b/interfaces/email/interactive/examples/blank new file mode 100644 index 0000000..e69de29 diff --git a/interfaces/email/interactive/examples/comment b/interfaces/email/interactive/examples/comment new file mode 100644 index 0000000..1d60748 --- /dev/null +++ b/interfaces/email/interactive/examples/comment @@ -0,0 +1,9 @@ +From jdoe@example.com Fri Apr 18 11:18:58 2008 +Message-ID: +Date: Fri, 18 Apr 2008 12:00:00 +0000 +From: John Doe +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Subject: [be-bug] comment a1d + +We sure do. diff --git a/interfaces/email/interactive/examples/invalid_command b/interfaces/email/interactive/examples/invalid_command new file mode 100644 index 0000000..4d18f09 --- /dev/null +++ b/interfaces/email/interactive/examples/invalid_command @@ -0,0 +1,9 @@ +From jdoe@example.com Fri Apr 18 11:18:58 2008 +Message-ID: +Date: Fri, 18 Apr 2008 12:00:00 +0000 +From: John Doe +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Subject: [be-bug] close + +Dummy content diff --git a/interfaces/email/interactive/examples/invalid_subject b/interfaces/email/interactive/examples/invalid_subject new file mode 100644 index 0000000..e148d0b --- /dev/null +++ b/interfaces/email/interactive/examples/invalid_subject @@ -0,0 +1,9 @@ +From jdoe@example.com Fri Apr 18 11:18:58 2008 +Message-ID: +Date: Fri, 18 Apr 2008 12:00:00 +0000 +From: John Doe +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Subject: Spam! + +Dummy content diff --git a/interfaces/email/interactive/examples/list b/interfaces/email/interactive/examples/list new file mode 100644 index 0000000..333315f --- /dev/null +++ b/interfaces/email/interactive/examples/list @@ -0,0 +1,9 @@ +From jdoe@example.com Fri Apr 18 11:18:58 2008 +Message-ID: +Date: Fri, 18 Apr 2008 12:00:00 +0000 +From: John Doe +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Subject: [be-bug] list --status all + +Dummy content diff --git a/interfaces/email/interactive/examples/missing_command b/interfaces/email/interactive/examples/missing_command new file mode 100644 index 0000000..fefe41b --- /dev/null +++ b/interfaces/email/interactive/examples/missing_command @@ -0,0 +1,9 @@ +From jdoe@example.com Fri Apr 18 11:18:58 2008 +Message-ID: +Date: Fri, 18 Apr 2008 12:00:00 +0000 +From: John Doe +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Subject: [be-bug] abcde + +Dummy content diff --git a/interfaces/email/interactive/examples/new b/interfaces/email/interactive/examples/new new file mode 100644 index 0000000..7ac6dce --- /dev/null +++ b/interfaces/email/interactive/examples/new @@ -0,0 +1,9 @@ +From jdoe@example.com Fri Apr 18 11:18:58 2008 +Message-ID: +Date: Fri, 18 Apr 2008 12:00:00 +0000 +From: John Doe +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Subject: [be-bug] new + +Need tests for the email interface. diff --git a/interfaces/email/interactive/examples/show b/interfaces/email/interactive/examples/show new file mode 100644 index 0000000..3ff56f4 --- /dev/null +++ b/interfaces/email/interactive/examples/show @@ -0,0 +1,9 @@ +From jdoe@example.com Fri Apr 18 11:18:58 2008 +Message-ID: +Date: Fri, 18 Apr 2008 12:00:00 +0000 +From: John Doe +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Subject: [be-bug] show --xml 361 + +Dummy content -- cgit From 574dd85e5fcb6e03269d4bc3077ff1227c35b5f3 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 17 Jul 2009 09:09:44 -0400 Subject: Added an email interface example requesting unicode comment output. Indeed, be-handle-mail chokes... :( --- interfaces/email/interactive/examples/unicode | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 interfaces/email/interactive/examples/unicode (limited to 'interfaces/email/interactive/examples') diff --git a/interfaces/email/interactive/examples/unicode b/interfaces/email/interactive/examples/unicode new file mode 100644 index 0000000..e5b0775 --- /dev/null +++ b/interfaces/email/interactive/examples/unicode @@ -0,0 +1,9 @@ +From jdoe@example.com Fri Apr 18 11:18:58 2008 +Message-ID: +Date: Fri, 18 Apr 2008 12:00:00 +0000 +From: John Doe +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Subject: [be-bug] show --xml f7ccd916-b5c7-4890-a2e3-8c8ace17ae3a + +Dummy content -- cgit From 6c0b67973dd95dfdc0ddfb29edfb793773f7115c Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 18 Jul 2009 09:04:25 -0400 Subject: send_pgp_mime.py attempts to avoid UTF-8 for MIMEText messages. This keeps the transfer-encoding out of base64 if possible. Also added a "help" example to interafaces/email/interactive/examples. --- interfaces/email/interactive/examples/help | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 interfaces/email/interactive/examples/help (limited to 'interfaces/email/interactive/examples') diff --git a/interfaces/email/interactive/examples/help b/interfaces/email/interactive/examples/help new file mode 100644 index 0000000..14e887c --- /dev/null +++ b/interfaces/email/interactive/examples/help @@ -0,0 +1,9 @@ +From jdoe@example.com Fri Apr 18 11:18:58 2008 +Message-ID: +Date: Fri, 18 Apr 2008 12:00:00 +0000 +From: John Doe +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Subject: [be-bug] help + +Dummy content -- cgit From e190c53b9e1c6d749277ba73074a0db02f72b1c2 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 18 Jul 2009 17:53:20 -0400 Subject: Added new_with_comment ability to be-handle-mail. Waiting for a response so you can get the bug ID for your initial comment is silly. Now you don't have to :) --- interfaces/email/interactive/examples/new_with_comment | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 interfaces/email/interactive/examples/new_with_comment (limited to 'interfaces/email/interactive/examples') diff --git a/interfaces/email/interactive/examples/new_with_comment b/interfaces/email/interactive/examples/new_with_comment new file mode 100644 index 0000000..8bd50aa --- /dev/null +++ b/interfaces/email/interactive/examples/new_with_comment @@ -0,0 +1,11 @@ +From jdoe@example.com Fri Apr 18 11:18:58 2008 +Message-ID: +Date: Fri, 18 Apr 2008 12:00:00 +0000 +From: John Doe +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Subject: [be-bug] new + +Need tests for the email interface. + +I think so anyway. -- cgit From 170b87f3499b2c8a224dccf5927ae9b4e6be2013 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sun, 19 Jul 2009 07:57:28 -0400 Subject: Reworked be-handle-mail to be more like the Debian Bug Tracker. Changed all the example emails over to the new format. Now it's time to try them all out and fix all the bugs ;). --- interfaces/email/interactive/examples/comment | 4 +++- interfaces/email/interactive/examples/help | 9 --------- interfaces/email/interactive/examples/invalid_command | 6 ++++-- interfaces/email/interactive/examples/invalid_subject | 2 +- interfaces/email/interactive/examples/list | 4 +++- interfaces/email/interactive/examples/missing_command | 6 ++++-- interfaces/email/interactive/examples/new | 7 +++++-- interfaces/email/interactive/examples/new_with_comment | 6 ++++-- interfaces/email/interactive/examples/show | 6 ++++-- interfaces/email/interactive/examples/unicode | 6 ++++-- 10 files changed, 32 insertions(+), 24 deletions(-) delete mode 100644 interfaces/email/interactive/examples/help (limited to 'interfaces/email/interactive/examples') diff --git a/interfaces/email/interactive/examples/comment b/interfaces/email/interactive/examples/comment index 1d60748..f22e4b2 100644 --- a/interfaces/email/interactive/examples/comment +++ b/interfaces/email/interactive/examples/comment @@ -4,6 +4,8 @@ Date: Fri, 18 Apr 2008 12:00:00 +0000 From: John Doe Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Subject: [be-bug] comment a1d +Subject: [be-bug:a1d] Subject ignored We sure do. +-- +Goofy tagline ignored diff --git a/interfaces/email/interactive/examples/help b/interfaces/email/interactive/examples/help deleted file mode 100644 index 14e887c..0000000 --- a/interfaces/email/interactive/examples/help +++ /dev/null @@ -1,9 +0,0 @@ -From jdoe@example.com Fri Apr 18 11:18:58 2008 -Message-ID: -Date: Fri, 18 Apr 2008 12:00:00 +0000 -From: John Doe -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit -Subject: [be-bug] help - -Dummy content diff --git a/interfaces/email/interactive/examples/invalid_command b/interfaces/email/interactive/examples/invalid_command index 4d18f09..f2963c7 100644 --- a/interfaces/email/interactive/examples/invalid_command +++ b/interfaces/email/interactive/examples/invalid_command @@ -4,6 +4,8 @@ Date: Fri, 18 Apr 2008 12:00:00 +0000 From: John Doe Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Subject: [be-bug] close +Subject: [be-bug] -Dummy content +close +-- +Close is currently disabled for the email interface. diff --git a/interfaces/email/interactive/examples/invalid_subject b/interfaces/email/interactive/examples/invalid_subject index e148d0b..95112dd 100644 --- a/interfaces/email/interactive/examples/invalid_subject +++ b/interfaces/email/interactive/examples/invalid_subject @@ -6,4 +6,4 @@ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Spam! -Dummy content +This should elicit an "invalid header" response email. diff --git a/interfaces/email/interactive/examples/list b/interfaces/email/interactive/examples/list index 333315f..acba424 100644 --- a/interfaces/email/interactive/examples/list +++ b/interfaces/email/interactive/examples/list @@ -4,6 +4,8 @@ Date: Fri, 18 Apr 2008 12:00:00 +0000 From: John Doe Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Subject: [be-bug] list --status all +Subject: [be-bug] Subject ignored +list --status all +-- Dummy content diff --git a/interfaces/email/interactive/examples/missing_command b/interfaces/email/interactive/examples/missing_command index fefe41b..bb390fc 100644 --- a/interfaces/email/interactive/examples/missing_command +++ b/interfaces/email/interactive/examples/missing_command @@ -4,6 +4,8 @@ Date: Fri, 18 Apr 2008 12:00:00 +0000 From: John Doe Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Subject: [be-bug] abcde +Subject: [be-bug] Subject ignored -Dummy content +abcde +-- +This should elicit a "invalid command 'abcde'" response email. diff --git a/interfaces/email/interactive/examples/new b/interfaces/email/interactive/examples/new index 7ac6dce..b0bc3d7 100644 --- a/interfaces/email/interactive/examples/new +++ b/interfaces/email/interactive/examples/new @@ -4,6 +4,9 @@ Date: Fri, 18 Apr 2008 12:00:00 +0000 From: John Doe Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Subject: [be-bug] new +Subject: [be-bug:submit] Need tests for the email interface. -Need tests for the email interface. +Version: XYZ + +-- +Goofy tagline not included, and no comment added. diff --git a/interfaces/email/interactive/examples/new_with_comment b/interfaces/email/interactive/examples/new_with_comment index 8bd50aa..1077f0f 100644 --- a/interfaces/email/interactive/examples/new_with_comment +++ b/interfaces/email/interactive/examples/new_with_comment @@ -4,8 +4,10 @@ Date: Fri, 18 Apr 2008 12:00:00 +0000 From: John Doe Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Subject: [be-bug] new +Subject: [be-bug:submit] Need tests for the email interface. -Need tests for the email interface. +Version: XYZ I think so anyway. +-- +Goofy tagline not included. diff --git a/interfaces/email/interactive/examples/show b/interfaces/email/interactive/examples/show index 3ff56f4..c5f8a4d 100644 --- a/interfaces/email/interactive/examples/show +++ b/interfaces/email/interactive/examples/show @@ -4,6 +4,8 @@ Date: Fri, 18 Apr 2008 12:00:00 +0000 From: John Doe Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Subject: [be-bug] show --xml 361 +Subject: [be-bug] Subject ignored -Dummy content +show --xml 361 +-- +Can we show a bug? diff --git a/interfaces/email/interactive/examples/unicode b/interfaces/email/interactive/examples/unicode index e5b0775..f0e8001 100644 --- a/interfaces/email/interactive/examples/unicode +++ b/interfaces/email/interactive/examples/unicode @@ -4,6 +4,8 @@ Date: Fri, 18 Apr 2008 12:00:00 +0000 From: John Doe Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Subject: [be-bug] show --xml f7ccd916-b5c7-4890-a2e3-8c8ace17ae3a +Subject: [be-bug] Subject ignored -Dummy content +show --xml f7ccd916-b5c7-4890-a2e3-8c8ace17ae3a +-- +Can we handle unicode output? -- cgit From aa1bb530b3e4d587b31d8d7a99bde1f795bc4eff Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sun, 19 Jul 2009 08:36:56 -0400 Subject: be-handle-mail's new DBT-style interface handles the example emails now. --- interfaces/email/interactive/examples/invalid_subject | 2 +- interfaces/email/interactive/examples/multiple_commands | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 interfaces/email/interactive/examples/multiple_commands (limited to 'interfaces/email/interactive/examples') diff --git a/interfaces/email/interactive/examples/invalid_subject b/interfaces/email/interactive/examples/invalid_subject index 95112dd..1e2eb88 100644 --- a/interfaces/email/interactive/examples/invalid_subject +++ b/interfaces/email/interactive/examples/invalid_subject @@ -6,4 +6,4 @@ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Spam! -This should elicit an "invalid header" response email. +This should elicit an "invalid subject" response email. diff --git a/interfaces/email/interactive/examples/multiple_commands b/interfaces/email/interactive/examples/multiple_commands new file mode 100644 index 0000000..41ef730 --- /dev/null +++ b/interfaces/email/interactive/examples/multiple_commands @@ -0,0 +1,14 @@ +From jdoe@example.com Fri Apr 18 11:18:58 2008 +Message-ID: +Date: Fri, 18 Apr 2008 12:00:00 +0000 +From: John Doe +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Subject: [be-bug] Subject ignored + +help +list --status=all +list --status=fixed +show --xml 361 +-- +Goofy tagline ignored. -- cgit From 10199c74f31ee69c08cfa44aa8c8d098ee1f13fa Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sun, 19 Jul 2009 16:14:12 -0400 Subject: be-handle-mail shown to successfully commit partially-failing emails. I've added the test-case that show it. --- .../email/interactive/examples/failing_multiples | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 interfaces/email/interactive/examples/failing_multiples (limited to 'interfaces/email/interactive/examples') diff --git a/interfaces/email/interactive/examples/failing_multiples b/interfaces/email/interactive/examples/failing_multiples new file mode 100644 index 0000000..ebe5406 --- /dev/null +++ b/interfaces/email/interactive/examples/failing_multiples @@ -0,0 +1,18 @@ +From jdoe@example.com Fri Apr 18 11:18:58 2008 +Message-ID: +Date: Fri, 18 Apr 2008 12:00:00 +0000 +From: John Doe +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Subject: [be-bug] Commit message... + +new "test_bug" +new "test_bug_2" +failing-command +new "test_bug_3" + +-- +This message fails partway through, but the partial changes should be +recorded in a commit... + +Note the lack of spaces in the bug summary strings. -- cgit From a408bd6c1d631ef4c1271b8d9574e4171ae85d2b Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Mon, 20 Jul 2009 14:30:40 -0400 Subject: Added psuedo-header handling to be-handle-mail. Many psuedo-headers had been ignored. Now they are all implemented. Getting this working exposed a few bugs in error message generation for Commands with IDs in their argument list. These bugs should now be fixed. --- interfaces/email/interactive/examples/new | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'interfaces/email/interactive/examples') diff --git a/interfaces/email/interactive/examples/new b/interfaces/email/interactive/examples/new index b0bc3d7..c64db93 100644 --- a/interfaces/email/interactive/examples/new +++ b/interfaces/email/interactive/examples/new @@ -1,4 +1,4 @@ -From jdoe@example.com Fri Apr 18 11:18:58 2008 +From jdoe@example.com Fri Apr 18 12:00:00 2008 Message-ID: Date: Fri, 18 Apr 2008 12:00:00 +0000 From: John Doe @@ -7,6 +7,13 @@ Content-Transfer-Encoding: 8bit Subject: [be-bug:submit] Need tests for the email interface. Version: XYZ +Reporter: Jane Doe +Assign: Dick Tracy +Depend: 00f +Severity: critical +Status: assigned +Tag: topsecret +Target: Law&Order -- Goofy tagline not included, and no comment added. -- cgit From f0ea26424119393a7c4baea4dab215af0c7bc9c4 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Mon, 20 Jul 2009 17:37:31 -0400 Subject: Use shlex.split() to parse control lines in be-handle-mail. Split arguments following POSIX rather than at all whitespace. --- interfaces/email/interactive/examples/failing_multiples | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'interfaces/email/interactive/examples') diff --git a/interfaces/email/interactive/examples/failing_multiples b/interfaces/email/interactive/examples/failing_multiples index ebe5406..cf50211 100644 --- a/interfaces/email/interactive/examples/failing_multiples +++ b/interfaces/email/interactive/examples/failing_multiples @@ -1,4 +1,4 @@ -From jdoe@example.com Fri Apr 18 11:18:58 2008 +From jdoe@example.com Fri Apr 18 12:00:00 2008 Message-ID: Date: Fri, 18 Apr 2008 12:00:00 +0000 From: John Doe @@ -6,13 +6,11 @@ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [be-bug] Commit message... -new "test_bug" -new "test_bug_2" +new "test bug" +new "test bug 2" failing-command -new "test_bug_3" +new "test bug 3" -- This message fails partway through, but the partial changes should be recorded in a commit... - -Note the lack of spaces in the bug summary strings. -- cgit