W. Trevor King [Sat, 18 Jul 2009 15:49:05 +0000 (11:49 -0400)]
Starting to seperate message handling in be-handle-mail.
The goal being to make handling commands differently easier, rather
than just passing off the whole interface to becommands.
W. Trevor King [Sat, 18 Jul 2009 15:10:27 +0000 (11:10 -0400)]
Normalized whitespace in be-handle-mail and send_pgp_mime.py.
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)
W. Trevor King [Sat, 18 Jul 2009 15:03:43 +0000 (11:03 -0400)]
be-handle-mail now handles non-text comments.
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.
W. Trevor King [Sat, 18 Jul 2009 14:48:37 +0000 (10:48 -0400)]
In be-handle-mail, don't mess with stdin if the command doesn't need it.
This fixes problems with StringIO(None).
W. Trevor King [Sat, 18 Jul 2009 14:45:13 +0000 (10:45 -0400)]
In be-handle-mail, give new bug summary via command line.
Fixes incorrect implementation of _comment_ bodies via stdin in my
wking@drexel.edu-
20090718143517-mkd6toxmcoij3qwk
commit.
W. Trevor King [Sat, 18 Jul 2009 14:42:54 +0000 (10:42 -0400)]
Merged some bugfixes from be.wtk-rr
W. Trevor King [Sat, 18 Jul 2009 14:41:11 +0000 (10:41 -0400)]
Import sys in becommands/new.py.
Required for reading the bug summary string from stdin.
W. Trevor King [Sat, 18 Jul 2009 14:35:17 +0000 (10:35 -0400)]
For be-handle-mail, pass comment body in via a temporary stdin.
This avoids decode-recode issues inside libbe.cmdutil.execute(), as
well as problems due to large comment bodies.
W. Trevor King [Sat, 18 Jul 2009 14:29:11 +0000 (10:29 -0400)]
Fixed broken path in libbe.rcs.RCS._rcs_get_file_contents(binary=True).
I'd forgotten to prefix the directory root, so calling
be show --only-raw-body COMMIT-ID
would fail if you weren't executing it in the repository root.
W. Trevor King [Sat, 18 Jul 2009 14:03:48 +0000 (10:03 -0400)]
Corrected author_addr -> info["author_addr"] in be-handle-mail
W. Trevor King [Sat, 18 Jul 2009 13:51:17 +0000 (09:51 -0400)]
Fixed typo in one of be-handle-mail's InvalidCommand calls.
Also restored Makefile target to home (from local), which I'd
accidentally committed two commits ago...
W. Trevor King [Sat, 18 Jul 2009 13:47:46 +0000 (09:47 -0400)]
Allow external override of libbe.encoding.get_encoding().
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.
W. Trevor King [Sat, 18 Jul 2009 13:36:23 +0000 (09:36 -0400)]
Fixed some missing references in be-handle-mail.InvalidSubject
W. Trevor King [Sat, 18 Jul 2009 13:31:44 +0000 (09:31 -0400)]
Hardcoded UTF-8 encoding in be-handle-mail.
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.
W. Trevor King [Sat, 18 Jul 2009 13:21:03 +0000 (09:21 -0400)]
Added "to_unicode" to send_pgp_mime.flatten()
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
W. Trevor King [Sat, 18 Jul 2009 13:04:25 +0000 (09:04 -0400)]
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.
W. Trevor King [Sat, 18 Jul 2009 12:47:11 +0000 (08:47 -0400)]
Added send_pgp_mime.Mail.encodedMIMEText() for unicode handling.
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
W. Trevor King [Sat, 18 Jul 2009 12:23:13 +0000 (08:23 -0400)]
Fixed options.logfile -> logpath typo in be-handle-mail.open_logfile().
W. Trevor King [Sat, 18 Jul 2009 11:43:29 +0000 (07:43 -0400)]
Better unicode handling in be-handle-mail.
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)
W. Trevor King [Sat, 18 Jul 2009 10:50:40 +0000 (06:50 -0400)]
Added tracebacks to be-handle-mail's "uncaught exceptions".
W. Trevor King [Fri, 17 Jul 2009 13:09:44 +0000 (09:09 -0400)]
Added an email interface example requesting unicode comment output.
Indeed, be-handle-mail chokes... :(
W. Trevor King [Fri, 17 Jul 2009 13:00:54 +0000 (09:00 -0400)]
Added "be-handle-mail --logfile LOGFILE" for sane logfile handling.
The previous setup had been pretty wimpy; now there's a degree of
flexibility.
W. Trevor King [Fri, 17 Jul 2009 12:24:33 +0000 (08:24 -0400)]
Added symlinks to libbe and becommands in interfaces/email/interactive.
With this set-up, be-handle-mail run from its own directory will load
your working-state BE setup, not your system-wide BE installation.
W. Trevor King [Fri, 17 Jul 2009 12:21:49 +0000 (08:21 -0400)]
Setup be-handle-mail.BE_DIR to point to the BE repo by default.
At least, it points to the directory where be-handle-mail lives. If
you haven't moved it, that will be somewhere inside the BE repository.
This removes my hardcoded BE_DIR.
W. Trevor King [Fri, 17 Jul 2009 12:16:45 +0000 (08:16 -0400)]
"be-handle-mail --output" added to support easy testing.
W. Trevor King [Thu, 16 Jul 2009 13:13:07 +0000 (09:13 -0400)]
Removed debugging reply-address adjustment from be-handle-mail.
Everything seems to be working now. On to the remote tests ;).
W. Trevor King [Thu, 16 Jul 2009 11:34:31 +0000 (07:34 -0400)]
be-hand-mail now catches errors and sends appropriate responses.
W. Trevor King [Thu, 16 Jul 2009 10:40:55 +0000 (06:40 -0400)]
Now be-handle-mail successfully catches stdout/stderr.
W. Trevor King [Thu, 16 Jul 2009 09:50:31 +0000 (05:50 -0400)]
Renamed test->manipulate_encodings in becommands.*.execute.
Reminder from my initial libbe/encoding.py commit:
Because of the stdout replacement, the doctests executes now need an
optional 'test' argument to turn off replacement during the doctests,
otherwise doctest flips out (since it had set up stdout to catch
output, and then we clobbered it's setup).
I'm also trying to catch stdout/stderr from be-handle-mail, and I ran
into the same problem. It took me a bit to remember exactly what
"test" was supposed to do, so I thought I'd make the argument name
more specific. If you need other changes when running in "test" mode,
you'll have to add other kwargs.
W. Trevor King [Wed, 15 Jul 2009 19:50:58 +0000 (15:50 -0400)]
Oops again, removed some old debugging logging
W. Trevor King [Wed, 15 Jul 2009 19:48:55 +0000 (15:48 -0400)]
Oops, the header keys in be-handle-mail should all be unicode.
Even though I convert to ascii in send_pgp_mime.Mail.__init__(), it's
still good to be consistent inside each module ;).
W. Trevor King [Wed, 15 Jul 2009 19:45:27 +0000 (15:45 -0400)]
be-handle-mail succesfully sends replies.
Although I'm not catching stdout/stderr yet, so the replies aren't
very useful ;). Still it the send_pgp_mime.py interface is working :).
I've added rudimentary logging (via LOGFILE) to keep track of what
be-handle-mail is up to. There's also BE_DIR, which sets the
directory that BE lives in (important ;).
The author handling got more consistent, thanks to
send_pgp_mime.source_email (using the new return_realname option) and
email.utils.formataddr(). Now author_addr should look the same
regardless of which phrasing you use to set it (e.g. "NAME <ADDR>" vs
"ADDR (NAME)", and possibly others.)
W. Trevor King [Wed, 15 Jul 2009 19:33:36 +0000 (15:33 -0400)]
Adjusted _procmailrc to not match reply emails.
You might want to keep the output to read later ;).
W. Trevor King [Wed, 15 Jul 2009 19:13:39 +0000 (15:13 -0400)]
Add unicode-header handling to send_pgp_mime.py
Also:
Switched
email.message_from_string()
to
email.parser.Parser().parsestr()
for parsing the header, for access to the headersonly option.
Adjusted module import order to alphebetize non-mime email modules.
Added return_realname to source_email(), which makes it more useful to
be-handle-mail (currently uncommitted).
Added a doctest for the plain() output and removed redundant
Content-Type line from the doctests (which we'd removed from the
output with the last commit).
Note that many doctests _will_fail_ unless me@big.edu and you@big.edu
are in your gpg keyring. At some point I should make those addresses
options to --test...
W. Trevor King [Wed, 15 Jul 2009 18:06:03 +0000 (14:06 -0400)]
Minor tweaks in send_pgp_mime.py
* No reason to set maxheaderlen to something other than the default.
* MIMEText sets content-type and charset automatically.
W. Trevor King [Wed, 15 Jul 2009 17:18:19 +0000 (13:18 -0400)]
Added --mode=plain option to send_pgp_mime.
Also a few more tweaks to get things working. I think be-handle-mail
is parsing the incoming messages correctly now, but I'm not getting
replies back for some reason. Some of the adjustments:
* Moved send_pgp_mime -> send_pgp_mime.py, otherwise Python doesn't
recognize it as an importable module.
* I use postfix now instead of msmtp, so send_pgp_mime.sendmail now
points to postfix's sendmail-compatable frontend.
* Added "--mode=plain" option to send_pgp_mime.py, so I can test
my procmail rules and send_pgp_mime itself without worrying about
be-handle-mail.
* Fixed some typos in be-handle-mail.
W. Trevor King [Wed, 15 Jul 2009 16:43:34 +0000 (12:43 -0400)]
First attempt at real response email.
W. Trevor King [Wed, 15 Jul 2009 16:10:19 +0000 (12:10 -0400)]
Added some comments to send_pgp_mime
W. Trevor King [Wed, 15 Jul 2009 13:55:20 +0000 (09:55 -0400)]
Incorperated send_pgp_mime into be-handle-mail.
Todo: generate a real response email to replace the current dummy
email.
W. Trevor King [Wed, 15 Jul 2009 13:43:34 +0000 (09:43 -0400)]
Ran update_copyright.sh on be-handle-mail and send_pgp_mime.
W. Trevor King [Wed, 15 Jul 2009 13:37:52 +0000 (09:37 -0400)]
Added my send_pgp_mime module to the project.
This is a bit of a shameless plug, since there's not much motivation
for encrypting bug emails. However, I've already written it, and it
does send emails, so I'm using it ;). Perhaps some company will want
to keep the bug submitter's contact information securely in a BE
database. Anyhow, there's very little reason to _not_ use PGP, and
the module certainly doesn't force you to encrypt anything. ;)
W. Trevor King [Wed, 15 Jul 2009 13:32:35 +0000 (09:32 -0400)]
Don't install xml tools (e.g. be-xml-to-mbox, cattmutt, ...).
There are lots of interfaces. They should each have seperate
installation targets, to allow the user to pick only the interfaces
they expect to use.
W. Trevor King [Tue, 14 Jul 2009 21:10:51 +0000 (17:10 -0400)]
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.
W. Trevor King [Tue, 14 Jul 2009 21:09:32 +0000 (17:09 -0400)]
Added --author and --alt-id to "be comment".
You could already add this info via the --xml input, now you can do it
from the command line too.
W. Trevor King [Tue, 14 Jul 2009 20:04:19 +0000 (16:04 -0400)]
Removed xml.sax cruft from be-mbox-to-xml
W. Trevor King [Tue, 14 Jul 2009 19:49:58 +0000 (15:49 -0400)]
Added _procmailrc file for interactive email handling.
The beginnings of an interactive email interface to BE.
With a working procmail setup, copying _procmailrc to ~/.procmailrc
should sort through incoming email to that user, passing all messages
with subjects starting with [be-mail] on to the script be-handle-mail
and deleting the rest.
Now I just need to write be-handle-mail ;).
W. Trevor King [Tue, 14 Jul 2009 19:27:32 +0000 (15:27 -0400)]
Merged directory reorganization
W. Trevor King [Tue, 14 Jul 2009 19:25:44 +0000 (15:25 -0400)]
libbe/_version.py made PHONY in Makefile.
It should be updated after bzr commits, but Makefile doesn't
understand bzr, so just update every time.
W. Trevor King [Tue, 14 Jul 2009 19:24:18 +0000 (15:24 -0400)]
Updated Makefile to match new organization
W. Trevor King [Tue, 14 Jul 2009 19:18:07 +0000 (15:18 -0400)]
Reorganized directory structure, mostly to put all the interfaces in
one place and make things clearer to the uninitiated. Here's my
current understanding:
.
|-- libbe (the guts of BE)
|-- becommands (plugins for all "be *" commands)
|-- doc (documentation, currently just the man page)
|-- interfaces (non-commandline interface implementations)
| |-- web
| | |-- Bugs-Everywhere-Web (in Turbogears)
| |-- gui
| | |-- beg (in Tkinter)
| | `-- wxbe (in WX)
| |-- email
| `-- xml (xml <-> whatever conversion)
`-- misc (random odds and ends)
`-- completion (shell completion scripts)
Note that I haven't attempted to use the web or gui interfaces in a
while, so I'm not sure how well they're holding vs the core
development.
W. Trevor King [Tue, 14 Jul 2009 18:34:40 +0000 (14:34 -0400)]
Updated README to match current status.
Mostly updated the list of supported VCSs.
Also corrected spacing inconsistency in README.dev.
W. Trevor King [Tue, 14 Jul 2009 12:13:47 +0000 (08:13 -0400)]
Updated GPLv2 to current GPLv2.
Fixes Ben's bug
00f26f04-9202-4288-8744-
b29abc2342d6.
I also tweaked update_copyright.sh to make possible future
copyright-blurb revision easier. The new algorithm is greedier,
overwriting _all_ consecutive comments after a '^# Copyright' line, so
do
# Copyright
# GPL ... GPL ... GPL
# Your comment here...
not
# Copyright
# GPL ... GPL ... GPL
#
# Your comment here...
Without the blank line, your comment would get overwritten by the next
run of update_copyright.sh.
Note that catmutt is ignored by update_copyright.sh because Moritz
Barsnick has only licensed his grepm code under the GPLv2 (not
GPLv>=2). See the initial catmutt commit for details.
W. Trevor King [Tue, 14 Jul 2009 10:54:42 +0000 (06:54 -0400)]
Updated setup.py url and switched to rolling version names.
Alex Miller [Tue, 14 Jul 2009 10:22:54 +0000 (06:22 -0400)]
Merged Alex Miller's git-config-not-found patch
W. Trevor King [Mon, 13 Jul 2009 11:46:58 +0000 (07:46 -0400)]
Fixed "be --dir --complete"
W. Trevor King [Mon, 13 Jul 2009 11:32:11 +0000 (07:32 -0400)]
Added --dir option to "be"
W. Trevor King [Mon, 13 Jul 2009 11:23:16 +0000 (07:23 -0400)]
Use CmdOptionParser in "be".
All the becommands have been using cmdutil CmdOptionParser for a long
time, but "be" parsed its options by hand. Now it used
CmdOptionParser, which makes adding new options much easier.
W. Trevor King [Sun, 12 Jul 2009 19:27:40 +0000 (15:27 -0400)]
Added (commented out) /usr/local PREFIX to Makefile.
I got a bit confused and installed be into "/usr/local " instead of
"/usr/local" with
PREFIX = /usr/local # ${HOME}
With the alternate PREFIX line right there, there should be less
temptation to do again :p.
W. Trevor King [Sun, 12 Jul 2009 18:32:55 +0000 (14:32 -0400)]
Added "be comment --xml --ignore-missing-references ID COMMENT".
Now you don't have to edit them out by hand.
W. Trevor King [Sun, 12 Jul 2009 17:56:05 +0000 (13:56 -0400)]
be-mbox-to-xml passes attributes on to each part of multipart messages.
Previously "message[<some-attr>]" just returned None if it wasn't set
for that message part, which overwrote anything passed in through
fields.
"from" and "date" added to list of attributes passed along.
For be-xml-to-mbox, "alt-id" was added to Comment._attrs,
and Comment.print_to_mbox was adjusted to handle the case where
we have no information about the parent bug.
With all of this, I can complete the loop
be-mbox-to-xml example.mbox | be-xml-to-mbox > example2.mbox
without errors :p.
Finally, be-xml-to-mbox has been adjusted to also work on files (it
had previously only handled data via stdin). We can't add stdin
handling to be-mbox-to-xml though, because the mailbox package needs
an actual file to work on, and I haven't setup a tmpfile workaround
yet...
W. Trevor King [Sun, 12 Jul 2009 17:12:08 +0000 (13:12 -0400)]
Altered be-xml-to-mbox to work with non-ASCII input.
Now it runs off xml.etree instead of xml.sax.
Removed "No matching bugs found" from "be list --xml" output.
W. Trevor King [Sun, 12 Jul 2009 13:50:24 +0000 (09:50 -0400)]
Added timezone handling to libbe.utility.str_to_time.
W. Trevor King [Sun, 12 Jul 2009 13:05:05 +0000 (09:05 -0400)]
Not escaping whitespace (e.g. endlines) outside the XML document root.
ElementTree.XML was choking on them. I should unescape all whitespace
(e.g. tabs, etc.), but I'm lazy and don't have any XML that's strange
enough to need it ;).
W. Trevor King [Sun, 12 Jul 2009 12:52:50 +0000 (08:52 -0400)]
Minor fixes to get unittests working again.
W. Trevor King [Sun, 12 Jul 2009 12:38:40 +0000 (08:38 -0400)]
Added be-mbox-to-xml.
Reworked to allow "be comment" to handle unicode strings (see bug
e4ed63f6-9000-4d0b-98c3-
487269140141). The solution was to escape all
the unicode to produce and ASCII string before calling
ElementTree.XML, and then converting back to unicode afterwards.
Added a unicode-containing comment to the end of bug
f7ccd916-b5c7-4890-a2e3-
8c8ace17ae3a so that there's a handy unicode
comment for testing.
XML headers (e.g. '<?xml version="1.0" encoding="UTF-8" ?>') are
now added to all xml output from be.
Switched non-text/* encoding library to base64 instead of
email.encoders, which makes that code in libbe/comment.py simpler.
Changed libbe/mapfile.py error encoding from string_escape to
unicode_escape so it can handle unicode.
Everything's still untested, and be-xml-to-mbox doesn't handle unicode
yet, but I felt this commit was getting a bit unwieldy ;).
W. Trevor King [Sat, 11 Jul 2009 14:09:27 +0000 (10:09 -0400)]
Went through "closed" bugs looking for miss-categorized bugs.
Found a few that were actually "fixed" and one that I reopened.
Perhaps we should add a "merged" status to the default, so that the
merged bugs don't clutter up the closed bugs category...
W. Trevor King [Sat, 11 Jul 2009 13:46:38 +0000 (09:46 -0400)]
Updating "be set --help" and "be status --help".
I don't really like the "defaults to None" for the settings that have
funky initialization procedures (most of them :p), but I'm not sure
how to handle that cleanly yet. Perhaps
be set --current
I also need to find a method of adding complicated settings like the
nested lists for severities, etc from the "be set" commandline.
W. Trevor King [Sat, 11 Jul 2009 12:13:34 +0000 (08:13 -0400)]
Removed <abentley@panoramicfeedback.com> from copyright blurbs.
These didn't work with my update_copyright.sh.
I went with
Aaron Bentley and Panometrics, Inc.
instead of
Aaron Bentley <abentley@panoramicfeedback.com> and Panometrics, Inc.
just because of line length, but I'm open to convincing if people
prefer the latter...
W. Trevor King [Sat, 11 Jul 2009 12:01:45 +0000 (08:01 -0400)]
"be comment --xml" now translates comment uuids to alt_ids.
W. Trevor King [Sat, 11 Jul 2009 11:46:22 +0000 (07:46 -0400)]
Adjustments to new versioned_property behavior.
Also adjusted libbe/comment.py to move to user-specified alt_ids,
rather than uuids.
W. Trevor King [Sat, 11 Jul 2009 11:13:17 +0000 (07:13 -0400)]
Fixed versioned_property(default=None, generator=None) defaults.
Now the behavior conforms to the docstring:
If both default and generator are None, then the property will be a
defaulting property which defaults to None.
W. Trevor King [Sat, 11 Jul 2009 10:46:49 +0000 (06:46 -0400)]
Fixed minor doctest failure in cmdutil.py
W. Trevor King [Sat, 11 Jul 2009 10:39:48 +0000 (06:39 -0400)]
Merged "be comment --xml" code from home.
W. Trevor King [Fri, 10 Jul 2009 21:58:49 +0000 (17:58 -0400)]
seems to work ;)
W. Trevor King [Fri, 10 Jul 2009 18:14:24 +0000 (14:14 -0400)]
Save whole bugdir in becommands/tag.py.
It doesn't matter now, but at some point Bugdir might implement some
sort of repo-wide caching which would need to be saved. The
BugDir.save() method should be intelligent enough to not save things
that have not changed, so efficiency should not be effected either.
W. Trevor King [Fri, 10 Jul 2009 18:11:23 +0000 (14:11 -0400)]
Simplified error handling in ./be
Removed superfluous nesting in ./be's error catching. Also replaced
KeyErrors due to unknown commands with the more specific
cmdutil.UnknownCommand, since all sorts of programming errors can
raise KeyErrors.
Untested, since my working tree is a mess at the moment, but what
could go wrong? ;)
W. Trevor King [Wed, 8 Jul 2009 02:18:56 +0000 (22:18 -0400)]
Added new-bug-from-stdin to mirror comments-from-stdin.
W. Trevor King [Mon, 6 Jul 2009 20:15:09 +0000 (16:15 -0400)]
Added "be show --only-raw-body COMMENT-ID".
W. Trevor King [Mon, 6 Jul 2009 19:54:13 +0000 (15:54 -0400)]
Added ability to show individual comments with "be show".
W. Trevor King [Thu, 2 Jul 2009 02:37:57 +0000 (22:37 -0400)]
"be init [ROOTDIR]" -> "be init [--root ROOTDIR]"
Following Ben's Wed, 01 Jul 2009 11:31:51 +1000 suggestion.
W. Trevor King [Thu, 2 Jul 2009 02:21:52 +0000 (22:21 -0400)]
Updated darcs put command for darcs >= 2.2.0, following Chris' report
W. Trevor King [Thu, 2 Jul 2009 02:20:32 +0000 (22:20 -0400)]
Updated copyright blurbs and AUTHORS and included script for future updates
W. Trevor King [Tue, 30 Jun 2009 23:40:01 +0000 (19:40 -0400)]
"be set-root" changed to "be init"
On the advice of
Martin F Krafft <madduck@debian.org>
as posted in
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=477125
on
Fri, 12 Jun 2009 17:03:02 +0200
W. Trevor King [Tue, 30 Jun 2009 19:26:56 +0000 (15:26 -0400)]
"be comment" now handles the default options.content_type.
Previously it choked when options.content_type == None.
I'm not sure how that made it past test_usage.sh...
W. Trevor King [Tue, 30 Jun 2009 15:54:56 +0000 (11:54 -0400)]
Add "--show-status" flag to "be depend"
W. Trevor King [Tue, 30 Jun 2009 15:29:06 +0000 (11:29 -0400)]
Added darcs support.
I don't know much darcs, so I make no claims about the beauty of my
implementation. It seems to get the job done though, until a darcs
guru comes along.
I also tweaked the libbe.git.Git._rcs_get_user_id to handle the case
where user.name or user.email are not set.
I also added the option to pass a stdin string into the
libbe.rcs.RCS._u_invoke* functions.
W. Trevor King [Tue, 30 Jun 2009 15:00:46 +0000 (11:00 -0400)]
Remove blank line from bug.xml() output when bug has no comments.
W. Trevor King [Fri, 26 Jun 2009 13:27:50 +0000 (09:27 -0400)]
Added ability to handle non text/* MIME types.
The main problem was the encoding/decoding that was happening to _all_
input/output. Now many I/O activities have a `binary' option to
disable any encoding/decoding. The `binary' flag is set whenever the
comment content-type is not a text/* type.
In order to print valid XML (and make life easy on xml/be-xml-to-mbox),
non text/* types are printed out as base64-encoded MIME messages, so
be list --xml | be-xml-to-mbox | catmutt
works as you'd expect.
With the standard (non-XML) output from `be show', we just print a
message telling the user that we can't reasonably display the MIME
type and that they should use the XML output if they want to see it.
W. Trevor King [Fri, 26 Jun 2009 01:57:02 +0000 (21:57 -0400)]
Updated help strings, man page, and completions
wking [Thu, 25 Jun 2009 21:10:57 +0000 (17:10 -0400)]
Fixed libbe.rcs.RCS.installed to handle missing backend binary.
This makes all the failed tests understandable, since they all crash
with strings like:
AssertionError: Arch RCS not found
Which makes more sense than spitting out the raw CommandError.
It also means that installed_rcs() actually works now ;).
W. Trevor King [Thu, 25 Jun 2009 17:42:19 +0000 (13:42 -0400)]
Updated .bzringore and Makefile.GENERATED_FILES
W. Trevor King [Thu, 25 Jun 2009 17:31:31 +0000 (13:31 -0400)]
Added auto-generated version info. (be --version)
W. Trevor King [Thu, 25 Jun 2009 17:30:23 +0000 (13:30 -0400)]
Remove blank line from tag's output if no tags exist
W. Trevor King [Thu, 25 Jun 2009 14:05:25 +0000 (10:05 -0400)]
Added regexp matching to `be list --extra-strings'
W. Trevor King [Thu, 25 Jun 2009 13:51:41 +0000 (09:51 -0400)]
Added extra_strings functionality to libbe.bug.xml and be-xml-to-mbox.
W. Trevor King [Thu, 25 Jun 2009 13:11:32 +0000 (09:11 -0400)]
Merged extra-strings branch, adding be tag/depend.
W. Trevor King [Thu, 25 Jun 2009 13:10:04 +0000 (09:10 -0400)]
Added `be depend'.
This closes bug
7ec2c071-9630-42b0-b08a-
9854616f9144. BE is now bug
free ;). At least until the next commit :p.
Writing depend.py turned up a few style points in tag.py which I also
fixed.
W. Trevor King [Thu, 25 Jun 2009 12:30:52 +0000 (08:30 -0400)]
Added `be tag --list' to list all tags.
Loading all the bugs for the list search had the side effect of
updating all the bug values files to the new YAML format.
W. Trevor King [Thu, 25 Jun 2009 12:16:47 +0000 (08:16 -0400)]
Added -e/--extra-strings option to `be list`
Now you can limit your list to bugs matching certain extra strings,
e.g. "TAG:working".
W. Trevor King [Thu, 25 Jun 2009 12:05:43 +0000 (08:05 -0400)]
Fixed settings=None bug when bug values file is blank/missing.
Just return an empty dict instead.
Steps to reproduce:
$ mkdir /tmp/BE-test
$ cd /tmp/BE-test
$ be set-root
$ be new 'having too much fun'