| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
If an exception is raised during command exection, self.ret may be
left at None.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allowed values for both are "yes" or "no", case insensitive.
Setting Confirm:no disables the confirmation email letting you know
your new bug was successfully submitted.
Setting Subscribe:yes automatically subscribes you to the new bug
you're submitting immediately, without reqiring an extra control
email.
In the case where both Confirm:yes and Subscribe:yes, the submitter
will only recieve the subscription email (which shows the "be show"
view of the new bug) and not the submission email (which shows the
output of all the executed submission commands).
Both of these pseudoheaders were in response to a
Would you like a direct response concerning your comments?
checkbox on the web frontend that generates emails for a BE repo.
When the checkbox is set, we set Confirm:yes Subscribe:yes, and the
submitter gets a nice pretty confirmation email and will be
automatically notified of any future action on their bug. When the
checkbox is not set, they get no response or submission emails.
Also fixed up some bugs in in the subscriber_emails() parsing. We now
use ordered_subscriptions to ensure that we parse the "DIR"
subscription first, since we don't want to include the same
information twice, and the user might be subscribed to DIR:all and a
particular bug (which would be wierd, but is easily avoidable). This
also ensures that the more central DIR level changes appear first in
the email.
We also check that there is an entry for a particular bug in bug_index
before attempting to grab it, which could raise KeyErrors otherwise.
Finally, we check to make sure we don't double-include bugs for which
the user is subscribed to both that bug's new and DIR:new.
A final minor correction is the capitalization of the first word of
our log entries. The logs are pretty cluttered, and the
capitalization helps the lines I care about stand out. A better
solution would be to come up with a cleaner idea of what to write to
the logs...
|
|
|
|
|
| |
Because subscribe.get_bugdir_subscribers() only looks for subscribers
in bugs that are already in memory.
|
|
|
|
|
|
| |
It had been eating the last line of the message (which wasn't a
problem when I had a blank line before the footer, but was when I had
neither footer nor trailing blank line).
|
|
|
|
|
| |
To conform with Python convention for "hiding" class attributes only
intended for internal use.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Switched from cStringIO to StringIO in be-handle-mail because:
(from http://docs.python.org/library/stringio.html)
"Unlike the memory files implemented by the StringIO module, those
provided by this [cStringIO] module are not able to accept Unicode
strings that cannot be encoded as plain ASCII strings."
I'm not sure what all the fuss with sys.__stdin__ had been about in
Command.run(), but I took it out and everything still seems to work
;).
Also fix Makefail (again!) to install under $HOME by default.
|
| |
|
| |
|
|
|
|
| |
Also fleshed out the be-handle-mail docstring.
|
|
|
|
|
| |
It had been mailing out the empty MIMEMultipart root returned by
diff_tree.report().
|
|
|
|
|
|
| |
"[" is a special character.
Also a few minor cleanups in be-handle-mail.
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, every node in the DiffTree created it's own attachment.
Now they're consolidated into a single attachment per bug. higher
level nodes are still one attachment per node.
Also:
* added send_pgp_mime.append_text()
* pulled guess_encoding() out of send_pgp_mime.encodedMIMEText().
* renamed data_string -> data_part in libbe.diff, since it needn't be a string.
|
| |
|
| |
|
| |
|
|
|
|
| |
Marked outstanding email interface bugs as fixed.
|
| |
|
|
|
|
|
| |
This still needs a lot of cleaning up, but it worked for an "all"
subscription to "DIR", so I thought I'd lock in the current status ;).
|
|
|
|
| |
Split arguments following POSIX rather than at all whitespace.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The README should give enough info to install and use the interface.
While I was writing it, I thought that be-handle-mail could use the
--be-dir, --tag-base, and --test options. generate_global_tags()
helps implement the --tag-base option.
I set up a unittest framework since checking is currently a
pipe-in-emails-by-hand sort of arrangement, which can be slow ;).
Currently only generate_global_tags() is tested.
I also restored "show" to ALLOWED_COMMANDS, since it seems to have
wandered off ;).
|
| |
|
|
|
|
| |
For example, it's helpful to actually run the autocommit command ;).
|
| |
|
|
|
|
|
|
|
|
| |
Now the final commit will run whether or not the preceding commands
raise any exceptions.
Note that since we've added the "--allow-empty" to "be commit", we
don't need to worry about empty commits after read-only actions.
|
| |
|
|
|
|
|
| |
I hadn't attached the mutipart body to the .response_header, which
meant that the reply lacked target email addresses, etc.
|
|
|
|
| |
Also restored repsonse-message logging to help track down bugs.
|
|
|
|
|
|
|
|
|
| |
Caveats:
It will produce blank commits after emails that make no changes.
Todo: --fail-on-null option to "be commit"
It will not commit changes due to emails that are partly successful.
Todo: add "be revert"
|
|
|
|
| |
The new pseudo-headers are currently ignored.
|
| |
|
|
|
|
|
| |
Changed all the example emails over to the new format.
Now it's time to try them all out and fix all the bugs ;).
|
|
|
|
|
| |
Waiting for a response so you can get the bug ID for your initial
comment is silly. Now you don't have to :)
|
| |
|
|
|
|
|
| |
Added Command and Message classes, and use new flexibility in
send_pgp_mime.py.
|
|
|
|
|
| |
The goal being to make handling commands differently easier, rather
than just passing off the whole interface to becommands.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also removed "commit after every message" from be-handle-mail,
because
a) not implemented yet
b) don't want to commit spam, since we'd have to find a way to
remove it later.
Suggested future workflow:
* "bzr diff" to poll for activity, blank output = no activity.
* on activity:
1) look at changes
2) remove whatever
3) commit email-interface repo.
4) merge changes into your private repo
* on private repo changes:
* if activity in email-interface repo:
1) deal with email activity as above
* push your private repo onto the email-interface repo
(and update the email repos' working tree, if required)
|
|
|
|
|
|
|
|
|
|
|
|
| |
This required replacing both the codec-wrapped sys.stdin _and_ the raw
sys.__stdin__ with StringIO(stdin). becommands/comment will use only
one or the other depending on the comment's content type.
Caveat: Get_body_type only grabs the body and type of the first
non-mulitpart section, which may not be what the user expects.
Todo: Add multiple comments for each part of a multipart message, like
we do in interfaces/xml/be-mbox-to-xml.
|
|
|
|
| |
This fixes problems with StringIO(None).
|
|
|
|
|
|
| |
Fixes incorrect implementation of _comment_ bodies via stdin in my
wking@drexel.edu-20090718143517-mkd6toxmcoij3qwk
commit.
|
|
|
|
|
| |
This avoids decode-recode issues inside libbe.cmdutil.execute(), as
well as problems due to large comment bodies.
|
| |
|
|
|
|
|
| |
Also restored Makefile target to home (from local), which I'd
accidentally committed two commits ago...
|
|
|
|
|
|
| |
The previous procmail encoding fix failed, because the becommand
execution checks libbe.encoding.get_encoding() on it's own, and got
the procmail encoding. This one works.
|
| |
|
|
|
|
|
|
|
| |
When run by procmail, the encoding returned by
libbe.encoding.get_encoding is ANSI_X3.4-1968, which chokes on unicode
output. I can't think of a more elegant solution than hardcoding in
the default encoding.
|
|
|
|
|
|
|
|
|
|
|
| |
be-handle-mail wants unicode output, since all it's internal
processing is done with unicode. However, the flatten calls in
send_pgp_mime work with the encoded binary string output, and
execute(sendmail, stdin=flatten(msg, to_unicode=True)) fails
with
Exception: u
while executing /usr/sbin/sendmail -t
sendmail: fatal: wking(1001): No recipient addresses found in message header
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now be-handle-mail handles examples/unicode without crashing
cat examples/unicode | ./be-handle-mail -o -l -
But the output email is encoded in base64:
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
From: BE Bugs <wking@thor.physics.drexel.edu>
To: John Doe <jdoe@example.com>
Date: Sat, 18 Jul 2009 12:22:05 +0000
Subject: [be-bug] Re: show
In-reply-to: <abcd@example.com>
UmVzdWx0cyBvZiBydW5uaW5nOiAoZXhpdCBjb2RlIDApCiAgc2hvdyAKCnN0ZG91dDoKCjw/eG1s
IHZlcnNpb249IjEuMCIgZW5jb2Rpbmc9IlVURi04IiA/Pgo8YnVnPgogIDx1dWlkPmY3Y2NkOTE2
LWI1YzctNDg5MC1hMmUzLThjOGFjZTE3YWUzYTwvdXVpZD4KICA8c2hvcnQtbmFtZT5mN2M8L3No
b3J0LW5hbWU+CiAgPHNldmVyaXR5Pm1pbm9yPC9zZXZlcml0eT4KICA8c3RhdHVzPmZpeGVkPC9z
...
This is perhaps the best we can get out of python < 3.1/2.7, see
http://bugs.python.org/issue1368247
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
be-handle-mail now gets a bit further on
cat examples/unicode | ./be-handle-mail -o -l - 2>&1 1>/dev/null
It successfully reads in unicode output from the command execution and
successfully prints that output to the log ("-l - 2>&1 1>/dev/null" sets
up the log to be printed to the terminal's stdout). However, it chokes
later on with
responding to John Doe <jdoe@example.com>: show
Traceback (most recent call last):
File "./be-handle-mail", line 274, in <module>
main()
File "./be-handle-mail", line 266, in main
response_email = compose_response(ret, out_text, err_text, info).plain()
File "./be-handle-mail", line 210, in compose_response
LOGFILE.write("\n%s\n\n" % send_pgp_mime.flatten(response_email.plain()))
File "/home/wking/src/fun/be/be.email/interfaces/email/interactive/send_pgp_mime.py", line 165, in flatten
g.flatten(msg)
File "/usr/lib/python2.5/email/generator.py" ...
...
UnicodeEncodeError: 'ascii' codec can't encode character u'\ufffd' in position 2581: ordinal not in
range(128)
|