| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
You used to get:
Uncaught exception:
'NoneType' object has no attribute 'decode'
File "./be-handle-mail", line 857, in main
m.run()
File "./be-handle-mail", line 591, in run
command.run()
File "./be-handle-mail", line 244, in run
manipulate_encodings=False)
File "/tmp/be.email-bugs/interfaces/email/interactive/libbe/cmdutil.py", line 82, in execute
ret = cmd.execute([a.decode(enc) for a in args],
A `print args' in Message.parse_comment() revealed
[..., u'--alt-id', None,...]
|
|
|
|
| |
For testing the new [be-bug:xml] interface we're about to write.
|
|
|
|
|
|
|
|
| |
Broke the bulk of show.py out into new function show.output(), which
is used by both show.py and email_bugs.py to reduce duplication of
effort and increase consistency of the XML.
Also a few relevant help string updates.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It should currently do everything that `be comment --xml` did, but it
still has a way to go before it lives up to it's longhelp string,
mostly figuring out bug/comment merging.
The allowed XML format also changed a bit, becoming a bit more
structured.
cmdutil.bug_from_shortname() renamed to cmdutil.bug_from_id().
New functions cmdutil.parse_id() and cmdutil.bug_comment_from_id().
Additional doctests in libbe.comment.Comment.comment_shortnames() to
show example output if bug_shortname==None.
Brought be-xml-to-mbox and be-mbox-to-xml up to speed on the current
<be-xml>-rooted format.
* Added <extra-string> handling to their comment handling.
* Moved extra strings from email bodies to X-Extra-String headers
(some comment bodies are not text, and we should keep the estr
location consistent between bugs and comments.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Moved comment.InvalidXML to utility.InvalidXML, so that bug and
comment can share it. Added docstring explaining the __init__
arguments.
Added indent and shortname options to Bug.xml() to match
Comment.xml().
Added .extra_strings export to Comment.xml().
Converted Bug.xml() from string addition to list joining, which avoids
a bunch of memory allocation/deallocation.
Assorted " -> ' replacements.
Elaborated doctests to check UTF-8, extra_strings, ...
Added new comparison cmp_extra_strings for both bug. and
comment.DEFAULT_CMP_FULL_CMP_LIST.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Protects agaist the off chance that the user doesn't have Arch (tla)
installed ;).
Changed Arch.name from "Arch" to "arch" so that each VCSs .name
matches the module name. This allows us to use vcs.VCS_ORDER (a list
of module names) to set up the allowed values of BugDir.vcs_name.
|
|
|
|
|
|
| |
This send a list of bugs in a single email off to be processed by
be-handle-mail. Of course, be-handle-mail doesn't yet handle the
[be-bug:xml] format that email_bugs.py creates. On to that now...
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\ |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
]
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| |
| | |
Corrects a mistake from using string replace to move output,error ->
stdout,stderr a few commits ago.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
|/ |
|
|\ |
|
| |\
| |/
|/|
| | |
- Reapplied the fix for subdirs
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 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.
|
| | | |
|
| |/
| |
| |
| | |
(i.e.: be html -o dir1/dir2 failed to create dir2 if dir1 does not exists)
|
| |\
| |/
|/| |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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...
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
cleanups.
|
| | | |
|
|/| | |
|
|\ \ \ |
|
| |\ \ \
| |/ / /
|/| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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', '')
----------------------------------------------------------------------
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| |\ \ \
| |/ / /
|/| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
*.__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()
|
| |\ \ \
| |/ / /
|/| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
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...
|