aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Translated update_copyright.sh to Python update_copyright.pyW. Trevor King2009-11-192-158/+454
|
* Updated README and Bugs-Everywhere-Web/README.W. Trevor King2009-11-192-20/+22
|
* Fixed bug with unicode handling reported by Nicolas Alvarez.W. Trevor King2009-11-179-34/+48
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Date: Mon, 16 Nov 2009 20:34:50 -0300 From: Nicolas Alvarez <nicolas.alvarez@gmail.com> Subject: [Be-devel] Mercurial + BE + Unicode doesn't work My username in ~/.hgrc contains a Unicode character. When I run "be new" on a Mercurial repository, I get an unhandled Python exception: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 13: ordinal not in range(128) The following shell script should reproduce the error: #!/bin/sh repo=/tmp/`mktemp -d bug-repro.XXXX` hg init $repo cd $repo /usr/bin/printf "[ui]\nusername = Nicol\u00e1s\n" > $repo/.hg/hgrc be set-root $repo be new "Testing" rm -rf /tmp/$repo [WTK: Note that the be set-root usage is out of date, it is now be init ]
| * Use unicode_output=False in some Darcs._u_invoke_client() calls.W. Trevor King2009-11-176-21/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids the following error: ====================================================================== ERROR: Should get file contents as committed to specified revision. ---------------------------------------------------------------------- Traceback (most recent call last): File ".../libbe/vcs.py", line 860, in test_revision_file_contents_as_committed full_path, revision) File ".../libbe/vcs.py", line 339, in get_file_contents contents = self._vcs_get_file_contents(relpath,revision,binary=binary) File ".../libbe/darcs.py", line 122, in _vcs_get_file_contents status,output,error = self._u_invoke(args, stdin=major_patch) File ".../libbe/vcs.py", line 488, in _u_invoke raise CommandError(args, status, stdout, stderr) CommandError: Command failed (2): patch: **** Only garbage was found in the patch input. while executing ['patch', '--reverse', 'a/text'] After adding the unicode_output=False lines, I adjusted the VCS._u_invoke_client() definition to pass all it's kwargs automatically through to VCS._u_invoke(). To make this simpler and more consistent, I renamed the "directory" option to "cwd", and adjusted *._u_invoke() calls appropriately in several VCS backends.
| * Cleanup temp. dir. in libbe.vcs tests.W. Trevor King2009-11-171-1/+2
| |
| * "CommandStderr" -> "CommandError" in VCS._u_invoke()W. Trevor King2009-11-171-1/+1
| | | | | | | | | | Corrects a mistake from using string replace to move output,error -> stdout,stderr a few commits ago.
| * Don't attempt to convert unicode objects to strings in *._setting_attr_string()W. Trevor King2009-11-172-2/+6
| |
| * Set binary=True for mapfile file handlingW. Trevor King2009-11-171-4/+9
| | | | | | | | | | | | | | | | The YAML library produces Python string encodings of unicode objects. There's no reason to try and convert them back into Python unicode objects just to save them with binary=False, because the files are only read in to be passed into the YAML parser, which can handle the unicode characters correctly.
| * Added unicode_output option to VCS._u_invoke()W. Trevor King2009-11-171-2/+8
| |
| * rename "output","error" -> "stdout","stderr" in VCS._u_invoke()W. Trevor King2009-11-171-4/+4
|/
* Merged Gianluca's nested directory fix.W. Trevor King2009-10-241-1/+1
|\
| * - Merged Trevor branchGianluca Montecchi2009-10-221-83/+93
| |\ | |/ |/| | | - Reapplied the fix for subdirs
* | Merged Gianluca's recent `be html` work.W. Trevor King2009-10-211-49/+97
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added --export-template and --export-template-dir * Fixed index page row colors. * Fixed --index-header Also a bit of tightening on my own: * Inspired by ._write_file, wrote ._read_file and .make_dir. * Wrapped some lines to stay under 80 characters, * Stripped trailing whitespace.
| | * Fixed a typo in the --export-dir-template optionsGianluca Montecchi2009-10-211-1/+1
| | |
| | * Fixed a problem with the creation of nested directoryGianluca Montecchi2009-10-211-1/+1
| |/ | | | | | | (i.e.: be html -o dir1/dir2 failed to create dir2 if dir1 does not exists)
| * test for bzr mergegian2009-10-21288-6842/+4855
| |\ | |/ |/|
* | Merged my cleanup of Gianluca's HTML branch.W. Trevor King2009-10-206-517/+497
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a bug in binary comments (non-"text/" content-types), where the content-type wasn't being set until _after_ the save was attempted. This led to errors for non-ascii bodies (e.g. images with null characters). Note that text/html comments are included as is, so make sure they are formatted appropriately to fit into your tempate without creating invalid code. This issue could be a real pain in the neck, especially when including text/html email bodies, which might contain <body> tags, etc.. Stupid email clients that don't send a text/plain alternative...
| * | Save non-text/ comments as separate files. Inline images.W. Trevor King2009-10-201-29/+57
| | |
| * | Pass content_type to Comment.new_reply() to fix error adding non-text/ commentsW. Trevor King2009-10-202-4/+4
| | |
| * | Restructured becommands/html to make templating more flexible + general ↵W. Trevor King2009-10-201-437/+363
| | | | | | | | | | | | cleanups.
| * | General cleanup of becommands/html.pyW. Trevor King2009-10-191-172/+141
| | |
| * | Merged Gianluca's html becommand with templates.W. Trevor King2009-10-194-368/+425
|/| |
* | | Non-event merge with trunk, just to pull in that bit of historyW. Trevor King2009-10-190-0/+0
|\ \ \
| * \ \ Fix darcs testsuite failureChris Ball2009-10-066-30/+37
| |\ \ \ | |/ / / |/| | |
* | | | Oops, fixed return typo in libbe.darcs.Darcs._vcs_get_file_contents()W. Trevor King2009-10-061-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For self.parsed_version[0] >= 2, was returning the entire output of ._u_invoke_client() (status, output, and error). Now it just returns the output, which is what we want. This fixes Chris' failed test: ====================================================================== FAIL: Should get file contents as committed to specified revision. ---------------------------------------------------------------------- Traceback (most recent call last): File "libbe/vcs.py", line 852, in test_revision_file_contents_as_committed self.test_contents['rev_1'], committed_contents) AssertionError: 'Lorem ipsum' != (0, 'Lorem ipsum', '') ----------------------------------------------------------------------
* | | | Moved VCS detection from _vcs_help() to _vcs_version().W. Trevor King2009-10-066-22/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The version string is useful information to have around, while the help string is probably not. For example, we use it in darcs.Darcs._vcs_get_file_contents() to construct an incantation appropriate to the version we're dealing with.
| * | | Silence testsuite warnings, from W. Trevor King.Chris Ball2009-10-055-15/+10
| |\ \ \ | |/ / / |/| | |
* | | | Moved from *.__del__() to exclusive use of *.cleanup().W. Trevor King2009-10-055-15/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *.__del__() is run some unspecified time after the refcount for an object is reduced to zero. Sometimes that means that the rest of the world has already been deallocated, which makes life difficult, especially when Python won't attempt to construct stack traces inside *.__del__(). We were always (hopefully ;) calling del(*) anyway, so we just replace those calls with *.cleanup()
| * | | Large merge from W. Trevor King, including Gianluca's HTML export.Chris Ball2009-10-05284-2164/+6394
| |\ \ \ | |/ / / |/| | |
* | | | Set self.ret if necessary in be-handle-mail.Command.response_msg().W. Trevor King2009-09-261-0/+1
| | | | | | | | | | | | | | | | | | | | If an exception is raised during command exection, self.ret may be left at None.
* | | | Added "Confirm" and "Subscribe" pseudoheaders to be-handle-mail.W. Trevor King2009-09-261-8/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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...
* | | | Load bugs in be-handle-mail.Message.subscriber_emails().W. Trevor King2009-09-261-0/+2
| | | | | | | | | | | | | | | | | | | | Because subscribe.get_bugdir_subscribers() only looks for subscribers in bugs that are already in memory.
* | | | Fix agressive be-handle-mail.Message._strip_footer().W. Trevor King2009-09-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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).
* | | | Prefix cache attributes in be-handle-mail with underscore (_).W. Trevor King2009-09-261-5/+5
| | | | | | | | | | | | | | | | | | | | To conform with Python convention for "hiding" class attributes only intended for internal use.
* | | | Fixed invalid TAG error in becommands.subscribe.get_subscribers()W. Trevor King2009-09-261-0/+2
| | | | | | | | | | | | | | | | | | | | Check that the string has the right tag before attempting to parse it :p.
* | | | Added -a and -l options to be subscribe.W. Trevor King2009-09-261-11/+29
| | | | | | | | | | | | | | | | | | | | It's useful to have some way to see the current subscription status from the command line ;).
* | | | Added normalize_RFC_2822_date() to be-mbox-to-xml.W. Trevor King2009-09-231-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The if new_fields[u'date'] != None: bit avoids attemting to normalize missing dates (which fails). You get messages with missing dates when comment_message_to_xml() is called recursively for multipart messages. Also fixed some unicode keys (['X'] -> [u'X']) for consistency.
* | | | Added normalize_email_address() to be-mbox-to-xmlW. Trevor King2009-09-231-1/+4
| | | |
* | | | Fixed mutliple in-reply-to splitting in be-mbox-to-xmlW. Trevor King2009-09-231-1/+3
| | | |
* | | | Fixed bugdir name collision in cmdutil.bug_from_shortname()W. Trevor King2009-09-231-2/+2
| | | |
* | | | Use Bug.active to decide active status in becommands/html.pyW. Trevor King2009-09-231-1/+1
| | | |
* | | | Convert incoming text/* email payloads to unicode in be-handle-mail.W. Trevor King2009-09-232-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | os.path.isdir() -> .exists() for check for "comments" file.W. Trevor King2009-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "comments" should always be a directory if it exists, but if it is something else, be should fail rather than return an empty comment list. This fix was inspired by some browsing around in response to Thomas Habets' version of a fix for missing "bugs" directory.
* | | | Include stdout in CommandError.W. Trevor King2009-09-193-8/+9
| | | |
* | | | Fixed email.Parser typo in send_pgp_mime.py imports for Python 2.4.W. Trevor King2009-09-171-1/+1
| | | |
* | | | Added `be --verbose-version' option to print full version information.W. Trevor King2009-09-151-2/+4
| | | |
* | | | Added libbe.version, wrapping the auto-generated libbe._version.W. Trevor King2009-09-152-2/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two major benefits: 1) Programatic access to the BE version. Previously the version-string logic was internal to the commandline interface ./be, which left the other interfaces hanging. 2) Simple to override auto-generated revision id version with any string you like (by setting libbe.version._VERSION, if that's the way you want to run things or the way your packaging system requires. Note that other modules should never read libbe.version._VERSION, since it may not be defined. Instead they should use the output of libbe.version.version().
* | | | Fixed a few typos in be-handle-mailW. Trevor King2009-09-131-4/+4
| | | |
* | | | Mention commit message in interactive email README subject explaination.W. Trevor King2009-09-131-2/+2
| | | |
* | | | Explicitly set encoding to UTF-8.W. Trevor King2009-09-131-0/+3
| | | | | | | | | | | | | | | | | | | | Because otherwise we run into problems when running be from inside cron jobs.